mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
update jqm
This commit is contained in:
parent
109e61ec65
commit
3449729ff4
@ -25,14 +25,14 @@
|
||||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/iron-meta",
|
||||
"homepage": "https://github.com/polymerelements/iron-meta",
|
||||
"_release": "1.0.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.3",
|
||||
"commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
|
||||
},
|
||||
"_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"
|
||||
}
|
@ -21,10 +21,10 @@
|
||||
return $(".radioDonationType:checked", page).val();
|
||||
}
|
||||
|
||||
var lifeTimeAmount = 69.99;
|
||||
var lifeTimeAmount = 79.99;
|
||||
var dailyAmount = 1;
|
||||
var monthlyAmount = 4.99;
|
||||
var yearlyAmount = 35.99;
|
||||
var yearlyAmount = 37.99;
|
||||
function getDonationAmount(page) {
|
||||
|
||||
var type = getDonationType(page);
|
||||
|
@ -967,16 +967,16 @@ $.ui.plugin = {
|
||||
$.mobile.degradeInputsWithin( this );
|
||||
}
|
||||
|
||||
var thisElem = this[0];
|
||||
|
||||
// Run buttonmarkup
|
||||
if ( $.fn.buttonMarkup ) {
|
||||
this.find( $.fn.buttonMarkup.initSelector ).not( keepNative )
|
||||
.jqmEnhanceable().buttonMarkup();
|
||||
$(thisElem.querySelectorAll($.fn.buttonMarkup.initSelector)).not(keepNative).jqmEnhanceable().buttonMarkup();
|
||||
}
|
||||
|
||||
// Add classes for fieldContain
|
||||
if ( $.fn.fieldcontain ) {
|
||||
this.find( ":jqmData(role='fieldcontain')" ).not( keepNative )
|
||||
.jqmEnhanceable().fieldcontain();
|
||||
$(thisElem.querySelectorAll("*[data-role='fieldcontain']")).not(keepNative).jqmEnhanceable().fieldcontain();
|
||||
}
|
||||
|
||||
// Enhance widgets
|
||||
@ -986,7 +986,7 @@ $.ui.plugin = {
|
||||
if ( constructor.initSelector ) {
|
||||
|
||||
// Filter elements that should not be enhanced based on parents
|
||||
var elements = $.mobile.enhanceable( that.find( constructor.initSelector ) );
|
||||
var elements = $.mobile.enhanceable(that.find(constructor.initSelector));
|
||||
|
||||
// If any matching elements remain filter ones with keepNativeSelector
|
||||
if ( elements.length > 0 ) {
|
||||
@ -2827,7 +2827,7 @@ $.fn.buttonMarkup.defaults = {
|
||||
};
|
||||
|
||||
$.extend( $.fn.buttonMarkup, {
|
||||
initSelector: "a:jqmData(role='button'), .ui-bar > a, .ui-bar > :jqmData(role='controlgroup') > a, button:not(:jqmData(role='navbar') button)"
|
||||
initSelector: "a[data-role='button'], .ui-bar > a, .ui-bar > *[data-role='controlgroup'] > a, button"
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
@ -3406,7 +3406,7 @@ $.widget = (function( orig ) {
|
||||
name = constructor.prototype.widgetName;
|
||||
|
||||
constructor.initSelector = ( ( constructor.prototype.initSelector !== undefined ) ?
|
||||
constructor.prototype.initSelector : ":jqmData(role='" + name + "')" );
|
||||
constructor.prototype.initSelector : "*[data-role='" + name + "']" );
|
||||
|
||||
$.mobile.widgets[ name ] = constructor;
|
||||
|
||||
@ -4548,7 +4548,7 @@ $.fn.grid = function( options ) {
|
||||
element: ( baseElement.length ? baseElement :
|
||||
$( "<base>", { href: $.mobile.path.documentBase.hrefNoHash } ).prependTo( $( "head" ) ) ),
|
||||
|
||||
linkSelector: "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]",
|
||||
linkSelector: "[src], link[href], a[rel='external'], *[data-ajax='false'], a[target]",
|
||||
|
||||
// set the generated BASE element's href to a new page's base path
|
||||
set: function( href ) {
|
||||
@ -5540,7 +5540,7 @@ $.fn.grid = function( options ) {
|
||||
samePage = true;
|
||||
}
|
||||
|
||||
//trigger before show/hide events
|
||||
//trigger before show/hide events
|
||||
// TODO deprecate nextPage in favor of next
|
||||
this._triggerWithDeprecated( prefix + "hide", {
|
||||
|
||||
@ -5563,7 +5563,6 @@ $.fn.grid = function( options ) {
|
||||
_cssTransition: function( to, from, options ) {
|
||||
var transition = options.transition,
|
||||
reverse = options.reverse,
|
||||
deferred = options.deferred,
|
||||
TransitionHandler,
|
||||
promise;
|
||||
|
||||
@ -5579,11 +5578,6 @@ $.fn.grid = function( options ) {
|
||||
promise.done( $.proxy( function() {
|
||||
this._triggerCssTransitionEvents( to, from );
|
||||
}, this ));
|
||||
|
||||
// TODO temporary accomodation of argument deferred
|
||||
promise.done(function() {
|
||||
deferred.resolve.apply( deferred, arguments );
|
||||
});
|
||||
},
|
||||
|
||||
_releaseTransitionLock: function() {
|
||||
@ -5722,20 +5716,7 @@ $.fn.grid = function( options ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// DEPRECATED - this call only, in favor of the before transition
|
||||
// if the page beforechange default is prevented return early
|
||||
if ( !this._triggerPageBeforeChange(toPage, triggerData, settings) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
triggerData.prevPage = settings.fromPage;
|
||||
// if the (content|page)beforetransition default is prevented return early
|
||||
// Note, we have to check for both the deprecated and new events
|
||||
beforeTransition = this._triggerWithDeprecated( "beforetransition", triggerData );
|
||||
if (beforeTransition.deprecatedEvent.isDefaultPrevented() ||
|
||||
beforeTransition.event.isDefaultPrevented() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Set the isPageTransitioning flag to prevent any requests from
|
||||
// entering this method while we are in the midst of loading a page
|
||||
@ -5806,23 +5787,6 @@ $.fn.grid = function( options ) {
|
||||
historyDir = settings.direction === "back" ? -1 : 1;
|
||||
}
|
||||
|
||||
// Kill the keyboard.
|
||||
// XXX_jblas: We need to stop crawling the entire document to kill focus.
|
||||
// Instead, we should be tracking focus with a delegate()
|
||||
// handler so we already have the element in hand at this
|
||||
// point.
|
||||
// Wrap this in a try/catch block since IE9 throw "Unspecified error" if
|
||||
// document.activeElement is undefined when we are in an IFrame.
|
||||
try {
|
||||
if ( document.activeElement &&
|
||||
document.activeElement.nodeName.toLowerCase() !== "body" ) {
|
||||
|
||||
$( document.activeElement ).blur();
|
||||
} else {
|
||||
$( "input:focus, textarea:focus, select:focus" ).blur();
|
||||
}
|
||||
} catch( e ) {}
|
||||
|
||||
// Record whether we are at a place in history where a dialog used to be -
|
||||
// if so, do not add a new history entry and do not change the hash either
|
||||
alreadyThere = false;
|
||||
@ -5867,8 +5831,7 @@ $.fn.grid = function( options ) {
|
||||
// if title element wasn't found, try the page div data attr too
|
||||
// If this is a deep-link or a reload ( active === undefined ) then just
|
||||
// use pageTitle
|
||||
newPageTitle = ( !active ) ? pageTitle : toPage.jqmData( "title" ) ||
|
||||
toPage.children( ":jqmData(role='header')" ).find( ".ui-title" ).text();
|
||||
newPageTitle = ( !active ) ? pageTitle : toPage.jqmData( "title" );
|
||||
if ( !!newPageTitle && pageTitle === document.title ) {
|
||||
pageTitle = newPageTitle;
|
||||
}
|
||||
@ -5922,32 +5885,27 @@ $.fn.grid = function( options ) {
|
||||
// If we're navigating back in the URL history, set reverse accordingly.
|
||||
settings.reverse = settings.reverse || historyDir < 0;
|
||||
|
||||
cssTransitionDeferred = $.Deferred();
|
||||
|
||||
this._cssTransition(toPage, fromPage, {
|
||||
transition: settings.transition,
|
||||
reverse: settings.reverse,
|
||||
deferred: cssTransitionDeferred
|
||||
reverse: settings.reverse
|
||||
});
|
||||
|
||||
cssTransitionDeferred.done($.proxy(function( name, reverse, $to, $from, alreadyFocused ) {
|
||||
$.mobile.removeActiveLinkClass();
|
||||
$.mobile.removeActiveLinkClass();
|
||||
|
||||
//if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
|
||||
if ( settings.duplicateCachedPage ) {
|
||||
settings.duplicateCachedPage.remove();
|
||||
}
|
||||
//if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
|
||||
if (settings.duplicateCachedPage) {
|
||||
settings.duplicateCachedPage.remove();
|
||||
}
|
||||
|
||||
// despite visibility: hidden addresses issue #2965
|
||||
// https://github.com/jquery/jquery-mobile/issues/2965
|
||||
if ( !alreadyFocused ) {
|
||||
$.mobile.focusPage( toPage );
|
||||
}
|
||||
// despite visibility: hidden addresses issue #2965
|
||||
// https://github.com/jquery/jquery-mobile/issues/2965
|
||||
//if (!alreadyFocused) {
|
||||
// $.mobile.focusPage(toPage);
|
||||
//}
|
||||
|
||||
this._releaseTransitionLock();
|
||||
this._triggerWithDeprecated( "transition", triggerData );
|
||||
this._triggerWithDeprecated( "change", triggerData );
|
||||
}, this));
|
||||
this._releaseTransitionLock();
|
||||
this._triggerWithDeprecated("transition", triggerData);
|
||||
this._triggerWithDeprecated("change", triggerData);
|
||||
},
|
||||
|
||||
// determine the current base url
|
||||
@ -6293,7 +6251,7 @@ $.fn.grid = function( options ) {
|
||||
}
|
||||
|
||||
//if there's a data-rel=back attr, go back in history
|
||||
if ( $link.is( ":jqmData(rel='back')" ) ) {
|
||||
if ( $link.is( "[data-rel='back']" ) ) {
|
||||
$.mobile.back();
|
||||
return false;
|
||||
}
|
||||
@ -6337,7 +6295,7 @@ $.fn.grid = function( options ) {
|
||||
}
|
||||
|
||||
// Should we handle this link, or let the browser deal with it?
|
||||
useDefaultUrlHandling = $link.is( "[rel='external']" ) || $link.is( ":jqmData(ajax='false')" ) || $link.is( "[target]" );
|
||||
useDefaultUrlHandling = $link.is( "[rel='external']" ) || $link.is( "[data-ajax='false']" ) || $link.is( "[target]" );
|
||||
|
||||
// Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR
|
||||
// requests if the document doing the request was loaded via the file:// protocol.
|
||||
@ -6373,7 +6331,7 @@ $.fn.grid = function( options ) {
|
||||
//prefetch pages when anchors with data-prefetch are encountered
|
||||
$.mobile.document.delegate( ".ui-page", "pageshow.prefetch", function() {
|
||||
var urls = [];
|
||||
$( this ).find( "a:jqmData(prefetch)" ).each(function() {
|
||||
$( this ).find( "a[data-prefetch]" ).each(function() {
|
||||
var $link = $( this ),
|
||||
url = $link.attr( "href" );
|
||||
|
||||
@ -6453,7 +6411,7 @@ $.fn.grid = function( options ) {
|
||||
initializePage: function() {
|
||||
// find present pages
|
||||
var path = $.mobile.path,
|
||||
$pages = $( ":jqmData(role='page'), :jqmData(role='dialog')" ),
|
||||
$pages = $("*[data-role='page'], *[data-role='dialog']"),
|
||||
hash = path.stripHash( path.stripQueryParams(path.parseLocation().hash) ),
|
||||
theLocation = $.mobile.path.parseLocation(),
|
||||
hashPage = hash ? document.getElementById( hash ) : undefined;
|
||||
@ -6503,7 +6461,7 @@ $.fn.grid = function( options ) {
|
||||
// Remember, however, that the hash can also be a path!
|
||||
if ( ! ( $.mobile.hashListeningEnabled &&
|
||||
$.mobile.path.isHashValid( location.hash ) &&
|
||||
( $( hashPage ).is( ":jqmData(role='page')" ) ||
|
||||
( $( hashPage ).is( "[data-role='page']" ) ||
|
||||
$.mobile.path.isPath( hash ) ||
|
||||
hash === $.mobile.dialogHashKey ) ) ) {
|
||||
|
||||
@ -6588,7 +6546,7 @@ $.mobile.links = function( target ) {
|
||||
$( target )
|
||||
.find( "a" )
|
||||
.jqmEnhanceable()
|
||||
.filter( ":jqmData(rel='popup')[href][href!='']" )
|
||||
.filter( "[data-rel='popup'][href][href!='']" )
|
||||
.each( function() {
|
||||
// Accessibility info for popups
|
||||
var element = this,
|
||||
@ -6601,7 +6559,7 @@ $.mobile.links = function( target ) {
|
||||
}
|
||||
})
|
||||
.end()
|
||||
.not( ".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')" )
|
||||
.not( ".ui-btn, [data-role='none'], [data-role='nojs']" )
|
||||
.addClass( "ui-link" );
|
||||
|
||||
};
|
||||
@ -7219,9 +7177,9 @@ $.widget( "mobile.controlgroup", $.extend( {
|
||||
$.widget( "mobile.textinput", {
|
||||
initSelector: "input[type='text']," +
|
||||
"input[type='search']," +
|
||||
":jqmData(type='search')," +
|
||||
"*[data-type='search']," +
|
||||
"input[type='number']," +
|
||||
":jqmData(type='number')," +
|
||||
"*[data-type='number']," +
|
||||
"input[type='password']," +
|
||||
"input[type='email']," +
|
||||
"input[type='url']," +
|
||||
@ -7725,7 +7683,7 @@ var escapeId = $.mobile.path.hashToSelector;
|
||||
|
||||
$.widget( "mobile.checkboxradio", $.extend( {
|
||||
|
||||
initSelector: "input:not( :jqmData(role='flipswitch' ) )[type='checkbox'],input[type='radio']:not( :jqmData(role='flipswitch' ))",
|
||||
initSelector: "input[type='checkbox'],input[type='radio']",
|
||||
|
||||
options: {
|
||||
theme: "inherit",
|
||||
@ -8069,230 +8027,8 @@ $.widget( "mobile.checkboxradio", $.extend( {
|
||||
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.flipswitch", $.extend({
|
||||
|
||||
options: {
|
||||
onText: "On",
|
||||
offText: "Off",
|
||||
theme: null,
|
||||
enhanced: false,
|
||||
wrapperClass: null,
|
||||
corners: true,
|
||||
mini: false
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
if ( !this.options.enhanced ) {
|
||||
this._enhance();
|
||||
} else {
|
||||
$.extend( this, {
|
||||
flipswitch: this.element.parent(),
|
||||
on: this.element.find( ".ui-flipswitch-on" ).eq( 0 ),
|
||||
off: this.element.find( ".ui-flipswitch-off" ).eq(0),
|
||||
type: this.element.get( 0 ).tagName
|
||||
});
|
||||
}
|
||||
|
||||
this._handleFormReset();
|
||||
|
||||
// Transfer tabindex to "on" element and make input unfocusable
|
||||
this._originalTabIndex = this.element.attr( "tabindex" );
|
||||
if ( this._originalTabIndex != null ) {
|
||||
this.on.attr( "tabindex", this._originalTabIndex );
|
||||
}
|
||||
this.element.attr( "tabindex", "-1" );
|
||||
this._on({
|
||||
"focus" : "_handleInputFocus"
|
||||
});
|
||||
|
||||
if ( this.element.is( ":disabled" ) ) {
|
||||
this._setOptions({
|
||||
"disabled": true
|
||||
});
|
||||
}
|
||||
|
||||
this._on( this.flipswitch, {
|
||||
"click": "_toggle",
|
||||
"swipeleft": "_left",
|
||||
"swiperight": "_right"
|
||||
});
|
||||
|
||||
this._on( this.on, {
|
||||
"keydown": "_keydown"
|
||||
});
|
||||
|
||||
this._on( {
|
||||
"change": "refresh"
|
||||
});
|
||||
},
|
||||
|
||||
_handleInputFocus: function() {
|
||||
this.on.focus();
|
||||
},
|
||||
|
||||
widget: function() {
|
||||
return this.flipswitch;
|
||||
},
|
||||
|
||||
_left: function() {
|
||||
this.flipswitch.removeClass( "ui-flipswitch-active" );
|
||||
if ( this.type === "SELECT" ) {
|
||||
this.element.get( 0 ).selectedIndex = 0;
|
||||
} else {
|
||||
this.element.prop( "checked", false );
|
||||
}
|
||||
this.element.trigger( "change" );
|
||||
},
|
||||
|
||||
_right: function() {
|
||||
this.flipswitch.addClass( "ui-flipswitch-active" );
|
||||
if ( this.type === "SELECT" ) {
|
||||
this.element.get( 0 ).selectedIndex = 1;
|
||||
} else {
|
||||
this.element.prop( "checked", true );
|
||||
}
|
||||
this.element.trigger( "change" );
|
||||
},
|
||||
|
||||
_enhance: function() {
|
||||
var flipswitch = $( "<div>" ),
|
||||
options = this.options,
|
||||
element = this.element,
|
||||
theme = options.theme ? options.theme : "inherit",
|
||||
|
||||
// The "on" button is an anchor so it's focusable
|
||||
on = $( "<a></a>", {
|
||||
"href": "#"
|
||||
}),
|
||||
off = $( "<span></span>" ),
|
||||
type = element.get( 0 ).tagName,
|
||||
onText = ( type === "INPUT" ) ?
|
||||
options.onText : element.find( "option" ).eq( 1 ).text(),
|
||||
offText = ( type === "INPUT" ) ?
|
||||
options.offText : element.find( "option" ).eq( 0 ).text();
|
||||
|
||||
on
|
||||
.addClass( "ui-flipswitch-on ui-btn ui-shadow ui-btn-inherit" )
|
||||
.text( onText );
|
||||
off
|
||||
.addClass( "ui-flipswitch-off" )
|
||||
.text( offText );
|
||||
|
||||
flipswitch
|
||||
.addClass( "ui-flipswitch ui-shadow-inset " +
|
||||
"ui-bar-" + theme + " " +
|
||||
( options.wrapperClass ? options.wrapperClass : "" ) + " " +
|
||||
( ( element.is( ":checked" ) ||
|
||||
element
|
||||
.find( "option" )
|
||||
.eq( 1 )
|
||||
.is( ":selected" ) ) ? "ui-flipswitch-active" : "" ) +
|
||||
( element.is(":disabled") ? " ui-state-disabled": "") +
|
||||
( options.corners ? " ui-corner-all": "" ) +
|
||||
( options.mini ? " ui-mini": "" ) )
|
||||
.append( on, off );
|
||||
|
||||
element
|
||||
.addClass( "ui-flipswitch-input" )
|
||||
.after( flipswitch )
|
||||
.appendTo( flipswitch );
|
||||
|
||||
$.extend( this, {
|
||||
flipswitch: flipswitch,
|
||||
on: on,
|
||||
off: off,
|
||||
type: type
|
||||
});
|
||||
},
|
||||
|
||||
_reset: function() {
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
var direction,
|
||||
existingDirection = this.flipswitch.hasClass( "ui-flipswitch-active" ) ? "_right" : "_left";
|
||||
|
||||
if ( this.type === "SELECT" ) {
|
||||
direction = ( this.element.get( 0 ).selectedIndex > 0 ) ? "_right": "_left";
|
||||
} else {
|
||||
direction = this.element.prop( "checked" ) ? "_right": "_left";
|
||||
}
|
||||
|
||||
if ( direction !== existingDirection ) {
|
||||
this[ direction ]();
|
||||
}
|
||||
},
|
||||
|
||||
_toggle: function() {
|
||||
var direction = this.flipswitch.hasClass( "ui-flipswitch-active" ) ? "_left" : "_right";
|
||||
|
||||
this[ direction ]();
|
||||
},
|
||||
|
||||
_keydown: function( e ) {
|
||||
if ( e.which === $.mobile.keyCode.LEFT ) {
|
||||
this._left();
|
||||
} else if ( e.which === $.mobile.keyCode.RIGHT ) {
|
||||
this._right();
|
||||
} else if ( e.which === $.mobile.keyCode.SPACE ) {
|
||||
this._toggle();
|
||||
e.preventDefault();
|
||||
}
|
||||
},
|
||||
|
||||
_setOptions: function( options ) {
|
||||
if ( options.theme !== undefined ) {
|
||||
var currentTheme = options.theme ? options.theme : "inherit",
|
||||
newTheme = options.theme ? options.theme : "inherit";
|
||||
|
||||
this.widget()
|
||||
.removeClass( "ui-bar-" + currentTheme )
|
||||
.addClass( "ui-bar-" + newTheme );
|
||||
}
|
||||
if ( options.onText !== undefined ) {
|
||||
this.on.text( options.onText );
|
||||
}
|
||||
if ( options.offText !== undefined ) {
|
||||
this.off.text( options.offText );
|
||||
}
|
||||
if ( options.disabled !== undefined ) {
|
||||
this.widget().toggleClass( "ui-state-disabled", options.disabled );
|
||||
}
|
||||
if ( options.mini !== undefined ) {
|
||||
this.widget().toggleClass( "ui-mini", options.mini );
|
||||
}
|
||||
if ( options.corners !== undefined ) {
|
||||
this.widget().toggleClass( "ui-corner-all", options.corners );
|
||||
}
|
||||
|
||||
this._super( options );
|
||||
},
|
||||
|
||||
_destroy: function() {
|
||||
if ( this.options.enhanced ) {
|
||||
return;
|
||||
}
|
||||
if ( this._originalTabIndex != null ) {
|
||||
this.element.attr( "tabindex", this._originalTabIndex );
|
||||
} else {
|
||||
this.element.removeAttr( "tabindex" );
|
||||
}
|
||||
this.on.remove();
|
||||
this.off.remove();
|
||||
this.element.unwrap();
|
||||
this.flipswitch.remove();
|
||||
this.removeClass( "ui-flipswitch-input" );
|
||||
}
|
||||
|
||||
}, $.mobile.behaviors.formReset ) );
|
||||
|
||||
})( jQuery );
|
||||
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.slider", $.extend( {
|
||||
initSelector: "input[type='range'], :jqmData(type='range'), :jqmData(role='slider')",
|
||||
initSelector: "input[type='range'], *[data-type='range'], *[data-role='slider']",
|
||||
|
||||
widgetEventPrefix: "slide",
|
||||
|
||||
@ -9133,7 +8869,7 @@ $.widget( "mobile.slider", $.extend( {
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.selectmenu", $.extend( {
|
||||
initSelector: "select:not( :jqmData(role='slider')):not( :jqmData(role='flipswitch') )",
|
||||
initSelector: "select:not( [data-role='slider'])",
|
||||
|
||||
options: {
|
||||
theme: null,
|
||||
@ -9749,70 +9485,6 @@ $.widget( "mobile.listview", $.extend( {
|
||||
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.navbar", {
|
||||
options: {
|
||||
iconpos: "top",
|
||||
grid: null
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
|
||||
var $navbar = this.element,
|
||||
$navbtns = $navbar.find( "a, button" ),
|
||||
iconpos = $navbtns.filter( ":jqmData(icon)" ).length ? this.options.iconpos : undefined;
|
||||
|
||||
$navbar.addClass( "ui-navbar" )
|
||||
.attr( "role", "navigation" )
|
||||
.find( "ul" )
|
||||
.jqmEnhanceable()
|
||||
.grid({ grid: this.options.grid });
|
||||
|
||||
$navbtns
|
||||
.each( function() {
|
||||
var icon = $.mobile.getAttribute( this, "icon" ),
|
||||
theme = $.mobile.getAttribute( this, "theme" ),
|
||||
classes = "ui-btn";
|
||||
|
||||
if ( theme ) {
|
||||
classes += " ui-btn-" + theme;
|
||||
}
|
||||
if ( icon ) {
|
||||
classes += " ui-icon-" + icon + " ui-btn-icon-" + iconpos;
|
||||
}
|
||||
$( this ).addClass( classes );
|
||||
});
|
||||
|
||||
$navbar.delegate( "a", "vclick", function( /* event */ ) {
|
||||
var activeBtn = $( this );
|
||||
|
||||
if ( !( activeBtn.hasClass( "ui-state-disabled" ) ||
|
||||
|
||||
// DEPRECATED as of 1.4.0 - remove after 1.4.0 release
|
||||
// only ui-state-disabled should be present thereafter
|
||||
activeBtn.hasClass( "ui-disabled" ) ||
|
||||
activeBtn.hasClass( $.mobile.activeBtnClass ) ) ) {
|
||||
|
||||
$navbtns.removeClass( $.mobile.activeBtnClass );
|
||||
activeBtn.addClass( $.mobile.activeBtnClass );
|
||||
|
||||
// The code below is a workaround to fix #1181
|
||||
$( document ).one( "pagehide", function() {
|
||||
activeBtn.removeClass( $.mobile.activeBtnClass );
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Buttons in the navbar with ui-state-persist class should regain their active state before page show
|
||||
$navbar.closest( ".ui-page" ).bind( "pagebeforeshow", function() {
|
||||
$navbtns.filter( ".ui-state-persist" ).addClass( $.mobile.activeBtnClass );
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
})( jQuery );
|
||||
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.panel", {
|
||||
options: {
|
||||
classes: {
|
||||
|
@ -1021,87 +1021,6 @@ textarea.ui-input-text.ui-textinput-autogrow {
|
||||
clip: rect(1px,1px,1px,1px);
|
||||
}
|
||||
|
||||
.ui-flipswitch {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 5.875em; /* Override this and padding-left in next rule if you use labels other than "on/off" and need more space */
|
||||
height: 1.875em;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
margin: .5em 0;
|
||||
overflow: hidden;
|
||||
-webkit-transition-property: padding, width, background-color, color, border-color;
|
||||
-moz-transition-property: padding, width, background-color, color, border-color;
|
||||
-o-transition-property: padding, width, background-color, color, border-color;
|
||||
transition-property: padding, width, background-color, color, border-color;
|
||||
-webkit-transition-duration: 100ms;
|
||||
-moz-transition-duration: 100ms;
|
||||
-o-transition-duration: 100ms;
|
||||
transition-duration: 100ms;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ui-flipswitch.ui-flipswitch-active {
|
||||
padding-left: 4em; /* Override this and width in previous rule if you use labels other than "on/off" and need more space */
|
||||
width: 1.875em;
|
||||
}
|
||||
.ui-flipswitch-input {
|
||||
position: absolute;
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(1px,1px,1px,1px);
|
||||
border: 0;
|
||||
outline: 0;
|
||||
filter: Alpha(Opacity=0);
|
||||
opacity: 0;
|
||||
}
|
||||
.ui-flipswitch .ui-btn.ui-flipswitch-on,
|
||||
.ui-flipswitch .ui-flipswitch-off {
|
||||
float: left;
|
||||
height: 1.75em;
|
||||
margin: .0625em;
|
||||
line-height: 1.65em;
|
||||
}
|
||||
.ui-flipswitch .ui-btn.ui-flipswitch-on {
|
||||
width: 1.75em;
|
||||
padding: 0;
|
||||
text-indent: -2.6em; /* Override this to center text if you use a label other than "on" */
|
||||
text-align: left;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border-radius: inherit;
|
||||
overflow: visible;
|
||||
color: inherit;
|
||||
text-shadow: inherit;
|
||||
}
|
||||
.ui-flipswitch .ui-flipswitch-off {
|
||||
padding: 1px;
|
||||
text-indent: 1em; /* Override this to center text if you use a label other than "off" */
|
||||
}
|
||||
/* Override field container CSS to prevent the flipswitch from becomming full width */
|
||||
html .ui-field-contain > label + .ui-flipswitch,
|
||||
html .ui-popup .ui-field-contain > label + .ui-flipswitch {
|
||||
display: inline-block;
|
||||
width: 5.875em; /* If you override the width for .ui-flipswitch you should repeat the same value here */
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.ui-field-contain .ui-flipswitch.ui-flipswitch-active,
|
||||
.ui-popup .ui-field-contain .ui-flipswitch.ui-flipswitch-active {
|
||||
width: 1.875em;
|
||||
}
|
||||
|
||||
|
||||
.ui-rangeslider {
|
||||
margin: .5em 0;
|
||||
}
|
||||
@ -1900,98 +1819,6 @@ ol.ui-listview > li img:first-child + * ~ * {
|
||||
text-indent: 2.04em; /* (1.4em + .3em) * .9em / .75em */
|
||||
}
|
||||
|
||||
|
||||
.ui-navbar {
|
||||
max-width: 100%;
|
||||
}
|
||||
.ui-navbar ul:before,
|
||||
.ui-navbar ul:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
.ui-navbar ul:after {
|
||||
clear: both;
|
||||
}
|
||||
.ui-navbar ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
display: block;
|
||||
border: 0;
|
||||
max-width: 100%;
|
||||
overflow: visible;
|
||||
}
|
||||
.ui-navbar li .ui-btn {
|
||||
font-size: 12.5px;
|
||||
display: block;
|
||||
margin: 0;
|
||||
border-right-width: 0;
|
||||
}
|
||||
.ui-header .ui-navbar li button.ui-btn,
|
||||
.ui-footer .ui-navbar li button.ui-btn {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-navbar .ui-btn:focus {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* fixes gaps caused by subpixel problem */
|
||||
.ui-navbar li:last-child .ui-btn {
|
||||
margin-right: -4px;
|
||||
}
|
||||
.ui-navbar li:last-child .ui-btn:after {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.ui-content .ui-navbar li:last-child .ui-btn,
|
||||
.ui-content .ui-navbar .ui-grid-duo .ui-block-b .ui-btn {
|
||||
border-right-width: 1px;
|
||||
margin-right: 0;
|
||||
}
|
||||
.ui-content .ui-navbar li:last-child .ui-btn:after,
|
||||
.ui-content .ui-navbar .ui-grid-duo .ui-block-b .ui-btn:after {
|
||||
margin-right: 0;
|
||||
}
|
||||
.ui-navbar .ui-grid-duo .ui-block-a:last-child .ui-btn {
|
||||
border-right-width: 1px;
|
||||
margin-right: -1px;
|
||||
}
|
||||
.ui-navbar .ui-grid-duo .ui-block-a:last-child .ui-btn:after {
|
||||
margin-right: 1px;
|
||||
}
|
||||
|
||||
.ui-navbar .ui-grid-duo .ui-btn {
|
||||
border-top-width: 0;
|
||||
}
|
||||
.ui-navbar .ui-grid-duo .ui-block-a:first-child .ui-btn,
|
||||
.ui-navbar .ui-grid-duo .ui-block-a:first-child + .ui-block-b .ui-btn {
|
||||
border-top-width: 1px;
|
||||
}
|
||||
.ui-header .ui-navbar .ui-btn,
|
||||
.ui-footer .ui-navbar .ui-btn {
|
||||
border-top-width: 0;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
.ui-header .ui-navbar .ui-grid-duo .ui-block-a:first-child .ui-btn,
|
||||
.ui-footer .ui-navbar .ui-grid-duo .ui-block-a:first-child .ui-btn,
|
||||
.ui-header .ui-navbar .ui-grid-duo .ui-block-a:first-child + .ui-block-b .ui-btn,
|
||||
.ui-footer .ui-navbar .ui-grid-duo .ui-block-a:first-child + .ui-block-b .ui-btn {
|
||||
border-top-width: 0;
|
||||
}
|
||||
.ui-header .ui-title ~ .ui-navbar .ui-btn,
|
||||
.ui-footer .ui-title ~ .ui-navbar .ui-btn,
|
||||
.ui-header .ui-navbar .ui-grid-duo .ui-btn,
|
||||
.ui-footer .ui-navbar .ui-grid-duo .ui-btn,
|
||||
.ui-header .ui-title ~ .ui-navbar .ui-grid-duo .ui-block-a:first-child .ui-btn,
|
||||
.ui-footer .ui-title ~ .ui-navbar .ui-grid-duo .ui-block-a:first-child .ui-btn,
|
||||
.ui-header .ui-title ~ .ui-navbar .ui-grid-duo .ui-block-a:first-child + .ui-block-b .ui-btn,
|
||||
.ui-footer .ui-title ~ .ui-navbar .ui-grid-duo .ui-block-a:first-child + .ui-block-b .ui-btn {
|
||||
border-top-width: 1px;
|
||||
}
|
||||
|
||||
|
||||
/* Panel */
|
||||
.ui-panel {
|
||||
width: 17em;
|
||||
|
@ -101,8 +101,6 @@ label.ui-btn {
|
||||
.ui-btn.ui-corner-all,
|
||||
/* Slider track */
|
||||
.ui-slider-track.ui-corner-all,
|
||||
/* Flipswitch */
|
||||
.ui-flipswitch.ui-corner-all,
|
||||
/* Count bubble */
|
||||
.ui-li-count {
|
||||
-webkit-border-radius: .3125em /*{global-radii-buttons}*/;
|
||||
@ -353,12 +351,6 @@ html .ui-bar-a .ui-checkbox-on:after,
|
||||
html .ui-body-a .ui-checkbox-on:after,
|
||||
html body .ui-group-theme-a .ui-checkbox-on:after,
|
||||
.ui-btn.ui-checkbox-on.ui-btn-a:after,
|
||||
/* Active flipswitch background */
|
||||
.ui-page-theme-a .ui-flipswitch-active,
|
||||
html .ui-bar-a .ui-flipswitch-active,
|
||||
html .ui-body-a .ui-flipswitch-active,
|
||||
html body .ui-group-theme-a .ui-flipswitch-active,
|
||||
html body .ui-flipswitch.ui-bar-a.ui-flipswitch-active,
|
||||
/* Active slider track */
|
||||
.ui-page-theme-a .ui-slider-track .ui-btn-active,
|
||||
html .ui-bar-a .ui-slider-track .ui-btn-active,
|
||||
@ -523,12 +515,6 @@ html .ui-bar-b .ui-checkbox-on:after,
|
||||
html .ui-body-b .ui-checkbox-on:after,
|
||||
html body .ui-group-theme-b .ui-checkbox-on:after,
|
||||
.ui-btn.ui-checkbox-on.ui-btn-b:after,
|
||||
/* Active flipswitch background */
|
||||
.ui-page-theme-b .ui-flipswitch-active,
|
||||
html .ui-bar-b .ui-flipswitch-active,
|
||||
html .ui-body-b .ui-flipswitch-active,
|
||||
html body .ui-group-theme-b .ui-flipswitch-active,
|
||||
html body .ui-flipswitch.ui-bar-b.ui-flipswitch-active,
|
||||
/* Active slider track */
|
||||
.ui-page-theme-b .ui-slider-track .ui-btn-active,
|
||||
html .ui-bar-b .ui-slider-track .ui-btn-active,
|
||||
|
Loading…
Reference in New Issue
Block a user