sync
@ -39,6 +39,8 @@ class Ui_ExceptionDialog(object):
|
|||||||
self.messageLayout.addSpacing(12)
|
self.messageLayout.addSpacing(12)
|
||||||
self.bugLabel = QtGui.QLabel(exceptionDialog)
|
self.bugLabel = QtGui.QLabel(exceptionDialog)
|
||||||
self.bugLabel.setPixmap(QtGui.QPixmap(u':/graphics/exception.png'))
|
self.bugLabel.setPixmap(QtGui.QPixmap(u':/graphics/exception.png'))
|
||||||
|
self.bugLabel.setSizePolicy(QtGui.QSizePolicy.Fixed,
|
||||||
|
QtGui.QSizePolicy.Fixed)
|
||||||
self.bugLabel.setObjectName(u'bugLabel')
|
self.bugLabel.setObjectName(u'bugLabel')
|
||||||
self.messageLayout.addWidget(self.bugLabel)
|
self.messageLayout.addWidget(self.bugLabel)
|
||||||
self.messageLayout.addSpacing(12)
|
self.messageLayout.addSpacing(12)
|
||||||
|
@ -638,14 +638,14 @@ class BiblesResourcesDB(QtCore.QObject, Manager):
|
|||||||
chapters = BiblesResourcesDB.run_sql(u'SELECT id, book_reference_id, '
|
chapters = BiblesResourcesDB.run_sql(u'SELECT id, book_reference_id, '
|
||||||
u'chapter, verse_count FROM chapters WHERE book_reference_id = ?',
|
u'chapter, verse_count FROM chapters WHERE book_reference_id = ?',
|
||||||
(book_id,))
|
(book_id,))
|
||||||
if chapters:
|
try:
|
||||||
return {
|
return {
|
||||||
u'id': chapters[chapter-1][0],
|
u'id': chapters[chapter-1][0],
|
||||||
u'book_reference_id': chapters[chapter-1][1],
|
u'book_reference_id': chapters[chapter-1][1],
|
||||||
u'chapter': chapters[chapter-1][2],
|
u'chapter': chapters[chapter-1][2],
|
||||||
u'verse_count': chapters[chapter-1][3]
|
u'verse_count': chapters[chapter-1][3]
|
||||||
}
|
}
|
||||||
else:
|
except (IndexError, TypeError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -753,7 +753,7 @@ class BiblesResourcesDB(QtCore.QObject, Manager):
|
|||||||
u'language_id, download_source_id FROM webbibles WHERE '
|
u'language_id, download_source_id FROM webbibles WHERE '
|
||||||
u'download_source_id = ? AND abbreviation = ?', (source[u'id'],
|
u'download_source_id = ? AND abbreviation = ?', (source[u'id'],
|
||||||
abbreviation))
|
abbreviation))
|
||||||
if bible:
|
try:
|
||||||
return {
|
return {
|
||||||
u'id': bible[0][0],
|
u'id': bible[0][0],
|
||||||
u'name': bible[0][1],
|
u'name': bible[0][1],
|
||||||
@ -761,7 +761,7 @@ class BiblesResourcesDB(QtCore.QObject, Manager):
|
|||||||
u'language_id': bible[0][3],
|
u'language_id': bible[0][3],
|
||||||
u'download_source_id': bible[0][4]
|
u'download_source_id': bible[0][4]
|
||||||
}
|
}
|
||||||
else:
|
except (IndexError, TypeError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Before Width: | Height: | Size: 935 B After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 940 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 3.9 KiB |
@ -62,15 +62,29 @@
|
|||||||
<h1>${service_manager}</h1>
|
<h1>${service_manager}</h1>
|
||||||
<a href="#" id="service-refresh" data-role="button" data-icon="refresh">${refresh}</a>
|
<a href="#" id="service-refresh" data-role="button" data-icon="refresh">${refresh}</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ui-bar ui-bar-b">
|
||||||
|
<div data-role="controlgroup" data-type="horizontal" style="float: left;">
|
||||||
|
<a href="#" id="service-top-blank" data-role="button" data-icon="blank">${blank}</a>
|
||||||
|
<a href="#" id="service-top-unblank" data-role="button" data-icon="unblank">${show}</a>
|
||||||
|
</div>
|
||||||
|
<div data-role="controlgroup" data-type="horizontal" style="float: left;">
|
||||||
|
<a href="#" id="service-top-previous" data-role="button" data-icon="arrow-l">${prev}</a>
|
||||||
|
<a href="#" id="service-top-next" data-role="button" data-icon="arrow-r" data-iconpos="right">${next}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<ul data-role="listview" data-inset="true">
|
<ul data-role="listview" data-inset="true">
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div data-role="footer" data-theme="b" class="ui-bar">
|
<div data-role="footer" data-theme="b" class="ui-bar">
|
||||||
<a href="#" id="service-blank" data-role="button" data-icon="blank">${blank}</a>
|
<div data-role="controlgroup" data-type="horizontal" style="float: left;">
|
||||||
<a href="#" id="service-unblank" data-role="button" data-icon="unblank">${show}</a>
|
<a href="#" id="service-btm-blank" data-role="button" data-icon="blank">${blank}</a>
|
||||||
<a href="#" id="service-previous" data-role="button" data-icon="arrow-l">${prev}</a>
|
<a href="#" id="service-btm-unblank" data-role="button" data-icon="unblank">${show}</a>
|
||||||
<a href="#" id="service-next" data-role="button" data-icon="arrow-r" data-iconpos="right">${next}</a>
|
</div>
|
||||||
|
<div data-role="controlgroup" data-type="horizontal" style="float: left;">
|
||||||
|
<a href="#" id="service-btm-previous" data-role="button" data-icon="arrow-l">${prev}</a>
|
||||||
|
<a href="#" id="service-btm-next" data-role="button" data-icon="arrow-r" data-iconpos="right">${next}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div data-role="page" id="slide-controller">
|
<div data-role="page" id="slide-controller">
|
||||||
@ -79,15 +93,29 @@
|
|||||||
<h1>${slide_controller}</h1>
|
<h1>${slide_controller}</h1>
|
||||||
<a href="#" id="controller-refresh" data-role="button" data-icon="refresh">${refresh}</a>
|
<a href="#" id="controller-refresh" data-role="button" data-icon="refresh">${refresh}</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ui-bar ui-bar-b">
|
||||||
|
<div data-role="controlgroup" data-type="horizontal" style="float: left;">
|
||||||
|
<a href="#" id="controller-top-blank" data-role="button" data-icon="blank">${blank}</a>
|
||||||
|
<a href="#" id="controller-top-unblank" data-role="button" data-icon="unblank">${show}</a>
|
||||||
|
</div>
|
||||||
|
<div data-role="controlgroup" data-type="horizontal" style="float: left;">
|
||||||
|
<a href="#" id="controller-top-previous" data-role="button" data-icon="arrow-l">${prev}</a>
|
||||||
|
<a href="#" id="controller-top-next" data-role="button" data-icon="arrow-r" data-iconpos="right">${next}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<ul data-role="listview" data-inset="true">
|
<ul data-role="listview" data-inset="true">
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div data-role="footer" data-theme="b" class="ui-bar">
|
<div data-role="footer" data-theme="b" class="ui-bar">
|
||||||
<a href="#" id="controller-blank" data-role="button" data-icon="blank">${blank}</a>
|
<div data-role="controlgroup" data-type="horizontal" style="float: left;">
|
||||||
<a href="#" id="controller-unblank" data-role="button" data-icon="unblank">${show}</a>
|
<a href="#" id="controller-btm-blank" data-role="button" data-icon="blank">${blank}</a>
|
||||||
<a href="#" id="controller-previous" data-role="button" data-icon="arrow-l">${prev}</a>
|
<a href="#" id="controller-btm-unblank" data-role="button" data-icon="unblank">${show}</a>
|
||||||
<a href="#" id="controller-next" data-role="button" data-icon="arrow-r" data-iconpos="right">${next}</a>
|
</div>
|
||||||
|
<div data-role="controlgroup" data-type="horizontal" style="float: left;">
|
||||||
|
<a href="#" id="controller-btm-previous" data-role="button" data-icon="arrow-l">${prev}</a>
|
||||||
|
<a href="#" id="controller-btm-next" data-role="button" data-icon="arrow-r" data-iconpos="right">${next}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div data-role="page" id="alerts">
|
<div data-role="page" id="alerts">
|
||||||
|
20
openlp/plugins/remotes/html/jquery.js
vendored
@ -1,121 +1,175 @@
|
|||||||
/*!
|
/*!
|
||||||
* jQuery Mobile v1.0a3
|
* jQuery Mobile v1.0rc2
|
||||||
* http://jquerymobile.com/
|
* http://jquerymobile.com/
|
||||||
*
|
*
|
||||||
* Copyright 2010, jQuery Project
|
* Copyright 2010, jQuery Project
|
||||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||||
* http://jquery.org/license
|
* http://jquery.org/license
|
||||||
*/
|
*/
|
||||||
(function(a,d){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var g=0,e;(e=b[g])!=null;g++)a(e).triggerHandler("remove");c(b)}}else{var f=a.fn.remove;a.fn.remove=function(b,g){return this.each(function(){if(!g)if(!b||a.filter(b,[this]).length)a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return f.call(a(this),b,g)})}}a.widget=function(b,g,e){var i=b.split(".")[0],h;b=b.split(".")[1];h=i+"-"+b;if(!e){e=g;g=a.Widget}a.expr[":"][h]=function(k){return!!a.data(k,
|
(function(a,d){if(a.cleanData){var b=a.cleanData;a.cleanData=function(c){for(var e=0,d;(d=c[e])!=null;e++)a(d).triggerHandler("remove");b(c)}}else{var c=a.fn.remove;a.fn.remove=function(b,e){return this.each(function(){e||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return c.call(a(this),b,e)})}}a.widget=function(c,b,d){var h=c.split(".")[0],i,c=c.split(".")[1];i=h+"-"+c;if(!d)d=b,b=a.Widget;a.expr[":"][i]=function(b){return!!a.data(b,
|
||||||
b)};a[i]=a[i]||{};a[i][b]=function(k,j){arguments.length&&this._createWidget(k,j)};g=new g;g.options=a.extend(true,{},g.options);a[i][b].prototype=a.extend(true,g,{namespace:i,widgetName:b,widgetEventPrefix:a[i][b].prototype.widgetEventPrefix||b,widgetBaseClass:h},e);a.widget.bridge(b,a[i][b])};a.widget.bridge=function(b,g){a.fn[b]=function(e){var i=typeof e==="string",h=Array.prototype.slice.call(arguments,1),k=this;e=!i&&h.length?a.extend.apply(null,[true,e].concat(h)):e;if(i&&e.charAt(0)==="_")return k;
|
c)};a[h]=a[h]||{};a[h][c]=function(a,c){arguments.length&&this._createWidget(a,c)};b=new b;b.options=a.extend(true,{},b.options);a[h][c].prototype=a.extend(true,b,{namespace:h,widgetName:c,widgetEventPrefix:a[h][c].prototype.widgetEventPrefix||c,widgetBaseClass:i},d);a.widget.bridge(c,a[h][c])};a.widget.bridge=function(c,b){a.fn[c]=function(g){var h=typeof g==="string",i=Array.prototype.slice.call(arguments,1),k=this,g=!h&&i.length?a.extend.apply(null,[true,g].concat(i)):g;if(h&&g.charAt(0)==="_")return k;
|
||||||
i?this.each(function(){var j=a.data(this,b);if(!j)throw"cannot call methods on "+b+" prior to initialization; attempted to call method '"+e+"'";if(!a.isFunction(j[e]))throw"no such method '"+e+"' for "+b+" widget instance";var o=j[e].apply(j,h);if(o!==j&&o!==d){k=o;return false}}):this.each(function(){var j=a.data(this,b);j?j.option(e||{})._init():a.data(this,b,new g(e,this))});return k}};a.Widget=function(b,g){arguments.length&&this._createWidget(b,g)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",
|
h?this.each(function(){var b=a.data(this,c);if(!b)throw"cannot call methods on "+c+" prior to initialization; attempted to call method '"+g+"'";if(!a.isFunction(b[g]))throw"no such method '"+g+"' for "+c+" widget instance";var e=b[g].apply(b,i);if(e!==b&&e!==d)return k=e,false}):this.each(function(){var d=a.data(this,c);d?d.option(g||{})._init():a.data(this,c,new b(g,this))});return k}};a.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",
|
||||||
options:{disabled:false},_createWidget:function(b,g){a.data(g,this.widgetName,this);this.element=a(g);this.options=a.extend(true,{},this.options,this._getCreateOptions(),b);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var b={};if(a.metadata)b=a.metadata.get(element)[this.widgetName];return b},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);
|
options:{disabled:false},_createWidget:function(c,b){a.data(b,this.widgetName,this);this.element=a(b);this.options=a.extend(true,{},this.options,this._getCreateOptions(),c);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var c={};a.metadata&&(c=a.metadata.get(element)[this.widgetName]);return c},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);
|
||||||
this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,g){var e=b;if(arguments.length===0)return a.extend({},this.options);if(typeof b==="string"){if(g===d)return this.options[b];e={};e[b]=g}this._setOptions(e);return this},_setOptions:function(b){var g=this;a.each(b,function(e,i){g._setOption(e,i)});return this},_setOption:function(b,g){this.options[b]=g;if(b===
|
this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(c,b){var g=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c==="string"){if(b===d)return this.options[c];g={};g[c]=b}this._setOptions(g);return this},_setOptions:function(c){var b=this;a.each(c,function(a,c){b._setOption(a,c)});return this},_setOption:function(a,c){this.options[a]=c;a==="disabled"&&
|
||||||
"disabled")this.widget()[g?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",g);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,g,e){var i=this.options[b];g=a.Event(g);g.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();e=e||{};if(g.originalEvent){b=a.event.props.length;for(var h;b;){h=a.event.props[--b];g[h]=g.originalEvent[h]}}this.element.trigger(g,
|
this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(c,b,d){var h=this.options[c],b=a.Event(b);b.type=(c===this.widgetEventPrefix?c:this.widgetEventPrefix+c).toLowerCase();d=d||{};if(b.originalEvent)for(var c=a.event.props.length,i;c;)i=a.event.props[--c],b[i]=b.originalEvent[i];this.element.trigger(b,
|
||||||
e);return!(a.isFunction(i)&&i.call(this.element[0],g,e)===false||g.isDefaultPrevented())}}})(jQuery);(function(a,d){a.widget("mobile.widget",{_getCreateOptions:function(){var c=this.element,f={};a.each(this.options,function(b){var g=c.data(b.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}));if(g!==d)f[b]=g});return f}})})(jQuery);
|
d);return!(a.isFunction(h)&&h.call(this.element[0],b,d)===false||b.isDefaultPrevented())}}})(jQuery);
|
||||||
(function(a){function d(){var g=c.width(),e=[],i=[],h;f.removeClass("min-width-"+b.join("px min-width-")+"px max-width-"+b.join("px max-width-")+"px");a.each(b,function(k,j){g>=j&&e.push("min-width-"+j+"px");g<=j&&i.push("max-width-"+j+"px")});if(e.length)h=e.join(" ");if(i.length)h+=" "+i.join(" ");f.addClass(h)}var c=a(window),f=a("html"),b=[320,480,768,1024];a.mobile.media=function(){var g={},e=a("<div id='jquery-mediatest'>"),i=a("<body>").append(e);return function(h){if(!(h in g)){var k=document.createElement("style"),
|
(function(a,d){a.widget("mobile.widget",{_createWidget:function(){a.Widget.prototype._createWidget.apply(this,arguments);this._trigger("init")},_getCreateOptions:function(){var b=this.element,c={};a.each(this.options,function(a){var e=b.jqmData(a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}));e!==d&&(c[a]=e)});return c},enhanceWithin:function(b){var c=a(b).data("page"),c=c&&c.keepNativeSelector();a(this.options.initSelector,b).not(c||"")[this.widgetName]()}})})(jQuery);
|
||||||
j="@media "+h+" { #jquery-mediatest { position:absolute; } }";k.type="text/css";if(k.styleSheet)k.styleSheet.cssText=j;else k.appendChild(document.createTextNode(j));f.prepend(i).prepend(k);g[h]=e.css("position")==="absolute";i.add(k).remove()}return g[h]}}();a.mobile.addResolutionBreakpoints=function(g){if(a.type(g)==="array")b=b.concat(g);else b.push(g);b.sort(function(e,i){return e-i});d()};a(document).bind("mobileinit.htmlclass",function(){c.bind("orientationchange.htmlclass resize.htmlclass",
|
(function(a){a(window);var d=a("html");a.mobile.media=function(){var b={},c=a("<div id='jquery-mediatest'>"),f=a("<body>").append(c);return function(a){if(!(a in b)){var g=document.createElement("style"),h="@media "+a+" { #jquery-mediatest { position:absolute; } }";g.type="text/css";g.styleSheet?g.styleSheet.cssText=h:g.appendChild(document.createTextNode(h));d.prepend(f).prepend(g);b[a]=c.css("position")==="absolute";f.add(g).remove()}return b[a]}}()})(jQuery);
|
||||||
function(g){g.orientation&&f.removeClass("portrait landscape").addClass(g.orientation);d()})});a(function(){c.trigger("orientationchange.htmlclass")})})(jQuery);
|
(function(a,d){function b(a){var c=a.charAt(0).toUpperCase()+a.substr(1),a=(a+" "+e.join(c+" ")+c).split(" "),b;for(b in a)if(f[a[b]]!==d)return true}var c=a("<body>").prependTo("html"),f=c[0].style,e=["Webkit","Moz","O"],g="palmGetResource"in window,h=window.blackberry;a.mobile.browser={};a.mobile.browser.ie=function(){for(var a=3,c=document.createElement("div"),b=c.all||[];c.innerHTML="<\!--[if gt IE "+ ++a+"]><br><![endif]--\>",b[0];);return a>4?a:!a}();a.extend(a.support,{orientation:"orientation"in
|
||||||
(function(a,d){function c(h){var k=h.charAt(0).toUpperCase()+h.substr(1);h=(h+" "+g.join(k+" ")+k).split(" ");for(var j in h)if(b[j]!==d)return true}var f=a("<body>").prependTo("html"),b=f[0].style,g=["webkit","moz","o"],e=window.palmGetResource||window.PalmServiceBridge,i=window.blackberry;a.extend(a.support,{orientation:"orientation"in window,touch:"ontouchend"in document,cssTransitions:"WebKitTransitionEvent"in window,pushState:!!history.pushState,mediaquery:a.mobile.media("only all"),cssPseudoElement:!!c("content"),
|
window&&"onorientationchange"in window,touch:"ontouchend"in document,cssTransitions:"WebKitTransitionEvent"in window,pushState:"pushState"in history&&"replaceState"in history,mediaquery:a.mobile.media("only all"),cssPseudoElement:!!b("content"),touchOverflow:!!b("overflowScrolling"),boxShadow:!!b("boxShadow")&&!h,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in c[0])&&!g,dynamicBaseTag:function(){var b=location.protocol+"//"+location.host+location.pathname+
|
||||||
boxShadow:!!c("boxShadow")&&!i,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in f[0])&&!e,dynamicBaseTag:function(){var h=location.protocol+"//"+location.host+location.pathname+"ui-dir/",k=a("head base"),j=null,o="";if(k.length)o=k.attr("href");else k=j=a("<base>",{href:h}).appendTo("head");var p=a("<a href='testurl'></a>").prependTo(f)[0].href;k[0].href=o?o:location.pathname;j&&j.remove();return p.indexOf(h)===0}()});f.remove();a.support.boxShadow||a("html").addClass("ui-mobile-nosupport-boxshadow")})(jQuery);
|
"ui-dir/",f=a("head base"),e=null,d="",g;f.length?d=f.attr("href"):f=e=a("<base>",{href:b}).appendTo("head");g=a("<a href='testurl' />").prependTo(c)[0].href;f[0].href=d||location.pathname;e&&e.remove();return g.indexOf(b)===0}()});c.remove();g=function(){var a=window.navigator.userAgent;return a.indexOf("Nokia")>-1&&(a.indexOf("Symbian/3")>-1||a.indexOf("Series60/5")>-1)&&a.indexOf("AppleWebKit")>-1&&a.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}();a.mobile.ajaxBlacklist=window.blackberry&&!window.WebKitPoint||
|
||||||
(function(a,d){a.each("touchstart touchmove touchend orientationchange tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(e,i){a.fn[i]=function(h){return h?this.bind(i,h):this.trigger(i)};a.attrFn[i]=true});var c=a.support.touch,f=c?"touchstart":"mousedown",b=c?"touchend":"mouseup",g=c?"touchmove":"mousemove";a.event.special.scrollstart={enabled:true,setup:function(){function e(j,o){h=o;var p=j.type;j.type=h?"scrollstart":"scrollstop";a.event.handle.call(i,j);j.type=
|
window.operamini&&Object.prototype.toString.call(window.operamini)==="[object OperaMini]"||g;g&&a(function(){a("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")});a.support.boxShadow||a("html").addClass("ui-mobile-nosupport-boxshadow")})(jQuery);
|
||||||
p}var i=this,h,k;a(i).bind("touchmove scroll",function(j){if(a.event.special.scrollstart.enabled){h||e(j,true);clearTimeout(k);k=setTimeout(function(){e(j,false)},50)}})}};a.event.special.tap={setup:function(){var e=this,i=a(e);i.bind("mousedown touchstart",function(h){function k(n){if(n.type=="scroll")j=true;else{n=n.type=="touchmove"?n.originalEvent.touches[0]:n;if(Math.abs(v[0]-n.pageX)>10||Math.abs(v[1]-n.pageY)>10)j=true}}if(h.which&&h.which!==1||i.data("prevEvent")&&i.data("prevEvent")!==h.type)return false;
|
(function(a,d,b,c){function f(a){for(;a&&typeof a.originalEvent!=="undefined";)a=a.originalEvent;return a}function e(c){for(var b={},f,u;c;){f=a.data(c,l);for(u in f)if(f[u])b[u]=b.hasVirtualBinding=true;c=c.parentNode}return b}function g(){s&&(clearTimeout(s),s=0);s=setTimeout(function(){E=s=0;v.length=0;D=false;y=true},a.vmouse.resetTimerDuration)}function h(b,u,e){var d,g;if(!(g=e&&e[b])){if(e=!e)a:{for(e=u.target;e;){if((g=a.data(e,l))&&(!b||g[b]))break a;e=e.parentNode}e=null}g=e}if(g){d=u;var e=
|
||||||
i.data("prevEvent",h.type);setTimeout(function(){i.removeData("prevEvent")},800);var j=false,o=true,p=h.target,t=h.originalEvent,v=h.type=="touchstart"?[t.touches[0].pageX,t.touches[0].pageY]:[h.pageX,h.pageY],m,r;r=setTimeout(function(){if(o&&!j){m=h.type;h.type="taphold";a.event.handle.call(e,h);h.type=m}},750);a(window).one("scroll",k);i.bind("mousemove touchmove",k).one("mouseup touchend",function(n){i.unbind("mousemove touchmove",k);a(window).unbind("scroll",k);clearTimeout(r);o=false;if(!j&&
|
d.type,j,h;d=a.Event(d);d.type=b;g=d.originalEvent;j=a.event.props;if(g)for(h=j.length;h;)b=j[--h],d[b]=g[b];if(e.search(/mouse(down|up)|click/)>-1&&!d.which)d.which=1;if(e.search(/^touch/)!==-1&&(b=f(g),e=b.touches,b=b.changedTouches,e=e&&e.length?e[0]:b&&b.length?b[0]:c))for(g=0,len=z.length;g<len;g++)b=z[g],d[b]=e[b];a(u.target).trigger(d)}return d}function i(c){var b=a.data(c.target,A);if(!D&&(!E||E!==b))if(b=h("v"+c.type,c))b.isDefaultPrevented()&&c.preventDefault(),b.isPropagationStopped()&&
|
||||||
p==n.target){m=n.type;n.type="tap";a.event.handle.call(e,n);n.type=m}})})}};a.event.special.swipe={setup:function(){var e=a(this);e.bind(f,function(i){function h(p){if(j){var t=p.originalEvent.touches?p.originalEvent.touches[0]:p;o={time:(new Date).getTime(),coords:[t.pageX,t.pageY]};Math.abs(j.coords[0]-o.coords[0])>10&&p.preventDefault()}}var k=i.originalEvent.touches?i.originalEvent.touches[0]:i,j={time:(new Date).getTime(),coords:[k.pageX,k.pageY],origin:a(i.target)},o;e.bind(g,h).one(b,function(){e.unbind(g,
|
c.stopPropagation(),b.isImmediatePropagationStopped()&&c.stopImmediatePropagation()}function k(c){var b=f(c).touches,d;if(b&&b.length===1&&(d=c.target,b=e(d),b.hasVirtualBinding))E=u++,a.data(d,A,E),s&&(clearTimeout(s),s=0),x=y=false,d=f(c).touches[0],w=d.pageX,t=d.pageY,h("vmouseover",c,b),h("vmousedown",c,b)}function n(a){y||(x||h("vmousecancel",a,e(a.target)),x=true,g())}function o(c){if(!y){var b=f(c).touches[0],d=x,u=a.vmouse.moveDistanceThreshold;x=x||Math.abs(b.pageX-w)>u||Math.abs(b.pageY-
|
||||||
h);if(j&&o)if(o.time-j.time<1E3&&Math.abs(j.coords[0]-o.coords[0])>30&&Math.abs(j.coords[1]-o.coords[1])<75)j.origin.trigger("swipe").trigger(j.coords[0]>o.coords[0]?"swipeleft":"swiperight");j=o=d})})}};(function(e){function i(){var o=k();if(o!==j){j=o;h.trigger("orientationchange")}}var h=e(window),k,j;e.event.special.orientationchange={setup:function(){if(e.support.orientation)return false;j=k();h.bind("resize",i)},teardown:function(){if(e.support.orientation)return false;h.unbind("resize",i)},
|
t)>u;flags=e(c.target);x&&!d&&h("vmousecancel",c,flags);h("vmousemove",c,flags);g()}}function q(a){if(!y){y=true;var c=e(a.target),b;h("vmouseup",a,c);if(!x&&(b=h("vclick",a,c))&&b.isDefaultPrevented())b=f(a).changedTouches[0],v.push({touchID:E,x:b.clientX,y:b.clientY}),D=true;h("vmouseout",a,c);x=false;g()}}function m(c){var c=a.data(c,l),b;if(c)for(b in c)if(c[b])return true;return false}function j(){}function p(c){var b=c.substr(1);return{setup:function(){m(this)||a.data(this,l,{});a.data(this,
|
||||||
add:function(o){var p=o.handler;o.handler=function(t){t.orientation=k();return p.apply(this,arguments)}}};k=function(){var o=document.documentElement;return o&&o.clientWidth/o.clientHeight<1.1?"portrait":"landscape"}})(jQuery);a.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(e,i){a.event.special[e]={setup:function(){a(this).bind(i,a.noop)}}})})(jQuery);
|
l)[c]=true;r[c]=(r[c]||0)+1;r[c]===1&&B.bind(b,i);a(this).bind(b,j);if(C)r.touchstart=(r.touchstart||0)+1,r.touchstart===1&&B.bind("touchstart",k).bind("touchend",q).bind("touchmove",o).bind("scroll",n)},teardown:function(){--r[c];r[c]||B.unbind(b,i);C&&(--r.touchstart,r.touchstart||B.unbind("touchstart",k).unbind("touchmove",o).unbind("touchend",q).unbind("scroll",n));var f=a(this),e=a.data(this,l);e&&(e[c]=false);f.unbind(b,j);m(this)||f.removeData(l)}}}var l="virtualMouseBindings",A="virtualTouchID",
|
||||||
(function(a,d,c){function f(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}var b="hashchange",g=document,e,i=a.event.special,h=g.documentMode,k="on"+b in d&&(h===c||h>7);a.fn[b]=function(j){return j?this.bind(b,j):this.trigger(b)};a.fn[b].delay=50;i[b]=a.extend(i[b],{setup:function(){if(k)return false;a(e.start)},teardown:function(){if(k)return false;a(e.stop)}});e=function(){function j(){var n=f(),u=r(t);if(n!==t){m(t=n,u);a(d).trigger(b)}else if(u!==t)location.href=location.href.replace(/#.*/,
|
d="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),z="clientX clientY pageX pageY screenX screenY".split(" "),r={},s=0,w=0,t=0,x=false,v=[],D=false,y=false,C="addEventListener"in b,B=a(b),u=1,E=0;a.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var F=0;F<d.length;F++)a.event.special[d[F]]=p(d[F]);C&&b.addEventListener("click",function(c){var b=v.length,f=c.target,e,d,u,g,j;if(b){e=c.clientX;d=c.clientY;threshold=a.vmouse.clickDistanceThreshold;
|
||||||
"")+u;p=setTimeout(j,a.fn[b].delay)}var o={},p,t=f(),v=function(n){return n},m=v,r=v;o.start=function(){p||j()};o.stop=function(){p&&clearTimeout(p);p=c};a.browser.msie&&!k&&function(){var n,u;o.start=function(){if(!n){u=(u=a.fn[b].src)&&u+f();n=a('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){u||m(f());j()}).attr("src",u||"javascript:0").insertAfter("body")[0].contentWindow;g.onpropertychange=function(){try{if(event.propertyName==="title")n.document.title=g.title}catch(l){}}}};
|
for(u=f;u;){for(g=0;g<b;g++)if(j=v[g],u===f&&Math.abs(j.x-e)<threshold&&Math.abs(j.y-d)<threshold||a.data(u,A)===j.touchID){c.preventDefault();c.stopPropagation();return}u=u.parentNode}}},true)})(jQuery,window,document);
|
||||||
o.stop=v;r=function(){return f(n.location.href)};m=function(l,s){var q=n.document,w=a.fn[b].domain;if(l!==s){q.title=g.title;q.open();w&&q.write('<script>document.domain="'+w+'"<\/script>');q.close();n.location.hash=l}}}();return o}()})(jQuery,this);
|
(function(a,d,b){function c(c,b,f){var e=f.type;f.type=b;a.event.handle.call(c,f);f.type=e}a.each("touchstart touchmove touchend orientationchange throttledresize tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(c,b){a.fn[b]=function(a){return a?this.bind(b,a):this.trigger(b)};a.attrFn[b]=true});var f=a.support.touch,e=f?"touchstart":"mousedown",g=f?"touchend":"mouseup",h=f?"touchmove":"mousemove";a.event.special.scrollstart={enabled:true,setup:function(){function b(a,
|
||||||
(function(a){a.widget("mobile.page",a.mobile.widget,{options:{backBtnText:"Back",addBackBtn:true,degradeInputs:{color:false,date:false,datetime:false,"datetime-local":false,email:false,month:false,number:false,range:"number",search:true,tel:false,time:false,url:false,week:false},keepNative:null},_create:function(){var d=this.element,c=this.options;this.keepNative="[data-role='none'], [data-role='nojs']"+(c.keepNative?", "+c.keepNative:"");if(this._trigger("beforeCreate")!==false){d.find("[data-role='page'], [data-role='content']").andSelf().each(function(){a(this).addClass("ui-"+
|
d){e=d;c(f,e?"scrollstart":"scrollstop",a)}var f=this,e,d;a(f).bind("touchmove scroll",function(c){a.event.special.scrollstart.enabled&&(e||b(c,true),clearTimeout(d),d=setTimeout(function(){b(c,false)},50))})}};a.event.special.tap={setup:function(){var b=this,f=a(b);f.bind("vmousedown",function(e){function d(){clearTimeout(p)}function g(){d();f.unbind("vclick",h).unbind("vmouseup",d).unbind("vmousecancel",g)}function h(a){g();j==a.target&&c(b,"tap",a)}if(e.which&&e.which!==1)return false;var j=e.target,
|
||||||
a(this).data("role"))});d.find("[data-role='nojs']").addClass("ui-nojs");d.find("[data-role]").andSelf().each(function(){var f=a(this),b=f.data("role"),g=f.data("theme");if(b==="header"||b==="footer"){f.addClass("ui-bar-"+(g||f.parent("[data-role=page]").data("theme")||"a"));f.attr("role",b==="header"?"banner":"contentinfo");g=f.children("a");var e=g.hasClass("ui-btn-left"),i=g.hasClass("ui-btn-right");if(!e)e=g.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length;i||g.eq(1).addClass("ui-btn-right");
|
p;f.bind("vmousecancel",g).bind("vmouseup",d).bind("vclick",h);p=setTimeout(function(){c(b,"taphold",a.Event("taphold"))},750)})}};a.event.special.swipe={scrollSupressionThreshold:10,durationThreshold:1E3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var c=a(this);c.bind(e,function(f){function e(c){if(q){var b=c.originalEvent.touches?c.originalEvent.touches[0]:c;m={time:(new Date).getTime(),coords:[b.pageX,b.pageY]};Math.abs(q.coords[0]-m.coords[0])>a.event.special.swipe.scrollSupressionThreshold&&
|
||||||
c.addBackBtn&&b==="header"&&a(".ui-page").length>1&&d.data("url")!==a.mobile.path.stripHash(location.hash)&&!e&&f.data("backbtn")!==false&&a("<a href='#' class='ui-btn-left' data-rel='back' data-icon='arrow-l'>"+c.backBtnText+"</a>").prependTo(f);f.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({tabindex:"0",role:"heading","aria-level":"1"})}else if(b==="content"){g&&f.addClass("ui-body-"+g);f.attr("role","main")}else if(b==="page")f.addClass("ui-body-"+(g||"c"));switch(b){case "header":case "footer":case "page":case "content":f.addClass("ui-"+
|
c.preventDefault()}}var d=f.originalEvent.touches?f.originalEvent.touches[0]:f,q={time:(new Date).getTime(),coords:[d.pageX,d.pageY],origin:a(f.target)},m;c.bind(h,e).one(g,function(){c.unbind(h,e);q&&m&&m.time-q.time<a.event.special.swipe.durationThreshold&&Math.abs(q.coords[0]-m.coords[0])>a.event.special.swipe.horizontalDistanceThreshold&&Math.abs(q.coords[1]-m.coords[1])<a.event.special.swipe.verticalDistanceThreshold&&q.origin.trigger("swipe").trigger(q.coords[0]>m.coords[0]?"swipeleft":"swiperight");
|
||||||
b);break;case "collapsible":case "fieldcontain":case "navbar":case "listview":case "dialog":f[b]()}});this._enhanceControls();d.find("[data-role='button'], .ui-bar > a, .ui-header > a, .ui-footer > a").not(".ui-btn").not(this.keepNative).buttonMarkup();d.find("[data-role='controlgroup']").controlgroup();d.find("a:not(.ui-btn):not(.ui-link-inherit)").not(this.keepNative).addClass("ui-link");d.fixHeaderFooter()}},_enhanceControls:function(){var d=this.options;this.element.find("input").not(this.keepNative).each(function(){var b=
|
q=m=b})})}};(function(a,c){function b(){var a=e();a!==d&&(d=a,f.trigger("orientationchange"))}var f=a(c),e,d;a.event.special.orientationchange={setup:function(){if(a.support.orientation&&a.mobile.orientationChangeEnabled)return false;d=e();f.bind("throttledresize",b)},teardown:function(){if(a.support.orientation&&a.mobile.orientationChangeEnabled)return false;f.unbind("throttledresize",b)},add:function(a){var c=a.handler;a.handler=function(a){a.orientation=e();return c.apply(this,arguments)}}};a.event.special.orientationchange.orientation=
|
||||||
this.getAttribute("type"),g=d.degradeInputs[b]||"text";d.degradeInputs[b]&&a(this).replaceWith(a("<div>").html(a(this).clone()).html().replace(/type="([a-zA-Z]+)"/,"type="+g+" data-type='$1'"))});var c=this.element.find("input, textarea, select, button"),f=c.not(this.keepNative);c=c.filter("input[type=text]");c.length&&typeof c[0].autocorrect!=="undefined"&&c.each(function(){this.setAttribute("autocorrect","off");this.setAttribute("autocomplete","off")});f.filter("[type='radio'], [type='checkbox']").checkboxradio();
|
e=function(){var b=true,b=document.documentElement;return(b=a.support.orientation?c.orientation%180==0:b&&b.clientWidth/b.clientHeight<1.1)?"portrait":"landscape"}})(jQuery,d);(function(){a.event.special.throttledresize={setup:function(){a(this).bind("resize",c)},teardown:function(){a(this).unbind("resize",c)}};var c=function(){e=(new Date).getTime();d=e-b;d>=250?(b=e,a(this).trigger("throttledresize")):(f&&clearTimeout(f),f=setTimeout(c,250-d))},b=0,f,e,d})();a.each({scrollstop:"scrollstart",taphold:"tap",
|
||||||
f.filter("button, [type='button'], [type='submit'], [type='reset'], [type='image']").button();f.filter("input, textarea").not("[type='radio'], [type='checkbox'], [type='button'], [type='submit'], [type='reset'], [type='image'], [type='hidden']").textinput();f.filter("input, select").filter("[data-role='slider'], [data-type='range']").slider();f.filter("select:not([data-role='slider'])").selectmenu()}})})(jQuery);
|
swipeleft:"swipe",swiperight:"swipe"},function(c,b){a.event.special[c]={setup:function(){a(this).bind(b,a.noop)}}})})(jQuery,this);
|
||||||
(function(a,d,c){a.extend(a.mobile,{subPageUrlKey:"ui-page",nonHistorySelectors:"dialog",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",ajaxEnabled:true,hashListeningEnabled:true,ajaxLinksEnabled:true,ajaxFormsEnabled:true,defaultTransition:"slide",loadingMessage:"loading",metaViewportContent:"width=device-width, minimum-scale=1, maximum-scale=1",gradeA:function(){return a.support.mediaquery},autoInitialize:true,keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,
|
(function(a,d,b){function c(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var f="hashchange",e=document,g,h=a.event.special,i=e.documentMode,k="on"+f in d&&(i===b||i>7);a.fn[f]=function(a){return a?this.bind(f,a):this.trigger(f)};a.fn[f].delay=50;h[f]=a.extend(h[f],{setup:function(){if(k)return false;a(g.start)},teardown:function(){if(k)return false;a(g.stop)}});g=function(){function g(){var b=c(),e=l(m);if(b!==m)p(m=b,e),a(d).trigger(f);else if(e!==m)location.href=location.href.replace(/#.*/,
|
||||||
COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a(d.document).trigger("mobileinit");if(a.mobile.gradeA()){var f=a(d),b=a("html"),g=a("head"),e=a.mobile.loadingMessage?a("<div class='ui-loader ui-body-a ui-corner-all'><span class='ui-icon ui-icon-loading spin'></span><h1>"+
|
"")+e;i=setTimeout(g,a.fn[f].delay)}var h={},i,m=c(),j=function(a){return a},p=j,l=j;h.start=function(){i||g()};h.stop=function(){i&&clearTimeout(i);i=b};a.browser.msie&&!k&&function(){var b,d;h.start=function(){if(!b)d=(d=a.fn[f].src)&&d+c(),b=a('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){d||p(c());g()}).attr("src",d||"javascript:0").insertAfter("body")[0].contentWindow,e.onpropertychange=function(){try{if(event.propertyName==="title")b.document.title=e.title}catch(a){}}};
|
||||||
a.mobile.loadingMessage+"</h1></div>"):c;b.addClass("ui-mobile ui-mobile-rendering");a.mobile.metaViewportContent&&a("<meta>",{name:"viewport",content:a.mobile.metaViewportContent}).prependTo(g);a.extend(a.mobile,{pageLoading:function(i){if(i)b.removeClass("ui-loading");else{if(a.mobile.loadingMessage){i=a("."+a.mobile.activeBtnClass).first();e.appendTo(a.mobile.pageContainer).css({top:a.support.scrollTop&&a(d).scrollTop()+a(d).height()/2||i.length&&i.offset().top||100})}b.addClass("ui-loading")}},
|
h.stop=j;l=function(){return c(b.location.href)};p=function(c,d){var g=b.document,h=a.fn[f].domain;if(c!==d)g.title=e.title,g.open(),h&&g.write('<script>document.domain="'+h+'"<\/script>'),g.close(),b.location.hash=c}}();return h}()})(jQuery,this);
|
||||||
silentScroll:function(i){i=i||0;a.event.special.scrollstart.enabled=false;setTimeout(function(){d.scrollTo(0,i);a(document).trigger("silentscroll",{x:0,y:i})},20);setTimeout(function(){a.event.special.scrollstart.enabled=true},150)},initializePage:function(){var i=a("[data-role='page']");i.add("[data-role='dialog']").each(function(){a(this).attr("data-url",a(this).attr("id"))});a.mobile.firstPage=i.first();a.mobile.pageContainer=i.first().parent().addClass("ui-mobile-viewport");a.mobile.pageLoading();
|
(function(a){a.widget("mobile.page",a.mobile.widget,{options:{theme:"c",domCache:false,keepNativeDefault:":jqmData(role='none'), :jqmData(role='nojs')"},_create:function(){this._trigger("beforecreate");this.element.attr("tabindex","0").addClass("ui-page ui-body-"+this.options.theme)},keepNativeSelector:function(){var d=this.options;return d.keepNative&&a.trim(d.keepNative)&&d.keepNative!==d.keepNativeDefault?[d.keepNative,d.keepNativeDefault].join(", "):d.keepNativeDefault}})})(jQuery);
|
||||||
!a.mobile.hashListeningEnabled||!a.mobile.path.stripHash(location.hash)?a.mobile.changePage(a.mobile.firstPage,false,true,false,true):f.trigger("hashchange",[true])}});a.mobile.autoInitialize&&a(a.mobile.initializePage);f.load(a.mobile.silentScroll)}})(jQuery,this);
|
(function(a,d){a.extend(a.mobile,{ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",ajaxEnabled:true,hashListeningEnabled:true,defaultPageTransition:"slide",minScrollBack:250,defaultDialogTransition:"pop",loadingMessage:"loading",pageLoadErrorMessage:"Error Loading Page",autoInitializePage:true,pushStateEnabled:true,orientationChangeEnabled:true,gradeA:function(){return a.support.mediaquery||a.mobile.browser.ie&&a.mobile.browser.ie>=7},keyCode:{ALT:18,BACKSPACE:8,
|
||||||
(function(a,d){function c(l){if(i&&(!i.closest(".ui-page-active").length||l))i.removeClass(a.mobile.activeBtnClass);i=null}var f=a(window),b=a("html"),g=a("head"),e={get:function(l){if(l==d)l=location.hash;return e.stripHash(l).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(l){var s="&"+a.mobile.subPageUrlKey;return l&&l.split(s)[0].split(t)[0]},set:function(l){location.hash=l},origin:"",setOrigin:function(){e.origin=e.get(location.protocol+"//"+location.host+location.pathname)},makeAbsolute:function(l){return e.get()+
|
CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},silentScroll:function(c){if(a.type(c)!=="number")c=a.mobile.defaultHomeScroll;a.event.special.scrollstart.enabled=false;setTimeout(function(){d.scrollTo(0,
|
||||||
l},clean:function(l){return l.replace(location.protocol+"//"+location.host,"")},stripHash:function(l){return l.replace(/^#/,"")},isExternal:function(l){return e.hasProtocol(e.clean(l))},hasProtocol:function(l){return/^(:?\w+:)/.test(l)},isRelative:function(l){return/^[^\/|#]/.test(l)&&!e.hasProtocol(l)},isEmbeddedPage:function(l){return/^#/.test(l)}},i=null,h={stack:[],activeIndex:0,getActive:function(){return h.stack[h.activeIndex]},getPrev:function(){return h.stack[h.activeIndex-1]},getNext:function(){return h.stack[h.activeIndex+
|
c);a(document).trigger("silentscroll",{x:0,y:c})},20);setTimeout(function(){a.event.special.scrollstart.enabled=true},150)},nsNormalize:function(c){return!c?void 0:a.camelCase(a.mobile.ns+c)},getInheritedTheme:function(a,b){var e=a.closest("[class*='ui-bar-'],[class*='ui-body-']");return e.length&&/ui-(bar|body)-([a-z])\b/.exec(e.attr("class"))[2]||""||""||b||"a"}});a.fn.jqmData=function(b,f){var e;typeof b!="undefined"&&(e=this.data(b?a.mobile.nsNormalize(b):b,f));return e};a.jqmData=function(b,
|
||||||
1]},addNew:function(l,s){h.getNext()&&h.clearForward();h.stack.push({url:l,transition:s});h.activeIndex=h.stack.length-1},clearForward:function(){h.stack=h.stack.slice(0,h.activeIndex+1)},ignoreNextHashChange:true},k="[tabindex],a,button:visible,select:visible,input",j=null,o=[],p=false,t="&ui-state=dialog",v=g.children("base"),m=location.protocol+"//"+location.host,r=e.get(m+location.pathname),n=r;if(v.length){var u=v.attr("href");if(u)n=u.search(/^[^:/]+:\/\/[^/]+\/?/)==-1?u.charAt(0)=="/"?m+u:
|
f,e){var d;typeof f!="undefined"&&(d=a.data(b,f?a.mobile.nsNormalize(f):f,e));return d};a.fn.jqmRemoveData=function(b){return this.removeData(a.mobile.nsNormalize(b))};a.jqmRemoveData=function(b,f){return a.removeData(b,a.mobile.nsNormalize(f))};a.fn.removeWithDependents=function(){a.removeWithDependents(this)};a.removeWithDependents=function(b){b=a(b);(b.jqmData("dependents")||a()).remove();b.remove()};a.fn.addDependents=function(b){a.addDependents(a(this),b)};a.addDependents=function(b,f){var e=
|
||||||
r+u:u;n+=n.charAt(n.length-1)=="/"?" ":"/"}base=a.support.dynamicBaseTag?{element:v.length?v:a("<base>",{href:n}).prependTo(g),set:function(l){base.element.attr("href",n+e.get(l))},reset:function(){base.element.attr("href",n)}}:d;e.setOrigin();a.fn.animationComplete=function(l){if(a.support.cssTransitions)return a(this).one("webkitAnimationEnd",l);else setTimeout(l,0)};a.mobile.updateHash=e.set;a.mobile.path=e;a.mobile.base=base;a.mobile.urlstack=h.stack;a.mobile.urlHistory=h;a.mobile.changePage=
|
a(b).jqmData("dependents")||a();a(b).jqmData("dependents",a.merge(e,f))};a.fn.getEncodedText=function(){return a("<div/>").text(a(this).text()).html()};var b=a.find;a.find=function(c,f,e,d){c=c.replace(/:jqmData\(([^)]*)\)/g,"[data-"+(a.mobile.ns||"")+"$1]");return b.call(this,c,f,e,d)};a.extend(a.find,b);a.find.matches=function(b,d){return a.find(b,null,null,d)};a.find.matchesSelector=function(b,d){return a.find(d,null,null,[b]).length>0}})(jQuery,this);
|
||||||
function(l,s,q,w,z){function F(){function A(){if(w!==false&&x){h.ignoreNextHashChange=false;e.set(x)}!I&&!K&&h.addNew(x,s);c();a.mobile.silentScroll(l.data("lastScroll"));var G=l,P=G.find(".ui-title:eq(0)");P.length?P.focus():G.find(k).eq(0).focus();y&&y.data("page")._trigger("hide",null,{nextPage:l});l.data("page")._trigger("show",null,{prevPage:y||a("")});a.mobile.activePage=l;L!=null&&L.remove();b.removeClass("ui-mobile-rendering");p=false;o.length>0&&a.mobile.changePage.apply(a.mobile,o.pop())}
|
(function(a,d){function b(a){var b=a.find(".ui-title:eq(0)");b.length?b.focus():a.focus()}function c(b){p&&(!p.closest(".ui-page-active").length||b)&&p.removeClass(a.mobile.activeBtnClass);p=null}function f(){z=false;A.length>0&&a.mobile.changePage.apply(null,A.pop())}function e(c,d,e,f){var h=a.mobile.urlHistory.getActive(),j=a.support.touchOverflow&&a.mobile.touchOverflowEnabled,i=h.lastScroll||(j?0:a.mobile.defaultHomeScroll),h=g();window.scrollTo(0,a.mobile.defaultHomeScroll);d&&d.data("page")._trigger("beforehide",
|
||||||
function B(G){a.mobile.pageContainer.addClass(G);D.push(G)}a.mobile.silentScroll();var M=f.scrollTop(),J=["flip"],D=[];if(x.indexOf("&"+a.mobile.subPageUrlKey)>-1)l=a("[data-url='"+x+"']");if(y){y.data("lastScroll",M);y.data("page")._trigger("beforehide",{nextPage:l})}l.data("page")._trigger("beforeshow",{prevPage:y||a("")});if(s&&s!=="none"){a.mobile.pageLoading(true);a.inArray(s,J)>=0&&B("ui-mobile-viewport-perspective");B("ui-mobile-viewport-transitioning");if(y)y.addClass(s+" out "+(q?"reverse":
|
null,{nextPage:c});j||c.height(h+i);c.data("page")._trigger("beforeshow",null,{prevPage:d||a("")});a.mobile.hidePageLoadingMsg();j&&i&&(c.addClass("ui-mobile-pre-transition"),b(c),c.is(".ui-native-fixed")?c.find(".ui-content").scrollTop(i):c.scrollTop(i));e=(a.mobile.transitionHandlers[e||"none"]||a.mobile.defaultTransitionHandler)(e,f,c,d);e.done(function(){j||(c.height(""),b(c));j||a.mobile.silentScroll(i);d&&(j||d.height(""),d.data("page")._trigger("hide",null,{nextPage:c}));c.data("page")._trigger("show",
|
||||||
""));l.addClass(a.mobile.activePageClass+" "+s+" in "+(q?"reverse":""));l.animationComplete(function(){y.add(l).removeClass("out in reverse "+s);y&&y.removeClass(a.mobile.activePageClass);A();a.mobile.pageContainer.removeClass(D.join(" "));D=[]})}else{a.mobile.pageLoading(true);y&&y.removeClass(a.mobile.activePageClass);l.addClass(a.mobile.activePageClass);A()}}function Q(){if(j||l.data("role")=="dialog"){x=h.getActive().url+t;if(j){l.attr("data-role",j);j=null}}l.page()}var E=a.type(l)==="array",
|
null,{prevPage:d||a("")})});return e}function g(){var b=jQuery.event.special.orientationchange.orientation()==="portrait",c=b?screen.availHeight:screen.availWidth,b=Math.max(b?480:320,a(window).height());return Math.min(c,b)}function h(){(!a.support.touchOverflow||!a.mobile.touchOverflowEnabled)&&a("."+a.mobile.activePageClass).css("min-height",g())}function i(b,c){c&&b.attr("data-"+a.mobile.ns+"role",c);b.page()}function k(a){for(;a;){if(a.nodeName.toLowerCase()=="a")break;a=a.parentNode}return a}
|
||||||
H=a.type(l)==="object",y=E?l[0]:a.mobile.activePage;l=E?l[1]:l;var x=fileUrl=a.type(l)==="string"?e.stripHash(l):"",C=d,N="get",R=false,L=null,O=h.getActive(),I=false,K=false;if(!(O&&h.stack.length>1&&O.url===x&&!E&&!H))if(p)o.unshift(arguments);else{p=true;if(z){a.each(h.stack,function(A){if(this.url==x){urlIndex=A;I=A<h.activeIndex;K=!I;h.activeIndex=A}});if(I){q=true;s=s||O.transition}else if(K)s=s||h.getActive().transition}if(H&&l.url){x=l.url;C=l.data;N=l.type;R=true;if(C&&N=="get"){if(a.type(C)==
|
function n(b){var b=a(b).closest(".ui-page").jqmData("url"),c=t.hrefNoHash;if(!b||!j.isPath(b))b=c;return j.makeUrlAbsolute(b,c)}var o=a(window),q=a("html"),m=a("head"),j={urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(b){if(a.type(b)==="object")return b;b=j.urlParseRE.exec(b||"")||[];return{href:b[0]||"",hrefNoHash:b[1]||"",hrefNoSearch:b[2]||
|
||||||
"object")C=a.param(C);x+="?"+C;C=d}}base&&base.reset();a(window.document.activeElement).add("input:focus, textarea:focus, select:focus").blur();if(x){l=a("[data-url='"+x+"']");fileUrl=e.getFilePath(x)}else{E=l.attr("data-url");H=e.getFilePath(E);if(E!=H)fileUrl=H}if(s===d)s=a.mobile.defaultTransition;if(l.length&&!R){fileUrl&&base&&base.set(fileUrl);Q();F()}else{if(l.length)L=l;a.mobile.pageLoading();a.ajax({url:fileUrl,type:N,data:C,success:function(A){var B=/ data-url="(.*)"/.test(A)&&RegExp.$1;
|
"",domain:b[3]||"",protocol:b[4]||"",doubleSlash:b[5]||"",authority:b[6]||"",username:b[8]||"",password:b[9]||"",host:b[10]||"",hostname:b[11]||"",port:b[12]||"",pathname:b[13]||"",directory:b[14]||"",filename:b[15]||"",search:b[16]||"",hash:b[17]||""}},makePathAbsolute:function(a,b){if(a&&a.charAt(0)==="/")return a;for(var a=a||"",c=(b=b?b.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"")?b.split("/"):[],d=a.split("/"),e=0;e<d.length;e++){var f=d[e];switch(f){case ".":break;case "..":c.length&&c.pop();break;
|
||||||
if(B){base&&base.set(B);x=fileUrl=e.getFilePath(B)}else base&&base.set(fileUrl);B=a("<div></div>");B.get(0).innerHTML=A;l=B.find('[data-role="page"], [data-role="dialog"]').first();if(!a.support.dynamicBaseTag){var M=e.get(fileUrl);l.find("[src],link[href]").each(function(){var J=a(this).is("[href]")?"href":"src",D=a(this).attr(J);D.replace(location.protocol+"//"+location.host+location.pathname,"");/^(\w+:|#|\/)/.test(D)||a(this).attr(J,M+D)})}l.attr("data-url",fileUrl).appendTo(a.mobile.pageContainer);
|
default:c.push(f)}}return"/"+c.join("/")},isSameDomain:function(a,b){return j.parseUrl(a).domain===j.parseUrl(b).domain},isRelativeUrl:function(a){return j.parseUrl(a).protocol===""},isAbsoluteUrl:function(a){return j.parseUrl(a).protocol!==""},makeUrlAbsolute:function(a,b){if(!j.isRelativeUrl(a))return a;var c=j.parseUrl(a),d=j.parseUrl(b),e=c.protocol||d.protocol,f=c.protocol?c.doubleSlash:c.doubleSlash||d.doubleSlash,g=c.authority||d.authority,h=c.pathname!=="",i=j.makePathAbsolute(c.pathname||
|
||||||
Q();setTimeout(function(){F()},0)},error:function(){a.mobile.pageLoading(true);c(true);base&&base.set(e.get());a("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>Error Loading Page</h1></div>").css({display:"block",opacity:0.96,top:a(window).scrollTop()+100}).appendTo(a.mobile.pageContainer).delay(800).fadeOut(400,function(){a(this).remove()})}})}}};a("form[data-ajax!='false']").live("submit",function(l){if(a.mobile.ajaxEnabled&&a.mobile.ajaxFormsEnabled){var s=a(this).attr("method"),
|
d.filename,d.pathname);return e+f+g+i+(c.search||!h&&d.search||"")+c.hash},addSearchParams:function(b,c){var d=j.parseUrl(b),e=typeof c==="object"?a.param(c):c,f=d.search||"?";return d.hrefNoSearch+f+(f.charAt(f.length-1)!=="?"?"&":"")+e+(d.hash||"")},convertUrlToDataUrl:function(a){var b=j.parseUrl(a);if(j.isEmbeddedPage(b))return b.hash.split(r)[0].replace(/^#/,"");else if(j.isSameDomain(b,t))return b.hrefNoHash.replace(t.domain,"");return a},get:function(a){if(a===d)a=location.hash;return j.stripHash(a).replace(/[^\/]*\.[^\/*]+$/,
|
||||||
q=e.clean(a(this).attr("action"));if(!e.isExternal(q)){if(e.isRelative(q))q=e.makeAbsolute(q);a.mobile.changePage({url:q,type:s,data:a(this).serialize()},d,d,true);l.preventDefault()}}});a("a").live("click",function(l){var s=a(this),q=s.attr("href")||"#";q=e.clean(q);var w=s.is("[rel='external']"),z=e.isEmbeddedPage(q);w=e.isExternal(q)||w&&!z;z=s.is("[target]");var F=s.is("[data-ajax='false']");if(s.is("[data-rel='back']")){window.history.back();return false}if(q==="#")return false;i=s.closest(".ui-btn").addClass(a.mobile.activeBtnClass);
|
"")},getFilePath:function(b){var c="&"+a.mobile.subPageUrlKey;return b&&b.split(c)[0].split(r)[0]},set:function(a){location.hash=a},isPath:function(a){return/\//.test(a)},clean:function(a){return a.replace(t.domain,"")},stripHash:function(a){return a.replace(/^#/,"")},cleanHash:function(a){return j.stripHash(a.replace(/\?.*$/,"").replace(r,""))},isExternal:function(a){a=j.parseUrl(a);return a.protocol&&a.domain!==w.domain?true:false},hasProtocol:function(a){return/^(:?\w+:)/.test(a)},isFirstPageUrl:function(b){var b=
|
||||||
if(w||F||z||!a.mobile.ajaxEnabled||!a.mobile.ajaxLinksEnabled){c(true);if(z)window.open(q);else if(F)return;else location.href=q}else{w=s.data("transition");z=(z=s.data("direction"))&&z=="reverse"||s.data("back");j=s.attr("data-rel");if(e.isRelative(q))q=e.makeAbsolute(q);q=e.stripHash(q);a.mobile.changePage(q,w,z)}l.preventDefault()});f.bind("hashchange",function(){var l=e.stripHash(location.hash),s=a.mobile.urlHistory.stack.length===0?false:d;if(!a.mobile.hashListeningEnabled||!h.ignoreNextHashChange||
|
j.parseUrl(j.makeUrlAbsolute(b,t)),c=a.mobile.firstPage,c=c&&c[0]?c[0].id:d;return(b.hrefNoHash===w.hrefNoHash||x&&b.hrefNoHash===t.hrefNoHash)&&(!b.hash||b.hash==="#"||c&&b.hash.replace(/^#/,"")===c)},isEmbeddedPage:function(a){a=j.parseUrl(a);return a.protocol!==""?a.hash&&(a.hrefNoHash===w.hrefNoHash||x&&a.hrefNoHash===t.hrefNoHash):/^#/.test(a.href)}},p=null,l={stack:[],activeIndex:0,getActive:function(){return l.stack[l.activeIndex]},getPrev:function(){return l.stack[l.activeIndex-1]},getNext:function(){return l.stack[l.activeIndex+
|
||||||
h.stack.length>1&&l.indexOf(t)>-1&&!a.mobile.activePage.is(".ui-dialog")){if(!h.ignoreNextHashChange)h.ignoreNextHashChange=true}else l?a.mobile.changePage(l,s,d,false,true):a.mobile.changePage(a.mobile.firstPage,s,true,false,true)})})(jQuery);
|
1]},addNew:function(a,b,c,d,e){l.getNext()&&l.clearForward();l.stack.push({url:a,transition:b,title:c,pageUrl:d,role:e});l.activeIndex=l.stack.length-1},clearForward:function(){l.stack=l.stack.slice(0,l.activeIndex+1)},directHashChange:function(b){var c,e,f;this.getActive();a.each(l.stack,function(a,d){b.currentUrl===d.url&&(c=a<l.activeIndex,e=!c,f=a)});this.activeIndex=f!==d?f:this.activeIndex;c?(b.either||b.isBack)(true):e&&(b.either||b.isForward)(false)},ignoreNextHashChange:false},A=[],z=false,
|
||||||
(function(a,d){a.fn.fixHeaderFooter=function(){if(!a.support.scrollTop)return this;return this.each(function(){var c=a(this);c.data("fullscreen")&&c.addClass("ui-page-fullscreen");c.find('.ui-header[data-position="fixed"]').addClass("ui-header-fixed ui-fixed-inline fade");c.find('.ui-footer[data-position="fixed"]').addClass("ui-footer-fixed ui-fixed-inline fade")})};a.fixedToolbars=function(){function c(){if(!e&&g=="overlay"){i||a.fixedToolbars.hide(true);a.fixedToolbars.startShowTimer()}}function f(m){var r=
|
r="&ui-state=dialog",s=m.children("base"),w=j.parseUrl(location.href),t=s.length?j.parseUrl(j.makeUrlAbsolute(s.attr("href"),w.href)):w,x=w.hrefNoHash!==t.hrefNoHash,v=a.support.dynamicBaseTag?{element:s.length?s:a("<base>",{href:t.hrefNoHash}).prependTo(m),set:function(a){v.element.attr("href",j.makeUrlAbsolute(a,t))},reset:function(){v.element.attr("href",t.hrefNoHash)}}:d,D=true,y,C,B;y=function(){var b=o;a.support.touchOverflow&&a.mobile.touchOverflowEnabled&&(b=a(".ui-page-active"),b=b.is(".ui-native-fixed")?
|
||||||
0;if(m){var n=m.offsetParent,u=document.body;for(r=m.offsetTop;m&&m!=u;){r+=m.scrollTop||0;if(m==n){r+=n.offsetTop;n=m.offsetParent}m=m.parentNode}}return r}function b(m){var r=a(window).scrollTop(),n=f(m[0]),u=m.css("top")=="auto"?0:parseFloat(m.css("top")),l=window.innerHeight,s=m.outerHeight(),q=m.parents(".ui-page:not(.ui-page-fullscreen)").length;if(m.is(".ui-header-fixed")){u=r-n+u;if(u<n)u=0;return m.css("top",q?u:r)}else{u=r+l-s-(n-u);return m.css("top",q?u:r+l-s)}}if(a.support.scrollTop){var g=
|
b.find(".ui-content"):b);return b};C=function(b){if(D){var c=a.mobile.urlHistory.getActive();if(c)b=b&&b.scrollTop(),c.lastScroll=b<a.mobile.minScrollBack?a.mobile.defaultHomeScroll:b}};B=function(){setTimeout(C,100,a(this))};o.bind(a.support.pushState?"popstate":"hashchange",function(){D=false});o.one(a.support.pushState?"popstate":"hashchange",function(){D=true});o.one("pagecontainercreate",function(){a.mobile.pageContainer.bind("pagechange",function(){var a=y();D=true;a.unbind("scrollstop",B);
|
||||||
"inline",e=false,i,h,k=a.support.touch,j=k?"touchstart":"mousedown",o=k?"touchend":"mouseup",p=null,t=false,v=true;a(function(){a(document).bind(j,function(m){if(v)a(m.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length||(p=g)}).bind(o,function(m){if(v)if(!a(m.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length)if(!t){a.fixedToolbars.toggle(p);p=null}}).bind("scrollstart",function(m){if(!a(m.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length){t=
|
a.bind("scrollstop",B)})});y().bind("scrollstop",B);a.mobile.getScreenHeight=g;a.fn.animationComplete=function(b){return a.support.cssTransitions?a(this).one("webkitAnimationEnd",b):(setTimeout(b,0),a(this))};a.mobile.path=j;a.mobile.base=v;a.mobile.urlHistory=l;a.mobile.dialogHashKey=r;a.mobile.noneTransitionHandler=function(b,c,d,e){e&&e.removeClass(a.mobile.activePageClass);d.addClass(a.mobile.activePageClass);return a.Deferred().resolve(b,c,d,e).promise()};a.mobile.defaultTransitionHandler=a.mobile.noneTransitionHandler;
|
||||||
true;if(p==null)p=g;if(e=(m=p=="overlay")||!!i){a.fixedToolbars.clearShowTimer();m&&a.fixedToolbars.hide(true)}}}).bind("scrollstop",function(m){if(!a(m.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length){t=false;if(e){e=false;a.fixedToolbars.startShowTimer()}p=null}}).bind("silentscroll",c);a(window).bind("resize",c)});a(".ui-page").live("pagebeforeshow",function(m){m=a(m.target).find('[data-role="footer"]:not(.ui-sticky-footer)');var r=m.data("id");
|
a.mobile.transitionHandlers={none:a.mobile.defaultTransitionHandler};a.mobile.allowCrossDomainPages=false;a.mobile.getDocumentUrl=function(b){return b?a.extend({},w):w.href};a.mobile.getDocumentBase=function(b){return b?a.extend({},t):t.href};a.mobile._bindPageRemove=function(){var b=a(this);!b.data("page").options.domCache&&b.is(":jqmData(external-page='true')")&&b.bind("pagehide.remove",function(){var b=a(this),c=new a.Event("pageremove");b.trigger(c);c.isDefaultPrevented()||b.removeWithDependents()})};
|
||||||
h=null;if(r){h=a('.ui-footer[data-id="'+r+'"].ui-sticky-footer');if(h.length==0){h=m;m=h.clone();h.addClass("ui-sticky-footer").before(m)}m.addClass("ui-footer-duplicate");h.appendTo(a.pageContainer).css("top",0);b(h)}});a(".ui-page").live("pageshow",function(m){h&&h.length&&h.appendTo(m.target).css("top",0);a.fixedToolbars.show(true,this)});return{show:function(m,r){a.fixedToolbars.clearShowTimer();g="overlay";return(r?a(r):a.mobile.activePage?a.mobile.activePage:a(".ui-page-active")).children(".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last").each(function(){var n=
|
a.mobile.loadPage=function(b,c){var e=a.Deferred(),f=a.extend({},a.mobile.loadPage.defaults,c),g=null,h=null,r=j.makeUrlAbsolute(b,a.mobile.activePage&&n(a.mobile.activePage)||t.hrefNoHash);if(f.data&&f.type==="get")r=j.addSearchParams(r,f.data),f.data=d;if(f.data&&f.type==="post")f.reloadPage=true;var m=j.getFilePath(r),l=j.convertUrlToDataUrl(r);f.pageContainer=f.pageContainer||a.mobile.pageContainer;g=f.pageContainer.children(":jqmData(url='"+l+"')");g.length===0&&l&&!j.isPath(l)&&(g=f.pageContainer.children("#"+
|
||||||
a(this),u=a(window).scrollTop(),l=f(n[0]),s=window.innerHeight,q=n.outerHeight();u=n.is(".ui-header-fixed")&&u<=l+q||n.is(".ui-footer-fixed")&&l<=u+s;n.addClass("ui-fixed-overlay").removeClass("ui-fixed-inline");!u&&!m&&n.animationComplete(function(){n.removeClass("in")}).addClass("in");b(n)})},hide:function(m){g="inline";return(a.mobile.activePage?a.mobile.activePage:a(".ui-page-active")).children(".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last").each(function(){var r=a(this),
|
l).attr("data-"+a.mobile.ns+"url",l));g.length===0&&a.mobile.firstPage&&j.isFirstPageUrl(m)&&(g=a(a.mobile.firstPage));v&&v.reset();if(g.length){if(!f.reloadPage)return i(g,f.role),e.resolve(r,c,g),e.promise();h=g}var q=f.pageContainer,k=new a.Event("pagebeforeload"),p={url:b,absUrl:r,dataUrl:l,deferred:e,options:f};q.trigger(k,p);if(k.isDefaultPrevented())return e.promise();if(f.showLoadMsg)var s=setTimeout(function(){a.mobile.showPageLoadingMsg()},f.loadMsgDelay);!a.mobile.allowCrossDomainPages&&
|
||||||
n=r.css("top");n=n=="auto"?0:parseFloat(n);r.addClass("ui-fixed-inline").removeClass("ui-fixed-overlay");if(n<0||r.is(".ui-header-fixed")&&n!=0)if(m)r.css("top",0);else r.css("top")!=="auto"&&parseFloat(r.css("top"))!==0&&r.animationComplete(function(){r.removeClass("out reverse");r.css("top",0)}).addClass("out reverse")})},startShowTimer:function(){a.fixedToolbars.clearShowTimer();var m=a.makeArray(arguments);i=setTimeout(function(){i=d;a.fixedToolbars.show.apply(null,m)},100)},clearShowTimer:function(){i&&
|
!j.isSameDomain(w,r)?e.reject(r,c):a.ajax({url:m,type:f.type,data:f.data,dataType:"html",success:function(d){var q=a("<div></div>"),k=d.match(/<title[^>]*>([^<]*)/)&&RegExp.$1,t=RegExp("\\bdata-"+a.mobile.ns+"url=[\"']?([^\"'>]*)[\"']?");RegExp("(<[^>]+\\bdata-"+a.mobile.ns+"role=[\"']?page[\"']?[^>]*>)").test(d)&&RegExp.$1&&t.test(RegExp.$1)&&RegExp.$1&&(b=m=j.getFilePath(RegExp.$1));v&&v.set(m);q.get(0).innerHTML=d;g=q.find(":jqmData(role='page'), :jqmData(role='dialog')").first();g.length||(g=
|
||||||
clearTimeout(i);i=d},toggle:function(m){if(m)g=m;return g=="overlay"?a.fixedToolbars.hide():a.fixedToolbars.show()},setTouchToggleEnabled:function(m){v=m}}}}()})(jQuery);
|
a("<div data-"+a.mobile.ns+"role='page'>"+d.split(/<\/?body[^>]*>/gmi)[1]+"</div>"));k&&!g.jqmData("title")&&g.jqmData("title",k);if(!a.support.dynamicBaseTag){var n=j.get(m);g.find("[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]").each(function(){var b=a(this).is("[href]")?"href":a(this).is("[src]")?"src":"action",c=a(this).attr(b),c=c.replace(location.protocol+"//"+location.host+location.pathname,"");/^(\w+:|#|\/)/.test(c)||a(this).attr(b,n+c)})}g.attr("data-"+a.mobile.ns+
|
||||||
(function(a,d){a.widget("mobile.checkboxradio",a.mobile.widget,{options:{theme:null},_create:function(){var c=this,f=this.element,b=f.closest("form,fieldset,[data-role='page']").find("label[for='"+f.attr("id")+"']"),g=f.attr("type"),e="ui-icon-"+g+"-off";if(!(g!="checkbox"&&g!="radio")){if(!this.options.theme)this.options.theme=this.element.data("theme");b.buttonMarkup({theme:this.options.theme,icon:this.element.parents("[data-type='horizontal']").length?d:e,shadow:false});f.add(b).wrapAll("<div class='ui-"+
|
"url",j.convertUrlToDataUrl(m)).attr("data-"+a.mobile.ns+"external-page",true).appendTo(f.pageContainer);g.one("pagecreate",a.mobile._bindPageRemove);i(g,f.role);r.indexOf("&"+a.mobile.subPageUrlKey)>-1&&(g=f.pageContainer.children(":jqmData(url='"+l+"')"));f.showLoadMsg&&(clearTimeout(s),a.mobile.hidePageLoadingMsg());p.page=g;f.pageContainer.trigger("pageload",p);e.resolve(r,c,g,h)},error:function(){v&&v.set(j.get());var b=new a.Event("pageloadfailed");f.pageContainer.trigger(b,p);b.isDefaultPrevented()||
|
||||||
g+"'></div>");b.bind({mouseover:function(){if(a(this).parent().is(".ui-disabled"))return false},touchmove:function(i){i=i.originalEvent.touches[0];if(b.data("movestart")){if(Math.abs(b.data("movestart")[0]-i.pageX)>10||Math.abs(abel.data("movestart")[1]-i.pageY)>10)b.data("moved",true)}else b.data("movestart",[parseFloat(i.pageX),parseFloat(i.pageY)])},"touchend mouseup":function(i){b.removeData("movestart");if(b.data("etype")&&b.data("etype")!==i.type||b.data("moved")){b.removeData("etype").removeData("moved");
|
(f.showLoadMsg&&(clearTimeout(s),a.mobile.hidePageLoadingMsg(),a("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>"+a.mobile.pageLoadErrorMessage+"</h1></div>").css({display:"block",opacity:0.96,top:o.scrollTop()+100}).appendTo(f.pageContainer).delay(800).fadeOut(400,function(){a(this).remove()})),e.reject(r,c))}});return e.promise()};a.mobile.loadPage.defaults={type:"get",data:d,reloadPage:false,role:d,showLoadMsg:false,pageContainer:d,loadMsgDelay:50};a.mobile.changePage=function(b,
|
||||||
b.data("moved")&&b.removeData("moved");return false}b.data("etype",i.type);c._cacheVals();f.attr("checked",g==="radio"&&true||!f.is(":checked"));c._updateAll();i.preventDefault()},click:false});f.bind({mousedown:function(){this._cacheVals()},click:function(){c._updateAll()},focus:function(){b.addClass("ui-focus")},blur:function(){b.removeClass("ui-focus")}});this.refresh()}},_cacheVals:function(){this._getInputSet().each(function(){a(this).data("cacheVal",a(this).is(":checked"))})},_getInputSet:function(){return this.element.closest("form,fieldset,[data-role='page']").find("input[name='"+
|
g){if(z)A.unshift(arguments);else{var h=a.extend({},a.mobile.changePage.defaults,g);h.pageContainer=h.pageContainer||a.mobile.pageContainer;h.fromPage=h.fromPage||a.mobile.activePage;var m=h.pageContainer,k=new a.Event("pagebeforechange"),p={toPage:b,options:h};m.trigger(k,p);if(!k.isDefaultPrevented())if(b=p.toPage,z=true,typeof b=="string")a.mobile.loadPage(b,h).done(function(b,c,d,f){z=false;c.duplicateCachedPage=f;a.mobile.changePage(d,c)}).fail(function(){z=false;c(true);f();h.pageContainer.trigger("pagechangefailed",
|
||||||
this.element.attr("name")+"'][type='"+this.element.attr("type")+"']")},_updateAll:function(){this._getInputSet().each(function(){var c=a(this).data("cacheVal");if(c&&c!==a(this).is(":checked")||a(this).is("[type='checkbox']"))a(this).trigger("change")}).checkboxradio("refresh")},refresh:function(){var c=this.element,f=c.closest("form,fieldset,[data-role='page']").find("label[for='"+c.attr("id")+"']"),b=c.attr("type"),g=f.find(".ui-icon"),e="ui-icon-"+b+"-on";b="ui-icon-"+b+"-off";if(c[0].checked){f.addClass("ui-btn-active");
|
p)});else{if(b[0]===a.mobile.firstPage[0]&&!h.dataUrl)h.dataUrl=w.hrefNoHash;var k=h.fromPage,s=h.dataUrl&&j.convertUrlToDataUrl(h.dataUrl)||b.jqmData("url"),t=s;j.getFilePath(s);var n=l.getActive(),x=l.activeIndex===0,o=0,v=document.title,y=h.role==="dialog"||b.jqmData("role")==="dialog";if(k&&k[0]===b[0]&&!h.allowSamePageTransition)z=false,m.trigger("pagechange",p);else{i(b,h.role);h.fromHashChange&&l.directHashChange({currentUrl:s,isBack:function(){o=-1},isForward:function(){o=1}});try{a(document.activeElement||
|
||||||
g.addClass(e);g.removeClass(b)}else{f.removeClass("ui-btn-active");g.removeClass(e);g.addClass(b)}c.is(":disabled")?this.disable():this.enable()},disable:function(){this.element.attr("disabled",true).parent().addClass("ui-disabled")},enable:function(){this.element.attr("disabled",false).parent().removeClass("ui-disabled")}})})(jQuery);
|
"").add("input:focus, textarea:focus, select:focus").blur()}catch(B){}y&&n&&(s=(n.url||"")+r);if(h.changeHash!==false&&s)l.ignoreNextHashChange=true,j.set(s);var C=b.jqmData("title")||b.children(":jqmData(role='header')").find(".ui-title").getEncodedText();C&&v==document.title&&(v=C);h.transition=h.transition||(o&&!x?n.transition:d)||(y?a.mobile.defaultDialogTransition:a.mobile.defaultPageTransition);o||l.addNew(s,h.transition,v,t,h.role);document.title=l.getActive().title;a.mobile.activePage=b;h.reverse=
|
||||||
(function(a){a.widget("mobile.textinput",a.mobile.widget,{options:{theme:null},_create:function(){var d=this.element,c=this.options,f=c.theme;if(!f){f=this.element.closest("[class*='ui-bar-'],[class*='ui-body-']");f=f.length?/ui-(bar|body)-([a-z])/.exec(f.attr("class"))[2]:"c"}f=" ui-body-"+f;a("label[for="+d.attr("id")+"]").addClass("ui-input-text");d.addClass("ui-input-text ui-body-"+c.theme);var b=d;if(d.is('[type="search"],[data-type="search"]')){b=d.wrap('<div class="ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield'+
|
h.reverse||o<0;e(b,k,h.transition,h.reverse).done(function(){c();h.duplicateCachedPage&&h.duplicateCachedPage.remove();q.removeClass("ui-mobile-rendering");f();m.trigger("pagechange",p)})}}}};a.mobile.changePage.defaults={transition:d,reverse:false,changeHash:true,fromHashChange:false,role:d,duplicateCachedPage:d,pageContainer:d,showLoadMsg:true,dataUrl:d,fromPage:d,allowSamePageTransition:false};a.mobile._registerInternalEvents=function(){a("form").live("submit",function(b){var c=a(this);if(a.mobile.ajaxEnabled&&
|
||||||
f+'"></div>').parent();var g=a('<a href="#" class="ui-input-clear" title="clear text">clear text</a>').tap(function(h){d.val("").focus();d.trigger("change");g.addClass("ui-input-clear-hidden");h.preventDefault()}).appendTo(b).buttonMarkup({icon:"delete",iconpos:"notext",corners:true,shadow:true});c=function(){d.val()==""?g.addClass("ui-input-clear-hidden"):g.removeClass("ui-input-clear-hidden")};c();d.keyup(c)}else d.addClass("ui-corner-all ui-shadow-inset"+f);d.focus(function(){b.addClass("ui-focus")}).blur(function(){b.removeClass("ui-focus")});
|
!c.is(":jqmData(ajax='false')")){var d=c.attr("method"),f=c.attr("target"),e=c.attr("action");if(!e&&(e=n(c),e===t.hrefNoHash))e=w.hrefNoSearch;e=j.makeUrlAbsolute(e,n(c));!j.isExternal(e)&&!f&&(a.mobile.changePage(e,{type:d&&d.length&&d.toLowerCase()||"get",data:c.serialize(),transition:c.jqmData("transition"),direction:c.jqmData("direction"),reloadPage:true}),b.preventDefault())}});a(document).bind("vclick",function(b){if(!(b.which>1)&&(b=k(b.target))&&j.parseUrl(b.getAttribute("href")||"#").hash!==
|
||||||
if(d.is("textarea")){var e=function(){var h=d[0].scrollHeight;d[0].clientHeight<h&&d.css({height:h+15})},i;d.keyup(function(){clearTimeout(i);i=setTimeout(e,100)})}},disable:function(){(this.element.attr("disabled",true).is('[type="search"],[data-type="search"]')?this.element.parent():this.element).addClass("ui-disabled")},enable:function(){(this.element.attr("disabled",false).is('[type="search"],[data-type="search"]')?this.element.parent():this.element).removeClass("ui-disabled")}})})(jQuery);
|
"#")c(true),p=a(b).closest(".ui-btn").not(".ui-disabled"),p.addClass(a.mobile.activeBtnClass),a("."+a.mobile.activePageClass+" .ui-btn").not(b).blur()});a(document).bind("click",function(b){var f=k(b.target);if(f&&!(b.which>1)){var e=a(f),g=function(){window.setTimeout(function(){c(true)},200)};if(e.is(":jqmData(rel='back')"))return window.history.back(),false;var h=n(e),f=j.makeUrlAbsolute(e.attr("href")||"#",h);if(!a.mobile.ajaxEnabled&&!j.isEmbeddedPage(f))g();else{if(f.search("#")!=-1)if(f=f.replace(/[^#]*#/,
|
||||||
(function(a){a.widget("mobile.selectmenu",a.mobile.widget,{options:{theme:null,disabled:false,icon:"arrow-d",iconpos:"right",inline:null,corners:true,shadow:true,iconshadow:true,menuPageTheme:"b",overlayTheme:"a",hidePlaceholderMenuItems:true,closeText:"Close",nativeMenu:false},_create:function(){var d=this,c=this.options,f=this.element.wrap("<div class='ui-select'>"),b=f.attr("id"),g=a("label[for="+b+"]").addClass("ui-select"),e=(d.options.nativeMenu?a("<div/>"):a("<a>",{href:"#",role:"button",id:k,
|
""))f=j.isPath(f)?j.makeUrlAbsolute(f,h):j.makeUrlAbsolute("#"+f,w.hrefNoHash);else{b.preventDefault();return}var h=e.is("[rel='external']")||e.is(":jqmData(ajax='false')")||e.is("[target]"),i=a.mobile.allowCrossDomainPages&&w.protocol==="file:"&&f.search(/^https?:/)!=-1;h||j.isExternal(f)&&!i?g():(g=e.jqmData("transition"),h=(h=e.jqmData("direction"))&&h==="reverse"||e.jqmData("back"),e=e.attr("data-"+a.mobile.ns+"rel")||d,a.mobile.changePage(f,{transition:g,reverse:h,role:e}),b.preventDefault())}}});
|
||||||
"aria-haspopup":"true","aria-owns":j})).text(a(f[0].options.item(f[0].selectedIndex)).text()).insertBefore(f).buttonMarkup({theme:c.theme,icon:c.icon,iconpos:c.iconpos,inline:c.inline,corners:c.corners,shadow:c.shadow,iconshadow:c.iconshadow}),i=d.isMultiple=f[0].multiple;c.nativeMenu&&window.opera&&window.opera.version&&f.addClass("ui-select-nativeonly");if(!c.nativeMenu){var h=f.find("option"),k=b+"-button",j=b+"-menu",o=f.closest(".ui-page"),p=/ui-btn-up-([a-z])/.exec(e.attr("class"))[1],t=a("<div data-role='dialog' data-theme='"+
|
a(".ui-page").live("pageshow.prefetch",function(){var b=[];a(this).find("a:jqmData(prefetch)").each(function(){var c=a(this),f=c.attr("href");f&&a.inArray(f,b)===-1&&(b.push(f),a.mobile.loadPage(f,{role:c.attr("data-"+a.mobile.ns+"rel")}))})});a.mobile._handleHashChange=function(b){var c=j.stripHash(b),f={transition:a.mobile.urlHistory.stack.length===0?"none":d,changeHash:false,fromHashChange:true};if(!a.mobile.hashListeningEnabled||l.ignoreNextHashChange)l.ignoreNextHashChange=false;else{if(l.stack.length>
|
||||||
c.menuPageTheme+"'><div data-role='header'><div class='ui-title'>"+g.text()+"</div></div><div data-role='content'></div></div>").appendTo(a.mobile.pageContainer).page(),v=t.find(".ui-content"),m=t.find(".ui-header a"),r=a("<div>",{"class":"ui-selectmenu-screen ui-screen-hidden"}).appendTo(o),n=a("<div>",{"class":"ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all pop ui-body-"+c.overlayTheme}).insertAfter(r),u=a("<ul>",{"class":"ui-selectmenu-list",id:j,role:"listbox","aria-labelledby":k,
|
1&&c.indexOf(r)>-1)if(a.mobile.activePage.is(".ui-dialog"))l.directHashChange({currentUrl:c,either:function(b){var e=a.mobile.urlHistory.getActive();c=e.pageUrl;a.extend(f,{role:e.role,transition:e.transition,reverse:b})}});else{l.directHashChange({currentUrl:c,isBack:function(){window.history.back()},isForward:function(){window.history.forward()}});return}c?(c=typeof c==="string"&&!j.isPath(c)?j.makeUrlAbsolute("#"+c,t):c,a.mobile.changePage(c,f)):a.mobile.changePage(a.mobile.firstPage,f)}};o.bind("hashchange",
|
||||||
"data-theme":p}).appendTo(n);p=a("<div>",{"class":"ui-header ui-bar-"+p}).prependTo(n);var l=a("<h1>",{"class":"ui-title"}).appendTo(p),s=a("<a>",{"data-iconpos":"notext","data-icon":"delete",text:c.closeText,href:"#","class":"ui-btn-left"}).appendTo(p).buttonMarkup()}if(i)d.buttonCount=a("<span>").addClass("ui-li-count ui-btn-up-c ui-btn-corner-all").hide().appendTo(e);c.disabled&&this.disable();f.change(function(){d.refresh()});a.extend(d,{select:f,optionElems:h,selectID:b,label:g,buttonId:k,menuId:j,
|
function(){a.mobile._handleHashChange(location.hash)});a(document).bind("pageshow",h);a(window).bind("throttledresize",h)}})(jQuery);
|
||||||
thisPage:o,button:e,menuPage:t,menuPageContent:v,screen:r,listbox:n,list:u,menuType:void 0,header:p,headerClose:s,headerTitle:l,placeholder:""});if(c.nativeMenu){f.appendTo(e).bind("touchstart mousedown",function(){e.addClass(a.mobile.activeBtnClass)}).bind("focus mouseover",function(){e.trigger("mouseover")}).bind("touchmove",function(){e.removeClass(a.mobile.activeBtnClass)}).bind("change blur mouseout",function(){e.trigger("mouseout").removeClass(a.mobile.activeBtnClass)});e.attr("tabindex","-1")}else{d.refresh();
|
(function(a,d){var b={},c=a(d),f=a.mobile.path.parseUrl(location.href);a.extend(b,{initialFilePath:f.pathname+f.search,initialHref:f.hrefNoHash,hashchangeFired:false,state:function(){return{hash:location.hash||"#"+b.initialFilePath,title:document.title,initialHref:b.initialHref}},resetUIKeys:function(b){var c="&"+a.mobile.subPageUrlKey,f=b.indexOf(a.mobile.dialogHashKey);f>-1?b=b.slice(0,f)+"#"+b.slice(f):b.indexOf(c)>-1&&(b=b.split(c).join("#"+c));return b},nextHashChangePrevented:function(c){a.mobile.urlHistory.ignoreNextHashChange=
|
||||||
f.attr("tabindex","-1").focus(function(){a(this).blur();e.focus()});e.bind("touchstart",function(q){a(this).data("startTouches",a.extend({},q.originalEvent.touches[0]))}).bind(a.support.touch?"touchend":"mouseup",function(q){a(this).data("moved")?a(this).removeData("moved"):d.open();q.preventDefault()}).bind("touchmove",function(q){q=q.originalEvent.touches[0];var w=a(this).data("startTouches"),z=Math.abs(q.pageY-w.pageY);if(Math.abs(q.pageX-w.pageX)>10||z>10)a(this).data("moved",true)});u.delegate("li:not(.ui-disabled, .ui-li-divider)",
|
c;b.onHashChangeDisabled=c},onHashChange:function(){if(!b.onHashChangeDisabled){var c,f;c=location.hash;var d=a.mobile.path.isPath(c),i=d?location.href:a.mobile.getDocumentUrl();c=d?c.replace("#",""):c;f=b.state();c=a.mobile.path.makeUrlAbsolute(c,i);d&&(c=b.resetUIKeys(c));history.replaceState(f,document.title,c)}},onPopState:function(c){var f=c.originalEvent.state;f&&(b.nextHashChangePrevented(true),setTimeout(function(){b.nextHashChangePrevented(false);a.mobile._handleHashChange(f.hash)},100))},
|
||||||
"click",function(q){if(a(q.target).is("a")){var w=u.find("li:not(.ui-li-divider)").index(this);w=d.optionElems.eq(w)[0];w.selected=i?!w.selected:true;i&&a(this).find(".ui-icon").toggleClass("ui-icon-checkbox-on",w.selected).toggleClass("ui-icon-checkbox-off",!w.selected);f.trigger("change");i||d.close();q.preventDefault()}});r.add(s).add(m).bind("click",function(q){d.close();q.preventDefault();a.contains(m[0],q.target)&&q.stopImmediatePropagation()})}},_buildList:function(){var d=this,c=this.options,
|
init:function(){c.bind("hashchange",b.onHashChange);c.bind("popstate",b.onPopState);location.hash===""&&history.replaceState(b.state(),document.title,location.href)}});a(function(){a.mobile.pushStateEnabled&&a.support.pushState&&b.init()})})(jQuery,this);
|
||||||
f=this.placeholder,b=[],g=[],e=d.isMultiple?"checkbox-off":"false";d.list.empty().filter(".ui-listview").listview("destroy");d.select.find("option").each(function(){var i=a(this),h=i.parent(),k=i.text(),j="<a href='#'>"+k+"</a>",o=[],p=[];if(h.is("optgroup")){h=h.attr("label");if(a.inArray(h,b)===-1){g.push("<li data-role='list-divider'>"+h+"</li>");b.push(h)}}if(!this.getAttribute("value")||k.length==0||i.data("placeholder")){c.hidePlaceholderMenuItems&&o.push("ui-selectmenu-placeholder");f=d.placeholder=
|
(function(a){function d(b,c,f,d){var g=new a.Deferred,h=c?" reverse":"",i="ui-mobile-viewport-transitioning viewport-"+b;f.animationComplete(function(){f.add(d).removeClass("out in reverse "+b);d&&d[0]!==f[0]&&d.removeClass(a.mobile.activePageClass);f.parent().removeClass(i);g.resolve(b,c,f,d)});f.parent().addClass(i);d&&d.addClass(b+" out"+h);f.addClass(a.mobile.activePageClass+" "+b+" in"+h);return g.promise()}a.mobile.css3TransitionHandler=d;if(a.mobile.defaultTransitionHandler===a.mobile.noneTransitionHandler)a.mobile.defaultTransitionHandler=
|
||||||
k}if(this.disabled){o.push("ui-disabled");p.push("aria-disabled='true'")}g.push("<li data-icon='"+e+"' class='"+o.join(" ")+"' "+p.join(" ")+">"+j+"</li>")});d.list.html(g.join(" "));this.isMultiple||this.headerClose.hide();!this.isMultiple&&!f.length?this.header.hide():this.headerTitle.text(this.placeholder);d.list.listview()},refresh:function(d){var c=this,f=this.element,b=this.isMultiple,g=this.optionElems=f.find("option"),e=g.filter(":selected"),i=e.map(function(){return g.index(this)}).get();
|
d})(jQuery,this);
|
||||||
if(!c.options.nativeMenu&&(d||f[0].options.length>c.list.find("li").length))c._buildList();c.button.find(".ui-btn-text").text(function(){if(!b)return e.text();return e.length?e.map(function(){return a(this).text()}).get().join(", "):c.placeholder});if(b)c.buttonCount[e.length>1?"show":"hide"]().text(e.length);c.options.nativeMenu||c.list.find("li:not(.ui-li-divider)").removeClass(a.mobile.activeBtnClass).attr("aria-selected",false).each(function(h){if(a.inArray(h,i)>-1){h=a(this).addClass(a.mobile.activeBtnClass);
|
(function(a){a.mobile.page.prototype.options.degradeInputs={color:false,date:false,datetime:false,"datetime-local":false,email:false,month:false,number:false,range:"number",search:"text",tel:false,time:false,url:false,week:false};a(document).bind("pagecreate create",function(d){var b=a(d.target).closest(':jqmData(role="page")').data("page"),c;if(b)c=b.options,a(d.target).find("input").not(b.keepNativeSelector()).each(function(){var b=a(this),d=this.getAttribute("type"),g=c.degradeInputs[d]||"text";
|
||||||
h.find("a").attr("aria-selected",true);b&&h.find(".ui-icon").removeClass("ui-icon-checkbox-off").addClass("ui-icon-checkbox-on")}})},open:function(){function d(){c.list.find(".ui-btn-active").focus()}if(!(this.options.disabled||this.options.nativeMenu)){var c=this,f=c.list.outerHeight(),b=c.list.outerWidth(),g=a(window).scrollTop(),e=c.button.offset().top,i=window.innerHeight,h=c.list.parents(".ui-dialog").length;c.button.addClass(a.mobile.activeBtnClass);if(h||f>i-80||!a.support.scrollTop){g==0&&
|
if(c.degradeInputs[d]){var h=a("<div>").html(b.clone()).html(),i=h.indexOf(" type=")>-1;b.replaceWith(h.replace(i?/\s+type=["']?\w+['"]?/:/\/?>/,' type="'+g+'" data-'+a.mobile.ns+'type="'+d+'"'+(i?"":">")))}})})})(jQuery);
|
||||||
e>i&&c.thisPage.one("pagehide",function(){a(this).data("lastScroll",e)});c.menuPage.one("pageshow",function(){a(window).one("silentscroll",function(){d()})});c.menuType="page";c.menuPageContent.append(c.list);a.mobile.changePage(c.menuPage,"pop",false,true)}else{c.menuType="overlay";c.screen.height(a(document).height()).removeClass("ui-screen-hidden");h=e-g;var k=g+i-e,j=f/2;f=h>f/2&&k>f/2?e+c.button.outerHeight()/2-j:h>k?g+i-f-30:g+30;b=c.button.offset().left+c.button.outerWidth()/2-b/2;c.listbox.append(c.list).removeClass("ui-selectmenu-hidden").css({top:f,
|
(function(a,d){a.widget("mobile.dialog",a.mobile.widget,{options:{closeBtnText:"Close",theme:"a",initSelector:":jqmData(role='dialog')"},_create:function(){var b=this,c=this.element,f=c.attr("class").match(/ui-body-[a-z]/),d=a("<a href='#' data-"+a.mobile.ns+"icon='delete' data-"+a.mobile.ns+"iconpos='notext'>"+this.options.closeBtnText+"</a>");f.length&&c.removeClass(f[0]);c.addClass("ui-body-"+this.options.theme);c.attr("role","dialog").addClass("ui-dialog").find(":jqmData(role='header')").addClass("ui-corner-top ui-overlay-shadow").prepend(d).end().find(":jqmData(role='content'),:jqmData(role='footer')").last().addClass("ui-corner-bottom ui-overlay-shadow");
|
||||||
left:b}).addClass("in");d()}setTimeout(function(){c.isOpen=true},400)}},close:function(){function d(){setTimeout(function(){c.button.focus();c.button.removeClass(a.mobile.activeBtnClass)},40);c.listbox.removeAttr("style").append(c.list)}if(!(this.options.disabled||!this.isOpen||this.options.nativeMenu)){var c=this;if(c.menuType=="page"){a.mobile.changePage([c.menuPage,c.thisPage],"pop",true,false);c.menuPage.one("pagehide",d)}else{c.screen.addClass("ui-screen-hidden");c.listbox.addClass("ui-selectmenu-hidden").removeAttr("style").removeClass("in");
|
d.bind("vclick",function(){b.close()});c.bind("vclick submit",function(b){var b=a(b.target).closest(b.type==="vclick"?"a":"form"),c;b.length&&!b.jqmData("transition")&&(c=a.mobile.urlHistory.getActive()||{},b.attr("data-"+a.mobile.ns+"transition",c.transition||a.mobile.defaultDialogTransition).attr("data-"+a.mobile.ns+"direction","reverse"))}).bind("pagehide",function(){a(this).find("."+a.mobile.activeBtnClass).removeClass(a.mobile.activeBtnClass)})},close:function(){d.history.back()}});a(a.mobile.dialog.prototype.options.initSelector).live("pagecreate",
|
||||||
d()}this.isOpen=false}},disable:function(){this.element.attr("disabled",true);this.button.addClass("ui-disabled").attr("aria-disabled",true);return this._setOption("disabled",true)},enable:function(){this.element.attr("disabled",false);this.button.removeClass("ui-disabled").attr("aria-disabled",false);return this._setOption("disabled",false)}})})(jQuery);
|
function(){a(this).dialog()})})(jQuery,this);
|
||||||
(function(a){a.fn.buttonMarkup=function(c){return this.each(function(){var f=a(this),b=a.extend({},a.fn.buttonMarkup.defaults,f.data(),c),g,e="ui-btn-inner",i;d&&d();if(!b.theme){g=f.closest("[class*='ui-bar-'],[class*='ui-body-']");b.theme=g.length?/ui-(bar|body)-([a-z])/.exec(g.attr("class"))[2]:"c"}g="ui-btn ui-btn-up-"+b.theme;if(b.inline)g+=" ui-btn-inline";if(b.icon){b.icon="ui-icon-"+b.icon;b.iconpos=b.iconpos||"left";i="ui-icon "+b.icon;if(b.shadow)i+=" ui-icon-shadow"}if(b.iconpos){g+=" ui-btn-icon-"+
|
(function(a){a.mobile.page.prototype.options.backBtnText="Back";a.mobile.page.prototype.options.addBackBtn=false;a.mobile.page.prototype.options.backBtnTheme=null;a.mobile.page.prototype.options.headerTheme="a";a.mobile.page.prototype.options.footerTheme="a";a.mobile.page.prototype.options.contentTheme=null;a(":jqmData(role='page'), :jqmData(role='dialog')").live("pagecreate",function(){var d=a(this).data("page").options,b=d.theme;a(":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')",this).each(function(){var c=
|
||||||
b.iconpos;b.iconpos=="notext"&&!f.attr("title")&&f.attr("title",f.text())}if(b.corners){g+=" ui-btn-corner-all";e+=" ui-btn-corner-all"}if(b.shadow)g+=" ui-shadow";f.attr("data-theme",b.theme).addClass(g);b=("<D class='"+e+"'><D class='ui-btn-text'></D>"+(b.icon?"<span class='"+i+"'></span>":"")+"</D>").replace(/D/g,b.wrapperEls);f.wrapInner(b)})};a.fn.buttonMarkup.defaults={corners:true,shadow:true,iconshadow:true,wrapperEls:"span"};var d=function(){a(".ui-btn:not(.ui-disabled)").live({"touchstart mousedown":function(){var c=
|
a(this),f=c.jqmData("role"),e=c.jqmData("theme"),g,h;c.addClass("ui-"+f);if(f==="header"||f==="footer"){var i=e||(f==="header"?d.headerTheme:d.footerTheme)||b;c.addClass("ui-bar-"+i).attr("role",f==="header"?"banner":"contentinfo");e=c.children("a");g=e.hasClass("ui-btn-left");h=e.hasClass("ui-btn-right");g=g||e.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length;h||e.eq(1).addClass("ui-btn-right");d.addBackBtn&&f==="header"&&a(".ui-page").length>1&&c.jqmData("url")!==a.mobile.path.stripHash(location.hash)&&
|
||||||
a(this).attr("data-theme");a(this).removeClass("ui-btn-up-"+c).addClass("ui-btn-down-"+c)},"touchmove touchend mouseup":function(){var c=a(this).attr("data-theme");a(this).removeClass("ui-btn-down-"+c).addClass("ui-btn-up-"+c)},"mouseover focus":function(){var c=a(this).attr("data-theme");a(this).removeClass("ui-btn-up-"+c).addClass("ui-btn-hover-"+c)},"mouseout blur":function(){var c=a(this).attr("data-theme");a(this).removeClass("ui-btn-hover-"+c).addClass("ui-btn-up-"+c)}});d=null}})(jQuery);
|
!g&&a("<a href='#' class='ui-btn-left' data-"+a.mobile.ns+"rel='back' data-"+a.mobile.ns+"icon='arrow-l'>"+d.backBtnText+"</a>").attr("data-"+a.mobile.ns+"theme",d.backBtnTheme||i).prependTo(c);c.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({tabindex:"0",role:"heading","aria-level":"1"})}else if(f==="content"){if(e||d.contentTheme)c.addClass("ui-body-"+(e||d.contentTheme));c.attr("role","main")}})})})(jQuery);
|
||||||
(function(a){a.widget("mobile.button",a.mobile.widget,{options:{theme:null,icon:null,iconpos:null,inline:null,corners:true,shadow:true,iconshadow:true},_create:function(){var d=this.element,c=this.options;this.button=a("<div></div>").text(d.text()||d.val()).buttonMarkup({theme:c.theme,icon:c.icon,iconpos:c.iconpos,inline:c.inline,corners:c.corners,shadow:c.shadow,iconshadow:c.iconshadow}).insertBefore(d).append(d.addClass("ui-btn-hidden"));d.attr("type")!=="reset"&&d.click(function(){var f=a("<input>",
|
(function(a){a.widget("mobile.collapsible",a.mobile.widget,{options:{expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsed:true,heading:">:header,>legend",theme:null,contentTheme:null,iconTheme:"d",initSelector:":jqmData(role='collapsible')"},_create:function(){var d=this.element,b=this.options,c=d.addClass("ui-collapsible"),f=d.find(b.heading).eq(0),e=c.wrapInner("<div class='ui-collapsible-content'></div>").find(".ui-collapsible-content"),g=d.closest(":jqmData(role='collapsible-set')").addClass("ui-collapsible-set"),
|
||||||
{type:"hidden",name:d.attr("name"),value:d.attr("value")}).insertBefore(d);a(document).submit(function(){f.remove()})})},enable:function(){this.element.attr("disabled",false);this.button.removeClass("ui-disabled").attr("aria-disabled",false);return this._setOption("disabled",false)},disable:function(){this.element.attr("disabled",true);this.button.addClass("ui-disabled").attr("aria-disabled",true);return this._setOption("disabled",true)}})})(jQuery);
|
d=g.children(":jqmData(role='collapsible')");f.is("legend")&&(f=a("<div role='heading'>"+f.html()+"</div>").insertBefore(f),f.next().remove());if(g.length){if(!b.theme)b.theme=g.jqmData("theme");if(!b.contentTheme)b.contentTheme=g.jqmData("content-theme")}e.addClass(b.contentTheme?"ui-body-"+b.contentTheme:"");f.insertBefore(e).addClass("ui-collapsible-heading").append("<span class='ui-collapsible-heading-status'></span>").wrapInner("<a href='#' class='ui-collapsible-heading-toggle'></a>").find("a:eq(0)").buttonMarkup({shadow:false,
|
||||||
(function(a){a.widget("mobile.slider",a.mobile.widget,{options:{theme:null,trackTheme:null,disabled:false},_create:function(){var d=this,c=this.element,f=c.parents("[class*=ui-bar-],[class*=ui-body-]").eq(0);f=f.length?f.attr("class").match(/ui-(bar|body)-([a-z])/)[2]:"c";var b=this.options.theme?this.options.theme:f,g=this.options.trackTheme?this.options.trackTheme:f,e=c[0].nodeName.toLowerCase();f=e=="select"?"ui-slider-switch":"";var i=c.attr("id"),h=i+"-label";i=a("[for="+i+"]").attr("id",h);
|
corners:false,iconPos:"left",icon:"plus",theme:b.theme});g.length?(g.jqmData("collapsiblebound")||g.jqmData("collapsiblebound",true).bind("expand",function(b){a(b.target).closest(".ui-collapsible").siblings(".ui-collapsible").trigger("collapse")}),d.first().find("a:eq(0)").addClass("ui-corner-top").find(".ui-btn-inner").addClass("ui-corner-top"),d.last().jqmData("collapsible-last",true).find("a:eq(0)").addClass("ui-corner-bottom").find(".ui-btn-inner").addClass("ui-corner-bottom"),c.jqmData("collapsible-last")&&
|
||||||
var k=function(){return e=="input"?parseFloat(c.val()):c[0].selectedIndex},j=e=="input"?parseFloat(c.attr("min")):0,o=e=="input"?parseFloat(c.attr("max")):c.find("option").length-1,p=window.parseFloat(c.attr("step")||1),t=a('<div class="ui-slider '+f+" ui-btn-down-"+g+' ui-btn-corner-all" role="application"></div>'),v=a('<a href="#" class="ui-slider-handle"></a>').appendTo(t).buttonMarkup({corners:true,theme:b,shadow:true}).attr({role:"slider","aria-valuemin":j,"aria-valuemax":o,"aria-valuenow":k(),
|
f.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom")):f.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-top ui-corner-bottom");c.bind("expand collapse",function(d){if(!d.isDefaultPrevented()){d.preventDefault();var i=a(this),d=d.type==="collapse",k=b.contentTheme;f.toggleClass("ui-collapsible-heading-collapsed",d).find(".ui-collapsible-heading-status").text(d?b.expandCueText:b.collapseCueText).end().find(".ui-icon").toggleClass("ui-icon-minus",!d).toggleClass("ui-icon-plus",d);i.toggleClass("ui-collapsible-collapsed",
|
||||||
"aria-valuetext":k(),title:k(),"aria-labelledby":h});a.extend(this,{slider:t,handle:v,dragging:false,beforeStart:null});if(e=="select"){t.wrapInner('<div class="ui-slider-inneroffset"></div>');c.find("option");c.find("option").each(function(m){var r=m==0?"b":"a",n=m==0?"right":"left";m=m==0?" ui-btn-down-"+g:" ui-btn-active";a('<div class="ui-slider-labelbg ui-slider-labelbg-'+r+m+" ui-btn-corner-"+n+'"></div>').prependTo(t);a('<span class="ui-slider-label ui-slider-label-'+r+m+" ui-btn-corner-"+
|
d);e.toggleClass("ui-collapsible-content-collapsed",d).attr("aria-hidden",d);if(k&&(!g.length||c.jqmData("collapsible-last")))f.find("a:eq(0), .ui-btn-inner").toggleClass("ui-corner-bottom",d),e.toggleClass("ui-corner-bottom",!d);e.trigger("updatelayout")}}).trigger(b.collapsed?"collapse":"expand");f.bind("click",function(a){var b=f.is(".ui-collapsible-heading-collapsed")?"expand":"collapse";c.trigger(b);a.preventDefault()})}});a(document).bind("pagecreate create",function(d){a(a.mobile.collapsible.prototype.options.initSelector,
|
||||||
n+'" role="img">'+a(this).text()+"</span>").prependTo(v)})}i.addClass("ui-slider");c.addClass(e=="input"?"ui-slider-input":"ui-slider-switch").change(function(){d.refresh(k(),true)}).keyup(function(){d.refresh(k(),true,true)}).blur(function(){d.refresh(k(),true)});a(document).bind("touchmove mousemove",function(m){if(d.dragging){d.refresh(m);return false}});t.bind("touchstart mousedown",function(m){d.dragging=true;if(e==="select")d.beforeStart=c[0].selectedIndex;d.refresh(m);return false});t.add(document).bind("touchend mouseup",
|
d.target).collapsible()})})(jQuery);(function(a){a.fn.fieldcontain=function(){return this.addClass("ui-field-contain ui-body ui-br")};a(document).bind("pagecreate create",function(d){a(":jqmData(role='fieldcontain')",d.target).fieldcontain()})})(jQuery);
|
||||||
function(){if(d.dragging){d.dragging=false;if(e==="select"){if(d.beforeStart===c[0].selectedIndex)d.refresh(d.beforeStart===0?1:0);var m=k();m=Math.round(m/(o-j)*100);v.addClass("ui-slider-handle-snapping").css("left",m+"%").animationComplete(function(){v.removeClass("ui-slider-handle-snapping")})}return false}});t.insertAfter(c);this.handle.bind("touchstart mousedown",function(){a(this).focus()});this.handle.bind("keydown",function(m){var r=k();if(!d.options.disabled){switch(m.keyCode){case a.mobile.keyCode.HOME:case a.mobile.keyCode.END:case a.mobile.keyCode.PAGE_UP:case a.mobile.keyCode.PAGE_DOWN:case a.mobile.keyCode.UP:case a.mobile.keyCode.RIGHT:case a.mobile.keyCode.DOWN:case a.mobile.keyCode.LEFT:m.preventDefault();
|
(function(a){a.fn.grid=function(d){return this.each(function(){var b=a(this),c=a.extend({grid:null},d),f=b.children(),e={solo:1,a:2,b:3,c:4,d:5},c=c.grid;if(!c)if(f.length<=5)for(var g in e)e[g]===f.length&&(c=g);else c="a";e=e[c];b.addClass("ui-grid-"+c);f.filter(":nth-child("+e+"n+1)").addClass("ui-block-a");e>1&&f.filter(":nth-child("+e+"n+2)").addClass("ui-block-b");e>2&&f.filter(":nth-child(3n+3)").addClass("ui-block-c");e>3&&f.filter(":nth-child(4n+4)").addClass("ui-block-d");e>4&&f.filter(":nth-child(5n+5)").addClass("ui-block-e")})}})(jQuery);
|
||||||
if(!d._keySliding){d._keySliding=true;a(this).addClass("ui-state-active")}}switch(m.keyCode){case a.mobile.keyCode.HOME:d.refresh(j);break;case a.mobile.keyCode.END:d.refresh(o);break;case a.mobile.keyCode.PAGE_UP:case a.mobile.keyCode.UP:case a.mobile.keyCode.RIGHT:d.refresh(r+p);break;case a.mobile.keyCode.PAGE_DOWN:case a.mobile.keyCode.DOWN:case a.mobile.keyCode.LEFT:d.refresh(r-p)}}}).keyup(function(){if(d._keySliding){d._keySliding=false;a(this).removeClass("ui-state-active")}});this.refresh()},
|
(function(a,d){a.widget("mobile.navbar",a.mobile.widget,{options:{iconpos:"top",grid:null,initSelector:":jqmData(role='navbar')"},_create:function(){var b=this.element,c=b.find("a"),f=c.filter(":jqmData(icon)").length?this.options.iconpos:d;b.addClass("ui-navbar").attr("role","navigation").find("ul").grid({grid:this.options.grid});f||b.addClass("ui-navbar-noicons");c.buttonMarkup({corners:false,shadow:false,iconpos:f});b.delegate("a","vclick",function(){c.not(".ui-state-persist").removeClass(a.mobile.activeBtnClass);
|
||||||
refresh:function(d,c,f){if(!this.options.disabled){var b=this.element,g=b[0].nodeName.toLowerCase(),e=g==="input"?parseFloat(b.attr("min")):0,i=g==="input"?parseFloat(b.attr("max")):b.find("option").length-1;if(typeof d==="object"){d=d.originalEvent.touches?d.originalEvent.touches[0]:d;if(!this.dragging||d.pageX<this.slider.offset().left-8||d.pageX>this.slider.offset().left+this.slider.width()+8)return;d=Math.round((d.pageX-this.slider.offset().left)/this.slider.width()*100)}else{if(d==null)d=g===
|
a(this).addClass(a.mobile.activeBtnClass)})}});a(document).bind("pagecreate create",function(b){a(a.mobile.navbar.prototype.options.initSelector,b.target).navbar()})})(jQuery);
|
||||||
"input"?parseFloat(b.val()):b[0].selectedIndex;d=(parseFloat(d)-e)/(i-e)*100}if(!isNaN(d)){if(d<0)d=0;if(d>100)d=100;var h=Math.round(d/100*(i-e))+e;if(h<e)h=e;if(h>i)h=i;this.handle.css("left",d+"%");this.handle.attr({"aria-valuenow":g==="input"?h:b.find("option").eq(h).attr("value"),"aria-valuetext":g==="input"?h:b.find("option").eq(h).text(),title:h});if(g==="select")h===0?this.slider.addClass("ui-slider-switch-a").removeClass("ui-slider-switch-b"):this.slider.addClass("ui-slider-switch-b").removeClass("ui-slider-switch-a");
|
(function(a){var d={};a.widget("mobile.listview",a.mobile.widget,{options:{theme:"c",countTheme:"c",headerTheme:"b",dividerTheme:"b",splitIcon:"arrow-r",splitTheme:"b",inset:false,initSelector:":jqmData(role='listview')"},_create:function(){var a=this;a.element.addClass(function(c,d){return d+" ui-listview "+(a.options.inset?" ui-listview-inset ui-corner-all ui-shadow ":"")});a.refresh(true)},_itemApply:function(b,c){var d=c.find(".ui-li-count");d.length&&c.addClass("ui-li-has-count");d.addClass("ui-btn-up-"+
|
||||||
if(!f){if(g==="input")b.val(h);else b[0].selectedIndex=h;c||b.trigger("change")}}}},enable:function(){this.element.attr("disabled",false);this.slider.removeClass("ui-disabled").attr("aria-disabled",false);return this._setOption("disabled",false)},disable:function(){this.element.attr("disabled",true);this.slider.addClass("ui-disabled").attr("aria-disabled",true);return this._setOption("disabled",true)}})})(jQuery);
|
(b.jqmData("counttheme")||this.options.countTheme)+" ui-btn-corner-all");c.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading").end().find("p, dl").addClass("ui-li-desc").end().find(">img:eq(0), .ui-link-inherit>img:eq(0)").addClass("ui-li-thumb").each(function(){c.addClass(a(this).is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb")}).end().find(".ui-li-aside").each(function(){var b=a(this);b.prependTo(b.parent())})},_removeCorners:function(a,c){a=a.add(a.find(".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb"));
|
||||||
(function(a){a.widget("mobile.collapsible",a.mobile.widget,{options:{expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsed:false,heading:">:header,>legend",theme:null,iconTheme:"d"},_create:function(){var d=this.element,c=this.options,f=d.addClass("ui-collapsible-contain"),b=d.find(c.heading).eq(0),g=f.wrapInner('<div class="ui-collapsible-content"></div>').find(".ui-collapsible-content");d=d.closest('[data-role="collapsible-set"]').addClass("ui-collapsible-set");
|
c==="top"?a.removeClass("ui-corner-top ui-corner-tr ui-corner-tl"):c==="bottom"?a.removeClass("ui-corner-bottom ui-corner-br ui-corner-bl"):a.removeClass("ui-corner-top ui-corner-tr ui-corner-tl ui-corner-bottom ui-corner-br ui-corner-bl")},_refreshCorners:function(a){var c,d;this.options.inset&&(c=this.element.children("li"),d=a?c.not(".ui-screen-hidden"):c.filter(":visible"),this._removeCorners(c),c=d.first().addClass("ui-corner-top"),c.add(c.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-tr").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-tl"),
|
||||||
if(b.is("legend")){b=a('<div role="heading">'+b.html()+"</div>").insertBefore(b);b.next().remove()}b.insertBefore(g);b.addClass("ui-collapsible-heading").append('<span class="ui-collapsible-heading-status"></span>').wrapInner('<a href="#" class="ui-collapsible-heading-toggle"></a>').find("a:eq(0)").buttonMarkup({shadow:!!!d.length,corners:false,iconPos:"left",icon:"plus",theme:c.theme}).find(".ui-icon").removeAttr("class").buttonMarkup({shadow:true,corners:true,iconPos:"notext",icon:"plus",theme:c.iconTheme});
|
d=d.last().addClass("ui-corner-bottom"),d.add(d.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-bl"));a||this.element.trigger("updatelayout")},refresh:function(b){this.parentPage=this.element.closest(".ui-page");this._createSubPages();var c=this.options,d=this.element,e=d.jqmData("dividertheme")||c.dividerTheme,g=d.jqmData("splittheme"),h=d.jqmData("spliticon"),i=d.children("li"),k=a.support.cssPseudoElement||
|
||||||
if(d.length)f.data("collapsible-last")&&b.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom");else b.find("a:eq(0)").addClass("ui-corner-all").find(".ui-btn-inner").addClass("ui-corner-all");f.bind("collapse",function(e){if(!e.isDefaultPrevented()){e.preventDefault();b.addClass("ui-collapsible-heading-collapsed").find(".ui-collapsible-heading-status").text(c.expandCueText);b.find(".ui-icon").removeClass("ui-icon-minus").addClass("ui-icon-plus");g.addClass("ui-collapsible-content-collapsed").attr("aria-hidden",
|
!a.nodeName(d[0],"ol")?0:1,n,o,q,m,j;k&&d.find(".ui-li-dec").remove();for(var p=0,l=i.length;p<l;p++){n=i.eq(p);o="ui-li";if(b||!n.hasClass("ui-li"))q=n.jqmData("theme")||c.theme,m=n.children("a"),m.length?(j=n.jqmData("icon"),n.buttonMarkup({wrapperEls:"div",shadow:false,corners:false,iconpos:"right",icon:m.length>1||j===false?false:j||"arrow-r",theme:q}),j!=false&&m.length==1&&n.addClass("ui-li-has-arrow"),m.first().addClass("ui-link-inherit"),m.length>1&&(o+=" ui-li-has-alt",m=m.last(),j=g||m.jqmData("theme")||
|
||||||
true);f.data("collapsible-last")&&b.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom")}}).bind("expand",function(e){if(!e.isDefaultPrevented()){e.preventDefault();b.removeClass("ui-collapsible-heading-collapsed").find(".ui-collapsible-heading-status").text(c.collapseCueText);b.find(".ui-icon").removeClass("ui-icon-plus").addClass("ui-icon-minus");g.removeClass("ui-collapsible-content-collapsed").attr("aria-hidden",false);f.data("collapsible-last")&&b.find("a:eq(0), .ui-btn-inner").removeClass("ui-corner-bottom")}}).trigger(c.collapsed?
|
c.splitTheme,m.appendTo(n).attr("title",m.getEncodedText()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:false,corners:false,theme:q,icon:false,iconpos:false}).find(".ui-btn-inner").append(a("<span />").buttonMarkup({shadow:true,corners:true,theme:j,iconpos:"notext",icon:h||m.jqmData("icon")||c.splitIcon})))):n.jqmData("role")==="list-divider"?(o+=" ui-li-divider ui-btn ui-bar-"+e,n.attr("role","heading"),k&&(k=1)):o+=" ui-li-static ui-body-"+q;k&&o.indexOf("ui-li-divider")<0&&(q=n.is(".ui-li-static:first")?
|
||||||
"collapse":"expand");if(d.length&&!d.data("collapsiblebound")){d.data("collapsiblebound",true).bind("expand",function(e){a(this).find(".ui-collapsible-contain").not(a(e.target).closest(".ui-collapsible-contain")).not("> .ui-collapsible-contain .ui-collapsible-contain").trigger("collapse")});d=d.find("[data-role=collapsible]");d.first().find("a:eq(0)").addClass("ui-corner-top").find(".ui-btn-inner").addClass("ui-corner-top");d.last().data("collapsible-last",true)}b.bind(a.support.touch?"touchstart":
|
n:n.find(".ui-link-inherit"),q.addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+k++ +". </span>"));n.add(n.children(".ui-btn-inner")).addClass(o);this._itemApply(d,n)}this._refreshCorners(b)},_idStringEscape:function(a){return a.replace(/[^a-zA-Z0-9]/g,"-")},_createSubPages:function(){var b=this.element,c=b.closest(".ui-page"),f=c.jqmData("url"),e=f||c[0][a.expando],g=b.attr("id"),h=this.options,i="data-"+a.mobile.ns,k=this,n=c.find(":jqmData(role='footer')").jqmData("id"),o;typeof d[e]===
|
||||||
"click",function(){b.is(".ui-collapsible-heading-collapsed")?f.trigger("expand"):f.trigger("collapse");return false})}})})(jQuery);
|
"undefined"&&(d[e]=-1);g=g||++d[e];a(b.find("li>ul, li>ol").toArray().reverse()).each(function(c){var d=a(this),e=d.attr("id")||g+"-"+c,c=d.parent(),k=a(d.prevAll().toArray().reverse()),k=k.length?k:a("<span>"+a.trim(c.contents()[0].nodeValue)+"</span>"),l=k.first().getEncodedText(),e=(f||"")+"&"+a.mobile.subPageUrlKey+"="+e,A=d.jqmData("theme")||h.theme,z=d.jqmData("counttheme")||b.jqmData("counttheme")||h.countTheme;o=true;d.detach().wrap("<div "+i+"role='page' "+i+"url='"+e+"' "+i+"theme='"+A+
|
||||||
(function(a){a.fn.controlgroup=function(d){return this.each(function(){function c(e){e.removeClass("ui-btn-corner-all ui-shadow").eq(0).addClass(g[0]).end().filter(":last").addClass(g[1]).addClass("ui-controlgroup-last")}var f=a.extend({direction:a(this).data("type")||"vertical",shadow:false},d),b=a(this).find(">legend"),g=f.direction=="horizontal"?["ui-corner-left","ui-corner-right"]:["ui-corner-top","ui-corner-bottom"];a(this).find("input:eq(0)").attr("type");if(b.length){a(this).wrapInner('<div class="ui-controlgroup-controls"></div>');
|
"' "+i+"count-theme='"+z+"'><div "+i+"role='content'></div></div>").parent().before("<div "+i+"role='header' "+i+"theme='"+h.headerTheme+"'><div class='ui-title'>"+l+"</div></div>").after(n?a("<div "+i+"role='footer' "+i+"id='"+n+"'>"):"").parent().appendTo(a.mobile.pageContainer).page();d=c.find("a:first");d.length||(d=a("<a/>").html(k||l).prependTo(c.empty()));d.attr("href","#"+e)}).listview();o&&c.is(":jqmData(external-page='true')")&&c.data("page").options.domCache===false&&c.unbind("pagehide.remove").bind("pagehide.remove",
|
||||||
a('<div role="heading" class="ui-controlgroup-label">'+b.html()+"</div>").insertBefore(a(this).children(0));b.remove()}a(this).addClass("ui-corner-all ui-controlgroup ui-controlgroup-"+f.direction);c(a(this).find(".ui-btn"));c(a(this).find(".ui-btn-inner"));f.shadow&&a(this).addClass("ui-shadow")})}})(jQuery);(function(a){a.fn.fieldcontain=function(){return this.addClass("ui-field-contain ui-body ui-br")}})(jQuery);
|
function(b,d){var e=d.nextPage;d.nextPage&&(e=e.jqmData("url"),e.indexOf(f+"&"+a.mobile.subPageUrlKey)!==0&&(k.childPages().remove(),c.remove()))})},childPages:function(){var b=this.parentPage.jqmData("url");return a(":jqmData(url^='"+b+"&"+a.mobile.subPageUrlKey+"')")}});a(document).bind("pagecreate create",function(b){a(a.mobile.listview.prototype.options.initSelector,b.target).listview()})})(jQuery);
|
||||||
(function(a){a.widget("mobile.listview",a.mobile.widget,{options:{theme:"c",countTheme:"c",headerTheme:"b",dividerTheme:"b",splitIcon:"arrow-r",splitTheme:"b",inset:false},_create:function(){var d=this.element,c=this.options;d.addClass("ui-listview").attr("role","listbox");c.inset&&d.addClass("ui-listview-inset ui-corner-all ui-shadow");d.delegate(".ui-li","focusin",function(){a(this).attr("tabindex","0")});this._itemApply(d,d);this.refresh(true);d.keydown(function(f){var b=a(f.target),g=b.closest("li");
|
(function(a){a.mobile.listview.prototype.options.filter=false;a.mobile.listview.prototype.options.filterPlaceholder="Filter items...";a.mobile.listview.prototype.options.filterTheme="c";a.mobile.listview.prototype.options.filterCallback=function(a,b){return a.toLowerCase().indexOf(b)===-1};a(":jqmData(role='listview')").live("listviewcreate",function(){var d=a(this),b=d.data("listview");if(b.options.filter){var c=a("<form>",{"class":"ui-listview-filter ui-bar-"+b.options.filterTheme,role:"search"});
|
||||||
switch(f.keyCode){case 38:f=g.prev();if(f.length){b.blur().attr("tabindex","-1");f.find("a").first().focus()}return false;case 40:f=g.next();if(f.length){b.blur().attr("tabindex","-1");f.find("a").first().focus()}return false;case 39:f=g.find("a.ui-li-link-alt");if(f.length){b.blur();f.first().focus()}return false;case 37:f=g.find("a.ui-link-inherit");if(f.length){b.blur();f.first().focus()}return false;case 13:case 32:b.trigger("click");return false}});d.delegate("li","click",function(f){if(!a(f.target).closest("a").length){a(this).find("a").first().trigger("click");
|
a("<input>",{placeholder:b.options.filterPlaceholder}).attr("data-"+a.mobile.ns+"type","search").jqmData("lastval","").bind("keyup change",function(){var c=a(this),e=this.value.toLowerCase(),g=null,g=c.jqmData("lastval")+"",h=false,i="";c.jqmData("lastval",e);i=e.replace(RegExp("^"+g),"");g=e.length<g.length||i.length!=e.length-g.length?d.children():d.children(":not(.ui-screen-hidden)");if(e){for(var k=g.length-1;k>=0;k--)c=a(g[k]),i=c.jqmData("filtertext")||c.text(),c.is("li:jqmData(role=list-divider)")?
|
||||||
return false}})},_itemApply:function(d,c){c.find(".ui-li-count").addClass("ui-btn-up-"+(d.data("counttheme")||this.options.countTheme)+" ui-btn-corner-all");c.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading");c.find("p, dl").addClass("ui-li-desc");c.find("li").find("img:eq(0)").addClass("ui-li-thumb").each(function(){a(this).closest("li").addClass(a(this).is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb")});var f=c.find(".ui-li-aside");f.length&&f.each(function(b,g){a(g).prependTo(a(g).parent())});
|
(c.toggleClass("ui-filter-hidequeue",!h),h=false):b.options.filterCallback(i,e)?c.toggleClass("ui-filter-hidequeue",true):h=true;g.filter(":not(.ui-filter-hidequeue)").toggleClass("ui-screen-hidden",false);g.filter(".ui-filter-hidequeue").toggleClass("ui-screen-hidden",true).toggleClass("ui-filter-hidequeue",false)}else g.toggleClass("ui-screen-hidden",false);b._refreshCorners()}).appendTo(c).textinput();a(this).jqmData("inset")&&c.addClass("ui-listview-filter-inset");c.bind("submit",function(){return false}).insertBefore(d)}})})(jQuery);
|
||||||
a.support.cssPseudoElement||a.nodeName(c[0],"ol")},_removeCorners:function(d){d.add(d.find(".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb")).removeClass("ui-corner-top ui-corner-bottom ui-corner-br ui-corner-bl ui-corner-tr ui-corner-tl")},refresh:function(d){this._createSubPages();var c=this.options,f=this.element,b=this,g=f.data("dividertheme")||c.dividerTheme,e=f.children("li"),i=a.support.cssPseudoElement||!a.nodeName(f[0],"ol")?0:1;i&&f.find(".ui-li-dec").remove();e.attr({role:"option",tabindex:"-1"});
|
(function(a){a(document).bind("pagecreate create",function(d){a(":jqmData(role='nojs')",d.target).addClass("ui-nojs")})})(jQuery);
|
||||||
e.first().attr("tabindex","0");e.each(function(h){var k=a(this),j="ui-li";if(!(!d&&k.hasClass("ui-li"))){var o=k.data("theme")||c.theme,p=k.find("a");if(p.length){var t=k.data("icon");k.buttonMarkup({wrapperEls:"div",shadow:false,corners:false,iconpos:"right",icon:p.length>1||t===false?false:t||"arrow-r",theme:o});p.first().addClass("ui-link-inherit");if(p.length>1){j+=" ui-li-has-alt";p=p.last();t=f.data("splittheme")||p.data("theme")||c.splitTheme;p.appendTo(k).attr("title",p.text()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:false,
|
(function(a,d){a.widget("mobile.checkboxradio",a.mobile.widget,{options:{theme:null,initSelector:"input[type='checkbox'],input[type='radio']"},_create:function(){var b=this,c=this.element,f=c.closest("form,fieldset,:jqmData(role='page')").find("label").filter("[for='"+c[0].id+"']"),e=c.attr("type"),g=e+"-on",h=e+"-off",i=c.parents(":jqmData(type='horizontal')").length?d:h;if(!(e!=="checkbox"&&e!=="radio")){a.extend(this,{label:f,inputtype:e,checkedClass:"ui-"+g+(i?"":" "+a.mobile.activeBtnClass),
|
||||||
corners:false,theme:o,icon:false,iconpos:false}).find(".ui-btn-inner").append(a("<span>").buttonMarkup({shadow:true,corners:true,theme:t,iconpos:"notext",icon:f.data("spliticon")||p.data("icon")||c.splitIcon}))}}else if(k.data("role")==="list-divider"){j+=" ui-li-divider ui-btn ui-bar-"+g;k.attr("role","heading");if(i)i=1}else j+=" ui-li-static ui-btn-up-"+o;if(c.inset){if(h===0){j+=" ui-corner-top";k.add(k.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-tr").end().find(".ui-li-thumb").addClass("ui-corner-tl");
|
uncheckedClass:"ui-"+h,checkedicon:"ui-icon-"+g,uncheckedicon:"ui-icon-"+h});if(!this.options.theme)this.options.theme=this.element.jqmData("theme");f.buttonMarkup({theme:this.options.theme,icon:i,shadow:false});c.add(f).wrapAll("<div class='ui-"+e+"'></div>");f.bind({vmouseover:function(b){a(this).parent().is(".ui-disabled")&&b.stopPropagation()},vclick:function(a){if(c.is(":disabled"))a.preventDefault();else return b._cacheVals(),c.prop("checked",e==="radio"&&true||!c.prop("checked")),b._getInputSet().not(c).prop("checked",
|
||||||
k.next().next().length&&b._removeCorners(k.next())}if(h===e.length-1){j+=" ui-corner-bottom";k.add(k.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").addClass("ui-corner-bl");k.prev().prev().length&&b._removeCorners(k.prev())}}i&&j.indexOf("ui-li-divider")<0&&k.find(".ui-link-inherit").first().addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+i++ +". </span>");k.addClass(j);d||b._itemApply(f,k)}})},_idStringEscape:function(d){return d.replace(/[^a-zA-Z0-9]/g,
|
false),b._updateAll(),false}});c.bind({vmousedown:function(){this._cacheVals()},vclick:function(){var c=a(this);c.is(":checked")?(c.prop("checked",true),b._getInputSet().not(c).prop("checked",false)):c.prop("checked",false);b._updateAll()},focus:function(){f.addClass("ui-focus")},blur:function(){f.removeClass("ui-focus")}});this.refresh()}},_cacheVals:function(){this._getInputSet().each(function(){var b=a(this);b.jqmData("cacheVal",b.is(":checked"))})},_getInputSet:function(){return this.inputtype==
|
||||||
"-")},_createSubPages:function(){var d=this.element,c=d.closest(".ui-page"),f=c.data("url"),b=this.options,g=this,e=c.find("[data-role='footer']").data("id");a(d.find("ul, ol").toArray().reverse()).each(function(i){var h=a(this),k=h.parent(),j=a.trim(k.contents()[0].nodeValue)||k.find("a:first").text();i=f+"&"+a.mobile.subPageUrlKey+"="+g._idStringEscape(j+" "+i);var o=h.data("theme")||b.theme,p=h.data("counttheme")||d.data("counttheme")||b.countTheme;h.wrap("<div data-role='page'><div data-role='content'></div></div>").parent().before("<div data-role='header' data-theme='"+
|
"checkbox"?this.element:this.element.closest("form,fieldset,:jqmData(role='page')").find("input[name='"+this.element.attr("name")+"'][type='"+this.inputtype+"']")},_updateAll:function(){var b=this;this._getInputSet().each(function(){var c=a(this);(c.is(":checked")||b.inputtype==="checkbox")&&c.trigger("change")}).checkboxradio("refresh")},refresh:function(){var b=this.element,c=this.label,d=c.find(".ui-icon");a(b[0]).prop("checked")?(c.addClass(this.checkedClass).removeClass(this.uncheckedClass),
|
||||||
b.headerTheme+"'><div class='ui-title'>"+j+"</div></div>").after(e?a("<div>",{"data-role":"footer","data-id":e,"class":"ui-footer-duplicate"}):"").parent().attr({"data-url":i,"data-theme":o,"data-count-theme":p}).appendTo(a.mobile.pageContainer).page();h=k.find("a:first");h.length||(h=a("<a></a>").html(j).prependTo(k.empty()));h.attr("href","#"+i)}).listview()}})})(jQuery);
|
d.addClass(this.checkedicon).removeClass(this.uncheckedicon)):(c.removeClass(this.checkedClass).addClass(this.uncheckedClass),d.removeClass(this.checkedicon).addClass(this.uncheckedicon));b.is(":disabled")?this.disable():this.enable()},disable:function(){this.element.prop("disabled",true).parent().addClass("ui-disabled")},enable:function(){this.element.prop("disabled",false).parent().removeClass("ui-disabled")}});a(document).bind("pagecreate create",function(b){a.mobile.checkboxradio.prototype.enhanceWithin(b.target)})})(jQuery);
|
||||||
(function(a){a.mobile.listview.prototype.options.filter=false;a("[data-role='listview']").live("listviewcreate",function(){var d=a(this);if(d.data("listview").options.filter){var c=a("<form>",{"class":"ui-listview-filter ui-bar-c",role:"search"});a("<input>",{placeholder:"Filter results...","data-type":"search"}).bind("keyup change",function(){var f=this.value.toLowerCase();d.children().show();f&&d.children().filter(function(){return a(this).text().toLowerCase().indexOf(f)===-1}).hide()}).appendTo(c).textinput();
|
(function(a,d){a.widget("mobile.button",a.mobile.widget,{options:{theme:null,icon:null,iconpos:null,inline:null,corners:true,shadow:true,iconshadow:true,initSelector:"button, [type='button'], [type='submit'], [type='reset'], [type='image']"},_create:function(){var b=this.element,c=this.options,f,e;this.button=a("<div></div>").text(b.text()||b.val()).insertBefore(b).buttonMarkup({theme:c.theme,icon:c.icon,iconpos:c.iconpos,inline:c.inline,corners:c.corners,shadow:c.shadow,iconshadow:c.iconshadow}).append(b.addClass("ui-btn-hidden"));
|
||||||
c.insertBefore(d)}})})(jQuery);
|
c=b.attr("type");f=b.attr("name");c!=="button"&&c!=="reset"&&f&&b.bind("vclick",function(){e===d&&(e=a("<input>",{type:"hidden",name:b.attr("name"),value:b.attr("value")}).insertBefore(b),a(document).submit(function(){e.remove()}))});this.refresh()},enable:function(){this.element.attr("disabled",false);this.button.removeClass("ui-disabled").attr("aria-disabled",false);return this._setOption("disabled",false)},disable:function(){this.element.attr("disabled",true);this.button.addClass("ui-disabled").attr("aria-disabled",
|
||||||
(function(a){a.widget("mobile.dialog",a.mobile.widget,{options:{},_create:function(){this.element.attr("role","dialog").addClass("ui-page ui-dialog ui-body-a").find("[data-role=header]").addClass("ui-corner-top ui-overlay-shadow").prepend('<a href="#" data-icon="delete" data-rel="back" data-iconpos="notext">Close</a>').end().find('.ui-content:not([class*="ui-body-"])').addClass("ui-body-c").end().find(".ui-content,[data-role=footer]").last().addClass("ui-corner-bottom ui-overlay-shadow");this.element.bind("click submit",
|
true);return this._setOption("disabled",true)},refresh:function(){this.element.attr("disabled")?this.disable():this.enable()}});a(document).bind("pagecreate create",function(b){a.mobile.button.prototype.enhanceWithin(b.target)})})(jQuery);
|
||||||
function(d){d=d.type=="click"?a(d.target).closest("a"):a(d.target).closest("form");d.length&&!d.data("transition")&&d.attr("data-transition",a.mobile.urlHistory.getActive().transition).attr("data-direction","reverse")})},close:function(){window.history.back()}})})(jQuery);
|
(function(a,d){a.widget("mobile.slider",a.mobile.widget,{options:{theme:null,trackTheme:null,disabled:false,initSelector:"input[type='range'], :jqmData(type='range'), :jqmData(role='slider')"},_create:function(){var b=this,c=this.element,f=a.mobile.getInheritedTheme(c,"c"),e=this.options.theme||f,g=this.options.trackTheme||f,h=c[0].nodeName.toLowerCase(),f=h=="select"?"ui-slider-switch":"",i=c.attr("id"),k=i+"-label",i=a("[for='"+i+"']").attr("id",k),n=function(){return h=="input"?parseFloat(c.val()):
|
||||||
(function(a,d){a.widget("mobile.navbar",a.mobile.widget,{options:{iconpos:"top",grid:null},_create:function(){var c=this.element,f=c.find("a"),b=f.filter("[data-icon]").length?this.options.iconpos:d;c.addClass("ui-navbar").attr("role","navigation").find("ul").grid({grid:this.options.grid});b||c.addClass("ui-navbar-noicons");f.buttonMarkup({corners:false,shadow:false,iconpos:b});c.delegate("a","click",function(){f.removeClass("ui-btn-active");a(this).addClass("ui-btn-active")})}})})(jQuery);
|
c[0].selectedIndex},o=h=="input"?parseFloat(c.attr("min")):0,q=h=="input"?parseFloat(c.attr("max")):c.find("option").length-1,m=window.parseFloat(c.attr("step")||1),j=a("<div class='ui-slider "+f+" ui-btn-down-"+g+" ui-btn-corner-all' role='application'></div>"),p=a("<a href='#' class='ui-slider-handle'></a>").appendTo(j).buttonMarkup({corners:true,theme:e,shadow:true}).attr({role:"slider","aria-valuemin":o,"aria-valuemax":q,"aria-valuenow":n(),"aria-valuetext":n(),title:n(),"aria-labelledby":k});
|
||||||
(function(a){a.fn.grid=function(d){return this.each(function(){var c=a.extend({grid:null},d),f=a(this).children(),b={a:2,b:3,c:4,d:5};c=c.grid;if(!c)if(f.length<=5)for(var g in b){if(b[g]==f.length)c=g}else c="a";b=b[c];a(this).addClass("ui-grid-"+c);f.filter(":nth-child("+b+"n+1)").addClass("ui-block-a");f.filter(":nth-child("+b+"n+2)").addClass("ui-block-b");b>2&&f.filter(":nth-child(3n+3)").addClass("ui-block-c");b>3&&f.filter(":nth-child(4n+4)").addClass("ui-block-d");b>4&&f.filter(":nth-child(5n+5)").addClass("ui-block-e")})}})(jQuery);
|
a.extend(this,{slider:j,handle:p,dragging:false,beforeStart:null,userModified:false});h=="select"&&(j.wrapInner("<div class='ui-slider-inneroffset'></div>"),c.find("option"),c.find("option").each(function(b){var c=!b?"b":"a",d=!b?"right":"left",b=!b?" ui-btn-down-"+g:" "+a.mobile.activeBtnClass;a("<div class='ui-slider-labelbg ui-slider-labelbg-"+c+b+" ui-btn-corner-"+d+"'></div>").prependTo(j);a("<span class='ui-slider-label ui-slider-label-"+c+b+" ui-btn-corner-"+d+"' role='img'>"+a(this).getEncodedText()+
|
||||||
|
"</span>").prependTo(p)}));i.addClass("ui-slider");c.addClass(h==="input"?"ui-slider-input":"ui-slider-switch").change(function(){b.refresh(n(),true)}).keyup(function(){b.refresh(n(),true,true)}).blur(function(){b.refresh(n(),true)});a(document).bind("vmousemove",function(a){if(b.dragging)return b.refresh(a),b.userModified=b.userModified||b.beforeStart!==c[0].selectedIndex,false});j.bind("vmousedown",function(a){b.dragging=true;b.userModified=false;if(h==="select")b.beforeStart=c[0].selectedIndex;
|
||||||
|
b.refresh(a);return false});j.add(document).bind("vmouseup",function(){if(b.dragging)return b.dragging=false,h==="select"&&!b.userModified&&(p.addClass("ui-slider-handle-snapping"),b.refresh(!b.beforeStart?1:0)),false});j.insertAfter(c);this.handle.bind("vmousedown",function(){a(this).focus()}).bind("vclick",false);this.handle.bind("keydown",function(c){var d=n();if(!b.options.disabled){switch(c.keyCode){case a.mobile.keyCode.HOME:case a.mobile.keyCode.END:case a.mobile.keyCode.PAGE_UP:case a.mobile.keyCode.PAGE_DOWN:case a.mobile.keyCode.UP:case a.mobile.keyCode.RIGHT:case a.mobile.keyCode.DOWN:case a.mobile.keyCode.LEFT:if(c.preventDefault(),
|
||||||
|
!b._keySliding)b._keySliding=true,a(this).addClass("ui-state-active")}switch(c.keyCode){case a.mobile.keyCode.HOME:b.refresh(o);break;case a.mobile.keyCode.END:b.refresh(q);break;case a.mobile.keyCode.PAGE_UP:case a.mobile.keyCode.UP:case a.mobile.keyCode.RIGHT:b.refresh(d+m);break;case a.mobile.keyCode.PAGE_DOWN:case a.mobile.keyCode.DOWN:case a.mobile.keyCode.LEFT:b.refresh(d-m)}}}).keyup(function(){if(b._keySliding)b._keySliding=false,a(this).removeClass("ui-state-active")});this.refresh(d,d,true)},
|
||||||
|
refresh:function(a,c,d){if(this.options.disabled||this.element.attr("disabled"))this.slider.addClass("ui-disabled");else{var e=this.element,g,h=e[0].nodeName.toLowerCase(),i=h==="input"?parseFloat(e.attr("min")):0,k=h==="input"?parseFloat(e.attr("max")):e.find("option").length-1;if(typeof a==="object"){if(!this.dragging||a.pageX<this.slider.offset().left-8||a.pageX>this.slider.offset().left+this.slider.width()+8)return;g=Math.round((a.pageX-this.slider.offset().left)/this.slider.width()*100)}else a==
|
||||||
|
null&&(a=h==="input"?parseFloat(e.val()):e[0].selectedIndex),g=(parseFloat(a)-i)/(k-i)*100;if(!isNaN(g)&&(g<0&&(g=0),g>100&&(g=100),a=Math.round(g/100*(k-i))+i,a<i&&(a=i),a>k&&(a=k),this.handle.css("left",g+"%"),this.handle.attr({"aria-valuenow":h==="input"?a:e.find("option").eq(a).attr("value"),"aria-valuetext":h==="input"?a:e.find("option").eq(a).getEncodedText(),title:a}),h==="select"&&(a===0?this.slider.addClass("ui-slider-switch-a").removeClass("ui-slider-switch-b"):this.slider.addClass("ui-slider-switch-b").removeClass("ui-slider-switch-a")),
|
||||||
|
!d))d=false,h==="input"?(d=e.val()!==a,e.val(a)):(d=e[0].selectedIndex!==a,e[0].selectedIndex=a),!c&&d&&e.trigger("change")}},enable:function(){this.element.attr("disabled",false);this.slider.removeClass("ui-disabled").attr("aria-disabled",false);return this._setOption("disabled",false)},disable:function(){this.element.attr("disabled",true);this.slider.addClass("ui-disabled").attr("aria-disabled",true);return this._setOption("disabled",true)}});a(document).bind("pagecreate create",function(b){a.mobile.slider.prototype.enhanceWithin(b.target)})})(jQuery);
|
||||||
|
(function(a){a.widget("mobile.textinput",a.mobile.widget,{options:{theme:null,initSelector:"input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type])"},_create:function(){var d=this.element,
|
||||||
|
b=this.options.theme,c,f,e;b||(b=a.mobile.getInheritedTheme(this.element,"c"));c=" ui-body-"+b;a("label[for='"+d.attr("id")+"']").addClass("ui-input-text");d.addClass("ui-input-text ui-body-"+b);f=d;typeof d[0].autocorrect!=="undefined"&&!a.support.touchOverflow&&(d[0].setAttribute("autocorrect","off"),d[0].setAttribute("autocomplete","off"));d.is("[type='search'],:jqmData(type='search')")?(f=d.wrap("<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield"+
|
||||||
|
c+"'></div>").parent(),e=a("<a href='#' class='ui-input-clear' title='clear text'>clear text</a>").tap(function(a){d.val("").focus();d.trigger("change");e.addClass("ui-input-clear-hidden");a.preventDefault()}).appendTo(f).buttonMarkup({icon:"delete",iconpos:"notext",corners:true,shadow:true}),b=function(){d.val()?e.removeClass("ui-input-clear-hidden"):e.addClass("ui-input-clear-hidden")},b(),d.keyup(b).focus(b)):d.addClass("ui-corner-all ui-shadow-inset"+c);d.focus(function(){f.addClass("ui-focus")}).blur(function(){f.removeClass("ui-focus")});
|
||||||
|
if(d.is("textarea")){var g=function(){var a=d[0].scrollHeight;d[0].clientHeight<a&&d.css({height:a+15})},h;d.keyup(function(){clearTimeout(h);h=setTimeout(g,100)});a.trim(d.text())&&a(g)}},disable:function(){(this.element.attr("disabled",true).is("[type='search'],:jqmData(type='search')")?this.element.parent():this.element).addClass("ui-disabled")},enable:function(){(this.element.attr("disabled",false).is("[type='search'],:jqmData(type='search')")?this.element.parent():this.element).removeClass("ui-disabled")}});
|
||||||
|
a(document).bind("pagecreate create",function(d){a.mobile.textinput.prototype.enhanceWithin(d.target)})})(jQuery);
|
||||||
|
(function(a){var d=function(b){var c=b.selectID,d=b.label,e=b.select.closest(".ui-page"),g=a("<div>",{"class":"ui-selectmenu-screen ui-screen-hidden"}).appendTo(e),h=b._selectOptions(),i=b.isMultiple=b.select[0].multiple,k=c+"-button",n=c+"-menu",o=a("<div data-"+a.mobile.ns+"role='dialog' data-"+a.mobile.ns+"theme='"+b.options.menuPageTheme+"'><div data-"+a.mobile.ns+"role='header'><div class='ui-title'>"+d.getEncodedText()+"</div></div><div data-"+a.mobile.ns+"role='content'></div></div>").appendTo(a.mobile.pageContainer).page(),
|
||||||
|
q=a("<div>",{"class":"ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-body-"+b.options.overlayTheme+" "+a.mobile.defaultDialogTransition}).insertAfter(g),m=a("<ul>",{"class":"ui-selectmenu-list",id:n,role:"listbox","aria-labelledby":k}).attr("data-"+a.mobile.ns+"theme",b.options.theme).appendTo(q),j=a("<div>",{"class":"ui-header ui-bar-"+b.options.theme}).prependTo(q),p=a("<h1>",{"class":"ui-title"}).appendTo(j),l=a("<a>",{text:b.options.closeText,href:"#","class":"ui-btn-left"}).attr("data-"+
|
||||||
|
a.mobile.ns+"iconpos","notext").attr("data-"+a.mobile.ns+"icon","delete").appendTo(j).buttonMarkup(),A=o.find(".ui-content"),z=o.find(".ui-header a");a.extend(b,{select:b.select,selectID:c,buttonId:k,menuId:n,thisPage:e,menuPage:o,label:d,screen:g,selectOptions:h,isMultiple:i,theme:b.options.theme,listbox:q,list:m,header:j,headerTitle:p,headerClose:l,menuPageContent:A,menuPageClose:z,placeholder:"",build:function(){var b=this;b.refresh();b.select.attr("tabindex","-1").focus(function(){a(this).blur();
|
||||||
|
b.button.focus()});b.button.bind("vclick keydown",function(c){if(c.type=="vclick"||c.keyCode&&(c.keyCode===a.mobile.keyCode.ENTER||c.keyCode===a.mobile.keyCode.SPACE))b.open(),c.preventDefault()});b.list.attr("role","listbox").delegate(".ui-li>a","focusin",function(){a(this).attr("tabindex","0")}).delegate(".ui-li>a","focusout",function(){a(this).attr("tabindex","-1")}).delegate("li:not(.ui-disabled, .ui-li-divider)","click",function(c){var d=b.select[0].selectedIndex,f=b.list.find("li:not(.ui-li-divider)").index(this),
|
||||||
|
e=b._selectOptions().eq(f)[0];e.selected=b.isMultiple?!e.selected:true;b.isMultiple&&a(this).find(".ui-icon").toggleClass("ui-icon-checkbox-on",e.selected).toggleClass("ui-icon-checkbox-off",!e.selected);(b.isMultiple||d!==f)&&b.select.trigger("change");b.isMultiple||b.close();c.preventDefault()}).keydown(function(b){var c=a(b.target),d=c.closest("li");switch(b.keyCode){case 38:return b=d.prev(),b.length&&(c.blur().attr("tabindex","-1"),b.find("a").first().focus()),false;case 40:return b=d.next(),
|
||||||
|
b.length&&(c.blur().attr("tabindex","-1"),b.find("a").first().focus()),false;case 13:case 32:return c.trigger("click"),false}});b.menuPage.bind("pagehide",function(){b.list.appendTo(b.listbox);b._focusButton();a.mobile._bindPageRemove.call(b.thisPage)});b.screen.bind("vclick",function(){b.close()});b.headerClose.click(function(){if(b.menuType=="overlay")return b.close(),false});b.thisPage.addDependents(this.menuPage)},_isRebuildRequired:function(){var a=this.list.find("li");return this._selectOptions().text()!==
|
||||||
|
a.text()},refresh:function(b){var c=this;this._selectOptions();this.selected();var d=this.selectedIndices();(b||this._isRebuildRequired())&&c._buildList();c.setButtonText();c.setButtonCount();c.list.find("li:not(.ui-li-divider)").removeClass(a.mobile.activeBtnClass).attr("aria-selected",false).each(function(b){a.inArray(b,d)>-1&&(b=a(this),b.attr("aria-selected",true),c.isMultiple?b.find(".ui-icon").removeClass("ui-icon-checkbox-off").addClass("ui-icon-checkbox-on"):b.addClass(a.mobile.activeBtnClass))})},
|
||||||
|
close:function(){if(!this.options.disabled&&this.isOpen)this.menuType=="page"?window.history.back():(this.screen.addClass("ui-screen-hidden"),this.listbox.addClass("ui-selectmenu-hidden").removeAttr("style").removeClass("in"),this.list.appendTo(this.listbox),this._focusButton()),this.isOpen=false},open:function(){if(!this.options.disabled){var b=this,c=b.list.parent().outerHeight(),d=b.list.parent().outerWidth(),f=a(".ui-page-active"),e=a.support.touchOverflow&&a.mobile.touchOverflowEnabled,f=f.is(".ui-native-fixed")?
|
||||||
|
f.find(".ui-content"):f;scrollTop=e?f.scrollTop():a(window).scrollTop();btnOffset=b.button.offset().top;screenHeight=window.innerHeight;screenWidth=window.innerWidth;b.button.addClass(a.mobile.activeBtnClass);setTimeout(function(){b.button.removeClass(a.mobile.activeBtnClass)},300);if(c>screenHeight-80||!a.support.scrollTop){b.thisPage.unbind("pagehide.remove");if(scrollTop==0&&btnOffset>screenHeight)b.thisPage.one("pagehide",function(){a(this).jqmData("lastScroll",btnOffset)});b.menuPage.one("pageshow",
|
||||||
|
function(){a(window).one("silentscroll",function(){b.list.find(a.mobile.activeBtnClass).focus()});b.isOpen=true});b.menuType="page";b.menuPageContent.append(b.list);b.menuPage.find("div .ui-title").text(b.label.text());a.mobile.changePage(b.menuPage,{transition:a.mobile.defaultDialogTransition})}else{b.menuType="overlay";b.screen.height(a(document).height()).removeClass("ui-screen-hidden");var f=btnOffset-scrollTop,g=scrollTop+screenHeight-btnOffset,h=c/2,e=parseFloat(b.list.parent().css("max-width")),
|
||||||
|
c=f>c/2&&g>c/2?btnOffset+b.button.outerHeight()/2-h:f>g?scrollTop+screenHeight-c-30:scrollTop+30;d<e?e=(screenWidth-d)/2:(e=b.button.offset().left+b.button.outerWidth()/2-d/2,e<30?e=30:e+d>screenWidth&&(e=screenWidth-d-30));b.listbox.append(b.list).removeClass("ui-selectmenu-hidden").css({top:c,left:e}).addClass("in");b.list.find(a.mobile.activeBtnClass).focus();b.isOpen=true}}},_buildList:function(){var b=this,c=this.options,d=this.placeholder,f=[],e=[],g=b.isMultiple?"checkbox-off":"false";b.list.empty().filter(".ui-listview").listview("destroy");
|
||||||
|
b.select.find("option").each(function(h){var j=a(this),i=j.parent(),m=j.getEncodedText(),q="<a href='#'>"+m+"</a>",l=[],k=[];i.is("optgroup")&&(i=i.attr("label"),a.inArray(i,f)===-1&&(e.push("<li data-"+a.mobile.ns+"role='list-divider'>"+i+"</li>"),f.push(i)));if(!this.getAttribute("value")||m.length==0||j.jqmData("placeholder"))c.hidePlaceholderMenuItems&&l.push("ui-selectmenu-placeholder"),d=b.placeholder=m;this.disabled&&(l.push("ui-disabled"),k.push("aria-disabled='true'"));e.push("<li data-"+
|
||||||
|
a.mobile.ns+"option-index='"+h+"' data-"+a.mobile.ns+"icon='"+g+"' class='"+l.join(" ")+"' "+k.join(" ")+">"+q+"</li>")});b.list.html(e.join(" "));b.list.find("li").attr({role:"option",tabindex:"-1"}).first().attr("tabindex","0");this.isMultiple||this.headerClose.hide();!this.isMultiple&&!d.length?this.header.hide():this.headerTitle.text(this.placeholder);b.list.listview()},_button:function(){return a("<a>",{href:"#",role:"button",id:this.buttonId,"aria-haspopup":"true","aria-owns":this.menuId})}})};
|
||||||
|
a("select").live("selectmenubeforecreate",function(){var b=a(this).data("selectmenu");b.options.nativeMenu||d(b)})})(jQuery);
|
||||||
|
(function(a){a.widget("mobile.selectmenu",a.mobile.widget,{options:{theme:null,disabled:false,icon:"arrow-d",iconpos:"right",inline:null,corners:true,shadow:true,iconshadow:true,menuPageTheme:"b",overlayTheme:"a",hidePlaceholderMenuItems:true,closeText:"Close",nativeMenu:true,initSelector:"select:not(:jqmData(role='slider'))"},_button:function(){return a("<div/>")},_setDisabled:function(a){this.element.attr("disabled",a);this.button.attr("aria-disabled",a);return this._setOption("disabled",a)},_focusButton:function(){var a=
|
||||||
|
this;setTimeout(function(){a.button.focus()},40)},_selectOptions:function(){return this.select.find("option")},_preExtension:function(){this.select=this.element.wrap("<div class='ui-select'>");this.selectID=this.select.attr("id");this.label=a("label[for='"+this.selectID+"']").addClass("ui-select");this.isMultiple=this.select[0].multiple;if(!this.options.theme)this.options.theme=a.mobile.getInheritedTheme(this.select,"c")},_create:function(){this._preExtension();this._trigger("beforeCreate");this.button=
|
||||||
|
this._button();var d=this,b=this.options,c=this.button.text(a(this.select[0].options.item(this.select[0].selectedIndex==-1?0:this.select[0].selectedIndex)).text()).insertBefore(this.select).buttonMarkup({theme:b.theme,icon:b.icon,iconpos:b.iconpos,inline:b.inline,corners:b.corners,shadow:b.shadow,iconshadow:b.iconshadow});b.nativeMenu&&window.opera&&window.opera.version&&this.select.addClass("ui-select-nativeonly");if(this.isMultiple)this.buttonCount=a("<span>").addClass("ui-li-count ui-btn-up-c ui-btn-corner-all").hide().appendTo(c.addClass("ui-li-has-count"));
|
||||||
|
(b.disabled||this.element.attr("disabled"))&&this.disable();this.select.change(function(){d.refresh()});this.build()},build:function(){var d=this;this.select.appendTo(d.button).bind("vmousedown",function(){d.button.addClass(a.mobile.activeBtnClass)}).bind("focus vmouseover",function(){d.button.trigger("vmouseover")}).bind("vmousemove",function(){d.button.removeClass(a.mobile.activeBtnClass)}).bind("change blur vmouseout",function(){d.button.trigger("vmouseout").removeClass(a.mobile.activeBtnClass)}).bind("change blur",
|
||||||
|
function(){d.button.removeClass("ui-btn-down-"+d.options.theme)})},selected:function(){return this._selectOptions().filter(":selected")},selectedIndices:function(){var a=this;return this.selected().map(function(){return a._selectOptions().index(this)}).get()},setButtonText:function(){var d=this,b=this.selected();this.button.find(".ui-btn-text").text(function(){return!d.isMultiple?b.text():b.length?b.map(function(){return a(this).text()}).get().join(", "):d.placeholder})},setButtonCount:function(){var a=
|
||||||
|
this.selected();this.isMultiple&&this.buttonCount[a.length>1?"show":"hide"]().text(a.length)},refresh:function(){this.setButtonText();this.setButtonCount()},open:a.noop,close:a.noop,disable:function(){this._setDisabled(true);this.button.addClass("ui-disabled")},enable:function(){this._setDisabled(false);this.button.removeClass("ui-disabled")}});a(document).bind("pagecreate create",function(d){a.mobile.selectmenu.prototype.enhanceWithin(d.target)})})(jQuery);
|
||||||
|
(function(a){function d(b){for(;b;){var d=a(b);if(d.hasClass("ui-btn")&&!d.hasClass("ui-disabled"))break;b=b.parentNode}return b}a.fn.buttonMarkup=function(c){return this.each(function(){var d=a(this),e=a.extend({},a.fn.buttonMarkup.defaults,{icon:d.jqmData("icon"),iconpos:d.jqmData("iconpos"),theme:d.jqmData("theme"),inline:d.jqmData("inline"),shadow:d.jqmData("shadow"),corners:d.jqmData("corners"),iconshadow:d.jqmData("iconshadow")},c),g="ui-btn-inner",h,i;b&&b();if(!e.theme)e.theme=a.mobile.getInheritedTheme(d,
|
||||||
|
"c");h="ui-btn ui-btn-up-"+e.theme;e.inline&&(h+=" ui-btn-inline");if(e.icon)e.icon="ui-icon-"+e.icon,e.iconpos=e.iconpos||"left",i="ui-icon "+e.icon,e.iconshadow&&(i+=" ui-icon-shadow");e.iconpos&&(h+=" ui-btn-icon-"+e.iconpos,e.iconpos=="notext"&&!d.attr("title")&&d.attr("title",d.getEncodedText()));e.corners&&(h+=" ui-btn-corner-all",g+=" ui-btn-corner-all");e.shadow&&(h+=" ui-shadow");d.attr("data-"+a.mobile.ns+"theme",e.theme).addClass(h);e=("<D class='"+g+"' aria-hidden='true'><D class='ui-btn-text'></D>"+
|
||||||
|
(e.icon?"<span class='"+i+"'></span>":"")+"</D>").replace(/D/g,e.wrapperEls);d.wrapInner(e)})};a.fn.buttonMarkup.defaults={corners:true,shadow:true,iconshadow:true,inline:false,wrapperEls:"span"};var b=function(){a(document).bind({vmousedown:function(b){var b=d(b.target),f;b&&(b=a(b),f=b.attr("data-"+a.mobile.ns+"theme"),b.removeClass("ui-btn-up-"+f).addClass("ui-btn-down-"+f))},"vmousecancel vmouseup":function(b){var b=d(b.target),f;b&&(b=a(b),f=b.attr("data-"+a.mobile.ns+"theme"),b.removeClass("ui-btn-down-"+
|
||||||
|
f).addClass("ui-btn-up-"+f))},"vmouseover focus":function(b){var b=d(b.target),f;b&&(b=a(b),f=b.attr("data-"+a.mobile.ns+"theme"),b.removeClass("ui-btn-up-"+f).addClass("ui-btn-hover-"+f))},"vmouseout blur":function(b){var b=d(b.target),f;b&&(b=a(b),f=b.attr("data-"+a.mobile.ns+"theme"),b.removeClass("ui-btn-hover-"+f).addClass("ui-btn-up-"+f))}});b=null};a(document).bind("pagecreate create",function(b){a(":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a",
|
||||||
|
b.target).not(".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')").buttonMarkup()})})(jQuery);
|
||||||
|
(function(a){a.fn.controlgroup=function(d){return this.each(function(){function b(a){a.removeClass("ui-btn-corner-all ui-shadow").eq(0).addClass(g[0]).end().filter(":last").addClass(g[1]).addClass("ui-controlgroup-last")}var c=a(this),f=a.extend({direction:c.jqmData("type")||"vertical",shadow:false,excludeInvisible:true},d),e=c.find(">legend"),g=f.direction=="horizontal"?["ui-corner-left","ui-corner-right"]:["ui-corner-top","ui-corner-bottom"];c.find("input:eq(0)").attr("type");e.length&&(c.wrapInner("<div class='ui-controlgroup-controls'></div>"),
|
||||||
|
a("<div role='heading' class='ui-controlgroup-label'>"+e.html()+"</div>").insertBefore(c.children(0)),e.remove());c.addClass("ui-corner-all ui-controlgroup ui-controlgroup-"+f.direction);b(c.find(".ui-btn"+(f.excludeInvisible?":visible":"")));b(c.find(".ui-btn-inner"));f.shadow&&c.addClass("ui-shadow")})};a(document).bind("pagecreate create",function(d){a(":jqmData(role='controlgroup')",d.target).controlgroup({excludeInvisible:false})})})(jQuery);
|
||||||
|
(function(a){a(document).bind("pagecreate create",function(d){a(d.target).find("a").not(".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')").addClass("ui-link")})})(jQuery);
|
||||||
|
(function(a,d){a.fn.fixHeaderFooter=function(){return!a.support.scrollTop||a.support.touchOverflow&&a.mobile.touchOverflowEnabled?this:this.each(function(){var b=a(this);b.jqmData("fullscreen")&&b.addClass("ui-page-fullscreen");b.find(".ui-header:jqmData(position='fixed')").addClass("ui-header-fixed ui-fixed-inline fade");b.find(".ui-footer:jqmData(position='fixed')").addClass("ui-footer-fixed ui-fixed-inline fade")})};a.mobile.fixedToolbars=function(){function b(){!i&&h==="overlay"&&(g||a.mobile.fixedToolbars.hide(true),
|
||||||
|
a.mobile.fixedToolbars.startShowTimer())}function c(a){var b=0,c,d;if(a){d=document.body;c=a.offsetParent;for(b=a.offsetTop;a&&a!=d;){b+=a.scrollTop||0;if(a==c)b+=c.offsetTop,c=a.offsetParent;a=a.parentNode}}return b}function f(b){var d=a(window).scrollTop(),e=c(b[0]),f=b.css("top")=="auto"?0:parseFloat(b.css("top")),g=window.innerHeight,h=b.outerHeight(),i=b.parents(".ui-page:not(.ui-page-fullscreen)").length;return b.is(".ui-header-fixed")?(f=d-e+f,f<e&&(f=0),b.css("top",i?f:d)):b.css("top",i?d+
|
||||||
|
g-h-(e-f):d+g-h)}if(a.support.scrollTop&&(!a.support.touchOverflow||!a.mobile.touchOverflowEnabled)){var e,g,h="inline",i=false,k=null,n=false,o=true;a(function(){var c=a(document),d=a(window);c.bind("vmousedown",function(){o&&(k=h)}).bind("vclick",function(b){o&&!a(b.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length&&!n&&(a.mobile.fixedToolbars.toggle(k),k=null)}).bind("silentscroll",b);(c.scrollTop()===0?d:c).bind("scrollstart",function(){n=true;k===
|
||||||
|
null&&(k=h);var b=k=="overlay";if(i=b||!!g)a.mobile.fixedToolbars.clearShowTimer(),b&&a.mobile.fixedToolbars.hide(true)}).bind("scrollstop",function(b){a(b.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length||(n=false,i&&(a.mobile.fixedToolbars.startShowTimer(),i=false),k=null)});d.bind("resize updatelayout",b)});a(".ui-page").live("pagebeforeshow",function(b,c){var d=a(b.target).find(":jqmData(role='footer')"),g=d.data("id"),h=c.prevPage,h=h&&h.find(":jqmData(role='footer')"),
|
||||||
|
h=h.length&&h.jqmData("id")===g;g&&h&&(e=d,f(e.removeClass("fade in out").appendTo(a.mobile.pageContainer)))}).live("pageshow",function(){var b=a(this);e&&e.length&&setTimeout(function(){f(e.appendTo(b).addClass("fade"));e=null},500);a.mobile.fixedToolbars.show(true,this)});a(".ui-collapsible-contain").live("collapse expand",b);return{show:function(b,d){a.mobile.fixedToolbars.clearShowTimer();h="overlay";return(d?a(d):a.mobile.activePage?a.mobile.activePage:a(".ui-page-active")).children(".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last").each(function(){var d=
|
||||||
|
a(this),e=a(window).scrollTop(),g=c(d[0]),h=window.innerHeight,i=d.outerHeight(),e=d.is(".ui-header-fixed")&&e<=g+i||d.is(".ui-footer-fixed")&&g<=e+h;d.addClass("ui-fixed-overlay").removeClass("ui-fixed-inline");!e&&!b&&d.animationComplete(function(){d.removeClass("in")}).addClass("in");f(d)})},hide:function(b){h="inline";return(a.mobile.activePage?a.mobile.activePage:a(".ui-page-active")).children(".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last").each(function(){var c=a(this),
|
||||||
|
d=c.css("top"),d=d=="auto"?0:parseFloat(d);c.addClass("ui-fixed-inline").removeClass("ui-fixed-overlay");if(d<0||c.is(".ui-header-fixed")&&d!==0)b?c.css("top",0):c.css("top")!=="auto"&&parseFloat(c.css("top"))!==0&&c.animationComplete(function(){c.removeClass("out reverse").css("top",0)}).addClass("out reverse")})},startShowTimer:function(){a.mobile.fixedToolbars.clearShowTimer();var b=[].slice.call(arguments);g=setTimeout(function(){g=d;a.mobile.fixedToolbars.show.apply(null,b)},100)},clearShowTimer:function(){g&&
|
||||||
|
clearTimeout(g);g=d},toggle:function(b){b&&(h=b);return h==="overlay"?a.mobile.fixedToolbars.hide():a.mobile.fixedToolbars.show()},setTouchToggleEnabled:function(a){o=a}}}}();a(document).bind("pagecreate create",function(b){a(":jqmData(position='fixed')",b.target).length&&a(b.target).each(function(){if(!a.support.scrollTop||a.support.touchOverflow&&a.mobile.touchOverflowEnabled)return this;var b=a(this);b.jqmData("fullscreen")&&b.addClass("ui-page-fullscreen");b.find(".ui-header:jqmData(position='fixed')").addClass("ui-header-fixed ui-fixed-inline fade");
|
||||||
|
b.find(".ui-footer:jqmData(position='fixed')").addClass("ui-footer-fixed ui-fixed-inline fade")})})})(jQuery);
|
||||||
|
(function(a){a.mobile.touchOverflowEnabled=false;a.mobile.touchOverflowZoomEnabled=false;a(document).bind("pagecreate",function(d){a.support.touchOverflow&&a.mobile.touchOverflowEnabled&&(d=a(d.target),d.is(":jqmData(role='page')")&&d.each(function(){var b=a(this),c=b.find(":jqmData(role='header'), :jqmData(role='footer')").filter(":jqmData(position='fixed')"),d=b.jqmData("fullscreen"),e=c.length?b.find(".ui-content"):b;b.addClass("ui-mobile-touch-overflow");e.bind("scrollstop",function(){e.scrollTop()>
|
||||||
|
0&&window.scrollTo(0,a.mobile.defaultHomeScroll)});c.length&&(b.addClass("ui-native-fixed"),d&&(b.addClass("ui-native-fullscreen"),c.addClass("fade in"),a(document).bind("vclick",function(){c.removeClass("ui-native-bars-hidden").toggleClass("in out").animationComplete(function(){a(this).not(".in").addClass("ui-native-bars-hidden")})})))}))})})(jQuery);
|
||||||
|
(function(a,d){function b(){var b=a("meta[name='viewport']");b.length?b.attr("content",b.attr("content")+", user-scalable=no"):a("head").prepend("<meta>",{name:"viewport",content:"user-scalable=no"})}var c=a("html");a("head");var f=a(d);a(d.document).trigger("mobileinit");if(a.mobile.gradeA()){if(a.mobile.ajaxBlacklist)a.mobile.ajaxEnabled=false;c.addClass("ui-mobile ui-mobile-rendering");var e=a("<div class='ui-loader ui-body-a ui-corner-all'><span class='ui-icon ui-icon-loading spin'></span><h1></h1></div>");
|
||||||
|
a.extend(a.mobile,{showPageLoadingMsg:function(){if(a.mobile.loadingMessage){var b=a("."+a.mobile.activeBtnClass).first();e.find("h1").text(a.mobile.loadingMessage).end().appendTo(a.mobile.pageContainer).css({top:a.support.scrollTop&&f.scrollTop()+f.height()/2||b.length&&b.offset().top||100})}c.addClass("ui-loading")},hidePageLoadingMsg:function(){c.removeClass("ui-loading")},initializePage:function(){var b=a(":jqmData(role='page')");b.length||(b=a("body").wrapInner("<div data-"+a.mobile.ns+"role='page'></div>").children(0));
|
||||||
|
b.add(":jqmData(role='dialog')").each(function(){var b=a(this);b.jqmData("url")||b.attr("data-"+a.mobile.ns+"url",b.attr("id")||location.pathname+location.search)});a.mobile.firstPage=b.first();a.mobile.pageContainer=b.first().parent().addClass("ui-mobile-viewport");f.trigger("pagecontainercreate");a.mobile.showPageLoadingMsg();!a.mobile.hashListeningEnabled||!a.mobile.path.stripHash(location.hash)?a.mobile.changePage(a.mobile.firstPage,{transition:"none",reverse:true,changeHash:false,fromHashChange:true}):
|
||||||
|
f.trigger("hashchange",[true])}});a.support.touchOverflow&&a.mobile.touchOverflowEnabled&&!a.mobile.touchOverflowZoomEnabled&&b();a.mobile._registerInternalEvents();a(function(){d.scrollTo(0,1);a.mobile.defaultHomeScroll=!a.support.scrollTop||a(d).scrollTop()===1?0:1;a.mobile.autoInitializePage&&a.mobile.initializePage();f.load(a.mobile.silentScroll)})}})(jQuery,this);
|
||||||
|
@ -52,6 +52,7 @@ window.OpenLP = {
|
|||||||
select.selectmenu("refresh");
|
select.selectmenu("refresh");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
loadService: function (event) {
|
loadService: function (event) {
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
@ -69,6 +70,7 @@ window.OpenLP = {
|
|||||||
ul.listview("refresh");
|
ul.listview("refresh");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
loadController: function (event) {
|
loadController: function (event) {
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
@ -92,6 +94,7 @@ window.OpenLP = {
|
|||||||
ul.listview("refresh");
|
ul.listview("refresh");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
setItem: function (event) {
|
setItem: function (event) {
|
||||||
var item = OpenLP.getElement(event);
|
var item = OpenLP.getElement(event);
|
||||||
@ -101,6 +104,7 @@ window.OpenLP = {
|
|||||||
"/api/service/set",
|
"/api/service/set",
|
||||||
{"data": text},
|
{"data": text},
|
||||||
function (data, status) {
|
function (data, status) {
|
||||||
|
$.mobile.changePage("#slide-controller");
|
||||||
$("#service-manager > div[data-role=content] ul[data-role=listview] li").attr("data-theme", "c").removeClass("ui-btn-up-e").addClass("ui-btn-up-c");
|
$("#service-manager > div[data-role=content] ul[data-role=listview] li").attr("data-theme", "c").removeClass("ui-btn-up-e").addClass("ui-btn-up-c");
|
||||||
while (item[0].tagName != "LI") {
|
while (item[0].tagName != "LI") {
|
||||||
item = item.parent();
|
item = item.parent();
|
||||||
@ -109,6 +113,7 @@ window.OpenLP = {
|
|||||||
$("#service-manager > div[data-role=content] ul[data-role=listview]").listview("refresh");
|
$("#service-manager > div[data-role=content] ul[data-role=listview]").listview("refresh");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
setSlide: function (event) {
|
setSlide: function (event) {
|
||||||
var slide = OpenLP.getElement(event);
|
var slide = OpenLP.getElement(event);
|
||||||
@ -126,6 +131,7 @@ window.OpenLP = {
|
|||||||
$("#slide-controller div[data-role=content] ul[data-role=listview]").listview("refresh");
|
$("#slide-controller div[data-role=content] ul[data-role=listview]").listview("refresh");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
pollServer: function () {
|
pollServer: function () {
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
@ -207,7 +213,7 @@ window.OpenLP = {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
search: function (event) {
|
search: function (event) {
|
||||||
var text = JSON.stringify({"request": {"text": $("#search-text").val()}});
|
var text = "{\"request\": {\"text\": \"" + $("#search-text").val() + "\"}}";
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
"/api/" + $("#search-plugin").val() + "/search",
|
"/api/" + $("#search-plugin").val() + "/search",
|
||||||
{"data": text},
|
{"data": text},
|
||||||
@ -235,10 +241,11 @@ window.OpenLP = {
|
|||||||
var element = OpenLP.getElement(event);
|
var element = OpenLP.getElement(event);
|
||||||
console.log(element);
|
console.log(element);
|
||||||
$("#selected-item").val(element.attr("value"));
|
$("#selected-item").val(element.attr("value"));
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
goLive: function (event) {
|
goLive: function (event) {
|
||||||
var id = $("#selected-item").val();
|
var id = $("#selected-item").val();
|
||||||
var text = JSON.stringify({"request": {"id": id}});
|
var text = "{\"request\": {\"id\": " + id + "}}";
|
||||||
$.getJSON(
|
$.getJSON(
|
||||||
"/api/" + $("#search-plugin").val() + "/live",
|
"/api/" + $("#search-plugin").val() + "/live",
|
||||||
{"data": text}
|
{"data": text}
|
||||||
@ -263,17 +270,17 @@ window.OpenLP = {
|
|||||||
// Service Manager
|
// Service Manager
|
||||||
$("#service-manager").live("pagebeforeshow", OpenLP.loadService);
|
$("#service-manager").live("pagebeforeshow", OpenLP.loadService);
|
||||||
$("#service-refresh").live("click", OpenLP.loadService);
|
$("#service-refresh").live("click", OpenLP.loadService);
|
||||||
$("#service-next").live("click", OpenLP.nextItem);
|
$("#service-top-next, #service-btm-next").live("click", OpenLP.nextItem);
|
||||||
$("#service-previous").live("click", OpenLP.previousItem);
|
$("#service-top-previous, #service-btm-previous").live("click", OpenLP.previousItem);
|
||||||
$("#service-blank").live("click", OpenLP.blankDisplay);
|
$("#service-top-blank, #service-btm-blank").live("click", OpenLP.blankDisplay);
|
||||||
$("#service-unblank").live("click", OpenLP.unblankDisplay);
|
$("#service-top-unblank, #service-btm-unblank").live("click", OpenLP.unblankDisplay);
|
||||||
// Slide Controller
|
// Slide Controller
|
||||||
$("#slide-controller").live("pagebeforeshow", OpenLP.loadController);
|
$("#slide-controller").live("pagebeforeshow", OpenLP.loadController);
|
||||||
$("#controller-refresh").live("click", OpenLP.loadController);
|
$("#controller-refresh").live("click", OpenLP.loadController);
|
||||||
$("#controller-next").live("click", OpenLP.nextSlide);
|
$("#controller-top-next, #controller-btm-next").live("click", OpenLP.nextSlide);
|
||||||
$("#controller-previous").live("click", OpenLP.previousSlide);
|
$("#controller-top-previous, #controller-btm-previous").live("click", OpenLP.previousSlide);
|
||||||
$("#controller-blank").live("click", OpenLP.blankDisplay);
|
$("#controller-top-blank, #controller-btm-blank").live("click", OpenLP.blankDisplay);
|
||||||
$("#controller-unblank").live("click", OpenLP.unblankDisplay);
|
$("#controller-top-unblank, #controller-btm-unblank").live("click", OpenLP.unblankDisplay);
|
||||||
// Alerts
|
// Alerts
|
||||||
$("#alert-submit").live("click", OpenLP.showAlert);
|
$("#alert-submit").live("click", OpenLP.showAlert);
|
||||||
// Search
|
// Search
|
||||||
|
@ -30,10 +30,11 @@ window.OpenLP = {
|
|||||||
$("#notes").html("");
|
$("#notes").html("");
|
||||||
for (idx in data.results.items) {
|
for (idx in data.results.items) {
|
||||||
idx = parseInt(idx, 10);
|
idx = parseInt(idx, 10);
|
||||||
if ((data.results.items[idx]["selected"]) &&
|
if (data.results.items[idx]["selected"]) {
|
||||||
(data.results.items.length > idx + 1)) {
|
$("#notes").html(data.results.items[idx]["notes"].replace(/\n/g, "<br />"));
|
||||||
$("#notes").html(data.results.items[idx]["notes"]);
|
if (data.results.items.length > idx + 1) {
|
||||||
OpenLP.nextSong = data.results.items[idx + 1]["title"];
|
OpenLP.nextSong = data.results.items[idx + 1]["title"];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,13 +278,11 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
if len(verse_tag) > 1:
|
if len(verse_tag) > 1:
|
||||||
index = VerseType.from_translated_string(verse_tag)
|
index = VerseType.from_translated_string(verse_tag)
|
||||||
if index is None:
|
if index is None:
|
||||||
index = VerseType.from_string(verse_tag)
|
index = VerseType.from_string(verse_tag, None)
|
||||||
else:
|
else:
|
||||||
verse_tags_translated = True
|
verse_tags_translated = True
|
||||||
if index is None:
|
if index is None:
|
||||||
index = VerseType.from_tag(verse_tag)
|
index = VerseType.from_tag(verse_tag)
|
||||||
if index is None:
|
|
||||||
index = VerseType.Other
|
|
||||||
verse[0][u'type'] = VerseType.Tags[index]
|
verse[0][u'type'] = VerseType.Tags[index]
|
||||||
if verse[0][u'label'] == u'':
|
if verse[0][u'label'] == u'':
|
||||||
verse[0][u'label'] = u'1'
|
verse[0][u'label'] = u'1'
|
||||||
@ -308,7 +306,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
for verse_def in self.song.verse_order.split():
|
for verse_def in self.song.verse_order.split():
|
||||||
verse_index = None
|
verse_index = None
|
||||||
if verse_tags_translated:
|
if verse_tags_translated:
|
||||||
verse_index = VerseType.from_translated_tag(verse_def[0])
|
verse_index = VerseType.from_translated_tag(verse_def[0],
|
||||||
|
None)
|
||||||
if verse_index is None:
|
if verse_index is None:
|
||||||
verse_index = VerseType.from_tag(verse_def[0])
|
verse_index = VerseType.from_tag(verse_def[0])
|
||||||
verse_tag = VerseType.TranslatedTags[verse_index].upper()
|
verse_tag = VerseType.TranslatedTags[verse_index].upper()
|
||||||
@ -606,14 +605,14 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
order_names = unicode(self.verseOrderEdit.text()).split()
|
order_names = unicode(self.verseOrderEdit.text()).split()
|
||||||
for item in order_names:
|
for item in order_names:
|
||||||
if len(item) == 1:
|
if len(item) == 1:
|
||||||
verse_index = VerseType.from_translated_tag(item)
|
verse_index = VerseType.from_translated_tag(item, None)
|
||||||
if verse_index is not None:
|
if verse_index is not None:
|
||||||
order.append(VerseType.Tags[verse_index] + u'1')
|
order.append(VerseType.Tags[verse_index] + u'1')
|
||||||
else:
|
else:
|
||||||
# it matches no verses anyway
|
# it matches no verses anyway
|
||||||
order.append(u'')
|
order.append(u'')
|
||||||
else:
|
else:
|
||||||
verse_index = VerseType.from_translated_tag(item[0])
|
verse_index = VerseType.from_translated_tag(item[0], None)
|
||||||
if verse_index is None:
|
if verse_index is None:
|
||||||
# it matches no verses anyway
|
# it matches no verses anyway
|
||||||
order.append(u'')
|
order.append(u'')
|
||||||
|
@ -113,7 +113,7 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
|
|||||||
verse_num = int(match.group(2))
|
verse_num = int(match.group(2))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
verse_num = 1
|
verse_num = 1
|
||||||
verse_type_index = VerseType.from_loose_input(verse_tag)
|
verse_type_index = VerseType.from_loose_input(verse_tag, None)
|
||||||
if verse_type_index is not None:
|
if verse_type_index is not None:
|
||||||
self.verseNumberBox.setValue(verse_num)
|
self.verseNumberBox.setValue(verse_num)
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
|
|||||||
match = VERSE_REGEX.match(text)
|
match = VERSE_REGEX.match(text)
|
||||||
if match:
|
if match:
|
||||||
verse_type = match.group(1)
|
verse_type = match.group(1)
|
||||||
verse_type_index = VerseType.from_loose_input(verse_type)
|
verse_type_index = VerseType.from_loose_input(verse_type, None)
|
||||||
try:
|
try:
|
||||||
verse_number = int(match.group(2))
|
verse_number = int(match.group(2))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@ -153,7 +153,7 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
|
|||||||
tag=u'%s1' % VerseType.Tags[VerseType.Verse]):
|
tag=u'%s1' % VerseType.Tags[VerseType.Verse]):
|
||||||
self.hasSingleVerse = single
|
self.hasSingleVerse = single
|
||||||
if single:
|
if single:
|
||||||
verse_type_index = VerseType.from_tag(tag[0])
|
verse_type_index = VerseType.from_tag(tag[0], None)
|
||||||
verse_number = tag[1:]
|
verse_number = tag[1:]
|
||||||
if verse_type_index is not None:
|
if verse_type_index is not None:
|
||||||
self.verseTypeComboBox.setCurrentIndex(verse_type_index)
|
self.verseTypeComboBox.setCurrentIndex(verse_type_index)
|
||||||
|
@ -69,7 +69,7 @@ class VerseType(object):
|
|||||||
TranslatedTags = [name[0].lower() for name in TranslatedNames]
|
TranslatedTags = [name[0].lower() for name in TranslatedNames]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def translated_tag(verse_tag, strict=False):
|
def translated_tag(verse_tag, default=Other):
|
||||||
"""
|
"""
|
||||||
Return the translated UPPERCASE tag for a given tag,
|
Return the translated UPPERCASE tag for a given tag,
|
||||||
used to show translated verse tags in UI
|
used to show translated verse tags in UI
|
||||||
@ -77,86 +77,84 @@ class VerseType(object):
|
|||||||
``verse_tag``
|
``verse_tag``
|
||||||
The string to return a VerseType for
|
The string to return a VerseType for
|
||||||
|
|
||||||
``strict``
|
``default``
|
||||||
Determines if the default Other or None should be returned
|
Default return value if no matching tag is found
|
||||||
"""
|
"""
|
||||||
if strict:
|
|
||||||
not_found_value = None
|
|
||||||
else:
|
|
||||||
not_found_value = VerseType.TranslatedTags[VerseType.Other].upper()
|
|
||||||
verse_tag = verse_tag[0].lower()
|
verse_tag = verse_tag[0].lower()
|
||||||
for num, tag in enumerate(VerseType.Tags):
|
for num, tag in enumerate(VerseType.Tags):
|
||||||
if verse_tag == tag:
|
if verse_tag == tag:
|
||||||
return VerseType.TranslatedTags[num].upper()
|
return VerseType.TranslatedTags[num].upper()
|
||||||
return not_found_value
|
if default in VerseType.TranslatedTags:
|
||||||
|
return VerseType.TranslatedTags[default].upper()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def translated_name(verse_tag, strict=False):
|
def translated_name(verse_tag, default=Other):
|
||||||
"""
|
"""
|
||||||
Return the translated name for a given tag
|
Return the translated name for a given tag
|
||||||
|
|
||||||
``verse_tag``
|
``verse_tag``
|
||||||
The string to return a VerseType for
|
The string to return a VerseType for
|
||||||
|
|
||||||
``strict``
|
``default``
|
||||||
Determines if the default Other or None should be returned
|
Default return value if no matching tag is found
|
||||||
"""
|
"""
|
||||||
if strict:
|
|
||||||
not_found_value = None
|
|
||||||
else:
|
|
||||||
not_found_value = VerseType.TranslatedNames[VerseType.Other]
|
|
||||||
verse_tag = verse_tag[0].lower()
|
verse_tag = verse_tag[0].lower()
|
||||||
for num, tag in enumerate(VerseType.Tags):
|
for num, tag in enumerate(VerseType.Tags):
|
||||||
if verse_tag == tag:
|
if verse_tag == tag:
|
||||||
return VerseType.TranslatedNames[num]
|
return VerseType.TranslatedNames[num]
|
||||||
return not_found_value
|
if default in VerseType.TranslatedNames:
|
||||||
|
return VerseType.TranslatedNames[default]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_tag(verse_tag, strict=False):
|
def from_tag(verse_tag, default=Other):
|
||||||
"""
|
"""
|
||||||
Return the VerseType for a given tag
|
Return the VerseType for a given tag
|
||||||
|
|
||||||
``verse_tag``
|
``verse_tag``
|
||||||
The string to return a VerseType for
|
The string to return a VerseType for
|
||||||
|
|
||||||
``strict``
|
``default``
|
||||||
Determines if the default Other or None should be returned
|
Default return value if no matching tag is found
|
||||||
"""
|
"""
|
||||||
if strict:
|
|
||||||
no_return_value = None
|
|
||||||
else:
|
|
||||||
no_return_value = VerseType.Other
|
|
||||||
verse_tag = verse_tag[0].lower()
|
verse_tag = verse_tag[0].lower()
|
||||||
for num, tag in enumerate(VerseType.Tags):
|
for num, tag in enumerate(VerseType.Tags):
|
||||||
if verse_tag == tag:
|
if verse_tag == tag:
|
||||||
return num
|
return num
|
||||||
return no_return_value
|
return default
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_translated_tag(verse_tag):
|
def from_translated_tag(verse_tag, default=Other):
|
||||||
"""
|
"""
|
||||||
Return the VerseType for a given tag
|
Return the VerseType for a given tag
|
||||||
|
|
||||||
``verse_tag``
|
``verse_tag``
|
||||||
The string to return a VerseType for
|
The string to return a VerseType for
|
||||||
|
|
||||||
|
``default``
|
||||||
|
Default return value if no matching tag is found
|
||||||
"""
|
"""
|
||||||
verse_tag = verse_tag[0].lower()
|
verse_tag = verse_tag[0].lower()
|
||||||
for num, tag in enumerate(VerseType.TranslatedTags):
|
for num, tag in enumerate(VerseType.TranslatedTags):
|
||||||
if verse_tag == tag:
|
if verse_tag == tag:
|
||||||
return num
|
return num
|
||||||
|
return default
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_string(verse_name):
|
def from_string(verse_name, default=Other):
|
||||||
"""
|
"""
|
||||||
Return the VerseType for a given string
|
Return the VerseType for a given string
|
||||||
|
|
||||||
``verse_name``
|
``verse_name``
|
||||||
The string to return a VerseType for
|
The string to return a VerseType for
|
||||||
|
|
||||||
|
``default``
|
||||||
|
Default return value if no matching tag is found
|
||||||
"""
|
"""
|
||||||
verse_name = verse_name.lower()
|
verse_name = verse_name.lower()
|
||||||
for num, name in enumerate(VerseType.Names):
|
for num, name in enumerate(VerseType.Names):
|
||||||
if verse_name == name.lower():
|
if verse_name == name.lower():
|
||||||
return num
|
return num
|
||||||
|
return default
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_translated_string(verse_name):
|
def from_translated_string(verse_name):
|
||||||
@ -172,23 +170,26 @@ class VerseType(object):
|
|||||||
return num
|
return num
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_loose_input(verse_name):
|
def from_loose_input(verse_name, default=Other):
|
||||||
"""
|
"""
|
||||||
Return the VerseType for a given string, Other if not found
|
Return the VerseType for a given string
|
||||||
|
|
||||||
``verse_name``
|
``verse_name``
|
||||||
The string to return a VerseType for
|
The string to return a VerseType for
|
||||||
|
|
||||||
|
``default``
|
||||||
|
Default return value if no matching tag is found
|
||||||
"""
|
"""
|
||||||
verse_index = None
|
|
||||||
if len(verse_name) > 1:
|
if len(verse_name) > 1:
|
||||||
verse_index = VerseType.from_translated_string(verse_name)
|
verse_index = VerseType.from_translated_string(verse_name)
|
||||||
if verse_index is None:
|
if verse_index is None:
|
||||||
verse_index = VerseType.from_string(verse_name)
|
verse_index = VerseType.from_string(verse_name, default)
|
||||||
elif len(verse_name) == 1:
|
elif len(verse_name) == 1:
|
||||||
|
verse_index = VerseType.from_translated_tag(verse_name, None)
|
||||||
if verse_index is None:
|
if verse_index is None:
|
||||||
verse_index = VerseType.from_translated_tag(verse_name)
|
verse_index = VerseType.from_tag(verse_name, default)
|
||||||
if verse_index is None:
|
else:
|
||||||
verse_index = VerseType.from_tag(verse_name)
|
return default
|
||||||
return verse_index
|
return verse_index
|
||||||
|
|
||||||
def retrieve_windows_encoding(recommendation=None):
|
def retrieve_windows_encoding(recommendation=None):
|
||||||
|
@ -242,7 +242,7 @@ class EasyWorshipSongImport(SongImport):
|
|||||||
if self.stopImportFlag:
|
if self.stopImportFlag:
|
||||||
break
|
break
|
||||||
raw_record = db_file.read(record_size)
|
raw_record = db_file.read(record_size)
|
||||||
self.fields = self.record_struct.unpack(raw_record)
|
self.fields = self.recordStruct.unpack(raw_record)
|
||||||
self.setDefaults()
|
self.setDefaults()
|
||||||
self.title = self.getField(fi_title)
|
self.title = self.getField(fi_title)
|
||||||
# Get remaining fields.
|
# Get remaining fields.
|
||||||
@ -321,11 +321,11 @@ class EasyWorshipSongImport(SongImport):
|
|||||||
db_file.close()
|
db_file.close()
|
||||||
self.memoFile.close()
|
self.memoFile.close()
|
||||||
|
|
||||||
def find_field(self, field_name):
|
def findField(self, field_name):
|
||||||
return [i for i, x in enumerate(self.fieldDescs)
|
return [i for i, x in enumerate(self.fieldDescs)
|
||||||
if x.name == field_name][0]
|
if x.name == field_name][0]
|
||||||
|
|
||||||
def set_record_struct(self, field_descs):
|
def setRecordStruct(self, field_descs):
|
||||||
# Begin with empty field struct list
|
# Begin with empty field struct list
|
||||||
fsl = ['>']
|
fsl = ['>']
|
||||||
for field_desc in field_descs:
|
for field_desc in field_descs:
|
||||||
@ -355,7 +355,7 @@ class EasyWorshipSongImport(SongImport):
|
|||||||
self.recordStruct = struct.Struct(''.join(fsl))
|
self.recordStruct = struct.Struct(''.join(fsl))
|
||||||
self.fieldDescs = field_descs
|
self.fieldDescs = field_descs
|
||||||
|
|
||||||
def get_field(self, field_desc_index):
|
def getField(self, field_desc_index):
|
||||||
field = self.fields[field_desc_index]
|
field = self.fields[field_desc_index]
|
||||||
field_desc = self.fieldDescs[field_desc_index]
|
field_desc = self.fieldDescs[field_desc_index]
|
||||||
# Return None in case of 'blank' entries
|
# Return None in case of 'blank' entries
|
||||||
|
@ -457,7 +457,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
verse_index = \
|
verse_index = \
|
||||||
VerseType.from_translated_string(verse_tag)
|
VerseType.from_translated_string(verse_tag)
|
||||||
if verse_index is None:
|
if verse_index is None:
|
||||||
verse_index = VerseType.from_string(verse_tag)
|
verse_index = VerseType.from_string(verse_tag, None)
|
||||||
if verse_index is None:
|
if verse_index is None:
|
||||||
verse_index = VerseType.from_tag(verse_tag)
|
verse_index = VerseType.from_tag(verse_tag)
|
||||||
verse_tag = VerseType.TranslatedTags[verse_index].upper()
|
verse_tag = VerseType.TranslatedTags[verse_index].upper()
|
||||||
@ -479,8 +479,6 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
else:
|
else:
|
||||||
verse_index = VerseType.from_tag(
|
verse_index = VerseType.from_tag(
|
||||||
verse[0][u'type'])
|
verse[0][u'type'])
|
||||||
if verse_index is None:
|
|
||||||
verse_index = VerseType.Other
|
|
||||||
verse_tag = VerseType.TranslatedTags[verse_index]
|
verse_tag = VerseType.TranslatedTags[verse_index]
|
||||||
verse_def = u'%s%s' % (verse_tag,
|
verse_def = u'%s%s' % (verse_tag,
|
||||||
verse[0][u'label'])
|
verse[0][u'label'])
|
||||||
|