mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update jqm
This commit is contained in:
parent
9412b4af1d
commit
007ba834a9
3 changed files with 98 additions and 210 deletions
|
@ -1,5 +1,53 @@
|
|||
(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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue