mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
kill off jqm selectmenu
This commit is contained in:
parent
036c620dac
commit
6bf7ea2ea5
52 changed files with 164 additions and 429 deletions
|
@ -465,6 +465,32 @@ input:not(.paper-input):not(.likePaperText):not([type='checkbox']):not([type='ra
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 0 .5em 0;
|
||||||
|
background: none;
|
||||||
|
border: 1px solid rgb(221, 221, 221);
|
||||||
|
border-radius: 3px;
|
||||||
|
/* Prefixed box-sizing rules necessary for older browsers */
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* Remove select styling */
|
||||||
|
/* Font size must the 16px or larger to prevent iOS page zoom on focus */
|
||||||
|
font-size: inherit;
|
||||||
|
/* General select styles: change as needed */
|
||||||
|
font-family: inherit;
|
||||||
|
font-weight: bold;
|
||||||
|
color: inherit;
|
||||||
|
padding: .6em 1.9em .5em .8em;
|
||||||
|
line-height: 1.3;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-page-theme-b select {
|
||||||
|
border-color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
.smoothScrollX {
|
.smoothScrollX {
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
|
@ -49,12 +49,10 @@
|
||||||
})[0];
|
})[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
selectmenu.selectmenu('refresh');
|
|
||||||
|
|
||||||
if (packageVersion) {
|
if (packageVersion) {
|
||||||
var val = packageVersion.versionStr + '|' + packageVersion.classification;
|
var val = packageVersion.versionStr + '|' + packageVersion.classification;
|
||||||
|
|
||||||
selectmenu.val(val).selectmenu('refresh');
|
selectmenu.val(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
$('#fldEnableAutomaticRestart', page).hide();
|
$('#fldEnableAutomaticRestart', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#selectAutomaticUpdateLevel', page).val(config.SystemUpdateLevel).selectmenu('refresh').trigger('change');
|
$('#selectAutomaticUpdateLevel', page).val(config.SystemUpdateLevel).trigger('change');
|
||||||
$('#chkDebugLog', page).checked(config.EnableDebugLevelLogging).checkboxradio("refresh");
|
$('#chkDebugLog', page).checked(config.EnableDebugLevelLogging).checkboxradio("refresh");
|
||||||
|
|
||||||
$('#chkRunAtStartup', page).checked(config.RunAtStartup).checkboxradio("refresh");
|
$('#chkRunAtStartup', page).checked(config.RunAtStartup).checkboxradio("refresh");
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
|
|
||||||
seriesHtml = '<option value=""></option>' + seriesHtml;
|
seriesHtml = '<option value=""></option>' + seriesHtml;
|
||||||
|
|
||||||
$('#selectSeries', popup).html(seriesHtml).selectmenu('refresh');
|
$('#selectSeries', popup).html(seriesHtml);
|
||||||
}
|
}
|
||||||
|
|
||||||
function organizeFile(page, id) {
|
function organizeFile(page, id) {
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
|
|
||||||
$('#txtDeleteLeftOverFiles', page).val(tvOptions.LeftOverFileExtensionsToDelete.join(';'));
|
$('#txtDeleteLeftOverFiles', page).val(tvOptions.LeftOverFileExtensionsToDelete.join(';'));
|
||||||
|
|
||||||
$('#copyOrMoveFile', page).val(tvOptions.CopyOriginalFile.toString()).selectmenu('refresh');
|
$('#copyOrMoveFile', page).val(tvOptions.CopyOriginalFile.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
|
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#channelItemsPage", function () {
|
$(document).on('pageinit', "#channelItemsPage", function () {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
function loadPage(page, config) {
|
function loadPage(page, config) {
|
||||||
|
|
||||||
$('#selectChannelResolution', page).val(config.PreferredStreamingWidth || '').selectmenu("refresh");
|
$('#selectChannelResolution', page).val(config.PreferredStreamingWidth || '');
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
populateCollections(panel);
|
populateCollections(panel);
|
||||||
} else {
|
} else {
|
||||||
$('.fldSelectCollection', panel).hide();
|
$('.fldSelectCollection', panel).hide();
|
||||||
$('#selectCollectionToAddTo', panel).html('').val('').selectmenu('refresh').trigger('change');
|
$('#selectCollectionToAddTo', panel).html('').val('').trigger('change');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
return '<option value="' + i.Id + '">' + i.Name + '</option>';
|
return '<option value="' + i.Id + '">' + i.Name + '</option>';
|
||||||
});
|
});
|
||||||
|
|
||||||
select.html(html).val('').selectmenu('refresh').trigger('change');
|
select.html(html).val('').trigger('change');
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
return '<option value="' + l.Value + '">' + l.Name + '</option>';
|
return '<option value="' + l.Value + '">' + l.Name + '</option>';
|
||||||
|
|
||||||
})).val(config.UICulture).selectmenu('refresh');
|
})).val(config.UICulture);
|
||||||
|
|
||||||
currentLanguage = config.UICulture;
|
currentLanguage = config.UICulture;
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
var usersHtml = '<option></option>' + users.map(function (u) {
|
var usersHtml = '<option></option>' + users.map(function (u) {
|
||||||
return '<option value="' + u.Id + '">' + u.Name + '</option>';
|
return '<option value="' + u.Id + '">' + u.Name + '</option>';
|
||||||
}).join('');
|
}).join('');
|
||||||
$('#selectUser', page).html(usersHtml).val(profile.UserId || '').selectmenu("refresh");
|
$('#selectUser', page).html(usersHtml).val(profile.UserId || '');
|
||||||
|
|
||||||
renderSubProfiles(page, profile);
|
renderSubProfiles(page, profile);
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
|
|
||||||
$('#txtIdentificationHeaderName', popup).val(header.Name || '');
|
$('#txtIdentificationHeaderName', popup).val(header.Name || '');
|
||||||
$('#txtIdentificationHeaderValue', popup).val(header.Value || '');
|
$('#txtIdentificationHeaderValue', popup).val(header.Value || '');
|
||||||
$('#selectMatchType', popup).val(header.Match || 'Equals').selectmenu('refresh');
|
$('#selectMatchType', popup).val(header.Match || 'Equals');
|
||||||
|
|
||||||
popup.popup('open');
|
popup.popup('open');
|
||||||
}
|
}
|
||||||
|
@ -294,8 +294,8 @@
|
||||||
var popup = $('#subtitleProfilePopup', page);
|
var popup = $('#subtitleProfilePopup', page);
|
||||||
|
|
||||||
$('#txtSubtitleProfileFormat', popup).val(profile.Format || '');
|
$('#txtSubtitleProfileFormat', popup).val(profile.Format || '');
|
||||||
$('#selectSubtitleProfileMethod', popup).val(profile.Method || '').selectmenu('refresh');
|
$('#selectSubtitleProfileMethod', popup).val(profile.Method || '');
|
||||||
$('#selectSubtitleProfileDidlMode', popup).val(profile.DidlMode || '').selectmenu('refresh');
|
$('#selectSubtitleProfileDidlMode', popup).val(profile.DidlMode || '');
|
||||||
|
|
||||||
popup.popup('open');
|
popup.popup('open');
|
||||||
}
|
}
|
||||||
|
@ -419,7 +419,7 @@
|
||||||
|
|
||||||
var popup = $('#popupEditDirectPlayProfile', page);
|
var popup = $('#popupEditDirectPlayProfile', page);
|
||||||
|
|
||||||
$('#selectDirectPlayProfileType', popup).val(directPlayProfile.Type || 'Video').selectmenu('refresh').trigger('change');
|
$('#selectDirectPlayProfileType', popup).val(directPlayProfile.Type || 'Video').trigger('change');
|
||||||
$('#txtDirectPlayContainer', popup).val(directPlayProfile.Container || '');
|
$('#txtDirectPlayContainer', popup).val(directPlayProfile.Container || '');
|
||||||
$('#txtDirectPlayAudioCodec', popup).val(directPlayProfile.AudioCodec || '');
|
$('#txtDirectPlayAudioCodec', popup).val(directPlayProfile.AudioCodec || '');
|
||||||
$('#txtDirectPlayVideoCodec', popup).val(directPlayProfile.VideoCodec || '');
|
$('#txtDirectPlayVideoCodec', popup).val(directPlayProfile.VideoCodec || '');
|
||||||
|
@ -491,11 +491,11 @@
|
||||||
|
|
||||||
var popup = $('#transcodingProfilePopup', page);
|
var popup = $('#transcodingProfilePopup', page);
|
||||||
|
|
||||||
$('#selectTranscodingProfileType', popup).val(transcodingProfile.Type || 'Video').selectmenu('refresh').trigger('change');
|
$('#selectTranscodingProfileType', popup).val(transcodingProfile.Type || 'Video').trigger('change');
|
||||||
$('#txtTranscodingContainer', popup).val(transcodingProfile.Container || '');
|
$('#txtTranscodingContainer', popup).val(transcodingProfile.Container || '');
|
||||||
$('#txtTranscodingAudioCodec', popup).val(transcodingProfile.AudioCodec || '');
|
$('#txtTranscodingAudioCodec', popup).val(transcodingProfile.AudioCodec || '');
|
||||||
$('#txtTranscodingVideoCodec', popup).val(transcodingProfile.VideoCodec || '');
|
$('#txtTranscodingVideoCodec', popup).val(transcodingProfile.VideoCodec || '');
|
||||||
$('#selectTranscodingProtocol', popup).val(transcodingProfile.Protocol || 'Http').selectmenu('refresh');
|
$('#selectTranscodingProtocol', popup).val(transcodingProfile.Protocol || 'Http');
|
||||||
|
|
||||||
$('#chkEnableMpegtsM2TsMode', popup).checked(transcodingProfile.EnableMpegtsM2TsMode || false).checkboxradio('refresh');
|
$('#chkEnableMpegtsM2TsMode', popup).checked(transcodingProfile.EnableMpegtsM2TsMode || false).checkboxradio('refresh');
|
||||||
$('#chkEstimateContentLength', popup).checked(transcodingProfile.EstimateContentLength || false).checkboxradio('refresh');
|
$('#chkEstimateContentLength', popup).checked(transcodingProfile.EstimateContentLength || false).checkboxradio('refresh');
|
||||||
|
@ -614,7 +614,7 @@
|
||||||
|
|
||||||
var popup = $('#containerProfilePopup', page);
|
var popup = $('#containerProfilePopup', page);
|
||||||
|
|
||||||
$('#selectContainerProfileType', popup).val(containerProfile.Type || 'Video').selectmenu('refresh').trigger('change');
|
$('#selectContainerProfileType', popup).val(containerProfile.Type || 'Video').trigger('change');
|
||||||
$('#txtContainerProfileContainer', popup).val(containerProfile.Container || '');
|
$('#txtContainerProfileContainer', popup).val(containerProfile.Container || '');
|
||||||
|
|
||||||
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
||||||
|
@ -716,7 +716,7 @@
|
||||||
|
|
||||||
var popup = $('#codecProfilePopup', page);
|
var popup = $('#codecProfilePopup', page);
|
||||||
|
|
||||||
$('#selectCodecProfileType', popup).val(codecProfile.Type || 'Video').selectmenu('refresh').trigger('change');
|
$('#selectCodecProfileType', popup).val(codecProfile.Type || 'Video').trigger('change');
|
||||||
$('#txtCodecProfileCodec', popup).val(codecProfile.Codec || '');
|
$('#txtCodecProfileCodec', popup).val(codecProfile.Codec || '');
|
||||||
|
|
||||||
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
||||||
|
@ -822,7 +822,7 @@
|
||||||
|
|
||||||
var popup = $('#responseProfilePopup', page);
|
var popup = $('#responseProfilePopup', page);
|
||||||
|
|
||||||
$('#selectResponseProfileType', popup).val(responseProfile.Type || 'Video').selectmenu('refresh').trigger('change');
|
$('#selectResponseProfileType', popup).val(responseProfile.Type || 'Video').trigger('change');
|
||||||
$('#txtResponseProfileContainer', popup).val(responseProfile.Container || '');
|
$('#txtResponseProfileContainer', popup).val(responseProfile.Container || '');
|
||||||
$('#txtResponseProfileAudioCodec', popup).val(responseProfile.AudioCodec || '');
|
$('#txtResponseProfileAudioCodec', popup).val(responseProfile.AudioCodec || '');
|
||||||
$('#txtResponseProfileVideoCodec', popup).val(responseProfile.VideoCodec || '');
|
$('#txtResponseProfileVideoCodec', popup).val(responseProfile.VideoCodec || '');
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
return '<option value="' + u.Id + '">' + u.Name + '</option>';
|
return '<option value="' + u.Id + '">' + u.Name + '</option>';
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
$('#selectUser', page).html(usersHtml).val(config.DefaultUserId || '').selectmenu("refresh");
|
$('#selectUser', page).html(usersHtml).val(config.DefaultUserId || '');
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,13 +38,13 @@
|
||||||
|
|
||||||
renderRemoteImages(page, currentItem, result, browsableImageType, options.startIndex, options.limit);
|
renderRemoteImages(page, currentItem, result, browsableImageType, options.startIndex, options.limit);
|
||||||
|
|
||||||
$('#selectBrowsableImageType', page).val(browsableImageType).selectmenu('refresh');
|
$('#selectBrowsableImageType', page).val(browsableImageType);
|
||||||
|
|
||||||
var providersHtml = result.Providers.map(function (p) {
|
var providersHtml = result.Providers.map(function (p) {
|
||||||
return '<option value="' + p + '">' + p + '</option>';
|
return '<option value="' + p + '">' + p + '</option>';
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#selectImageProvider', page).html('<option value="">' + Globalize.translate('LabelAll') + '</option>' + providersHtml).val(provider).selectmenu('refresh');
|
$('#selectImageProvider', page).html('<option value="">' + Globalize.translate('LabelAll') + '</option>' + providersHtml).val(provider);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
|
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
$('#selectContentType', page).html(html).val(metadataInfo.ContentType || '').selectmenu('refresh');
|
$('#selectContentType', page).html(html).val(metadataInfo.ContentType || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function onExternalIdChange() {
|
function onExternalIdChange() {
|
||||||
|
@ -377,9 +377,9 @@
|
||||||
$('#fldDisplayOrder', page).show();
|
$('#fldDisplayOrder', page).show();
|
||||||
|
|
||||||
$('#labelDisplayOrder', page).html(Globalize.translate('LabelTitleDisplayOrder'));
|
$('#labelDisplayOrder', page).html(Globalize.translate('LabelTitleDisplayOrder'));
|
||||||
$('#selectDisplayOrder', page).html('<option value="SortName">' + Globalize.translate('OptionSortName') + '</option><option value="PremiereDate">' + Globalize.translate('OptionReleaseDate') + '</option>').selectmenu('refresh');
|
$('#selectDisplayOrder', page).html('<option value="SortName">' + Globalize.translate('OptionSortName') + '</option><option value="PremiereDate">' + Globalize.translate('OptionReleaseDate') + '</option>');
|
||||||
} else {
|
} else {
|
||||||
$('#selectDisplayOrder', page).html('').selectmenu('refresh');
|
$('#selectDisplayOrder', page).html('');
|
||||||
$('#fldDisplayOrder', page).hide();
|
$('#fldDisplayOrder', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,19 +401,19 @@
|
||||||
|
|
||||||
populateRatings(parentalRatingOptions, select, item.OfficialRating);
|
populateRatings(parentalRatingOptions, select, item.OfficialRating);
|
||||||
|
|
||||||
select.val(item.OfficialRating || "").selectmenu('refresh');
|
select.val(item.OfficialRating || "");
|
||||||
|
|
||||||
select = $('#selectCustomRating', page);
|
select = $('#selectCustomRating', page);
|
||||||
|
|
||||||
populateRatings(parentalRatingOptions, select, item.CustomRating);
|
populateRatings(parentalRatingOptions, select, item.CustomRating);
|
||||||
|
|
||||||
select.val(item.CustomRating || "").selectmenu('refresh');
|
select.val(item.CustomRating || "");
|
||||||
|
|
||||||
var selectStatus = $('#selectStatus', page);
|
var selectStatus = $('#selectStatus', page);
|
||||||
populateStatus(selectStatus);
|
populateStatus(selectStatus);
|
||||||
selectStatus.val(item.Status || "").selectmenu('refresh');
|
selectStatus.val(item.Status || "");
|
||||||
|
|
||||||
$('#select3dFormat', page).val(item.Video3DFormat || "").selectmenu('refresh');
|
$('#select3dFormat', page).val(item.Video3DFormat || "");
|
||||||
|
|
||||||
$('.chkAirDay', page).each(function () {
|
$('.chkAirDay', page).each(function () {
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@
|
||||||
|
|
||||||
}).join(';'));
|
}).join(';'));
|
||||||
|
|
||||||
$('#selectDisplayOrder', page).val(item.DisplayOrder).selectmenu('refresh');
|
$('#selectDisplayOrder', page).val(item.DisplayOrder);
|
||||||
|
|
||||||
$('#txtArtist', page).val((item.ArtistItems || []).map(function (a) {
|
$('#txtArtist', page).val((item.ArtistItems || []).map(function (a) {
|
||||||
|
|
||||||
|
@ -536,8 +536,8 @@
|
||||||
|
|
||||||
$('#txtOriginalAspectRatio', page).val(item.AspectRatio || "");
|
$('#txtOriginalAspectRatio', page).val(item.AspectRatio || "");
|
||||||
|
|
||||||
$('#selectLanguage', page).val(item.PreferredMetadataLanguage || "").selectmenu('refresh');
|
$('#selectLanguage', page).val(item.PreferredMetadataLanguage || "");
|
||||||
$('#selectCountry', page).val(item.PreferredMetadataCountryCode || "").selectmenu('refresh');
|
$('#selectCountry', page).val(item.PreferredMetadataCountryCode || "");
|
||||||
|
|
||||||
if (item.RunTimeTicks) {
|
if (item.RunTimeTicks) {
|
||||||
|
|
||||||
|
@ -604,7 +604,7 @@
|
||||||
$('#popupEditPerson', page).popup("open");
|
$('#popupEditPerson', page).popup("open");
|
||||||
|
|
||||||
$('#txtPersonName', page).val(person.Name || '');
|
$('#txtPersonName', page).val(person.Name || '');
|
||||||
$('#selectPersonType', page).val(person.Type || '').selectmenu('refresh');
|
$('#selectPersonType', page).val(person.Type || '');
|
||||||
$('#txtPersonRole', page).val(person.Role || '');
|
$('#txtPersonRole', page).val(person.Role || '');
|
||||||
|
|
||||||
if (index == null) {
|
if (index == null) {
|
||||||
|
@ -678,7 +678,7 @@
|
||||||
html += "<option value='" + rating.Value + "'>" + rating.Name + "</option>";
|
html += "<option value='" + rating.Value + "'>" + rating.Name + "</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
select.html(html).selectmenu("refresh");
|
select.html(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateStatus(select) {
|
function populateStatus(select) {
|
||||||
|
@ -687,7 +687,7 @@
|
||||||
html += "<option value=''></option>";
|
html += "<option value=''></option>";
|
||||||
html += "<option value='Continuing'>" + Globalize.translate('OptionContinuing') + "</option>";
|
html += "<option value='Continuing'>" + Globalize.translate('OptionContinuing') + "</option>";
|
||||||
html += "<option value='Ended'>" + Globalize.translate('OptionEnded') + "</option>";
|
html += "<option value='Ended'>" + Globalize.translate('OptionEnded') + "</option>";
|
||||||
select.html(html).selectmenu("refresh");
|
select.html(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateListView(list, items, sortCallback) {
|
function populateListView(list, items, sortCallback) {
|
||||||
|
@ -1283,8 +1283,8 @@
|
||||||
|
|
||||||
$('.popupAdvancedRefresh', page).popup('open');
|
$('.popupAdvancedRefresh', page).popup('open');
|
||||||
|
|
||||||
$('#selectMetadataRefreshMode', page).val('all').selectmenu('refresh');
|
$('#selectMetadataRefreshMode', page).val('all');
|
||||||
$('#selectImageRefreshMode', page).val('missing').selectmenu('refresh');
|
$('#selectImageRefreshMode', page).val('missing');
|
||||||
}
|
}
|
||||||
|
|
||||||
function performSimpleRefresh(page) {
|
function performSimpleRefresh(page) {
|
||||||
|
|
|
@ -167,14 +167,14 @@
|
||||||
|
|
||||||
return '<option value="' + l.ThreeLetterISOLanguageName + '">' + l.DisplayName + '</option>';
|
return '<option value="' + l.ThreeLetterISOLanguageName + '">' + l.DisplayName + '</option>';
|
||||||
|
|
||||||
})).selectmenu('refresh');
|
}));
|
||||||
|
|
||||||
Dashboard.getCurrentUser().done(function (user) {
|
Dashboard.getCurrentUser().done(function (user) {
|
||||||
|
|
||||||
var lang = user.Configuration.SubtitleLanguagePreference;
|
var lang = user.Configuration.SubtitleLanguagePreference;
|
||||||
|
|
||||||
if (lang) {
|
if (lang) {
|
||||||
$('#selectLanguage', page).val(lang).selectmenu('refresh');
|
$('#selectLanguage', page).val(lang);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
$('#selectThreadCount', page).val(config.EncodingThreadCount).selectmenu('refresh');
|
$('#selectThreadCount', page).val(config.EncodingThreadCount);
|
||||||
$('#txtDownMixAudioBoost', page).val(config.DownMixAudioBoost);
|
$('#txtDownMixAudioBoost', page).val(config.DownMixAudioBoost);
|
||||||
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
|
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
$('#selectView', page).val(view).selectmenu('refresh');
|
$('#selectView', page).val(view);
|
||||||
|
|
||||||
$('#chkHD', page).checked(query.IsHD == true).checkboxradio('refresh');
|
$('#chkHD', page).checked(query.IsHD == true).checkboxradio('refresh');
|
||||||
$('#chkSD', page).checked(query.IsHD == false).checkboxradio('refresh');
|
$('#chkSD', page).checked(query.IsHD == false).checkboxradio('refresh');
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
$('#chkFutureEpisode', page).checked(query.IsUnaired == true).checkboxradio('refresh');
|
$('#chkFutureEpisode', page).checked(query.IsUnaired == true).checkboxradio('refresh');
|
||||||
|
|
||||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#episodesPage", function () {
|
$(document).on('pageinit', "#episodesPage", function () {
|
||||||
|
@ -353,7 +353,7 @@
|
||||||
LibraryBrowser.getSavedViewSetting(viewkey).done(function (val) {
|
LibraryBrowser.getSavedViewSetting(viewkey).done(function (val) {
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
Events.trigger($('#selectView', page).val(val).selectmenu('refresh')[0], 'change');
|
Events.trigger($('#selectView', page).val(val)[0], 'change');
|
||||||
} else {
|
} else {
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
function updateFilterControls(page) {
|
function updateFilterControls(page) {
|
||||||
|
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#gameGenresPage", function () {
|
$(document).on('pageinit', "#gameGenresPage", function () {
|
||||||
|
|
|
@ -134,10 +134,10 @@
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
$('#selectView', page).val(view).selectmenu('refresh');
|
$('#selectView', page).val(view);
|
||||||
|
|
||||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
|
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
var filtersLoaded;
|
var filtersLoaded;
|
||||||
|
@ -262,7 +262,7 @@
|
||||||
LibraryBrowser.getSavedViewSetting(viewkey).done(function (val) {
|
LibraryBrowser.getSavedViewSetting(viewkey).done(function (val) {
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
$('#selectView', page).val(val).selectmenu('refresh').trigger('change');
|
$('#selectView', page).val(val).trigger('change');
|
||||||
} else {
|
} else {
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
|
|
||||||
function updateFilterControls(page) {
|
function updateFilterControls(page) {
|
||||||
|
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#gameStudiosPage", function () {
|
$(document).on('pageinit', "#gameStudiosPage", function () {
|
||||||
|
|
|
@ -168,10 +168,10 @@
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
$('#selectView', page).val(view).selectmenu('refresh');
|
$('#selectView', page).val(view);
|
||||||
|
|
||||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onListItemClick(e) {
|
function onListItemClick(e) {
|
||||||
|
@ -266,7 +266,7 @@
|
||||||
LibraryBrowser.getSavedViewSetting(getSavedQueryKey()).done(function (val) {
|
LibraryBrowser.getSavedViewSetting(getSavedQueryKey()).done(function (val) {
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
$('#selectView', page).val(val).selectmenu('refresh').trigger('change');
|
$('#selectView', page).val(val).trigger('change');
|
||||||
} else {
|
} else {
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1231,7 +1231,7 @@
|
||||||
|
|
||||||
return '<option value="' + i + '">' + i + '</option>';
|
return '<option value="' + i + '">' + i + '</option>';
|
||||||
|
|
||||||
}).join('')).selectmenu('refresh');
|
}).join(''));
|
||||||
|
|
||||||
$(page).on('click', '.btnToggleSelections', function () {
|
$(page).on('click', '.btnToggleSelections', function () {
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
$('#txtSeasonZeroName', page).val(config.SeasonZeroDisplayName);
|
$('#txtSeasonZeroName', page).val(config.SeasonZeroDisplayName);
|
||||||
|
|
||||||
$('#selectEnableRealtimeMonitor', page).val(config.EnableLibraryMonitor).selectmenu("refresh");
|
$('#selectEnableRealtimeMonitor', page).val(config.EnableLibraryMonitor);
|
||||||
|
|
||||||
$('#txtItemsByNamePath', page).val(config.ItemsByNamePath || '');
|
$('#txtItemsByNamePath', page).val(config.ItemsByNamePath || '');
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
$('#chkFavorite', page).checked(query.IsFavorite == true).checkboxradio('refresh');
|
$('#chkFavorite', page).checked(query.IsFavorite == true).checkboxradio('refresh');
|
||||||
$('#chkLikes', page).checked(query.IsLiked == true).checkboxradio('refresh');
|
$('#chkLikes', page).checked(query.IsLiked == true).checkboxradio('refresh');
|
||||||
$('#chkDislikes', page).checked(query.IsDisliked == true).checkboxradio('refresh');
|
$('#chkDislikes', page).checked(query.IsDisliked == true).checkboxradio('refresh');
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.LiveTvPage.initChannelsTab = function (page, tabContent) {
|
window.LiveTvPage.initChannelsTab = function (page, tabContent) {
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
|
|
||||||
function updateFilterControls(page) {
|
function updateFilterControls(page) {
|
||||||
|
|
||||||
$('#selectView', page).val(view).selectmenu('refresh');
|
$('#selectView', page).val(view);
|
||||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
function reloadItems(page) {
|
function reloadItems(page) {
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
LibraryBrowser.getSavedViewSetting(viewkey).done(function (val) {
|
LibraryBrowser.getSavedViewSetting(viewkey).done(function (val) {
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
$('#selectView', page).val(val).selectmenu('refresh').trigger('change');
|
$('#selectView', page).val(val).trigger('change');
|
||||||
} else {
|
} else {
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
$('.liveTvSettingsForm', page).show();
|
$('.liveTvSettingsForm', page).show();
|
||||||
$('.noLiveTvServices', page).hide();
|
$('.noLiveTvServices', page).hide();
|
||||||
|
|
||||||
$('#selectGuideDays', page).val(config.GuideDays || '').selectmenu('refresh');
|
$('#selectGuideDays', page).val(config.GuideDays || '');
|
||||||
|
|
||||||
$('#chkMovies', page).checked(config.EnableMovieProviders);
|
$('#chkMovies', page).checked(config.EnableMovieProviders);
|
||||||
$('#chkOrganize', page).checked(config.EnableAutoOrganize);
|
$('#chkOrganize', page).checked(config.EnableAutoOrganize);
|
||||||
|
|
|
@ -189,13 +189,13 @@
|
||||||
|
|
||||||
if (showCollectionType) {
|
if (showCollectionType) {
|
||||||
$('#fldCollectionType', popup).show();
|
$('#fldCollectionType', popup).show();
|
||||||
$('#selectCollectionType', popup).attr('required', 'required').selectmenu('refresh');
|
$('#selectCollectionType', popup).attr('required', 'required');
|
||||||
} else {
|
} else {
|
||||||
$('#fldCollectionType', popup).hide();
|
$('#fldCollectionType', popup).hide();
|
||||||
$('#selectCollectionType', popup).removeAttr('required').selectmenu('refresh');
|
$('#selectCollectionType', popup).removeAttr('required');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#selectCollectionType', popup).html(MediaLibraryPage.getCollectionTypeOptionsHtml()).val('').selectmenu('refresh');
|
$('#selectCollectionType', popup).html(MediaLibraryPage.getCollectionTypeOptionsHtml()).val('');
|
||||||
|
|
||||||
popup.on("popupafterclose", function () {
|
popup.on("popupafterclose", function () {
|
||||||
$(this).off("popupafterclose").off("click");
|
$(this).off("popupafterclose").off("click");
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
function loadMetadataConfig(page, config) {
|
function loadMetadataConfig(page, config) {
|
||||||
|
|
||||||
$('#selectDateAdded', page).val((config.UseFileCreationTimeForDateAdded ? '1' : '0')).selectmenu("refresh");
|
$('#selectDateAdded', page).val((config.UseFileCreationTimeForDateAdded ? '1' : '0'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadTmdbConfig(page, config) {
|
function loadTmdbConfig(page, config) {
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
|
|
||||||
$('#chkEnableInternetProviders', page).checked(config.EnableInternetProviders).checkboxradio("refresh");
|
$('#chkEnableInternetProviders', page).checked(config.EnableInternetProviders).checkboxradio("refresh");
|
||||||
$('#chkSaveLocal', page).checked(config.SaveLocalMeta).checkboxradio("refresh");
|
$('#chkSaveLocal', page).checked(config.SaveLocalMeta).checkboxradio("refresh");
|
||||||
$('#selectLanguage', page).val(config.PreferredMetadataLanguage).selectmenu("refresh");
|
$('#selectLanguage', page).val(config.PreferredMetadataLanguage);
|
||||||
$('#selectCountry', page).val(config.MetadataCountryCode).selectmenu("refresh");
|
$('#selectCountry', page).val(config.MetadataCountryCode);
|
||||||
|
|
||||||
$('#selectImageSavingConvention', page).val(config.ImageSavingConvention).selectmenu("refresh");
|
$('#selectImageSavingConvention', page).val(config.ImageSavingConvention);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
html += '<option value="' + tab.type + '"' + isChecked + '>' + Globalize.translate(tab.name) + '</option>';
|
html += '<option value="' + tab.type + '"' + isChecked + '>' + Globalize.translate(tab.name) + '</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#selectItemType', page).html(html).selectmenu('refresh').trigger('change');
|
$('#selectItemType', page).html(html).trigger('change');
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
return '<option value="' + user.Id + '">' + user.Name + '</option>';
|
return '<option value="' + user.Id + '">' + user.Name + '</option>';
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
$('#selectUser', page).html(html).val(config.UserId || '').selectmenu('refresh');
|
$('#selectUser', page).html(html).val(config.UserId || '');
|
||||||
$('#selectReleaseDateFormat', page).val(config.ReleaseDateFormat).selectmenu('refresh');
|
$('#selectReleaseDateFormat', page).val(config.ReleaseDateFormat);
|
||||||
$('#chkSaveImagePaths', page).checked(config.SaveImagePathsInNfo).checkboxradio('refresh');
|
$('#chkSaveImagePaths', page).checked(config.SaveImagePathsInNfo).checkboxradio('refresh');
|
||||||
$('#chkEnablePathSubstitution', page).checked(config.EnablePathSubstitution).checkboxradio('refresh');
|
$('#chkEnablePathSubstitution', page).checked(config.EnablePathSubstitution).checkboxradio('refresh');
|
||||||
$('#chkEnableExtraThumbs', page).checked(config.EnableExtraThumbsDuplication).checkboxradio('refresh');
|
$('#chkEnableExtraThumbs', page).checked(config.EnableExtraThumbsDuplication).checkboxradio('refresh');
|
||||||
|
|
|
@ -135,10 +135,10 @@
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
$('#selectView', page).val(view).selectmenu('refresh');
|
$('#selectView', page).val(view);
|
||||||
|
|
||||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
var filtersLoaded;
|
var filtersLoaded;
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
LibraryBrowser.getSavedViewSetting(getSavedQueryKey()).done(function (val) {
|
LibraryBrowser.getSavedViewSetting(getSavedQueryKey()).done(function (val) {
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
$('#selectView', page).val(val).selectmenu('refresh').trigger('change');
|
$('#selectView', page).val(val).trigger('change');
|
||||||
} else {
|
} else {
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
|
|
||||||
var query = getQuery();
|
var query = getQuery();
|
||||||
|
|
||||||
$('#selectView', page).val(view).selectmenu('refresh');
|
$('#selectView', page).val(view);
|
||||||
|
|
||||||
// Reset form values using the last used query
|
// Reset form values using the last used query
|
||||||
$('.radioSortBy', page).each(function () {
|
$('.radioSortBy', page).each(function () {
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
|
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
var filtersLoaded;
|
var filtersLoaded;
|
||||||
|
@ -289,7 +289,7 @@
|
||||||
LibraryBrowser.getSavedViewSetting(getSavedQueryKey()).done(function (val) {
|
LibraryBrowser.getSavedViewSetting(getSavedQueryKey()).done(function (val) {
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
$('#selectView', page).val(val).selectmenu('refresh').trigger('change');
|
$('#selectView', page).val(val).trigger('change');
|
||||||
} else {
|
} else {
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,10 +134,10 @@
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
$('#selectView', page).val(view).selectmenu('refresh');
|
$('#selectView', page).val(view);
|
||||||
|
|
||||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
var filtersLoaded;
|
var filtersLoaded;
|
||||||
|
@ -226,7 +226,7 @@
|
||||||
LibraryBrowser.getSavedViewSetting(getSavedQueryKey()).done(function (val) {
|
LibraryBrowser.getSavedViewSetting(getSavedQueryKey()).done(function (val) {
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
$('#selectView', page).val(val).selectmenu('refresh').trigger('change');
|
$('#selectView', page).val(val).trigger('change');
|
||||||
} else {
|
} else {
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
page.querySelector('.chkDisplayUnairedEpisodes').checked = user.Configuration.DisplayUnairedEpisodes || false;
|
page.querySelector('.chkDisplayUnairedEpisodes').checked = user.Configuration.DisplayUnairedEpisodes || false;
|
||||||
page.querySelector('.chkGroupMoviesIntoCollections').checked = user.Configuration.GroupMoviesIntoBoxSets || false;
|
page.querySelector('.chkGroupMoviesIntoCollections').checked = user.Configuration.GroupMoviesIntoBoxSets || false;
|
||||||
|
|
||||||
$('#selectThemeSong', page).val(appStorage.getItem('enableThemeSongs-' + user.Id) || '').selectmenu("refresh");
|
$('#selectThemeSong', page).val(appStorage.getItem('enableThemeSongs-' + user.Id) || '');
|
||||||
$('#selectBackdrop', page).val(appStorage.getItem('enableBackdrops-' + user.Id) || '').selectmenu("refresh");
|
$('#selectBackdrop', page).val(appStorage.getItem('enableBackdrops-' + user.Id) || '');
|
||||||
|
|
||||||
$('#selectLanguage', page).val(AppSettings.displayLanguage()).selectmenu("refresh");
|
$('#selectLanguage', page).val(AppSettings.displayLanguage());
|
||||||
|
|
||||||
page.querySelector('.chkEnableFullScreen').checked = AppSettings.enableFullScreen();
|
page.querySelector('.chkEnableFullScreen').checked = AppSettings.enableFullScreen();
|
||||||
|
|
||||||
|
|
|
@ -130,10 +130,10 @@
|
||||||
page.querySelector('.chkHidePlayedFromLatest').checked = user.Configuration.HidePlayedInLatest || false;
|
page.querySelector('.chkHidePlayedFromLatest').checked = user.Configuration.HidePlayedInLatest || false;
|
||||||
page.querySelector('.chkDisplayChannelsInline').checked = user.Configuration.DisplayChannelsInline || false;
|
page.querySelector('.chkDisplayChannelsInline').checked = user.Configuration.DisplayChannelsInline || false;
|
||||||
|
|
||||||
$('#selectHomeSection1', page).val(displayPreferences.CustomPrefs.home0 || '').selectmenu("refresh");
|
$('#selectHomeSection1', page).val(displayPreferences.CustomPrefs.home0 || '');
|
||||||
$('#selectHomeSection2', page).val(displayPreferences.CustomPrefs.home1 || '').selectmenu("refresh");
|
$('#selectHomeSection2', page).val(displayPreferences.CustomPrefs.home1 || '');
|
||||||
$('#selectHomeSection3', page).val(displayPreferences.CustomPrefs.home2 || '').selectmenu("refresh");
|
$('#selectHomeSection3', page).val(displayPreferences.CustomPrefs.home2 || '');
|
||||||
$('#selectHomeSection4', page).val(displayPreferences.CustomPrefs.home3 || '').selectmenu("refresh");
|
$('#selectHomeSection4', page).val(displayPreferences.CustomPrefs.home3 || '');
|
||||||
|
|
||||||
var promise1 = ApiClient.getItems(user.Id, {
|
var promise1 = ApiClient.getItems(user.Id, {
|
||||||
sortBy: "SortName"
|
sortBy: "SortName"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
html += "<option value='" + culture.ThreeLetterISOLanguageName + "'>" + culture.DisplayName + "</option>";
|
html += "<option value='" + culture.ThreeLetterISOLanguageName + "'>" + culture.DisplayName + "</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$(select).html(html).selectmenu("refresh");
|
$(select).html(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadForm(page, user, loggedInUser, allCulturesPromise) {
|
function loadForm(page, user, loggedInUser, allCulturesPromise) {
|
||||||
|
@ -23,11 +23,11 @@
|
||||||
populateLanguages($('#selectAudioLanguage', page), allCultures);
|
populateLanguages($('#selectAudioLanguage', page), allCultures);
|
||||||
populateLanguages($('#selectSubtitleLanguage', page), allCultures);
|
populateLanguages($('#selectSubtitleLanguage', page), allCultures);
|
||||||
|
|
||||||
$('#selectAudioLanguage', page).val(user.Configuration.AudioLanguagePreference || "").selectmenu("refresh");
|
$('#selectAudioLanguage', page).val(user.Configuration.AudioLanguagePreference || "");
|
||||||
$('#selectSubtitleLanguage', page).val(user.Configuration.SubtitleLanguagePreference || "").selectmenu("refresh");
|
$('#selectSubtitleLanguage', page).val(user.Configuration.SubtitleLanguagePreference || "");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#selectSubtitlePlaybackMode', page).val(user.Configuration.SubtitleMode || "").selectmenu("refresh").trigger('change');
|
$('#selectSubtitlePlaybackMode', page).val(user.Configuration.SubtitleMode || "").trigger('change');
|
||||||
|
|
||||||
page.querySelector('.chkPlayDefaultAudioTrack').checked = user.Configuration.PlayDefaultAudioTrack || false;
|
page.querySelector('.chkPlayDefaultAudioTrack').checked = user.Configuration.PlayDefaultAudioTrack || false;
|
||||||
page.querySelector('.chkEnableCinemaMode').checked = user.Configuration.EnableCinemaMode || false;
|
page.querySelector('.chkEnableCinemaMode').checked = user.Configuration.EnableCinemaMode || false;
|
||||||
|
@ -39,10 +39,10 @@
|
||||||
return '<option value="' + i.bitrate + '">' + i.name + '</option>';
|
return '<option value="' + i.bitrate + '">' + i.name + '</option>';
|
||||||
|
|
||||||
}).join('');
|
}).join('');
|
||||||
$('#selectMaxBitrate', page).html(bitrateOptions).val(AppSettings.maxStreamingBitrate()).selectmenu("refresh");
|
$('#selectMaxBitrate', page).html(bitrateOptions).val(AppSettings.maxStreamingBitrate());
|
||||||
|
|
||||||
|
|
||||||
$('#selectMaxChromecastBitrate', page).val(AppSettings.maxChromecastBitrate()).selectmenu("refresh");
|
$('#selectMaxChromecastBitrate', page).val(AppSettings.maxChromecastBitrate());
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
|
|
||||||
$('#txtTitle', page).val(notificationConfig.Title || typeInfo.DefaultTitle);
|
$('#txtTitle', page).val(notificationConfig.Title || typeInfo.DefaultTitle);
|
||||||
|
|
||||||
$('#selectUsers', page).val(notificationConfig.SendToUserMode).selectmenu('refresh').trigger('change');
|
$('#selectUsers', page).val(notificationConfig.SendToUserMode).trigger('change');
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,9 +101,9 @@
|
||||||
|
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
select.html(selectHtml).selectmenu('refresh');
|
select.html(selectHtml);
|
||||||
|
|
||||||
select.val(lastPlaylistId || '').selectmenu('refresh').trigger('change');
|
select.val(lastPlaylistId || '').trigger('change');
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
return '<option value="' + i.Id + '">' + i.Name + '</option>';
|
return '<option value="' + i.Id + '">' + i.Name + '</option>';
|
||||||
});
|
});
|
||||||
|
|
||||||
select.html(html).val('').selectmenu('refresh').trigger('change');
|
select.html(html).val('').trigger('change');
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,7 +298,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#selectPageSize', page).val(selected).selectmenu('refresh');
|
$('#selectPageSize', page).val(selected);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -504,7 +504,7 @@
|
||||||
$('#chkThemeSong', page).checked(query.HasThemeSong == true).checkboxradio('refresh');
|
$('#chkThemeSong', page).checked(query.HasThemeSong == true).checkboxradio('refresh');
|
||||||
$('#chkThemeVideo', page).checked(query.HasThemeVideo == true).checkboxradio('refresh');
|
$('#chkThemeVideo', page).checked(query.HasThemeVideo == true).checkboxradio('refresh');
|
||||||
|
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
|
|
||||||
//Management
|
//Management
|
||||||
$('#chkMissingRating', page).checked(query.HasOfficialRating == false).checkboxradio('refresh');
|
$('#chkMissingRating', page).checked(query.HasOfficialRating == false).checkboxradio('refresh');
|
||||||
|
@ -519,7 +519,7 @@
|
||||||
$('#chkMissingEpisode', page).checked(query.IsMissing == true).checkboxradio('refresh');
|
$('#chkMissingEpisode', page).checked(query.IsMissing == true).checkboxradio('refresh');
|
||||||
$('#chkFutureEpisode', page).checked(query.IsUnaired == true).checkboxradio('refresh');
|
$('#chkFutureEpisode', page).checked(query.IsUnaired == true).checkboxradio('refresh');
|
||||||
|
|
||||||
$('#selectIncludeItemTypes').val(query.IncludeItemTypes).selectmenu('refresh');
|
$('#selectIncludeItemTypes').val(query.IncludeItemTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
var filtersLoaded;
|
var filtersLoaded;
|
||||||
|
@ -855,7 +855,7 @@
|
||||||
|
|
||||||
QueryReportFilters.onPageShow(page, query);
|
QueryReportFilters.onPageShow(page, query);
|
||||||
QueryReportColumns.onPageShow(page, query);
|
QueryReportColumns.onPageShow(page, query);
|
||||||
$('#selectIncludeItemTypes', page).val(query.IncludeItemTypes).selectmenu('refresh').trigger('change');
|
$('#selectIncludeItemTypes', page).val(query.IncludeItemTypes).trigger('change');
|
||||||
|
|
||||||
updateFilterControls(page);
|
updateFilterControls(page);
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
|
|
||||||
var page = $.mobile.activePage;
|
var page = $.mobile.activePage;
|
||||||
|
|
||||||
Events.trigger($('#selectTriggerType', page).val('DailyTrigger').selectmenu('refresh')[0], 'change');
|
Events.trigger($('#selectTriggerType', page).val('DailyTrigger')[0], 'change');
|
||||||
|
|
||||||
$('#popupAddTrigger', page).on("popupafteropen", function () {
|
$('#popupAddTrigger', page).on("popupafteropen", function () {
|
||||||
$('#addTriggerForm input:first', this).focus();
|
$('#addTriggerForm input:first', this).focus();
|
||||||
|
|
|
@ -67,7 +67,7 @@ var Dashboard = {
|
||||||
// These are not needed. Nulling them out can help reduce dom querying when pages are loaded
|
// These are not needed. Nulling them out can help reduce dom querying when pages are loaded
|
||||||
$.mobile.nojs = null;
|
$.mobile.nojs = null;
|
||||||
$.mobile.degradeInputsWithin = null;
|
$.mobile.degradeInputsWithin = null;
|
||||||
$.mobile.keepNative = ":jqmData(role='none'),.paper-input,textarea.style-scope";
|
$.mobile.keepNative = ":jqmData(role='none')";
|
||||||
|
|
||||||
$.mobile.filterHtml = Dashboard.filterHtml;
|
$.mobile.filterHtml = Dashboard.filterHtml;
|
||||||
},
|
},
|
||||||
|
@ -1470,7 +1470,7 @@ var Dashboard = {
|
||||||
html += "<option value='" + culture.TwoLetterISOLanguageName + "'>" + culture.DisplayName + "</option>";
|
html += "<option value='" + culture.TwoLetterISOLanguageName + "'>" + culture.DisplayName + "</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$(select).html(html).selectmenu("refresh");
|
$(select).html(html);
|
||||||
},
|
},
|
||||||
|
|
||||||
populateCountries: function (select, allCountries) {
|
populateCountries: function (select, allCountries) {
|
||||||
|
@ -1486,7 +1486,7 @@ var Dashboard = {
|
||||||
html += "<option value='" + culture.TwoLetterISORegionName + "'>" + culture.DisplayName + "</option>";
|
html += "<option value='" + culture.TwoLetterISORegionName + "'>" + culture.DisplayName + "</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$(select).html(html).selectmenu("refresh");
|
$(select).html(html);
|
||||||
},
|
},
|
||||||
|
|
||||||
getSupportedRemoteCommands: function () {
|
getSupportedRemoteCommands: function () {
|
||||||
|
|
|
@ -134,7 +134,7 @@ $(document).on('pageshowready', "#supporterKeyPage", SupporterKeyPage.onPageShow
|
||||||
|
|
||||||
return '<option value="' + u.ConnectUserId + '">' + u.Name + '</option>';
|
return '<option value="' + u.ConnectUserId + '">' + u.Name + '</option>';
|
||||||
|
|
||||||
}).join('')).selectmenu('refresh');
|
}).join(''));
|
||||||
}
|
}
|
||||||
|
|
||||||
function addUser(page, id) {
|
function addUser(page, id) {
|
||||||
|
|
|
@ -351,14 +351,14 @@
|
||||||
var selectedAttribute = o.IsDefault ? ' selected="selected"' : '';
|
var selectedAttribute = o.IsDefault ? ' selected="selected"' : '';
|
||||||
return '<option value="' + o.Id + '"' + selectedAttribute + '>' + o.Name + '</option>';
|
return '<option value="' + o.Id + '"' + selectedAttribute + '>' + o.Name + '</option>';
|
||||||
|
|
||||||
}).join('')).trigger('change').selectmenu('refresh');
|
}).join('')).trigger('change');
|
||||||
|
|
||||||
$('#selectQuality', form).html(options.QualityOptions.map(function (o) {
|
$('#selectQuality', form).html(options.QualityOptions.map(function (o) {
|
||||||
|
|
||||||
var selectedAttribute = o.IsDefault ? ' selected="selected"' : '';
|
var selectedAttribute = o.IsDefault ? ' selected="selected"' : '';
|
||||||
return '<option value="' + o.Id + '"' + selectedAttribute + '>' + o.Name + '</option>';
|
return '<option value="' + o.Id + '"' + selectedAttribute + '>' + o.Name + '</option>';
|
||||||
|
|
||||||
}).join('')).trigger('change').selectmenu('refresh');
|
}).join('')).trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
function isAvailable(item, user) {
|
function isAvailable(item, user) {
|
||||||
|
|
|
@ -258,8 +258,8 @@
|
||||||
function fillJobValues(page, job, editOptions) {
|
function fillJobValues(page, job, editOptions) {
|
||||||
|
|
||||||
$('#txtSyncJobName', page).val(job.Name);
|
$('#txtSyncJobName', page).val(job.Name);
|
||||||
$('#selectProfile', page).val(job.Profile || '').trigger('change').selectmenu('refresh');
|
$('#selectProfile', page).val(job.Profile || '').trigger('change');
|
||||||
$('#selectQuality', page).val(job.Quality || '').trigger('change').selectmenu('refresh');
|
$('#selectQuality', page).val(job.Quality || '').trigger('change');
|
||||||
$('#chkUnwatchedOnly', page).checked(job.UnwatchedOnly).checkboxradio('refresh');
|
$('#chkUnwatchedOnly', page).checked(job.UnwatchedOnly).checkboxradio('refresh');
|
||||||
$('#chkSyncNewContent', page).checked(job.SyncNewContent).checkboxradio('refresh');
|
$('#chkSyncNewContent', page).checked(job.SyncNewContent).checkboxradio('refresh');
|
||||||
$('#txtItemLimit', page).val(job.ItemLimit);
|
$('#txtItemLimit', page).val(job.ItemLimit);
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
|
|
||||||
var query = getQuery();
|
var query = getQuery();
|
||||||
|
|
||||||
$('#selectView', page).val(view).selectmenu('refresh');
|
$('#selectView', page).val(view);
|
||||||
|
|
||||||
$('#chkTrailer', page).checked(query.HasTrailer == true).checkboxradio('refresh');
|
$('#chkTrailer', page).checked(query.HasTrailer == true).checkboxradio('refresh');
|
||||||
$('#chkThemeSong', page).checked(query.HasThemeSong == true).checkboxradio('refresh');
|
$('#chkThemeSong', page).checked(query.HasThemeSong == true).checkboxradio('refresh');
|
||||||
|
@ -203,7 +203,7 @@
|
||||||
$('#chkSpecialFeature', page).checked(query.HasSpecialFeature == true).checkboxradio('refresh');
|
$('#chkSpecialFeature', page).checked(query.HasSpecialFeature == true).checkboxradio('refresh');
|
||||||
|
|
||||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
|
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
|
||||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
$('#selectPageSize', page).val(query.Limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
var filtersLoaded;
|
var filtersLoaded;
|
||||||
|
@ -407,7 +407,7 @@
|
||||||
LibraryBrowser.getSavedViewSetting(viewKey).done(function (val) {
|
LibraryBrowser.getSavedViewSetting(viewKey).done(function (val) {
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
Events.trigger($('#selectView', page).val(val).selectmenu('refresh')[0], 'change');
|
Events.trigger($('#selectView', page).val(val)[0], 'change');
|
||||||
} else {
|
} else {
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
html += "<option value='" + rating.Value + "'>" + rating.Name + "</option>";
|
html += "<option value='" + rating.Value + "'>" + rating.Name + "</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#selectMaxParentalRating', page).html(html).selectmenu("refresh");
|
$('#selectMaxParentalRating', page).html(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadUnratedItems(page, user) {
|
function loadUnratedItems(page, user) {
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#selectMaxParentalRating', page).val(ratingValue).selectmenu("refresh");
|
$('#selectMaxParentalRating', page).val(ratingValue);
|
||||||
|
|
||||||
if (user.Policy.IsAdministrator) {
|
if (user.Policy.IsAdministrator) {
|
||||||
$('.accessScheduleSection', page).hide();
|
$('.accessScheduleSection', page).hide();
|
||||||
|
@ -279,8 +279,8 @@
|
||||||
|
|
||||||
html += '<option value="24">' + getDisplayTime(0) + '</option>';
|
html += '<option value="24">' + getDisplayTime(0) + '</option>';
|
||||||
|
|
||||||
$('#selectStart', page).html(html).selectmenu('refresh');
|
$('#selectStart', page).html(html);
|
||||||
$('#selectEnd', page).html(html).selectmenu('refresh');
|
$('#selectEnd', page).html(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showSchedulePopup(page, schedule, index) {
|
function showSchedulePopup(page, schedule, index) {
|
||||||
|
@ -291,9 +291,9 @@
|
||||||
|
|
||||||
$('#fldScheduleIndex', page).val(index);
|
$('#fldScheduleIndex', page).val(index);
|
||||||
|
|
||||||
$('#selectDay', page).val(schedule.DayOfWeek || 'Sunday').selectmenu('refresh');
|
$('#selectDay', page).val(schedule.DayOfWeek || 'Sunday');
|
||||||
$('#selectStart', page).val(schedule.StartHour || 0).selectmenu('refresh');
|
$('#selectStart', page).val(schedule.StartHour || 0);
|
||||||
$('#selectEnd', page).val(schedule.EndHour || 0).selectmenu('refresh');
|
$('#selectEnd', page).val(schedule.EndHour || 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveSchedule(page) {
|
function saveSchedule(page) {
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
apiClient.getJSON(apiClient.getUrl('Startup/Configuration')).done(function (config) {
|
apiClient.getJSON(apiClient.getUrl('Startup/Configuration')).done(function (config) {
|
||||||
|
|
||||||
$('#selectTunerType', page).val(config.LiveTvTunerType || 'hdhomerun').selectmenu("refresh");
|
$('#selectTunerType', page).val(config.LiveTvTunerType || 'hdhomerun');
|
||||||
page.querySelector('.txtDevicePath').value = config.LiveTvTunerPath || '';
|
page.querySelector('.txtDevicePath').value = config.LiveTvTunerPath || '';
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
Dashboard.populateLanguages($('#selectLanguage', page), cultures);
|
Dashboard.populateLanguages($('#selectLanguage', page), cultures);
|
||||||
Dashboard.populateCountries($('#selectCountry', page), countries);
|
Dashboard.populateCountries($('#selectCountry', page), countries);
|
||||||
|
|
||||||
$('#selectLanguage', page).val(config.PreferredMetadataLanguage).selectmenu("refresh");
|
$('#selectLanguage', page).val(config.PreferredMetadataLanguage);
|
||||||
$('#selectCountry', page).val(config.MetadataCountryCode).selectmenu("refresh");
|
$('#selectCountry', page).val(config.MetadataCountryCode);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
return '<option value="' + l.Value + '">' + l.Name + '</option>';
|
return '<option value="' + l.Value + '">' + l.Name + '</option>';
|
||||||
|
|
||||||
})).val(config.UICulture).selectmenu('refresh');
|
})).val(config.UICulture);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,16 +131,16 @@
|
||||||
"change": "_controlChange",
|
"change": "_controlChange",
|
||||||
"keyup": "_controlKeyup",
|
"keyup": "_controlKeyup",
|
||||||
"blur": "_controlBlur",
|
"blur": "_controlBlur",
|
||||||
"vmouseup": "_controlVMouseUp"
|
"mouseup": "_controlVMouseUp"
|
||||||
});
|
});
|
||||||
|
|
||||||
slider.bind("vmousedown", $.proxy(this._sliderVMouseDown, this))
|
slider.bind("mousedown", $.proxy(this._sliderVMouseDown, this))
|
||||||
.bind("click", false);
|
.bind("click", false);
|
||||||
|
|
||||||
// We have to instantiate a new function object for the unbind to work properly
|
// We have to instantiate a new function object for the unbind to work properly
|
||||||
// since the method itself is defined in the prototype (causing it to unbind everything)
|
// since the method itself is defined in the prototype (causing it to unbind everything)
|
||||||
this._on(document, { "vmousemove": "_preventDocumentDrag" });
|
this._on(document, { "mousemove": "_preventDocumentDrag" });
|
||||||
this._on(slider.add(document), { "vmouseup": "_sliderVMouseUp" });
|
this._on(slider.add(document), { "mouseup": "_sliderVMouseUp" });
|
||||||
|
|
||||||
slider.insertAfter(control);
|
slider.insertAfter(control);
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
|
|
||||||
// bind the handle event callbacks and set the context to the widget instance
|
// bind the handle event callbacks and set the context to the widget instance
|
||||||
this._on(this.handle, {
|
this._on(this.handle, {
|
||||||
"vmousedown": "_handleVMouseDown",
|
"mousedown": "_handleVMouseDown",
|
||||||
"keydown": "_handleKeydown",
|
"keydown": "_handleKeydown",
|
||||||
"keyup": "_handleKeyup"
|
"keyup": "_handleKeyup"
|
||||||
});
|
});
|
||||||
|
@ -642,7 +642,7 @@
|
||||||
"reset": "_handleReset"
|
"reset": "_handleReset"
|
||||||
});
|
});
|
||||||
this._on(firstHandle, {
|
this._on(firstHandle, {
|
||||||
"vmousedown": "_dragFirstHandle"
|
"mousedown": "_dragFirstHandle"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
_handleReset: function () {
|
_handleReset: function () {
|
||||||
|
@ -681,7 +681,7 @@
|
||||||
this._proxy = false;
|
this._proxy = false;
|
||||||
//this stops dragging of the handle and brings the active track to the front
|
//this stops dragging of the handle and brings the active track to the front
|
||||||
//this makes clicks on the track go the the last handle used
|
//this makes clicks on the track go the the last handle used
|
||||||
this.element.find("input").trigger("vmouseup");
|
this.element.find("input").trigger("mouseup");
|
||||||
this._sliderFirst.css("z-index", first ? 1 : "");
|
this._sliderFirst.css("z-index", first ? 1 : "");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -870,8 +870,8 @@
|
||||||
|
|
||||||
this._setOption("popupEnabled", this.options.popupEnabled);
|
this._setOption("popupEnabled", this.options.popupEnabled);
|
||||||
|
|
||||||
this._on(this.handle, { "vmousedown": "_showPopup" });
|
this._on(this.handle, { "mousedown": "_showPopup" });
|
||||||
this._on(this.slider.add(this.document), { "vmouseup": "_hidePopup" });
|
this._on(this.slider.add(this.document), { "mouseup": "_hidePopup" });
|
||||||
this._refresh();
|
this._refresh();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -6428,298 +6428,9 @@ $.widget( "mobile.checkboxradio", $.extend( {
|
||||||
|
|
||||||
(function( $, undefined ) {
|
(function( $, undefined ) {
|
||||||
|
|
||||||
$.widget( "mobile.selectmenu", $.extend( {
|
$.fn.selectmenu = function() {
|
||||||
initSelector: "select:not( [data-role='slider'])",
|
return this;
|
||||||
|
};
|
||||||
options: {
|
|
||||||
theme: null,
|
|
||||||
icon: "carat-d",
|
|
||||||
iconpos: "right",
|
|
||||||
inline: false,
|
|
||||||
corners: true,
|
|
||||||
shadow: true,
|
|
||||||
iconshadow: false, /* TODO: Deprecated in 1.4, remove in 1.5. */
|
|
||||||
overlayTheme: null,
|
|
||||||
dividerTheme: null,
|
|
||||||
hidePlaceholderMenuItems: true,
|
|
||||||
closeText: "Close",
|
|
||||||
nativeMenu: true,
|
|
||||||
// This option defaults to true on iOS devices.
|
|
||||||
preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1,
|
|
||||||
mini: false
|
|
||||||
},
|
|
||||||
|
|
||||||
_button: function() {
|
|
||||||
return $( "<div/>" );
|
|
||||||
},
|
|
||||||
|
|
||||||
_setDisabled: function( value ) {
|
|
||||||
this.element.attr( "disabled", value );
|
|
||||||
this.button.attr( "aria-disabled", value );
|
|
||||||
return this._setOption( "disabled", value );
|
|
||||||
},
|
|
||||||
|
|
||||||
_focusButton : function() {
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
setTimeout( function() {
|
|
||||||
self.button.focus();
|
|
||||||
}, 40);
|
|
||||||
},
|
|
||||||
|
|
||||||
_selectOptions: function() {
|
|
||||||
return this.select.find( "option" );
|
|
||||||
},
|
|
||||||
|
|
||||||
// setup items that are generally necessary for select menu extension
|
|
||||||
_preExtension: function() {
|
|
||||||
var inline = this.options.inline || this.element.jqmData( "inline" ),
|
|
||||||
mini = this.options.mini || this.element.jqmData( "mini" ),
|
|
||||||
classes = "";
|
|
||||||
// TODO: Post 1.1--once we have time to test thoroughly--any classes manually applied to the original element should be carried over to the enhanced element, with an `-enhanced` suffix. See https://github.com/jquery/jquery-mobile/issues/3577
|
|
||||||
/* if ( $el[0].className.length ) {
|
|
||||||
classes = $el[0].className;
|
|
||||||
} */
|
|
||||||
if ( !!~this.element[0].className.indexOf( "ui-btn-left" ) ) {
|
|
||||||
classes = " ui-btn-left";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !!~this.element[0].className.indexOf( "ui-btn-right" ) ) {
|
|
||||||
classes = " ui-btn-right";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( inline ) {
|
|
||||||
classes += " ui-btn-inline";
|
|
||||||
}
|
|
||||||
if ( mini ) {
|
|
||||||
classes += " ui-mini";
|
|
||||||
}
|
|
||||||
|
|
||||||
this.select = this.element.removeClass( "ui-btn-left ui-btn-right" ).wrap( "<div class='ui-select" + classes + "'>" );
|
|
||||||
this.selectId = this.select.attr( "id" ) || ( "select-" + this.uuid );
|
|
||||||
this.buttonId = this.selectId + "-button";
|
|
||||||
this.label = $( "label[for='"+ this.selectId +"']" );
|
|
||||||
this.isMultiple = this.select[ 0 ].multiple;
|
|
||||||
},
|
|
||||||
|
|
||||||
_destroy: function() {
|
|
||||||
var wrapper = this.element.parents( ".ui-select" );
|
|
||||||
if ( wrapper.length > 0 ) {
|
|
||||||
if ( wrapper.is( ".ui-btn-left, .ui-btn-right" ) ) {
|
|
||||||
this.element.addClass( wrapper.hasClass( "ui-btn-left" ) ? "ui-btn-left" : "ui-btn-right" );
|
|
||||||
}
|
|
||||||
this.element.insertAfter( wrapper );
|
|
||||||
wrapper.remove();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_create: function() {
|
|
||||||
this._preExtension();
|
|
||||||
|
|
||||||
this.button = this._button();
|
|
||||||
|
|
||||||
var self = this,
|
|
||||||
|
|
||||||
options = this.options,
|
|
||||||
|
|
||||||
iconpos = options.icon ? ( options.iconpos || this.select.jqmData( "iconpos" ) ) : false,
|
|
||||||
|
|
||||||
button = this.button
|
|
||||||
.insertBefore( this.select )
|
|
||||||
.attr( "id", this.buttonId )
|
|
||||||
.addClass( "ui-btn" +
|
|
||||||
( options.icon ? ( " ui-icon-" + options.icon + " ui-btn-icon-" + iconpos +
|
|
||||||
( options.iconshadow ? " ui-shadow-icon" : "" ) ) : "" ) + /* TODO: Remove in 1.5. */
|
|
||||||
( options.theme ? " ui-btn-" + options.theme : "" ) +
|
|
||||||
( options.corners ? " ui-corner-all" : "" ) +
|
|
||||||
( options.shadow ? " ui-shadow" : "" ) );
|
|
||||||
|
|
||||||
this.setButtonText();
|
|
||||||
|
|
||||||
// Opera does not properly support opacity on select elements
|
|
||||||
// In Mini, it hides the element, but not its text
|
|
||||||
// On the desktop,it seems to do the opposite
|
|
||||||
// for these reasons, using the nativeMenu option results in a full native select in Opera
|
|
||||||
if ( options.nativeMenu && window.opera && window.opera.version ) {
|
|
||||||
button.addClass( "ui-select-nativeonly" );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add counter for multi selects
|
|
||||||
if ( this.isMultiple ) {
|
|
||||||
this.buttonCount = $( "<span>" )
|
|
||||||
.addClass( "ui-li-count ui-body-inherit" )
|
|
||||||
.hide()
|
|
||||||
.appendTo( button.addClass( "ui-li-has-count" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disable if specified
|
|
||||||
if ( options.disabled || this.element.attr( "disabled" )) {
|
|
||||||
this.disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Events on native select
|
|
||||||
this.select.change(function() {
|
|
||||||
self.refresh();
|
|
||||||
|
|
||||||
if ( !!options.nativeMenu ) {
|
|
||||||
self._delay( function() {
|
|
||||||
self.select.blur();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this._handleFormReset();
|
|
||||||
|
|
||||||
this._on( this.button, {
|
|
||||||
keydown: "_handleKeydown"
|
|
||||||
});
|
|
||||||
|
|
||||||
this.build();
|
|
||||||
},
|
|
||||||
|
|
||||||
build: function() {
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
this.select
|
|
||||||
.appendTo( self.button )
|
|
||||||
.bind( "mousedown", function() {
|
|
||||||
// Add active class to button
|
|
||||||
self.button.addClass( $.mobile.activeBtnClass );
|
|
||||||
})
|
|
||||||
.bind( "focus", function() {
|
|
||||||
self.button.addClass( $.mobile.focusClass );
|
|
||||||
})
|
|
||||||
.bind( "blur", function() {
|
|
||||||
self.button.removeClass( $.mobile.focusClass );
|
|
||||||
})
|
|
||||||
.bind( "focus mouseover", function() {
|
|
||||||
self.button.trigger( "mouseover" );
|
|
||||||
})
|
|
||||||
.bind( "mousemove", function() {
|
|
||||||
// Remove active class on scroll/touchmove
|
|
||||||
self.button.removeClass( $.mobile.activeBtnClass );
|
|
||||||
})
|
|
||||||
.bind( "change blur mouseout", function() {
|
|
||||||
self.button.trigger( "mouseout" )
|
|
||||||
.removeClass( $.mobile.activeBtnClass );
|
|
||||||
});
|
|
||||||
|
|
||||||
// In many situations, iOS will zoom into the select upon tap, this prevents that from happening
|
|
||||||
self.button.bind( "mousedown", function() {
|
|
||||||
if ( self.options.preventFocusZoom ) {
|
|
||||||
$.mobile.zoom.disable( true );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
self.label.bind( "click focus", function() {
|
|
||||||
if ( self.options.preventFocusZoom ) {
|
|
||||||
$.mobile.zoom.disable( true );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
self.select.bind( "focus", function() {
|
|
||||||
if ( self.options.preventFocusZoom ) {
|
|
||||||
$.mobile.zoom.disable( true );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
self.button.bind( "mouseup", function() {
|
|
||||||
if ( self.options.preventFocusZoom ) {
|
|
||||||
setTimeout(function() {
|
|
||||||
$.mobile.zoom.enable( true );
|
|
||||||
}, 0 );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
self.select.bind( "blur", function() {
|
|
||||||
if ( self.options.preventFocusZoom ) {
|
|
||||||
$.mobile.zoom.enable( true );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
selected: function() {
|
|
||||||
return this._selectOptions().filter( ":selected" );
|
|
||||||
},
|
|
||||||
|
|
||||||
selectedIndices: function() {
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
return this.selected().map(function() {
|
|
||||||
return self._selectOptions().index( this );
|
|
||||||
}).get();
|
|
||||||
},
|
|
||||||
|
|
||||||
setButtonText: function() {
|
|
||||||
var self = this,
|
|
||||||
selected = this.selected(),
|
|
||||||
text = this.placeholder,
|
|
||||||
span = $( document.createElement( "span" ) );
|
|
||||||
|
|
||||||
this.button.children( "span" ).not( ".ui-li-count" ).remove().end().end().prepend( (function() {
|
|
||||||
if ( selected.length ) {
|
|
||||||
text = selected.map(function() {
|
|
||||||
return $( this ).text();
|
|
||||||
}).get().join( ", " );
|
|
||||||
} else {
|
|
||||||
text = self.placeholder;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( text ) {
|
|
||||||
span.text( text );
|
|
||||||
} else {
|
|
||||||
|
|
||||||
// Set the contents to which we write as   to be XHTML compliant - see gh-6699
|
|
||||||
span.html( " " );
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO possibly aggregate multiple select option classes
|
|
||||||
return span
|
|
||||||
.addClass( self.select.attr( "class" ) )
|
|
||||||
.addClass( selected.attr( "class" ) )
|
|
||||||
.removeClass( "ui-screen-hidden" );
|
|
||||||
})());
|
|
||||||
},
|
|
||||||
|
|
||||||
setButtonCount: function() {
|
|
||||||
var selected = this.selected();
|
|
||||||
|
|
||||||
// multiple count inside button
|
|
||||||
if ( this.isMultiple ) {
|
|
||||||
this.buttonCount[ selected.length > 1 ? "show" : "hide" ]().text( selected.length );
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_handleKeydown: function( /* event */ ) {
|
|
||||||
this._delay( "_refreshButton" );
|
|
||||||
},
|
|
||||||
|
|
||||||
_reset: function() {
|
|
||||||
this.refresh();
|
|
||||||
},
|
|
||||||
|
|
||||||
_refreshButton: function() {
|
|
||||||
this.setButtonText();
|
|
||||||
this.setButtonCount();
|
|
||||||
},
|
|
||||||
|
|
||||||
refresh: function() {
|
|
||||||
this._refreshButton();
|
|
||||||
},
|
|
||||||
|
|
||||||
// open and close preserved in native selects
|
|
||||||
// to simplify users code when looping over selects
|
|
||||||
open: $.noop,
|
|
||||||
close: $.noop,
|
|
||||||
|
|
||||||
disable: function() {
|
|
||||||
this._setDisabled( true );
|
|
||||||
this.button.addClass( "ui-state-disabled" );
|
|
||||||
},
|
|
||||||
|
|
||||||
enable: function() {
|
|
||||||
this._setDisabled( false );
|
|
||||||
this.button.removeClass( "ui-state-disabled" );
|
|
||||||
}
|
|
||||||
}, $.mobile.behaviors.formReset ) );
|
|
||||||
|
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|
||||||
(function( $, undefined ) {
|
(function( $, undefined ) {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
})[0] || {};
|
})[0] || {};
|
||||||
|
|
||||||
listingsId = info.ListingsId;
|
listingsId = info.ListingsId;
|
||||||
$('#selectListing', page).val(info.ListingsId || '').selectmenu('refresh');
|
$('#selectListing', page).val(info.ListingsId || '');
|
||||||
page.querySelector('.txtUser').value = info.Username || '';
|
page.querySelector('.txtUser').value = info.Username || '';
|
||||||
page.querySelector('.txtPass').value = info.Username || '';
|
page.querySelector('.txtPass').value = info.Username || '';
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
return '<option value="' + c.value + '">' + c.name + '</option>';
|
return '<option value="' + c.value + '">' + c.name + '</option>';
|
||||||
|
|
||||||
}).join('')).val(info.Country || '').selectmenu('refresh');
|
}).join('')).val(info.Country || '');
|
||||||
|
|
||||||
$(page.querySelector('.txtZipCode')).trigger('change');
|
$(page.querySelector('.txtZipCode')).trigger('change');
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
function refreshListings(value) {
|
function refreshListings(value) {
|
||||||
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
$('#selectListing', page).html('').selectmenu('refresh');
|
$('#selectListing', page).html('');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,10 +189,10 @@
|
||||||
|
|
||||||
return '<option value="' + o.Id + '">' + o.Name + '</option>';
|
return '<option value="' + o.Id + '">' + o.Name + '</option>';
|
||||||
|
|
||||||
})).selectmenu('refresh');
|
}));
|
||||||
|
|
||||||
if (listingsId) {
|
if (listingsId) {
|
||||||
$('#selectListing', page).val(listingsId).selectmenu('refresh');
|
$('#selectListing', page).val(listingsId);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dashboard.hideModalLoadingMsg();
|
Dashboard.hideModalLoadingMsg();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue