mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update lists
This commit is contained in:
parent
dd1b33021d
commit
1121dd8ae4
22 changed files with 192 additions and 761 deletions
|
@ -16,12 +16,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.0.33",
|
||||
"_release": "1.0.33",
|
||||
"version": "1.0.34",
|
||||
"_release": "1.0.34",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.0.33",
|
||||
"commit": "18b04408e1d07fa162db92fa30eec77adfeb0e44"
|
||||
"tag": "1.0.34",
|
||||
"commit": "1bbacdd65aa7c7af955cdd7f0500a4419064a98b"
|
||||
},
|
||||
"_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
|
||||
"_target": "~1.0.3",
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
var webSocket;
|
||||
var serverInfo = {};
|
||||
|
||||
self.enableAppStorePolicy = false;
|
||||
|
||||
/**
|
||||
* Gets the server address.
|
||||
*/
|
||||
|
@ -1129,29 +1127,6 @@
|
|||
});
|
||||
};
|
||||
|
||||
self.getSmartMatchInfos = function (options) {
|
||||
|
||||
options = options || {};
|
||||
|
||||
var url = self.getUrl("Library/FileOrganizationSmartMatch", options);
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
self.deleteSmartMatchEntry = function (id, options) {
|
||||
|
||||
var url = self.getUrl("Library/FileOrganizationSmartMatch/" + id + "/Delete", options || {});
|
||||
|
||||
return self.ajax({
|
||||
type: "POST",
|
||||
url: url
|
||||
});
|
||||
};
|
||||
|
||||
self.getLiveTvSeriesTimer = function (id) {
|
||||
|
||||
if (!id) {
|
||||
|
@ -1677,10 +1652,6 @@
|
|||
options = options || {};
|
||||
options.PackageType = "UserInstalled";
|
||||
|
||||
if (self.enableAppStorePolicy) {
|
||||
options.IsAppStoreEnabled = true;
|
||||
}
|
||||
|
||||
var url = self.getUrl("Packages", options);
|
||||
|
||||
return self.getJSON(url);
|
||||
|
@ -2119,10 +2090,6 @@
|
|||
|
||||
var options = {};
|
||||
|
||||
if (self.enableAppStorePolicy) {
|
||||
options.IsAppStoreEnabled = true;
|
||||
}
|
||||
|
||||
var url = self.getUrl("Plugins", options);
|
||||
|
||||
return self.getJSON(url);
|
||||
|
|
|
@ -29,14 +29,14 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/polymerelements/iron-behaviors",
|
||||
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||
"_release": "1.0.12",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.12",
|
||||
"commit": "657f526a2382a659cdf4e13be87ecc89261588a3"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-behaviors.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-behaviors"
|
||||
"_originalSource": "PolymerElements/iron-behaviors"
|
||||
}
|
|
@ -26,14 +26,14 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"main": "iron-meta.html",
|
||||
"homepage": "https://github.com/polymerelements/iron-meta",
|
||||
"homepage": "https://github.com/PolymerElements/iron-meta",
|
||||
"_release": "1.1.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.1.1",
|
||||
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-meta.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-meta.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-meta"
|
||||
"_originalSource": "PolymerElements/iron-meta"
|
||||
}
|
|
@ -36,7 +36,7 @@
|
|||
"tag": "v1.2.1",
|
||||
"commit": "1e6a7ee05e5ff350472ffc1ee780f145a7606b7b"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-selector.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-selector"
|
||||
"_originalSource": "PolymerElements/iron-selector"
|
||||
}
|
|
@ -34,6 +34,6 @@
|
|||
"commit": "284332a905ddd60eab11901a82ac037976175cf8"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/polymer.git",
|
||||
"_target": "^1.0.0",
|
||||
"_target": "^1.1.0",
|
||||
"_originalSource": "Polymer/polymer"
|
||||
}
|
|
@ -19,7 +19,7 @@
|
|||
<br />
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<label for="selectChannelResolution">${LabelChannelStreamQuality}</label>
|
||||
<label for="selectChannelResolution" class="selectLabel">${LabelChannelStreamQuality}</label>
|
||||
<select id="selectChannelResolution" data-mini="true">
|
||||
<option value="">${OptionBestAvailableStreamQuality}</option>
|
||||
<option value="1920">1080p</option>
|
||||
|
|
|
@ -19,18 +19,12 @@
|
|||
|
||||
<p>${HeaderProfileInformation}</p>
|
||||
<div data-role="controlgroup" data-type="horizontal" data-mini="true">
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioInfo" value="tabInfo">
|
||||
<label for="radioInfo">${TabInfo}</label>
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioDirectPlay" value="tabDirectPlayProfiles">
|
||||
<label for="radioDirectPlay">${TabDirectPlay}</label>
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioTranscoding" value="tabTranscodingProfiles">
|
||||
<label for="radioTranscoding">${TabTranscoding}</label>
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioContainers" value="tabContainerProfiles">
|
||||
<label for="radioContainers">${TabContainers}</label>
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioCodecs" value="tabCodecProfiles">
|
||||
<label for="radioCodecs">${TabCodecs}</label>
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioMediaProfiles" value="tabMediaProfiles">
|
||||
<label for="radioMediaProfiles">${TabResponses}</label>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioInfo" data-value="tabInfo">${TabInfo}</a>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioDirectPlay" data-value="tabDirectPlayProfiles">${TabDirectPlay}</a>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioTranscoding" data-value="tabTranscodingProfiles">${TabTranscoding}</a>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioContainers" data-value="tabContainerProfiles">${TabContainers}</a>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioCodecs" data-value="tabCodecProfiles">${TabCodecs}</a>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioMediaProfiles" data-value="tabMediaProfiles">${TabResponses}</a>
|
||||
</div>
|
||||
<br />
|
||||
<div class="tabContent tabInfo">
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<label for="selectVideoDecoder">${LabelHardwareAccelerationType}</label>
|
||||
<label for="selectVideoDecoder" class="selectLabel">${LabelHardwareAccelerationType}</label>
|
||||
<select id="selectVideoDecoder" data-mini="true">
|
||||
<option value="">${OptionAuto}</option>
|
||||
<option value="qsv">Intel Quick Sync</option>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<div class="fieldDescription">${LabelHardwareAccelerationTypeHelp}</div>
|
||||
</li>
|
||||
<li>
|
||||
<label for="selectThreadCount">${LabelTranscodingThreadCount}</label>
|
||||
<label for="selectThreadCount" class="selectLabel">${LabelTranscodingThreadCount}</label>
|
||||
<select id="selectThreadCount" data-mini="true">
|
||||
<option value="-1">${OptionAuto}</option>
|
||||
<option value="1">1</option>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<div class="fieldDescription">${LabelSaveLocalMetadataHelp}</div>
|
||||
</li>
|
||||
<li style="display:none;">
|
||||
<label for="selectImageSavingConvention">${LabelImageSavingConvention}</label>
|
||||
<label for="selectImageSavingConvention" class="selectLabel">${LabelImageSavingConvention}</label>
|
||||
<select name="selectImageSavingConvention" id="selectImageSavingConvention" data-mini="true">
|
||||
<option value="Compatible">${OptionImageSavingCompatible}</option>
|
||||
<option value="Legacy">${OptionImageSavingStandard}</option>
|
||||
|
@ -38,11 +38,11 @@
|
|||
<div class="fieldDescription">${LabelImageSavingConventionHelp}</div>
|
||||
</li>
|
||||
<li>
|
||||
<label for="selectLanguage">${LabelMetadataDownloadLanguage}</label>
|
||||
<label for="selectLanguage" class="selectLabel">${LabelMetadataDownloadLanguage}</label>
|
||||
<select name="selectLanguage" id="selectLanguage" data-mini="true" required="required"></select>
|
||||
</li>
|
||||
<li>
|
||||
<label for="selectCountry">${LabelCountry}</label>
|
||||
<label for="selectCountry" class="selectLabel">${LabelCountry}</label>
|
||||
<select name="selectCountry" id="selectCountry" data-mini="true" required="required"></select>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<input type="checkbox" id="chkSaveMetadataHidden" data-mini="true" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="selectDateAdded">${LabelDateAddedBehavior}</label>
|
||||
<label for="selectDateAdded" class="selectLabel">${LabelDateAddedBehavior}</label>
|
||||
<select id="selectDateAdded" data-mini="true">
|
||||
<option value="0">${OptionDateAddedImportTime}</option>
|
||||
<option value="1">${OptionDateAddedFileTime}</option>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<form class="metadataImagesConfigurationForm" style="margin-top: 10px; max-width: 800px;">
|
||||
<br />
|
||||
<div style="width: 75%;">
|
||||
<label for="selectItemType">${LabelCustomizeOptionsPerMediaType}</label>
|
||||
<label for="selectItemType" class="selectLabel">${LabelCustomizeOptionsPerMediaType}</label>
|
||||
<select id="selectItemType" data-mini="true"></select>
|
||||
</div>
|
||||
<br />
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
<ul class="ulForm" data-role="listview">
|
||||
|
||||
<li>
|
||||
<label for="selectUser">${LabelKodiMetadataUser}</label>
|
||||
<label for="selectUser" class="selectLabel">${LabelKodiMetadataUser}</label>
|
||||
<select name="selectUser" id="selectUser" data-mini="true"></select>
|
||||
<div class="fieldDescription">${LabelKodiMetadataUserHelp}</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="selectReleaseDateFormat">${LabelKodiMetadataDateFormat}</label>
|
||||
<label for="selectReleaseDateFormat" class="selectLabel">${LabelKodiMetadataDateFormat}</label>
|
||||
<select name="selectReleaseDateFormat" id="selectReleaseDateFormat" data-mini="true">
|
||||
<option value="yyyy-MM-dd">yyyy-MM-dd</option>
|
||||
</select>
|
||||
|
|
|
@ -501,7 +501,7 @@
|
|||
$('#chkEstimateContentLength', popup).checked(transcodingProfile.EstimateContentLength || false).checkboxradio('refresh');
|
||||
$('#chkReportByteRangeRequests', popup).checked(transcodingProfile.TranscodeSeekInfo == 'Bytes').checkboxradio('refresh');
|
||||
|
||||
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
||||
$('.radioTabButton:first', popup).trigger('click');
|
||||
|
||||
popup.popup('open');
|
||||
}
|
||||
|
@ -617,7 +617,7 @@
|
|||
$('#selectContainerProfileType', popup).val(containerProfile.Type || 'Video').trigger('change');
|
||||
$('#txtContainerProfileContainer', popup).val(containerProfile.Container || '');
|
||||
|
||||
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
||||
$('.radioTabButton:first', popup).trigger('click');
|
||||
|
||||
popup.popup('open');
|
||||
}
|
||||
|
@ -719,7 +719,7 @@
|
|||
$('#selectCodecProfileType', popup).val(codecProfile.Type || 'Video').trigger('change');
|
||||
$('#txtCodecProfileCodec', popup).val(codecProfile.Codec || '');
|
||||
|
||||
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
||||
$('.radioTabButton:first', popup).trigger('click');
|
||||
|
||||
popup.popup('open');
|
||||
}
|
||||
|
@ -827,7 +827,7 @@
|
|||
$('#txtResponseProfileAudioCodec', popup).val(responseProfile.AudioCodec || '');
|
||||
$('#txtResponseProfileVideoCodec', popup).val(responseProfile.VideoCodec || '');
|
||||
|
||||
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
||||
$('.radioTabButton:first', popup).trigger('click');
|
||||
|
||||
popup.popup('open');
|
||||
}
|
||||
|
@ -944,9 +944,12 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('.radioTabButton', page).on('change', function () {
|
||||
$('.radioTabButton', page).on('click', function () {
|
||||
|
||||
var elem = $('.' + this.value, page);
|
||||
$(this).siblings().removeClass('ui-btn-active');
|
||||
$(this).addClass('ui-btn-active');
|
||||
|
||||
var elem = $('.' + this.getAttribute('data-value'), page);
|
||||
elem.siblings('.tabContent').hide();
|
||||
|
||||
elem.show();
|
||||
|
@ -1070,8 +1073,7 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('.radioTabButton', page).checked(false).checkboxradio('refresh');
|
||||
$('#radioInfo', page).checked(true).checkboxradio('refresh').trigger('change');
|
||||
$('#radioInfo', page).trigger('click');
|
||||
|
||||
loadProfile(page);
|
||||
});
|
||||
|
|
|
@ -4,13 +4,16 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
|
||||
require(['paper-fab', 'paper-progress', 'paper-item-body', 'paper-icon-item'], function () {
|
||||
|
||||
var apiClient = ApiClient;
|
||||
|
||||
apiClient.getJSON(apiClient.getUrl('System/Logs')).then(function (logs) {
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true">';
|
||||
html += '<div class="paperList">';
|
||||
|
||||
html += logs.map(function (log) {
|
||||
|
||||
|
@ -20,11 +23,17 @@
|
|||
|
||||
logUrl += "&api_key=" + apiClient.accessToken();
|
||||
|
||||
var logHtml = '<li><a href="' + logUrl + '" target="_blank">';
|
||||
var logHtml = '';
|
||||
logHtml += '<paper-icon-item>';
|
||||
|
||||
logHtml += '<h3>';
|
||||
logHtml += log.Name;
|
||||
logHtml += '</h3>';
|
||||
logHtml += '<a item-icon class="clearLink" href="' + logUrl + '" target="_blank">';
|
||||
logHtml += '<paper-fab mini icon="schedule" class="blue" item-icon></paper-fab>';
|
||||
logHtml += "</a>";
|
||||
|
||||
logHtml += '<paper-item-body two-line>';
|
||||
logHtml += '<a class="clearLink" href="' + logUrl + '" target="_blank">';
|
||||
|
||||
logHtml += "<div>" + log.Name + "</div>";
|
||||
|
||||
var date = parseISO8601Date(log.DateModified, { toLocal: true });
|
||||
|
||||
|
@ -32,20 +41,24 @@
|
|||
|
||||
text += ' ' + LibraryBrowser.getDisplayTime(date);
|
||||
|
||||
logHtml += '<p>' + text + '</p>';
|
||||
logHtml += '<div secondary>' + text + '</div>';
|
||||
|
||||
logHtml += '</li>';
|
||||
logHtml += "</a>";
|
||||
logHtml += '</paper-item-body>';
|
||||
|
||||
logHtml += '</paper-icon-item>';
|
||||
|
||||
return logHtml;
|
||||
|
||||
})
|
||||
.join('');
|
||||
|
||||
html += '</ul>';
|
||||
html += '</div>';
|
||||
|
||||
$('.serverLogs', page).html(html).trigger('create');
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
})();
|
|
@ -134,10 +134,16 @@
|
|||
|
||||
if (showNoPluginsMessage) {
|
||||
html += '<div style="padding:5px;">';
|
||||
|
||||
if (AppInfo.enableAppStorePolicy) {
|
||||
html += '<p>' + Globalize.translate('MessageNoPluginsDueToAppStore') + '</p>';
|
||||
} else {
|
||||
html += '<p>' + Globalize.translate('MessageNoPluginsInstalled') + '</p>';
|
||||
|
||||
html += '<p><a href="plugincatalog.html">';
|
||||
html += Globalize.translate('BrowsePluginCatalogMessage');
|
||||
html += '</a></p>';
|
||||
}
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -1639,7 +1639,15 @@ var AppInfo = {};
|
|||
|
||||
function initializeApiClient(apiClient) {
|
||||
|
||||
apiClient.enableAppStorePolicy = AppInfo.enableAppStorePolicy;
|
||||
if (AppInfo.enableAppStorePolicy) {
|
||||
apiClient.getAvailablePlugins = function() {
|
||||
return Promise.resolve([]);
|
||||
};
|
||||
apiClient.getInstalledPlugins = function () {
|
||||
return Promise.resolve([]);
|
||||
};
|
||||
}
|
||||
|
||||
apiClient.getDefaultImageQuality = Dashboard.getDefaultImageQuality;
|
||||
apiClient.normalizeImageOptions = Dashboard.normalizeImageOptions;
|
||||
|
||||
|
@ -1973,7 +1981,7 @@ var AppInfo = {};
|
|||
|
||||
define("jqmlistview", ['css!thirdparty/jquerymobile-1.4.5/jqm.listview.css']);
|
||||
|
||||
define("jqmcontrolgroup", ["thirdparty/jquerymobile-1.4.5/jqm.controlgroup", 'css!thirdparty/jquerymobile-1.4.5/jqm.controlgroup.css']);
|
||||
define("jqmcontrolgroup", ['css!thirdparty/jquerymobile-1.4.5/jqm.controlgroup.css']);
|
||||
|
||||
define("jqmcollapsible", ["jqmicons", "thirdparty/jquerymobile-1.4.5/jqm.collapsible", 'css!thirdparty/jquerymobile-1.4.5/jqm.collapsible.css']);
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['paper-checkbox', 'paper-input'], function () {
|
||||
require(['paper-checkbox', 'paper-input', 'jqmcollapsible'], function () {
|
||||
renderFormInternal(options);
|
||||
resolve();
|
||||
});
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
"HeaderDeleteTaskTrigger": "Delete Task Trigger",
|
||||
"MessageDeleteTaskTrigger": "Are you sure you wish to delete this task trigger?",
|
||||
"MessageNoPluginsInstalled": "You have no plugins installed.",
|
||||
"MessageNoPluginsDueToAppStore": "To manage plugins, please use the Emby web app.",
|
||||
"LabelVersionInstalled": "{0} installed",
|
||||
"LabelNumberReviews": "{0} Reviews",
|
||||
"LabelFree": "Free",
|
||||
|
|
|
@ -1,134 +1,112 @@
|
|||
|
||||
|
||||
|
||||
.ui-controlgroup,
|
||||
fieldset.ui-controlgroup {
|
||||
.udiv[data-role="controlgroup"], fieldset[data-role="controlgroup"] {
|
||||
padding: 0;
|
||||
margin: .5em 0;
|
||||
}
|
||||
.ui-field-contain .ui-controlgroup,
|
||||
.ui-field-contain fieldset.ui-controlgroup {
|
||||
margin: 0;
|
||||
}
|
||||
.ui-mini .ui-controlgroup-label {
|
||||
font-size: 16px;
|
||||
}
|
||||
.ui-controlgroup.ui-mini .ui-btn-icon-notext,
|
||||
.ui-controlgroup .ui-mini.ui-btn-icon-notext {
|
||||
|
||||
*[data-role="controlgroup"].ui-mini .ui-btn-icon-notext,
|
||||
*[data-role="controlgroup"] .ui-mini.ui-btn-icon-notext {
|
||||
font-size: inherit;
|
||||
}
|
||||
.ui-controlgroup-controls .ui-btn,
|
||||
.ui-controlgroup-controls .ui-checkbox,
|
||||
.ui-controlgroup-controls .ui-radio,
|
||||
.ui-controlgroup-controls .ui-select {
|
||||
|
||||
*[data-role="controlgroup"] .ui-btn,
|
||||
*[data-role="controlgroup"] .ui-checkbox,
|
||||
*[data-role="controlgroup"] .ui-radio,
|
||||
*[data-role="controlgroup"] .ui-select {
|
||||
margin: 0;
|
||||
}
|
||||
.ui-controlgroup-controls .ui-btn:focus,
|
||||
.ui-controlgroup-controls .ui-btn.ui-focus {
|
||||
|
||||
*[data-role="controlgroup"] .ui-btn:focus,
|
||||
*[data-role="controlgroup"] .ui-btn.ui-focus {
|
||||
z-index: 1;
|
||||
}
|
||||
.ui-controlgroup-controls li {
|
||||
}
|
||||
|
||||
*[data-role="controlgroup"] li {
|
||||
list-style: none;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls:before,
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls:after {
|
||||
clear: both;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls > .ui-btn,
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls li > .ui-btn,
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls .ui-checkbox,
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls .ui-radio,
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls .ui-select {
|
||||
|
||||
div[data-role="controlgroup"][data-type="horizontal"] .ui-btn,
|
||||
div[data-role="controlgroup"][data-type="horizontal"] li > .ui-btn,
|
||||
div[data-role="controlgroup"][data-type="horizontal"] .ui-checkbox,
|
||||
div[data-role="controlgroup"][data-type="horizontal"] .ui-radio,
|
||||
div[data-role="controlgroup"][data-type="horizontal"].ui-select {
|
||||
float: left;
|
||||
clear: none;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls button.ui-btn,
|
||||
.ui-controlgroup-controls .ui-btn-icon-notext {
|
||||
|
||||
div[data-role="controlgroup"][data-type="horizontal"] input[type="radio"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div[data-role="controlgroup"][data-type="horizontal"] button.ui-btn,
|
||||
*[data-role="controlgroup"] .ui-btn-icon-notext {
|
||||
width: auto;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls .ui-btn-icon-notext,
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls button.ui-btn-icon-notext {
|
||||
|
||||
div[data-role="controlgroup"][data-type="horizontal"] .ui-btn-icon-notext,
|
||||
div[data-role="controlgroup"][data-type="horizontal"] button.ui-btn-icon-notext {
|
||||
width: 1.5em;
|
||||
}
|
||||
.ui-controlgroup-controls .ui-btn-icon-notext {
|
||||
|
||||
*[data-role="controlgroup"] .ui-btn-icon-notext {
|
||||
height: auto;
|
||||
padding: .7em 1em;
|
||||
}
|
||||
.ui-controlgroup-vertical .ui-controlgroup-controls .ui-btn {
|
||||
|
||||
*[data-role="controlgroup"]:not([data-type="horizontal"]) .ui-btn {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
.ui-controlgroup-vertical .ui-controlgroup-controls .ui-btn.ui-last-child {
|
||||
|
||||
*[data-role="controlgroup"]:not([data-type="horizontal"]) .ui-checkbox:last-child .ui-btn {
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls .ui-btn {
|
||||
}
|
||||
|
||||
div[data-role="controlgroup"][data-type="horizontal"] .ui-btn {
|
||||
border-right-width: 0;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-controls .ui-btn.ui-last-child {
|
||||
|
||||
div[data-role="controlgroup"][data-type="horizontal"] .ui-btn:last-child {
|
||||
border-right-width: 1px;
|
||||
}
|
||||
.ui-controlgroup-controls .ui-btn-corner-all,
|
||||
.ui-controlgroup-controls .ui-btn.ui-corner-all {
|
||||
}
|
||||
|
||||
*[data-role="controlgroup"] .ui-btn-corner-all,
|
||||
*[data-role="controlgroup"] .ui-btn.ui-corner-all {
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.ui-controlgroup-controls,
|
||||
.ui-controlgroup-controls .ui-radio,
|
||||
.ui-controlgroup-controls .ui-checkbox,
|
||||
.ui-controlgroup-controls .ui-select,
|
||||
.ui-controlgroup-controls li {
|
||||
|
||||
*[data-role="controlgroup"] .ui-radio,
|
||||
*[data-role="controlgroup"] .ui-checkbox,
|
||||
*[data-role="controlgroup"] .ui-select,
|
||||
*[data-role="controlgroup"] li {
|
||||
-webkit-border-radius: inherit;
|
||||
border-radius: inherit;
|
||||
}
|
||||
.ui-controlgroup-vertical .ui-btn.ui-first-child {
|
||||
-webkit-border-top-left-radius: inherit;
|
||||
border-top-left-radius: inherit;
|
||||
-webkit-border-top-right-radius: inherit;
|
||||
border-top-right-radius: inherit;
|
||||
}
|
||||
.ui-controlgroup-vertical .ui-btn.ui-last-child {
|
||||
-webkit-border-bottom-left-radius: inherit;
|
||||
border-bottom-left-radius: inherit;
|
||||
-webkit-border-bottom-right-radius: inherit;
|
||||
border-bottom-right-radius: inherit;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-btn.ui-first-child {
|
||||
|
||||
div[data-role="controlgroup"][data-type="horizontal"] .ui-btn:first-child {
|
||||
-webkit-border-top-left-radius: inherit;
|
||||
border-top-left-radius: inherit;
|
||||
-webkit-border-bottom-left-radius: inherit;
|
||||
border-bottom-left-radius: inherit;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-btn.ui-last-child {
|
||||
|
||||
div[data-role="controlgroup"][data-type="horizontal"] .ui-btn:last-child {
|
||||
-webkit-border-top-right-radius: inherit;
|
||||
border-top-right-radius: inherit;
|
||||
-webkit-border-bottom-right-radius: inherit;
|
||||
border-bottom-right-radius: inherit;
|
||||
}
|
||||
.ui-controlgroup-controls a.ui-shadow:not(:focus),
|
||||
.ui-controlgroup-controls button.ui-shadow:not(:focus),
|
||||
.ui-controlgroup-controls div.ui-shadow:not(.ui-focus) {
|
||||
|
||||
*[data-role="controlgroup"] a.ui-shadow:not(:focus),
|
||||
*[data-role="controlgroup"] button.ui-shadow:not(:focus),
|
||||
*[data-role="controlgroup"] div.ui-shadow:not(.ui-focus) {
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
/* Fixes legend not wrapping on IE10 */
|
||||
.ui-controlgroup-label legend {
|
||||
fieldset[data-role="controlgroup"] legend {
|
||||
max-width: 100%;
|
||||
}
|
||||
.ui-controlgroup-controls > label {
|
||||
position: absolute !important;
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
overflow: hidden;
|
||||
clip: rect(1px,1px,1px,1px);
|
||||
}
|
||||
|
||||
.ui-textinput-autogrow-resize {
|
||||
-webkit-transition: height 0.25s;
|
||||
|
|
|
@ -1,246 +0,0 @@
|
|||
define(['jqmwidget'], function () {
|
||||
|
||||
(function ($, undefined) {
|
||||
|
||||
var uiScreenHiddenRegex = /\bui-screen-hidden\b/;
|
||||
function noHiddenClass(elements) {
|
||||
var index,
|
||||
length = elements.length,
|
||||
result = [];
|
||||
|
||||
for (index = 0; index < length; index++) {
|
||||
if (!elements[index].className.match(uiScreenHiddenRegex)) {
|
||||
result.push(elements[index]);
|
||||
}
|
||||
}
|
||||
|
||||
return $(result);
|
||||
}
|
||||
|
||||
$.mobile.behaviors.addFirstLastClasses = {
|
||||
_getVisibles: function ($els, create) {
|
||||
var visibles;
|
||||
|
||||
if (create) {
|
||||
visibles = noHiddenClass($els);
|
||||
} else {
|
||||
visibles = $els.filter(":visible");
|
||||
if (visibles.length === 0) {
|
||||
visibles = noHiddenClass($els);
|
||||
}
|
||||
}
|
||||
|
||||
return visibles;
|
||||
},
|
||||
|
||||
_addFirstLastClasses: function ($els, $visibles, create) {
|
||||
$els.removeClass("ui-first-child ui-last-child");
|
||||
$visibles.eq(0).addClass("ui-first-child").end().last().addClass("ui-last-child");
|
||||
if (!create) {
|
||||
this.element.trigger("updatelayout");
|
||||
}
|
||||
},
|
||||
|
||||
_removeFirstLastClasses: function ($els) {
|
||||
$els.removeClass("ui-first-child ui-last-child");
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
(function ($, undefined) {
|
||||
|
||||
function keepNativeSelector() {
|
||||
var keepNative = $.trim("[data-role='none']"),
|
||||
globalValue = $.trim($.mobile.keepNative),
|
||||
optionValue = $.trim("[data-role='none']"),
|
||||
|
||||
// Check if $.mobile.keepNative has changed from the factory default
|
||||
newDefault = "",
|
||||
|
||||
// If $.mobile.keepNative has not changed, use options.keepNativeDefault
|
||||
oldDefault = (newDefault === "" ? optionValue : "");
|
||||
|
||||
// Concatenate keepNative selectors from all sources where the value has
|
||||
// changed or, if nothing has changed, return the default
|
||||
return ((keepNative ? [keepNative] : [])
|
||||
.concat(newDefault ? [newDefault] : [])
|
||||
.concat(oldDefault ? [oldDefault] : [])
|
||||
.join(", "));
|
||||
|
||||
}
|
||||
|
||||
$.widget("mobile.controlgroup", $.extend({
|
||||
options: {
|
||||
enhanced: false,
|
||||
theme: null,
|
||||
shadow: false,
|
||||
corners: true,
|
||||
excludeInvisible: true,
|
||||
type: "vertical",
|
||||
mini: false
|
||||
},
|
||||
|
||||
_create: function () {
|
||||
var elem = this.element,
|
||||
opts = this.options,
|
||||
keepNative = keepNativeSelector();
|
||||
|
||||
// Run buttonmarkup
|
||||
if ($.fn.buttonMarkup) {
|
||||
this.element
|
||||
.find($.fn.buttonMarkup.initSelector)
|
||||
.not(keepNative)
|
||||
.buttonMarkup();
|
||||
}
|
||||
// Enhance child widgets
|
||||
$.each(this._childWidgets, $.proxy(function (number, widgetName) {
|
||||
if ($.mobile[widgetName]) {
|
||||
this.element
|
||||
.find($.mobile[widgetName].initSelector)
|
||||
.not(keepNative)[widgetName]();
|
||||
}
|
||||
}, this));
|
||||
|
||||
$.extend(this, {
|
||||
_ui: null,
|
||||
_initialRefresh: true
|
||||
});
|
||||
|
||||
if (opts.enhanced) {
|
||||
this._ui = {
|
||||
groupLegend: elem.children(".ui-controlgroup-label").children(),
|
||||
childWrapper: elem.children(".ui-controlgroup-controls")
|
||||
};
|
||||
} else {
|
||||
this._ui = this._enhance();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
_childWidgets: ["checkboxradio", "selectmenu", "button"],
|
||||
|
||||
_themeClassFromOption: function (value) {
|
||||
return (value ? (value === "none" ? "" : "ui-group-theme-" + value) : "");
|
||||
},
|
||||
|
||||
_enhance: function () {
|
||||
var elem = this.element,
|
||||
opts = this.options,
|
||||
ui = {
|
||||
groupLegend: elem.children("legend"),
|
||||
childWrapper: elem
|
||||
.addClass("ui-controlgroup " +
|
||||
"ui-controlgroup-" +
|
||||
(opts.type === "horizontal" ? "horizontal" : "vertical") + " " +
|
||||
this._themeClassFromOption(opts.theme) + " " +
|
||||
(opts.corners ? "ui-corner-all " : "") +
|
||||
(opts.mini ? "ui-mini " : ""))
|
||||
.wrapInner("<div " +
|
||||
"class='ui-controlgroup-controls " +
|
||||
(opts.shadow === true ? "ui-shadow" : "") + "'></div>")
|
||||
.children()
|
||||
};
|
||||
|
||||
if (ui.groupLegend.length > 0) {
|
||||
$("<div role='heading' class='ui-controlgroup-label'></div>")
|
||||
.append(ui.groupLegend)
|
||||
.prependTo(elem);
|
||||
}
|
||||
|
||||
return ui;
|
||||
},
|
||||
|
||||
_init: function () {
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
_setOptions: function (options) {
|
||||
var callRefresh, returnValue,
|
||||
elem = this.element;
|
||||
|
||||
// Must have one of horizontal or vertical
|
||||
if (options.type !== undefined) {
|
||||
elem
|
||||
.removeClass("ui-controlgroup-horizontal ui-controlgroup-vertical")
|
||||
.addClass("ui-controlgroup-" + (options.type === "horizontal" ? "horizontal" : "vertical"));
|
||||
callRefresh = true;
|
||||
}
|
||||
|
||||
if (options.theme !== undefined) {
|
||||
elem
|
||||
.removeClass(this._themeClassFromOption(this.options.theme))
|
||||
.addClass(this._themeClassFromOption(options.theme));
|
||||
}
|
||||
|
||||
if (options.corners !== undefined) {
|
||||
elem.toggleClass("ui-corner-all", options.corners);
|
||||
}
|
||||
|
||||
if (options.mini !== undefined) {
|
||||
elem.toggleClass("ui-mini", options.mini);
|
||||
}
|
||||
|
||||
if (options.shadow !== undefined) {
|
||||
this._ui.childWrapper.toggleClass("ui-shadow", options.shadow);
|
||||
}
|
||||
|
||||
if (options.excludeInvisible !== undefined) {
|
||||
this.options.excludeInvisible = options.excludeInvisible;
|
||||
callRefresh = true;
|
||||
}
|
||||
|
||||
returnValue = this._super(options);
|
||||
|
||||
if (callRefresh) {
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
},
|
||||
|
||||
container: function () {
|
||||
return this._ui.childWrapper;
|
||||
},
|
||||
|
||||
refresh: function () {
|
||||
var $el = this.container(),
|
||||
els = $el.find(".ui-btn").not(".ui-slider-handle"),
|
||||
create = this._initialRefresh;
|
||||
if ($.mobile.checkboxradio) {
|
||||
$el.find(":mobile-checkboxradio").checkboxradio("refresh");
|
||||
}
|
||||
this._addFirstLastClasses(els,
|
||||
this.options.excludeInvisible ? this._getVisibles(els, create) : els,
|
||||
create);
|
||||
this._initialRefresh = false;
|
||||
},
|
||||
|
||||
// Caveat: If the legend is not the first child of the controlgroup at enhance
|
||||
// time, it will be after _destroy().
|
||||
_destroy: function () {
|
||||
var ui, buttons,
|
||||
opts = this.options;
|
||||
|
||||
if (opts.enhanced) {
|
||||
return this;
|
||||
}
|
||||
|
||||
ui = this._ui;
|
||||
buttons = this.element
|
||||
.removeClass("ui-controlgroup " +
|
||||
"ui-controlgroup-horizontal ui-controlgroup-vertical ui-corner-all ui-mini " +
|
||||
this._themeClassFromOption(opts.theme))
|
||||
.find(".ui-btn")
|
||||
.not(".ui-slider-handle");
|
||||
|
||||
this._removeFirstLastClasses(buttons);
|
||||
|
||||
ui.groupLegend.unwrap();
|
||||
ui.childWrapper.children().unwrap();
|
||||
}
|
||||
}, $.mobile.behaviors.addFirstLastClasses));
|
||||
|
||||
})(jQuery);
|
||||
|
||||
});
|
|
@ -1,292 +0,0 @@
|
|||
define(['jqmwidget'], function () {
|
||||
|
||||
(function ($, window, undefined) {
|
||||
var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/;
|
||||
|
||||
$.extend($.mobile, {
|
||||
|
||||
// Namespace used framework-wide for data-attrs. Default is no namespace
|
||||
|
||||
// Retrieve an attribute from an element and perform some massaging of the value
|
||||
|
||||
getAttribute: function (element, key) {
|
||||
var data;
|
||||
|
||||
element = element.jquery ? element[0] : element;
|
||||
|
||||
if (element && element.getAttribute) {
|
||||
data = element.getAttribute("data-" + key);
|
||||
}
|
||||
|
||||
// Copied from core's src/data.js:dataAttr()
|
||||
// Convert from a string to a proper data type
|
||||
try {
|
||||
data = data === "true" ? true :
|
||||
data === "false" ? false :
|
||||
data === "null" ? null :
|
||||
// Only convert to a number if it doesn't change the string
|
||||
+data + "" === data ? +data :
|
||||
rbrace.test(data) ? JSON.parse(data) :
|
||||
data;
|
||||
} catch (err) { }
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, this);
|
||||
|
||||
(function ($, undefined) {
|
||||
|
||||
var uiScreenHiddenRegex = /\bui-screen-hidden\b/;
|
||||
function noHiddenClass(elements) {
|
||||
var index,
|
||||
length = elements.length,
|
||||
result = [];
|
||||
|
||||
for (index = 0; index < length; index++) {
|
||||
if (!elements[index].className.match(uiScreenHiddenRegex)) {
|
||||
result.push(elements[index]);
|
||||
}
|
||||
}
|
||||
|
||||
return $(result);
|
||||
}
|
||||
|
||||
$.mobile.behaviors.addFirstLastClasses = {
|
||||
_getVisibles: function ($els, create) {
|
||||
var visibles;
|
||||
|
||||
if (create) {
|
||||
visibles = noHiddenClass($els);
|
||||
} else {
|
||||
visibles = $els.filter(":visible");
|
||||
if (visibles.length === 0) {
|
||||
visibles = noHiddenClass($els);
|
||||
}
|
||||
}
|
||||
|
||||
return visibles;
|
||||
},
|
||||
|
||||
_addFirstLastClasses: function ($els, $visibles, create) {
|
||||
$els.removeClass("ui-first-child ui-last-child");
|
||||
$visibles.eq(0).addClass("ui-first-child").end().last().addClass("ui-last-child");
|
||||
if (!create) {
|
||||
this.element.trigger("updatelayout");
|
||||
}
|
||||
},
|
||||
|
||||
_removeFirstLastClasses: function ($els) {
|
||||
$els.removeClass("ui-first-child ui-last-child");
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
(function ($, undefined) {
|
||||
|
||||
var getAttr = $.mobile.getAttribute;
|
||||
|
||||
$.widget("mobile.listview", $.extend({
|
||||
|
||||
options: {
|
||||
theme: null,
|
||||
countTheme: null, /* Deprecated in 1.4 */
|
||||
dividerTheme: null,
|
||||
icon: "carat-r",
|
||||
splitIcon: "carat-r",
|
||||
splitTheme: null,
|
||||
corners: true,
|
||||
shadow: true,
|
||||
inset: false
|
||||
},
|
||||
|
||||
_create: function () {
|
||||
var t = this,
|
||||
listviewClasses = "";
|
||||
|
||||
listviewClasses += t.options.inset ? " ui-listview-inset" : "";
|
||||
|
||||
if (!!t.options.inset) {
|
||||
listviewClasses += t.options.corners ? " ui-corner-all" : "";
|
||||
listviewClasses += t.options.shadow ? " ui-shadow" : "";
|
||||
}
|
||||
|
||||
// create listview markup
|
||||
t.element.addClass(" ui-listview" + listviewClasses);
|
||||
|
||||
t.refresh(true);
|
||||
},
|
||||
|
||||
// TODO: Remove in 1.5
|
||||
_findFirstElementByTagName: function (ele, nextProp, lcName, ucName) {
|
||||
var dict = {};
|
||||
dict[lcName] = dict[ucName] = true;
|
||||
while (ele) {
|
||||
if (dict[ele.nodeName]) {
|
||||
return ele;
|
||||
}
|
||||
ele = ele[nextProp];
|
||||
}
|
||||
return null;
|
||||
},
|
||||
// TODO: Remove in 1.5
|
||||
_addThumbClasses: function (containers) {
|
||||
var i, img, len = containers.length;
|
||||
for (i = 0; i < len; i++) {
|
||||
img = $(this._findFirstElementByTagName(containers[i].firstChild, "nextSibling", "img", "IMG"));
|
||||
if (img.length) {
|
||||
$(this._findFirstElementByTagName(img[0].parentNode, "parentNode", "li", "LI")).addClass(img.hasClass("ui-li-icon") ? "ui-li-has-icon" : "ui-li-has-thumb");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_getChildrenByTagName: function (ele, lcName, ucName) {
|
||||
var results = [],
|
||||
dict = {};
|
||||
dict[lcName] = dict[ucName] = true;
|
||||
ele = ele.firstChild;
|
||||
while (ele) {
|
||||
if (dict[ele.nodeName]) {
|
||||
results.push(ele);
|
||||
}
|
||||
ele = ele.nextSibling;
|
||||
}
|
||||
return $(results);
|
||||
},
|
||||
|
||||
_beforeListviewRefresh: $.noop,
|
||||
_afterListviewRefresh: $.noop,
|
||||
|
||||
refresh: function (create) {
|
||||
var buttonClass, pos, numli, item, itemClass, itemTheme, itemIcon, icon, a,
|
||||
isDivider, startCount, newStartCount, value, last, splittheme, splitThemeClass, spliticon,
|
||||
altButtonClass, dividerTheme, li,
|
||||
o = this.options,
|
||||
$list = this.element,
|
||||
ol = !!$.nodeName($list[0], "ol"),
|
||||
start = $list.attr("start"),
|
||||
itemClassDict = {},
|
||||
countBubbles = $list.find(".ui-li-count"),
|
||||
countTheme = getAttr($list[0], "counttheme") || this.options.countTheme,
|
||||
countThemeClass = countTheme ? "ui-body-" + countTheme : "ui-body-inherit";
|
||||
|
||||
if (o.theme) {
|
||||
$list.addClass("ui-group-theme-" + o.theme);
|
||||
}
|
||||
|
||||
// Check if a start attribute has been set while taking a value of 0 into account
|
||||
if (ol && (start || start === 0)) {
|
||||
startCount = parseInt(start, 10) - 1;
|
||||
$list.css("counter-reset", "listnumbering " + startCount);
|
||||
}
|
||||
|
||||
this._beforeListviewRefresh();
|
||||
|
||||
li = this._getChildrenByTagName($list[0], "li", "LI");
|
||||
|
||||
for (pos = 0, numli = li.length; pos < numli; pos++) {
|
||||
item = li.eq(pos);
|
||||
itemClass = "";
|
||||
|
||||
if (create || item[0].className.search(/\bui-li-static\b|\bui-li-divider\b/) < 0) {
|
||||
a = this._getChildrenByTagName(item[0], "a", "A");
|
||||
isDivider = (getAttr(item[0], "role") === "list-divider");
|
||||
value = item.attr("value");
|
||||
itemTheme = getAttr(item[0], "theme");
|
||||
|
||||
if (a.length && a[0].className.search(/\bui-btn\b/) < 0 && !isDivider) {
|
||||
itemIcon = getAttr(item[0], "icon");
|
||||
icon = (itemIcon === false) ? false : (itemIcon || o.icon);
|
||||
|
||||
// TODO: Remove in 1.5 together with links.js (links.js / .ui-link deprecated in 1.4)
|
||||
a.removeClass("ui-link");
|
||||
|
||||
buttonClass = "ui-btn";
|
||||
|
||||
if (itemTheme) {
|
||||
buttonClass += " ui-btn-" + itemTheme;
|
||||
}
|
||||
|
||||
if (a.length > 1) {
|
||||
itemClass = "ui-li-has-alt";
|
||||
|
||||
last = a.last();
|
||||
splittheme = getAttr(last[0], "theme") || o.splitTheme || getAttr(item[0], "theme", true);
|
||||
splitThemeClass = splittheme ? " ui-btn-" + splittheme : "";
|
||||
spliticon = getAttr(last[0], "icon") || getAttr(item[0], "icon") || o.splitIcon;
|
||||
altButtonClass = "ui-btn ui-btn-icon-notext ui-icon-" + spliticon + splitThemeClass;
|
||||
|
||||
last
|
||||
.attr("title", $.trim(last.text()))
|
||||
.addClass(altButtonClass)
|
||||
.empty();
|
||||
|
||||
// Reduce to the first anchor, because only the first gets the buttonClass
|
||||
a = a.first();
|
||||
} else if (icon) {
|
||||
buttonClass += " ui-btn-icon-right ui-icon-" + icon;
|
||||
}
|
||||
|
||||
// Apply buttonClass to the (first) anchor
|
||||
a.addClass(buttonClass);
|
||||
} else if (isDivider) {
|
||||
dividerTheme = (getAttr(item[0], "theme") || o.dividerTheme || o.theme);
|
||||
|
||||
itemClass = "ui-li-divider ui-bar-" + (dividerTheme ? dividerTheme : "inherit");
|
||||
|
||||
item.attr("role", "heading");
|
||||
} else if (a.length <= 0) {
|
||||
itemClass = "ui-li-static ui-body-" + (itemTheme ? itemTheme : "inherit");
|
||||
}
|
||||
if (ol && value) {
|
||||
newStartCount = parseInt(value, 10) - 1;
|
||||
|
||||
item.css("counter-reset", "listnumbering " + newStartCount);
|
||||
}
|
||||
}
|
||||
|
||||
// Instead of setting item class directly on the list item
|
||||
// at this point in time, push the item into a dictionary
|
||||
// that tells us what class to set on it so we can do this after this
|
||||
// processing loop is finished.
|
||||
|
||||
if (!itemClassDict[itemClass]) {
|
||||
itemClassDict[itemClass] = [];
|
||||
}
|
||||
|
||||
itemClassDict[itemClass].push(item[0]);
|
||||
}
|
||||
|
||||
// Set the appropriate listview item classes on each list item.
|
||||
// The main reason we didn't do this
|
||||
// in the for-loop above is because we can eliminate per-item function overhead
|
||||
// by calling addClass() and children() once or twice afterwards. This
|
||||
// can give us a significant boost on platforms like WP7.5.
|
||||
|
||||
for (itemClass in itemClassDict) {
|
||||
$(itemClassDict[itemClass]).addClass(itemClass);
|
||||
}
|
||||
|
||||
countBubbles.each(function () {
|
||||
$(this).closest("li").addClass("ui-li-has-count");
|
||||
});
|
||||
if (countThemeClass) {
|
||||
countBubbles.not("[class*='ui-body-']").addClass(countThemeClass);
|
||||
}
|
||||
|
||||
// Deprecated in 1.4. From 1.5 you have to add class ui-li-has-thumb or ui-li-has-icon to the LI.
|
||||
this._addThumbClasses(li);
|
||||
this._addThumbClasses(li.find(".ui-btn"));
|
||||
|
||||
this._afterListviewRefresh();
|
||||
|
||||
this._addFirstLastClasses(li, this._getVisibles(li, create), create);
|
||||
}
|
||||
}, $.mobile.behaviors.addFirstLastClasses));
|
||||
|
||||
})(jQuery);
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue