mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
enable unified routing
This commit is contained in:
parent
2360213901
commit
154f6b5fd8
133 changed files with 6988 additions and 7112 deletions
|
@ -6,7 +6,13 @@
|
|||
|
||||
(function ($, undefined) {
|
||||
|
||||
var escapeId = $.mobile.path.hashToSelector;
|
||||
var escapeId = function (hash) {
|
||||
var hasHash = (hash.substring(0, 1) === "#");
|
||||
if (hasHash) {
|
||||
hash = hash.substring(1);
|
||||
}
|
||||
return (hasHash ? "#" : "") + hash.replace(/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g, "\\$1");
|
||||
};
|
||||
|
||||
$.widget("mobile.checkboxradio", $.extend({
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
// Define instance variables
|
||||
$.extend(this, {
|
||||
_scrollTop: 0,
|
||||
_page: theElement.closest(".ui-page"),
|
||||
_page: theElement.parents("div[data-role='page']"),
|
||||
_ui: null,
|
||||
_fallbackTransition: "",
|
||||
_currentTransition: false,
|
||||
|
|
|
@ -1,4 +1,100 @@
|
|||
define(['jqm'], function () {
|
||||
define(['jQuery'], function () {
|
||||
|
||||
jQuery.mobile = {};
|
||||
|
||||
(function ($, window, undefined) {
|
||||
|
||||
function parentWithClass(elem, className) {
|
||||
|
||||
while (!elem.classList || !elem.classList.contains(className)) {
|
||||
elem = elem.parentNode;
|
||||
|
||||
if (!elem) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return elem;
|
||||
}
|
||||
|
||||
$.extend($.mobile, {
|
||||
|
||||
// Place to store various widget extensions
|
||||
behaviors: {}
|
||||
});
|
||||
|
||||
// plugins
|
||||
$.fn.extend({
|
||||
// Enhance child elements
|
||||
enhanceWithin: function () {
|
||||
var index,
|
||||
widgetElements = {},
|
||||
that = this;
|
||||
|
||||
// Enhance widgets
|
||||
$.each($.mobile.widgets, function (name, constructor) {
|
||||
|
||||
// If initSelector not false find elements
|
||||
if (constructor.initSelector) {
|
||||
|
||||
// Filter elements that should not be enhanced based on parents
|
||||
var elements = that[0].querySelectorAll(constructor.initSelector);
|
||||
|
||||
// Enhance whatever is left
|
||||
if (elements.length > 0) {
|
||||
widgetElements[constructor.prototype.widgetName] = $(elements);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
for (index in widgetElements) {
|
||||
widgetElements[index][index]();
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery, this);
|
||||
|
||||
jQuery.mobile.widgets = {};
|
||||
|
||||
// plugins
|
||||
$.fn.extend({
|
||||
// Enhance child elements
|
||||
enhanceWithin: function () {
|
||||
var index,
|
||||
widgetElements = {},
|
||||
that = this;
|
||||
|
||||
// Enhance widgets
|
||||
$.each($.mobile.widgets, function (name, constructor) {
|
||||
|
||||
// If initSelector not false find elements
|
||||
if (constructor.initSelector) {
|
||||
|
||||
// Filter elements that should not be enhanced based on parents
|
||||
var elements = that[0].querySelectorAll(constructor.initSelector);
|
||||
|
||||
// Enhance whatever is left
|
||||
if (elements.length > 0) {
|
||||
widgetElements[constructor.prototype.widgetName] = $(elements);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
for (index in widgetElements) {
|
||||
widgetElements[index][index]();
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
// For backcompat remove in 1.5
|
||||
jQuery(document).on("create", function (event) {
|
||||
jQuery(event.target).enhanceWithin();
|
||||
});
|
||||
|
||||
/*!
|
||||
* jQuery UI Widget c0ab71056b936627e8a7821f03c044aec6280a40
|
||||
|
|
|
@ -207,10 +207,14 @@ div.ui-mobile-viewport {
|
|||
width: 100%;
|
||||
min-height: 100%;
|
||||
position: absolute;
|
||||
display: none;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* "page" containers - full-screen views, one should always be in view post-pageload */
|
||||
.ui-mobile [data-role=dialog] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* On ios4, setting focus on the page element causes flashing during transitions when there is an outline, so we turn off outlines */
|
||||
.ui-page {
|
||||
outline: none;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue