Commit 742474f1 authored by Sven Franck's avatar Sven Franck

updated jQuery Mobile, JIO, Modernizr and extensions to latest

parent 3806e7aa
/*!
* jQuery Mobile 1.4.0pre
* Git HEAD hash: e27a97c01c44f70da83d3544cb9c064609357e69 <> Date: Fri Nov 1 2013 15:22:56 UTC
* Git HEAD hash: cc93bc3b7d1b64e4bc28673f3bb44f184ab3d323 <> Date: Wed Nov 27 2013 15:48:52 UTC
* http://jquerymobile.com
*
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
......@@ -873,7 +873,7 @@ html .ui-alt-icon.ui-radio-off:after,
html .ui-alt-icon .ui-checkbox-off:after,
html .ui-alt-icon .ui-radio-off:after {
background-color: #666 /*{global-icon-color}*/;
background-color: rgba(0,0,0,.15) /*{global-icon-disc-alt}*/;
background-color: rgba(0,0,0,.15);
}
/* No disc */
.ui-nodisc-icon.ui-btn:after,
......@@ -1249,6 +1249,7 @@ html head + body .ui-body-b.ui-focus {
-moz-box-shadow: 0 0 12px #22aadd /*{b-active-background-color}*/;
box-shadow: 0 0 12px #22aadd /*{b-active-background-color}*/;
}
/* Structure */
/* Disabled
-----------------------------------------------------------------------------------------------------------*/
/* Class ui-disabled deprecated in 1.4. :disabled not supported by IE8 so we use [disabled] */
......
......@@ -598,11 +598,14 @@ $.widget( "mobile.table", $.mobile.table, {
},
_generateWrapper: function ( grids ) {
return $("<div/>", {
class: "ui-table-wrapper ui-table-wrapper-inset " + (this.options.embedded ? "" : "ui-corner-all")
}).append($.map(new Array( grids ), function(){
return $("<div/>");
})).grid({ grid: grids > 1 ? this._toLetter(grids-2) : "solo" });
return $("<div class='ui-table-wrapper ui-table-wrapper-inset " +
(this.options.embedded ? "" : "ui-corner-all") + "'>")
.append(
$.map(new Array( grids ), function(){
return $("<div/>");
})
)
.grid({ grid: grids > 1 ? this._toLetter(grids-2) : "solo" });
},
_enhanceColToggle: function() {
......
......@@ -878,7 +878,6 @@ function ajax(param) {
return new RSVP.Promise(function (resolve, reject, notify) {
var k;
xhr.open(param.type || "GET", param.url, true);
xhr.responseType = param.dataType || "";
if (typeof param.headers === 'object' && param.headers !== null) {
for (k in param.headers) {
if (param.headers.hasOwnProperty(k)) {
......
// HACK: tabindex in clearBtn, panelFix #6658, listview enhance:false
/*!
* jQuery Mobile 1.4.0pre
* Git HEAD hash: e27a97c01c44f70da83d3544cb9c064609357e69 <> Date: Fri Nov 1 2013 15:22:56 UTC
* Git HEAD hash: cc93bc3b7d1b64e4bc28673f3bb44f184ab3d323 <> Date: Wed Nov 27 2013 15:48:52 UTC
* http://jquerymobile.com
*
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
......@@ -3034,6 +3035,7 @@ if ( !$.support.boxShadow ) {
return;
}
}
// account for direct manipulation of the hash. That is, we will receive a popstate
// when the hash is changed by assignment, and it won't have a state associated. We
// then need to squash the hash. See below for handling of hash assignment that
......@@ -3150,7 +3152,6 @@ if ( !$.support.boxShadow ) {
$.mobile.navigate.navigator = new $.mobile.Navigator( $.mobile.navigate.history );
var loc = $.mobile.path.parseLocation();
$.mobile.navigate.history.add( loc.href, {hash: loc.hash} );
})( jQuery );
......@@ -4496,8 +4497,7 @@ $.widget( "mobile.page", {
// TODO rename _handleDestination
_handleDestination: function( to ) {
var history;
// console.log("Handling destination")
// console.log(to)
// clean the hash for comparison if it's a url
if ( $.type(to) === "string" ) {
to = $.mobile.path.stripHash( to );
......@@ -4516,28 +4516,19 @@ $.widget( "mobile.page", {
//
// TODO move check to history object or path object?
to = !$.mobile.path.isPath( to ) ? ( $.mobile.path.makeUrlAbsolute( "#" + to, this._getDocumentBase() ) ) : to;
// console.log("here")
// console.log(to)
// If we're about to go to an initial URL that contains a
// reference to a non-existent internal page, go to the first
// page instead. We know that the initial hash refers to a
// non-existent page, because the initial hash did not end
// up in the initial history entry
// HACK: AND IF IT DID???
// TODO move check to history object?
// console.log("PROBLEM")
if ( to === $.mobile.path.makeUrlAbsolute( "#" + history.initialDst, this._getDocumentBase() ) &&
history.stack.length &&
//$.mobile.path.parseUrl(history.stack[0].url).hash.replace("#","") !== history.initialDst.replace( $.mobile.dialogHashKey, "" ) &&
history.stack[0].url !== history.initialDst.replace( $.mobile.dialogHashKey, "" ) ) {
// console.log("there")
to = this._getInitialContent();
// console.log(to)
}
}
// console.log("TO SET TO")
// console.log(to)
return to || this._getInitialContent();
},
......@@ -4611,8 +4602,6 @@ $.widget( "mobile.page", {
return;
}
}
// console.log("changing content")
// console.log(to);
this._changeContent( this._handleDestination( to ), changePageOptions );
},
......@@ -5154,12 +5143,12 @@ $.widget( "mobile.page", {
// in the loadPage callback where it exists
triggerData.absUrl = settings.absUrl;
}
// Let listeners know we're about to change the current page.
this.element.trigger( pbcEvent, triggerData );
// If the default behavior is prevented, stop here!
if ( pbcEvent.isDefaultPrevented() ) {
// console.log("PUM, stop!")
return false;
}
......@@ -5180,8 +5169,7 @@ $.widget( "mobile.page", {
// Make sure we have a fromPage.
settings.fromPage = settings.fromPage || this.activePage;
// console.log("triggerBeforechange with")
// console.log(to)
// if the page beforechange default is prevented return early
if ( !this._triggerPageBeforeChange(to, triggerData, settings) ) {
return;
......@@ -5587,8 +5575,6 @@ $.widget( "mobile.page", {
};
$.mobile.changePage = function( to, options ) {
// console.log("changePage with to =")
// console.log(to)
$.mobile.pageContainer.pagecontainer( "change", to, options );
};
......@@ -6914,7 +6900,7 @@ $.widget( "mobile.collapsibleset", $.extend( {
initSelector: ":jqmData(role='collapsible-set'),:jqmData(role='collapsibleset')",
options: $.extend( {
enhanced: false,
enhanced: false
}, $.mobile.collapsible.defaults ),
_handleCollapsibleExpand: function( event ) {
......@@ -7156,10 +7142,10 @@ $.widget( "mobile.listview", $.extend( {
},
_create: function() {
var o = this.options,
listviewClasses;
var listviewClasses,
o = this.options;
if (!o.enhanced) {
if ( !o.enhanced ) {
listviewClasses = o.inset ? " ui-listview-inset" : "";
if ( !!o.inset ) {
......@@ -7221,11 +7207,11 @@ $.widget( "mobile.listview", $.extend( {
$list = this.element;
if (!o.enhanced && create) {
ol = !!$.nodeName( $list[ 0 ], "ol" );
start = $list.attr( "start" );
itemClassDict = {};
countBubbles = $list.find( ".ui-li-count" );
countTheme = getAttr( $list[ 0 ], "counttheme" ) || o.countTheme;
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 ) {
......@@ -9270,7 +9256,7 @@ $.widget( "mobile.flipswitch", $.extend({
clearButton: function() {
return $( "<a href='#' class='ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all" +
return $( "<a href='#' tabindex='0' class='ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all" +
"' title='" + this.options.clearBtnText + "'>" + this.options.clearBtnText + "</a>" );
},
......@@ -9976,7 +9962,6 @@ $.widget( "mobile.popup", {
},
_eatEventAndClose: function( theEvent ) {
theEvent.mother = "fucker";
theEvent.preventDefault();
theEvent.stopImmediatePropagation();
if ( this.options.dismissible ) {
......@@ -10618,14 +10603,10 @@ $.widget( "mobile.popup", {
parsedDst = $.mobile.path.parseUrl( parsedDst );
toUrl = parsedDst.pathname + parsedDst.search + parsedDst.hash;
// console.log("comparing myUrl with parsedDst")
// console.log(this._myUrl)
// console.log($.mobile.path.makeUrlAbsolute( toUrl ))
if ( this._myUrl !== $.mobile.path.makeUrlAbsolute( toUrl ) ) {
// Going to a different page - close immediately
immediate = true;
} else {
// console.log("SET TO STOP!")
theEvent.preventDefault();
}
}
......@@ -12534,6 +12515,7 @@ $.widget( "mobile.panel", {
$.extend( this, {
_panelID: el.attr( "id" ),
_closeLink: el.find( ":jqmData(rel='close')" ),
_openedPage: null,
_parentPage: ( parentPage.length > 0 ) ? parentPage : false,
_page: this._getPage,
_panelInner: this._getPanelInner(),
......@@ -12582,7 +12564,7 @@ $.widget( "mobile.panel", {
},
_getPage: function() {
var page = this._parentPage ? this._parentPage : $( "." + $.mobile.activePageClass );
var page = this._openedPage || (this._parentPage ? this._parentPage : $( "." + $.mobile.activePageClass ));
return page;
},
......@@ -12822,6 +12804,8 @@ $.widget( "mobile.panel", {
self._bindFixListener();
self._trigger( "open" );
self._openedPage = self._page();
};
self._trigger( "beforeopen" );
......@@ -12888,6 +12872,8 @@ $.widget( "mobile.panel", {
self._page().jqmRemoveData( "panel" );
self._trigger( "close" );
self._openedPage = null;
};
self._trigger( "beforeclose" );
......@@ -13359,7 +13345,6 @@ $.widget( "mobile.filterable", {
});
this._setInput( opts.input );
if ( !opts.enhanced ) {
this._filterItems( ( ( this._search && this._search.val() ) || "" ).toLowerCase() );
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment