1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update path fields

This commit is contained in:
Luke Pulverenti 2015-09-06 00:53:37 -04:00
parent 8c248c229a
commit 03b5e48d4f
45 changed files with 153 additions and 198 deletions

View file

@ -78,11 +78,8 @@
<br /><br /> <br /><br />
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li> <li>
<label for="txtDashboardSourcePath">${LabelDashboardSourcePath}</label> <paper-input type="text" id="txtDashboardSourcePath" label="${LabelDashboardSourcePath}" style="display: inline-block; width: 80%;"></paper-input>
<div style="display: inline-block; width: 85%;"> <paper-icon-button id="btnSelectDashboardSourcePath" icon="search" title="${ButtonSelectDirectory}"></paper-icon-button>
<input type="text" id="txtDashboardSourcePath" />
</div>
<button id="btnSelectDashboardSourcePath" type="button" data-icon="search" data-iconpos="notext" data-inline="true">${ButtonSelectDirectory}</button>
<div class="fieldDescription">${LabelDashboardSourcePathHelp}</div> <div class="fieldDescription">${LabelDashboardSourcePathHelp}</div>
</li> </li>
</ul> </ul>

View file

@ -501,17 +501,17 @@
Size: byteSize Size: byteSize
}); });
var now = new Date().getTime();
var deferred = DeferredBuilder.Deferred(); var deferred = DeferredBuilder.Deferred();
var now = new Date().getTime();
self.get(url).done(function () { self.get(url).done(function () {
var responseTime = new Date().getTime() - now; var responseTimeSeconds = (new Date().getTime() - now) / 1000;
var bytesPerSecond = byteSize / responseTime; var bytesPerSecond = byteSize / responseTimeSeconds;
bytesPerSecond *= 1000; var bitrate = Math.round(bytesPerSecond * 8);
deferred.resolveWith(null, [bytesPerSecond]); deferred.resolveWith(null, [bitrate]);
}).fail(function () { }).fail(function () {

View file

@ -24,14 +24,12 @@
<label for="chkEnableTvSorting">${OptionEnableEpisodeOrganization}</label> <label for="chkEnableTvSorting">${OptionEnableEpisodeOrganization}</label>
</li> </li>
<li> <li>
<label for="txtWatchFolder">${LabelWatchFolder}</label> <paper-input id="txtWatchFolder" label="${LabelWatchFolder}" style="width:85%;display:inline-block;"></paper-input>
<div style="display: inline-block; width: 85%;"> <paper-icon-button id="btnSelectWatchFolder" icon="search"></paper-icon-button>
<input type="text" id="txtWatchFolder" name="txtWatchFolder" />
</div>
<button id="btnSelectWatchFolder" type="button" data-icon="search" data-iconpos="notext" data-inline="true">${ButtonSelectDirectory}</button>
<div class="fieldDescription"> <div class="fieldDescription">
<div>${LabelWatchFolderHelp}</div> <div>${LabelWatchFolderHelp}</div>
</div> </div>
<br/>
</li> </li>
<li> <li>
<label for="txtMinFileSize">${LabelMinFileSizeForOrganize}</label> <label for="txtMinFileSize">${LabelMinFileSizeForOrganize}</label>

View file

@ -25,14 +25,14 @@
"web-component-tester": "*", "web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}, },
"homepage": "https://github.com/polymerelements/iron-meta", "homepage": "https://github.com/PolymerElements/iron-meta",
"_release": "1.0.3", "_release": "1.0.3",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.3", "tag": "v1.0.3",
"commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04" "commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
}, },
"_source": "git://github.com/polymerelements/iron-meta.git", "_source": "git://github.com/PolymerElements/iron-meta.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "polymerelements/iron-meta" "_originalSource": "PolymerElements/iron-meta"
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "polymer", "name": "polymer",
"version": "1.1.2", "version": "1.1.3",
"main": [ "main": [
"polymer.html" "polymer.html"
], ],
@ -25,11 +25,11 @@
}, },
"private": true, "private": true,
"homepage": "https://github.com/Polymer/polymer", "homepage": "https://github.com/Polymer/polymer",
"_release": "1.1.2", "_release": "1.1.3",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.1.2", "tag": "v1.1.3",
"commit": "9b0a25e347404ac164bc610bbd2ccbc91b6799b2" "commit": "fb2b93bf2f5058027c63a50fda79b130388b6e15"
}, },
"_source": "git://github.com/Polymer/polymer.git", "_source": "git://github.com/Polymer/polymer.git",
"_target": "^1.0.0", "_target": "^1.0.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "polymer", "name": "polymer",
"version": "1.1.2", "version": "1.1.3",
"main": [ "main": [
"polymer.html" "polymer.html"
], ],

View file

@ -56,10 +56,10 @@ prototype = {};
} }
var factory = desugar(prototype); var factory = desugar(prototype);
prototype = factory.prototype; prototype = factory.prototype;
var options = { var options = { prototype: prototype };
prototype: prototype, if (prototype.extends) {
extends: prototype.extends options.extends = prototype.extends;
}; }
Polymer.telemetry._registrate(prototype); Polymer.telemetry._registrate(prototype);
document.registerElement(prototype.is, options); document.registerElement(prototype.is, options);
return factory; return factory;
@ -576,7 +576,7 @@ debouncer.stop();
} }
} }
}); });
Polymer.version = '1.1.2'; Polymer.version = '1.1.3';
Polymer.Base._addFeature({ Polymer.Base._addFeature({
_registerFeatures: function () { _registerFeatures: function () {
this._prepIs(); this._prepIs();

View file

@ -687,12 +687,12 @@ gd = gobj[dep];
if (gd && gd[name]) { if (gd && gd[name]) {
gd[name] = (gd[name] || 1) - 1; gd[name] = (gd[name] || 1) - 1;
gd._count = (gd._count || 1) - 1; gd._count = (gd._count || 1) - 1;
}
if (gd._count === 0) { if (gd._count === 0) {
node.removeEventListener(dep, this.handleNative); node.removeEventListener(dep, this.handleNative);
} }
} }
} }
}
node.removeEventListener(evType, handler); node.removeEventListener(evType, handler);
}, },
register: function (recog) { register: function (recog) {

View file

@ -53,10 +53,10 @@
</li> </li>
<li> <li>
<label for="txtCustomIntrosPath">${LabelCustomIntrosPath}</label> <label for="txtCustomIntrosPath">${LabelCustomIntrosPath}</label>
<div style="display: inline-block; width: 85%;"> <div>
<input type="text" id="txtCustomIntrosPath" /> <input type="text" id="txtCustomIntrosPath" style="display: inline-block; width: 85%;" />
<paper-icon-button id="btnSelectCustomIntrosPath" icon="search"></paper-icon-button>
</div> </div>
<button id="btnSelectCustomIntrosPath" type="button" data-icon="search" data-iconpos="notext" data-inline="true">${ButtonSelectDirectory}</button>
<div class="fieldDescription">${LabelCustomIntrosPathHelp}</div> <div class="fieldDescription">${LabelCustomIntrosPathHelp}</div>
</li> </li>
<li> <li>

View file

@ -43,10 +43,8 @@
function sendRequest(request) { function sendRequest(request) {
var method = request.type || "GET";
// For now, we can only handle json responses // For now, we can only handle json responses
if (request.dataType || method == "GET") { if (request.dataType) {
if (request.dataType != 'json') { if (request.dataType != 'json') {
return baseAjaxMethod(request); return baseAjaxMethod(request);
} }
@ -69,6 +67,8 @@
request.headers.accept = 'application/json'; request.headers.accept = 'application/json';
} }
var method = request.type || "GET";
var javaRequest = { var javaRequest = {
Method: method, Method: method,
Url: request.url, Url: request.url,
@ -131,11 +131,54 @@
return error; return error;
} }
function getDownloadSpeed(bytes, url) {
var deferred = DeferredBuilder.Deferred();
ApiClientBridge.getDownloadSpeed(bytes, url);
Events.on(AndroidAjax, 'downloadspeedresponse', function (e, response) {
Events.off(AndroidAjax, 'downloadspeedresponse');
if (response) {
deferred.resolveWith(null, [response]);
}
else {
// Need to mimic the jquery ajax error response
deferred.reject();
}
});
return deferred.promise();
}
function initApiClient(newApiClient) {
newApiClient.getDownloadSpeed = function (bytes) {
return getDownloadSpeed(bytes, newApiClient.getUrl('Playback/BitrateTest', {
api_key: newApiClient.accessToken(),
Size: bytes
}));
};
}
Events.on(ConnectionManager, 'apiclientcreated', function (e, newApiClient) {
initApiClient(newApiClient);
});
Events.on(ConnectionManager.credentialProvider(), 'credentialsupdated', updateCredentials); Events.on(ConnectionManager.credentialProvider(), 'credentialsupdated', updateCredentials);
updateCredentials(); updateCredentials();
initNativeConnectionManager(); initNativeConnectionManager();
if (window.ApiClient) {
initApiClient(window.ApiClient);
}
window.AndroidAjax = { window.AndroidAjax = {
onResponse: function (id, response) { onResponse: function (id, response) {
@ -145,6 +188,10 @@
onError: function (id, response) { onError: function (id, response) {
Events.trigger(AndroidAjax, 'response' + id, [false, response]); Events.trigger(AndroidAjax, 'response' + id, [false, response]);
},
onDownloadSpeedResponse: function (response) {
Events.trigger(AndroidAjax, 'downloadspeedresponse', [response]);
} }
}; };

View file

@ -430,6 +430,10 @@ h1 a:hover {
margin: -10px 0 0 -10px; margin: -10px 0 0 -10px;
} }
fieldset {
border: none;
}
input:not(.paper-input):not(.likePaperText):not([type='checkbox']):not([type='radio']):not([type='file']) { input:not(.paper-input):not(.likePaperText):not([type='checkbox']):not([type='radio']):not([type='file']) {
-webkit-appearance: none; -webkit-appearance: none;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
@ -464,6 +468,7 @@ input:not(.paper-input):not(.likePaperText):not([type='checkbox']):not([type='ra
color: #000; color: #000;
margin: 0 0 3px 0; margin: 0 0 3px 0;
border-radius: 4px; border-radius: 4px;
display: block;
} }
select { select {
@ -487,6 +492,10 @@ select {
text-align: center; text-align: center;
} }
select:not([data-inline='true']) {
display: block;
}
.ui-page-theme-b select { .ui-page-theme-b select {
border-color: #1f1f1f; border-color: #1f1f1f;
background: #373737; background: #373737;
@ -783,7 +792,7 @@ paper-input + .fieldDescription {
} }
.background-theme-a { .background-theme-a {
background-color: #f5f5f5; background-color: #f7f7f7;
} }
.ui-page-theme-a .content-secondary { .ui-page-theme-a .content-secondary {

View file

@ -29,11 +29,8 @@
<div class="fieldDescription">${LabelCustomDeviceDisplayNameHelp}</div> <div class="fieldDescription">${LabelCustomDeviceDisplayNameHelp}</div>
</li> </li>
<li id="fldCameraUploadPath" style="display:none;"> <li id="fldCameraUploadPath" style="display:none;">
<label for="txtUploadPath">${LabelCameraUploadPath}</label> <paper-input id="txtUploadPath" label="${LabelCameraUploadPath}" style="width:85%;display:inline-block;"></paper-input>
<div style="display: inline-block; width: 85%;"> <paper-icon-button id="btnSelectUploadPath" icon="search"></paper-icon-button>
<input type="text" id="txtUploadPath" />
</div>
<button id="btnSelectUploadPath" type="button" data-icon="search" data-iconpos="notext" data-inline="true">${ButtonSelectDirectory}</button>
<div class="fieldDescription">${LabelCameraUploadPathHelp}</div> <div class="fieldDescription">${LabelCameraUploadPathHelp}</div>
</li> </li>

View file

@ -28,14 +28,11 @@
</div> </div>
<br /><br /> <br />
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li> <li>
<label for="txtUploadPath">${LabelCameraUploadPath}</label> <paper-input id="txtUploadPath" label="${LabelCameraUploadPath}" style="width:84%;display:inline-block;"></paper-input>
<div style="display: inline-block; width: 85%;"> <paper-icon-button id="btnSelectUploadPath" icon="search"></paper-icon-button>
<input type="text" id="txtUploadPath" />
</div>
<button id="btnSelectUploadPath" type="button" data-icon="search" data-iconpos="notext" data-inline="true">${ButtonSelectDirectory}</button>
<div class="fieldDescription">${LabelCameraUploadPathHelp}</div> <div class="fieldDescription">${LabelCameraUploadPathHelp}</div>
</li> </li>
<li> <li>

View file

@ -41,14 +41,12 @@
<div class="fieldDescription">${OptionEnableTranscodingThrottleHelp}</div> <div class="fieldDescription">${OptionEnableTranscodingThrottleHelp}</div>
</li> </li>
<li> <li>
<label for="txtTranscodingTempPath">${LabelTranscodingTempPath}</label> <paper-input id="txtTranscodingTempPath" label="${LabelTranscodingTempPath}" style="width:80%;display:inline-block;"></paper-input>
<div style="display: inline-block; width: 85%;"> <paper-icon-button id="btnSelectTranscodingTempPath" icon="search"></paper-icon-button>
<input type="text" id="txtTranscodingTempPath" />
</div>
<button id="btnSelectTranscodingTempPath" type="button" data-icon="search" data-iconpos="notext" data-inline="true">${ButtonSelectDirectory}</button>
<div class="fieldDescription"> <div class="fieldDescription">
${LabelTranscodingTempPathHelp} ${LabelTranscodingTempPathHelp}
</div> </div>
<br/>
</li> </li>
<li> <li>
<label for="txtDownMixAudioBoost">${LabelDownMixAudioScale}</label> <label for="txtDownMixAudioBoost">${LabelDownMixAudioScale}</label>

View file

@ -40,13 +40,13 @@
<div class="fieldDescription">${LabelNumberOfGuideDaysHelp}</div> <div class="fieldDescription">${LabelNumberOfGuideDaysHelp}</div>
</li> </li>
</ul> </ul>
<div> <div class="paperCheckboxList">
<label>${LabelEnableInternetMetadataForTvPrograms}</label> <label>${LabelEnableInternetMetadataForTvPrograms}</label>
<paper-checkbox id="chkMovies">${OptionTVMovies}</paper-checkbox> <paper-checkbox id="chkMovies">${OptionTVMovies}</paper-checkbox>
</div> </div>
<div> <div>
<br /> <br />
<paper-input id="txtRecordingPath" label="${LabelRecordingPath}" style="width:80%;display:inline-block;"></paper-input> <paper-input id="txtRecordingPath" label="${LabelRecordingPath}" style="width:84%;display:inline-block;"></paper-input>
<paper-icon-button id="btnSelectRecordingPath" icon="search"></paper-icon-button> <paper-icon-button id="btnSelectRecordingPath" icon="search"></paper-icon-button>
<div class="fieldDescription">${LabelRecordingPathHelp}</div> <div class="fieldDescription">${LabelRecordingPathHelp}</div>
</div> </div>

View file

@ -21,12 +21,10 @@
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li> <li>
<label for="txtMetadataPath">${LabelMetadataPath}</label> <paper-input id="txtMetadataPath" label="${LabelMetadataPath}" style="width:85%;display:inline-block;"></paper-input>
<div style="display: inline-block; width: 85%;"> <paper-icon-button id="btnSelectMetadataPath" icon="search"></paper-icon-button>
<input type="text" id="txtMetadataPath" />
</div>
<button id="btnSelectMetadataPath" type="button" data-icon="search" data-iconpos="notext" data-inline="true">${ButtonSelectDirectory}</button>
<div class="fieldDescription">${LabelMetadataPathHelp}</div> <div class="fieldDescription">${LabelMetadataPathHelp}</div>
<br/>
</li> </li>
<li> <li>
<label for="chkSaveMetadataHidden">${OptionSaveMetadataAsHidden}</label> <label for="chkSaveMetadataHidden">${OptionSaveMetadataAsHidden}</label>

View file

@ -136,10 +136,13 @@
html += '<div style="margin:20px 0 0;">'; html += '<div style="margin:20px 0 0;">';
html += '<label for="txtDirectoryPickerPath" class="lblDirectoryPickerPath">' + Globalize.translate('LabelCurrentPath') + '</label>'; html += '<label for="txtDirectoryPickerPath" class="lblDirectoryPickerPath">' + Globalize.translate('LabelCurrentPath') + '</label>';
html += '<div style="width:82%;display:inline-block;"><input id="txtDirectoryPickerPath" name="txtDirectoryPickerPath" type="text" required="required" style="font-weight:bold;" /></div>';
html += '<div><input id="txtDirectoryPickerPath" name="txtDirectoryPickerPath" type="text" required="required" style="font-weight:bold;width:82%;display:inline-block;" />';
html += '<button class="btnRefreshDirectories" type="button" data-icon="refresh" data-inline="true" data-mini="true" data-iconpos="notext">' + Globalize.translate('ButtonRefresh') + '</button>'; html += '<button class="btnRefreshDirectories" type="button" data-icon="refresh" data-inline="true" data-mini="true" data-iconpos="notext">' + Globalize.translate('ButtonRefresh') + '</button>';
html += '</div>'; html += '</div>';
html += '</div>';
html += '<div style="height: 180px; overflow-y: auto;">'; html += '<div style="height: 180px; overflow-y: auto;">';
html += '<ul id="ulDirectoryPickerList" data-role="listview" data-inset="true" data-auto-enhanced="false"></ul>'; html += '<ul id="ulDirectoryPickerList" data-role="listview" data-inset="true" data-auto-enhanced="false"></ul>';

View file

@ -32,7 +32,7 @@
totalRecordCount: result.TotalRecordCount, totalRecordCount: result.TotalRecordCount,
viewButton: true, viewButton: true,
showLimit: false showLimit: false
})).trigger('create'); }));
updateFilterControls(page); updateFilterControls(page);

View file

@ -38,7 +38,7 @@
totalRecordCount: result.TotalRecordCount, totalRecordCount: result.TotalRecordCount,
viewButton: true, viewButton: true,
showLimit: false showLimit: false
})).trigger('create'); }));
updateFilterControls(page); updateFilterControls(page);
var trigger = false; var trigger = false;
@ -50,7 +50,6 @@
context: 'games', context: 'games',
sortBy: query.SortBy sortBy: query.SortBy
}); });
trigger = true;
} }
else if (view == "Poster") { else if (view == "Poster") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
@ -77,10 +76,6 @@
elem.innerHTML = html; elem.innerHTML = html;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
if (trigger) {
$(elem).trigger('create');
}
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;
reloadItems(page); reloadItems(page);

View file

@ -247,11 +247,9 @@
} }
listOptions.items = result.Items; listOptions.items = result.Items;
var trigger = false;
if (type == 'Audio') { if (type == 'Audio') {
html = LibraryBrowser.getListViewHtml(listOptions); html = LibraryBrowser.getListViewHtml(listOptions);
trigger = true;
} else { } else {
html = LibraryBrowser.getPosterViewHtml(listOptions); html = LibraryBrowser.getPosterViewHtml(listOptions);
} }
@ -260,10 +258,6 @@
itemsContainer.innerHTML = html; itemsContainer.innerHTML = html;
$(itemsContainer).createCardMenus(); $(itemsContainer).createCardMenus();
if (trigger) {
$(itemsContainer).trigger('create');
}
ImageLoader.lazyChildren(itemsContainer); ImageLoader.lazyChildren(itemsContainer);
}); });
} }

View file

@ -830,7 +830,6 @@
promise.done(function (result) { promise.done(function (result) {
var html = ''; var html = '';
var trigger = false;
if (item.Type == "MusicAlbum") { if (item.Type == "MusicAlbum") {
@ -844,7 +843,6 @@
defaultAction: 'playallfromhere', defaultAction: 'playallfromhere',
lazy: true lazy: true
}); });
trigger = true;
} }
else if (item.Type == "Series") { else if (item.Type == "Series") {
@ -885,10 +883,6 @@
elem.innerHTML = html; elem.innerHTML = html;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
if (trigger) {
$(elem).trigger('create');
}
if (item.Type == "BoxSet") { if (item.Type == "BoxSet") {
var collectionItemTypes = [ var collectionItemTypes = [
@ -990,7 +984,7 @@
renderCollectionItemType(page, { name: Globalize.translate('HeaderItems') }, items, user); renderCollectionItemType(page, { name: Globalize.translate('HeaderItems') }, items, user);
} }
$('.collectionItems', page).trigger('create').createCardMenus(); $('.collectionItems', page).createCardMenus();
} }
function renderCollectionItemType(page, type, items, user, context) { function renderCollectionItemType(page, type, items, user, context) {
@ -1163,7 +1157,7 @@
smallIcon: true smallIcon: true
}); });
$('#themeSongsContent', page).html(html).trigger('create'); $('#themeSongsContent', page).html(html);
} else { } else {
$('#themeSongsCollapsible', page).hide(); $('#themeSongsCollapsible', page).hide();
} }
@ -1175,7 +1169,7 @@
$('#themeVideosCollapsible', page).show(); $('#themeVideosCollapsible', page).show();
$('#themeVideosContent', page).html(getVideosHtml(items, user)).lazyChildren().trigger('create'); $('#themeVideosContent', page).html(getVideosHtml(items, user)).lazyChildren();
} else { } else {
$('#themeVideosCollapsible', page).hide(); $('#themeVideosCollapsible', page).hide();
} }
@ -1197,7 +1191,7 @@
$('#musicVideosCollapsible', page).show(); $('#musicVideosCollapsible', page).show();
$('#musicVideosContent', page).html(getVideosHtml(result.Items, user)).lazyChildren().trigger('create'); $('#musicVideosContent', page).html(getVideosHtml(result.Items, user)).lazyChildren();
} else { } else {
$('#musicVideosCollapsible', page).hide(); $('#musicVideosCollapsible', page).hide();
} }
@ -1213,7 +1207,7 @@
$('#additionalPartsCollapsible', page).show(); $('#additionalPartsCollapsible', page).show();
$('#additionalPartsContent', page).html(getVideosHtml(result.Items, user)).lazyChildren().trigger('create'); $('#additionalPartsContent', page).html(getVideosHtml(result.Items, user)).lazyChildren();
} else { } else {
$('#additionalPartsCollapsible', page).hide(); $('#additionalPartsCollapsible', page).hide();
} }

View file

@ -172,10 +172,13 @@
function onCardTapHold(e) { function onCardTapHold(e) {
var card = parentWithClass(e.target, 'card'); var card = parentWithClass(e.target, 'card');
showContextMenu(card, {});
e.preventDefault(); if (card) {
return false; showContextMenu(card, {});
e.preventDefault();
return false;
}
} }
function showContextMenu(card, options) { function showContextMenu(card, options) {

View file

@ -96,7 +96,7 @@
html += '</a>'; html += '</a>';
} }
$('#childrenContent', page).html(html).trigger('create').createGuideHoverMenu('.tvProgramInfo'); $('#childrenContent', page).html(html).createGuideHoverMenu('.tvProgramInfo');
} }
function loadPrograms(page, channelId) { function loadPrograms(page, channelId) {

View file

@ -24,7 +24,7 @@
showLimit: false, showLimit: false,
viewPanelClass: 'channelViewPanel' viewPanelClass: 'channelViewPanel'
})).trigger('create'); }));
updateFilterControls(viewPanel); updateFilterControls(viewPanel);
@ -33,7 +33,6 @@
var elem = page.querySelector('#items'); var elem = page.querySelector('#items');
elem.innerHTML = html; elem.innerHTML = html;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
$(elem).trigger('create');
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;

View file

@ -87,7 +87,7 @@
html += '</div>'; html += '</div>';
} }
var elem = $('#items', page).html(html).trigger('create'); var elem = $('#items', page).html(html);
$('.btnCancelSeries', elem).on('click', function () { $('.btnCancelSeries', elem).on('click', function () {

View file

@ -110,7 +110,7 @@
html += '</div>'; html += '</div>';
} }
var elem = $('#items', page).html(html).trigger('create'); var elem = $('#items', page).html(html);
$('.btnDeleteTimer', elem).on('click', function () { $('.btnDeleteTimer', elem).on('click', function () {

View file

@ -992,7 +992,7 @@
}; };
}; };
var lastBitrateDetect = 0; self.lastBitrateDetect = 0;
self.playInternal = function (item, startPosition, callback) { self.playInternal = function (item, startPosition, callback) {
@ -1014,14 +1014,14 @@
return; return;
} }
if (item.MediaType == 'Video' && AppSettings.enableAutomaticBitrateDetection() && (new Date().getTime() - lastBitrateDetect) > 1000) { if (item.MediaType == 'Video' && AppSettings.enableAutomaticBitrateDetection() && (new Date().getTime() - self.lastBitrateDetect) > 300000) {
Dashboard.showModalLoadingMsg(); Dashboard.showModalLoadingMsg();
ApiClient.detectBitrate().done(function (bitrate) { ApiClient.detectBitrate().done(function (bitrate) {
Logger.log('Max bitrate auto detected to ' + bitrate); Logger.log('Max bitrate auto detected to ' + bitrate);
lastBitrateDetect = new Date().getTime(); self.lastBitrateDetect = new Date().getTime();
AppSettings.maxStreamingBitrate(bitrate); AppSettings.maxStreamingBitrate(bitrate);
playOnDeviceProfileCreated(self.getDeviceProfile(), item, startPosition, callback); playOnDeviceProfileCreated(self.getDeviceProfile(), item, startPosition, callback);
@ -1900,9 +1900,16 @@
window.MediaPlayer = new mediaPlayer(); window.MediaPlayer = new mediaPlayer();
function onConnectionChange() {
window.MediaPlayer.lastBitrateDetect = 0;
}
Dashboard.ready(function () { Dashboard.ready(function () {
window.MediaController.registerPlayer(window.MediaPlayer); window.MediaController.registerPlayer(window.MediaPlayer);
window.MediaController.setActivePlayer(window.MediaPlayer, window.MediaPlayer.getTargets()[0]); window.MediaController.setActivePlayer(window.MediaPlayer, window.MediaPlayer.getTargets()[0]);
Events.on(ConnectionManager, 'localusersignedin', onConnectionChange);
Events.on(ConnectionManager, 'localusersignedout', onConnectionChange);
}); });

View file

@ -69,8 +69,6 @@
})).trigger('create'); })).trigger('create');
var trigger = false;
if (result.TotalRecordCount) { if (result.TotalRecordCount) {
var context = getParameterByName('context'); var context = getParameterByName('context');
@ -82,7 +80,6 @@
context: context, context: context,
sortBy: query.SortBy sortBy: query.SortBy
}); });
trigger = true;
} }
else if (view == "Poster") { else if (view == "Poster") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
@ -140,10 +137,6 @@
elem.innerHTML = html; elem.innerHTML = html;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
if (trigger) {
$(elem).trigger('create');
}
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;
reloadItems(page); reloadItems(page);

View file

@ -60,15 +60,12 @@
})).trigger('create'); })).trigger('create');
var trigger = false;
if (view == "List") { if (view == "List") {
html = LibraryBrowser.getListViewHtml({ html = LibraryBrowser.getListViewHtml({
items: result.Items, items: result.Items,
sortBy: query.SortBy sortBy: query.SortBy
}); });
trigger = true;
} }
else if (view == "Thumb") { else if (view == "Thumb") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
@ -120,10 +117,6 @@
elem.innerHTML = html; elem.innerHTML = html;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
if (trigger) {
$(elem).trigger('create');
}
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;
reloadItems(page); reloadItems(page);

View file

@ -67,7 +67,6 @@
page.querySelector('.listTopPaging').innerHTML = pagingHtml; page.querySelector('.listTopPaging').innerHTML = pagingHtml;
updateFilterControls(page, viewPanel); updateFilterControls(page, viewPanel);
var trigger = false;
if (view == "List") { if (view == "List") {
@ -76,7 +75,6 @@
context: 'music', context: 'music',
sortBy: query.SortBy sortBy: query.SortBy
}); });
trigger = true;
} }
else if (view == "Poster") { else if (view == "Poster") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
@ -108,10 +106,6 @@
elem.innerHTML = html + pagingHtml; elem.innerHTML = html + pagingHtml;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
if (trigger) {
$(elem).trigger('create');
}
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;
reloadItems(page, viewPanel); reloadItems(page, viewPanel);

View file

@ -68,7 +68,6 @@
page.querySelector('.listTopPaging').innerHTML = pagingHtml; page.querySelector('.listTopPaging').innerHTML = pagingHtml;
updateFilterControls(page, viewPanel); updateFilterControls(page, viewPanel);
var trigger = false;
if (view == "Poster") { if (view == "Poster") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
@ -102,7 +101,6 @@
context: 'music', context: 'music',
sortBy: query.SortBy sortBy: query.SortBy
}); });
trigger = true;
} }
else if (view == "Timeline") { else if (view == "Timeline") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
@ -120,10 +118,6 @@
elem.innerHTML = html + pagingHtml; elem.innerHTML = html + pagingHtml;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
if (trigger) {
$(elem).trigger('create');
}
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;
reloadItems(page, viewPanel); reloadItems(page, viewPanel);

View file

@ -67,7 +67,6 @@
page.querySelector('.listTopPaging').innerHTML = pagingHtml; page.querySelector('.listTopPaging').innerHTML = pagingHtml;
updateFilterControls(page, viewPanel); updateFilterControls(page, viewPanel);
var trigger = false;
if (view == "List") { if (view == "List") {
@ -76,7 +75,6 @@
context: 'music', context: 'music',
sortBy: query.SortBy sortBy: query.SortBy
}); });
trigger = true;
} }
else if (view == "Poster") { else if (view == "Poster") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
@ -108,10 +106,6 @@
elem.innerHTML = html + pagingHtml; elem.innerHTML = html + pagingHtml;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
if (trigger) {
$(elem).trigger('create');
}
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;
reloadItems(page, viewPanel); reloadItems(page, viewPanel);

View file

@ -59,7 +59,7 @@
addLayoutButton: true, addLayoutButton: true,
currentLayout: view currentLayout: view
})).trigger('create'); }));
if (view == "Thumb") { if (view == "Thumb") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({

View file

@ -54,7 +54,6 @@
elem.innerHTML = html; elem.innerHTML = html;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
$(elem).trigger('create');
} }
function selectCurrentChapter(elem, positionTicks) { function selectCurrentChapter(elem, positionTicks) {
@ -699,7 +698,6 @@
var itemsContainer = page.querySelector('.playlist'); var itemsContainer = page.querySelector('.playlist');
itemsContainer.innerHTML = html; itemsContainer.innerHTML = html;
ImageLoader.lazyChildren(itemsContainer); ImageLoader.lazyChildren(itemsContainer);
$(itemsContainer).trigger('create');
} }
function onListItemClick(e) { function onListItemClick(e) {

View file

@ -75,7 +75,7 @@
var elem = page.querySelector('#childrenContent .itemsContainer'); var elem = page.querySelector('#childrenContent .itemsContainer');
elem.innerHTML = html; elem.innerHTML = html;
$(elem).trigger('create');
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
$(elem).off('needsrefresh').on('needsrefresh', function () { $(elem).off('needsrefresh').on('needsrefresh', function () {

View file

@ -73,9 +73,7 @@
addLayoutButton: true, addLayoutButton: true,
currentLayout: view currentLayout: view
})).trigger('create'); }));
var trigger = false;
if (result.TotalRecordCount) { if (result.TotalRecordCount) {
@ -85,7 +83,6 @@
items: result.Items, items: result.Items,
sortBy: query.SortBy sortBy: query.SortBy
}); });
trigger = true;
} }
else if (view == "PosterCard") { else if (view == "PosterCard") {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
@ -143,10 +140,6 @@
elem.innerHTML = html; elem.innerHTML = html;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
if (trigger) {
$(elem).trigger('create');
}
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;
reloadItems(page); reloadItems(page);

View file

@ -104,7 +104,6 @@
}); });
page.querySelector('.listTopPaging').innerHTML = pagingHtml; page.querySelector('.listTopPaging').innerHTML = pagingHtml;
var trigger = false;
if (query.IncludeItemTypes == "Audio") { if (query.IncludeItemTypes == "Audio") {
@ -114,7 +113,6 @@
defaultAction: 'playallfromhere', defaultAction: 'playallfromhere',
smallIcon: true smallIcon: true
}) + '</div>'; }) + '</div>';
trigger = true;
} else { } else {
var posterOptions = { var posterOptions = {
@ -148,10 +146,6 @@
elem.innerHTML = html + pagingHtml; elem.innerHTML = html + pagingHtml;
ImageLoader.lazyChildren(elem); ImageLoader.lazyChildren(elem);
if (trigger) {
$(elem).trigger('create');
}
$('.btnNextPage', page).on('click', function () { $('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit; query.StartIndex += query.Limit;
reloadItems(page, parentItem); reloadItems(page, parentItem);

View file

@ -89,7 +89,7 @@
html += servers.map(getServerHtml).join(''); html += servers.map(getServerHtml).join('');
var elem = $('.serverList', page).html(html).trigger('create'); var elem = $('.serverList', page).html(html);
$('.lnkServer', elem).on('click', function () { $('.lnkServer', elem).on('click', function () {
@ -286,7 +286,7 @@
var html = list.map(getPendingInviteHtml).join(''); var html = list.map(getPendingInviteHtml).join('');
var elem = $('.invitationList', page).html(html).trigger('create'); var elem = $('.invitationList', page).html(html);
$('.btnInviteMenu', elem).on('click', function () { $('.btnInviteMenu', elem).on('click', function () {
showPendingInviteMenu(this); showPendingInviteMenu(this);

View file

@ -5,7 +5,7 @@
$('#txtSyncTempPath', page).val(config.TemporaryPath || ''); $('#txtSyncTempPath', page).val(config.TemporaryPath || '');
$('#txtUploadSpeedLimit', page).val((config.UploadSpeedLimitBytes / 1000000) || ''); $('#txtUploadSpeedLimit', page).val((config.UploadSpeedLimitBytes / 1000000) || '');
$('#txtCpuCoreLimit', page).val(config.TranscodingCpuCoreLimit); $('#txtCpuCoreLimit', page).val(config.TranscodingCpuCoreLimit);
$('#chkEnableFullSpeedConversion', page).checked(config.EnableFullSpeedTranscoding).checkboxradio('refresh'); $('#chkEnableFullSpeedConversion', page).checked(config.EnableFullSpeedTranscoding);
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
} }

View file

@ -50,7 +50,6 @@
var elem = page.querySelector('.providerTemplate'); var elem = page.querySelector('.providerTemplate');
elem.innerHTML = Globalize.translateDocument(html); elem.innerHTML = Globalize.translateDocument(html);
$(elem).trigger('create');
init(page, type); init(page, type);
}); });

View file

@ -19,30 +19,24 @@
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li> <li>
<label for="txtSyncTempPath">${LabelSyncTempPath}</label> <paper-input type="text" id="txtSyncTempPath" label="${LabelSyncTempPath}" style="display: inline-block; width: 84%;"></paper-input>
<div style="display: inline-block; width: 85%;"> <paper-icon-button id="btnSelectSyncTempPath" icon="search" title="${ButtonSelectDirectory}"></paper-icon-button>
<input type="text" id="txtSyncTempPath" />
</div>
<button id="btnSelectSyncTempPath" type="button" data-icon="search" data-iconpos="notext" data-inline="true">${ButtonSelectDirectory}</button>
<div class="fieldDescription"> <div class="fieldDescription">
${LabelSyncTempPathHelp} ${LabelSyncTempPathHelp}
</div> </div>
</li> </li>
<li> <li>
<label for="txtUploadSpeedLimit">${LabelUploadSpeedLimit}</label> <paper-input type="number" min="0" step=".5" id="txtUploadSpeedLimit" label="${LabelUploadSpeedLimit}"></paper-input>
<input type="number" id="txtUploadSpeedLimit" min="0" step=".5" />
</li> </li>
<li> <li>
<label for="txtCpuCoreLimit">${LabelConversionCpuCoreLimit}</label> <paper-input type="number" min="0" max="8" step="1" id="txtCpuCoreLimit" label="${LabelConversionCpuCoreLimit}" required="required"></paper-input>
<input type="number" id="txtCpuCoreLimit" min="0" max="8" step="1" required="required" />
<div class="fieldDescription"> <div class="fieldDescription">
${LabelConversionCpuCoreLimitHelp} ${LabelConversionCpuCoreLimitHelp}
</div> </div>
</li> </li>
<li> <li>
<label for="chkEnableFullSpeedConversion">${OptionEnableFullSpeedConversion}</label> <paper-checkbox id="chkEnableFullSpeedConversion">${OptionEnableFullSpeedConversion}</paper-checkbox>
<input type="checkbox" id="chkEnableFullSpeedConversion" /> <div class="fieldDescription paperCheckboxFieldDescription">
<div class="fieldDescription">
${OptionEnableFullSpeedConversionHelp} ${OptionEnableFullSpeedConversionHelp}
</div> </div>
</li> </li>

View file

@ -4869,11 +4869,6 @@ $.fn.fieldcontain = function(/* options */) {
var $html = $( "html" ), var $html = $( "html" ),
$window = $.mobile.window; $window = $.mobile.window;
//remove initial build class (only present on first pageshow)
function hideRenderingClass() {
$html.removeClass( "ui-mobile-rendering" );
}
// trigger mobileinit event - useful hook for configuring $.mobile settings before they're used // trigger mobileinit event - useful hook for configuring $.mobile settings before they're used
$( window.document ).trigger( "mobileinit" ); $( window.document ).trigger( "mobileinit" );
@ -4890,28 +4885,16 @@ $.fn.fieldcontain = function(/* options */) {
$.mobile.ajaxEnabled = false; $.mobile.ajaxEnabled = false;
} }
// Add mobile, initial load "rendering" classes to docEl
$html.addClass( "ui-mobile ui-mobile-rendering" );
// This is a fallback. If anything goes wrong (JS errors, etc), or events don't fire,
// this ensures the rendering class is removed after 5 seconds, so content is visible and accessible
setTimeout( hideRenderingClass, 5000 );
$.extend( $.mobile, { $.extend( $.mobile, {
// find and enhance the pages in the dom and transition to the first page. // find and enhance the pages in the dom and transition to the first page.
initializePage: function() { initializePage: function() {
// find present pages // find present pages
var path = $.mobile.path, var path = $.mobile.path,
$pages = $("*[data-role='page'], *[data-role='dialog']"), $pages = $("div[data-role='page']"),
hash = path.stripHash( path.stripQueryParams(path.parseLocation().hash) ), hash = path.stripHash( path.stripQueryParams(path.parseLocation().hash) ),
theLocation = $.mobile.path.parseLocation(), theLocation = $.mobile.path.parseLocation(),
hashPage = hash ? document.getElementById( hash ) : undefined; hashPage = hash ? document.getElementById( hash ) : undefined;
// if no pages are found, create one with body's inner html
if ( !$pages.length ) {
$pages = $( "body" ).wrapInner( "<div data-" + $.mobile.ns + "role='page'></div>" ).children( 0 );
}
// add dialogs, set data-url attrs // add dialogs, set data-url attrs
$pages.each(function() { $pages.each(function() {
var $this = $( this ); var $this = $( this );
@ -4936,16 +4919,6 @@ $.fn.fieldcontain = function(/* options */) {
// has been created but before the rest of the library is alerted to that fact // has been created but before the rest of the library is alerted to that fact
$.mobile.navreadyDeferred.resolve(); $.mobile.navreadyDeferred.resolve();
// alert listeners that the pagecontainer has been determined for binding
// to events triggered on it
$window.trigger( "pagecontainercreate" );
// cue page loading message
$.mobile.loading( "show" );
//remove initial build class (only present on first pageshow)
hideRenderingClass();
// if hashchange listening is disabled, there's no hash deeplink, // if hashchange listening is disabled, there's no hash deeplink,
// the hash is not valid (contains more than one # or does not start with #) // the hash is not valid (contains more than one # or does not start with #)
// or there is no page with that hash, change to the first page in the DOM // or there is no page with that hash, change to the first page in the DOM

View file

@ -54,7 +54,7 @@ div.ui-mobile-viewport {
border: 0; border: 0;
} }
.ui-page { .ui-page {
position: static !important; /*position: static !important;*/
} }
/* On ios4, setting focus on the page element causes flashing during transitions when there is an outline, so we turn off outlines */ /* On ios4, setting focus on the page element causes flashing during transitions when there is an outline, so we turn off outlines */
.ui-page { .ui-page {

View file

@ -421,7 +421,7 @@ paper-input label, paper-textarea label {
} }
.ui-page-theme-a paper-input label, .ui-page-theme-a paper-textarea label { .ui-page-theme-a paper-input label, .ui-page-theme-a paper-textarea label {
color: #333 !important; color: #656565 !important;
} }
.ui-page-theme-a .label-is-highlighted label { .ui-page-theme-a .label-is-highlighted label {

View file

@ -80,10 +80,10 @@ prototype = {};
} }
var factory = desugar(prototype); var factory = desugar(prototype);
prototype = factory.prototype; prototype = factory.prototype;
var options = { var options = { prototype: prototype };
prototype: prototype, if (prototype.extends) {
extends: prototype.extends options.extends = prototype.extends;
}; }
Polymer.telemetry._registrate(prototype); Polymer.telemetry._registrate(prototype);
document.registerElement(prototype.is, options); document.registerElement(prototype.is, options);
return factory; return factory;
@ -600,7 +600,7 @@ debouncer.stop();
} }
} }
}); });
Polymer.version = '1.1.2'; Polymer.version = '1.1.3';
Polymer.Base._addFeature({ Polymer.Base._addFeature({
_registerFeatures: function () { _registerFeatures: function () {
this._prepIs(); this._prepIs();
@ -2809,12 +2809,12 @@ gd = gobj[dep];
if (gd && gd[name]) { if (gd && gd[name]) {
gd[name] = (gd[name] || 1) - 1; gd[name] = (gd[name] || 1) - 1;
gd._count = (gd._count || 1) - 1; gd._count = (gd._count || 1) - 1;
}
if (gd._count === 0) { if (gd._count === 0) {
node.removeEventListener(dep, this.handleNative); node.removeEventListener(dep, this.handleNative);
} }
} }
} }
}
node.removeEventListener(evType, handler); node.removeEventListener(evType, handler);
}, },
register: function (recog) { register: function (recog) {