webui-aria2/js/libs/dojox/mobile/app.js

15 lines
154 KiB
JavaScript
Raw Normal View History

/*
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
/*
This is an optimized version of Dojo, built for deployment and not for
development. To get sources and documentation, please visit:
http://dojotoolkit.org
*/
//>>built
require({cache:{"dojo/uacss":function(){define(["./dom-geometry","./_base/lang","./ready","./_base/sniff","./_base/window"],function(_1,_2,_3,_4,_5){var _6=_5.doc.documentElement,ie=_4("ie"),_7=_4("opera"),_8=Math.floor,ff=_4("ff"),_9=_1.boxModel.replace(/-/,""),_a={"dj_ie":ie,"dj_ie6":_8(ie)==6,"dj_ie7":_8(ie)==7,"dj_ie8":_8(ie)==8,"dj_ie9":_8(ie)==9,"dj_quirks":_4("quirks"),"dj_iequirks":ie&&_4("quirks"),"dj_opera":_7,"dj_khtml":_4("khtml"),"dj_webkit":_4("webkit"),"dj_safari":_4("safari"),"dj_chrome":_4("chrome"),"dj_gecko":_4("mozilla"),"dj_ff3":_8(ff)==3};_a["dj_"+_9]=true;var _b="";for(var _c in _a){if(_a[_c]){_b+=_c+" ";}}_6.className=_2.trim(_6.className+" "+_b);_3(90,function(){if(!_1.isBodyLtr()){var _d="dj_rtl dijitRtl "+_b.replace(/ /g,"-rtl ");_6.className=_2.trim(_6.className+" "+_d+"dj_rtl dijitRtl "+_b.replace(/ /g,"-rtl "));}});return _4;});},"dojox/mobile/app/_Widget":function(){define(["dijit","dojo","dojox","dojo/require!dijit/_WidgetBase"],function(_e,_f,_10){_f.provide("dojox.mobile.app._Widget");_f.experimental("dojox.mobile.app._Widget");_f.require("dijit._WidgetBase");_f.declare("dojox.mobile.app._Widget",_e._WidgetBase,{getScroll:function(){return {x:_f.global.scrollX,y:_f.global.scrollY};},connect:function(_11,_12,fn){if(_12.toLowerCase()=="dblclick"||_12.toLowerCase()=="ondblclick"){if(_f.global["Mojo"]){return this.connect(_11,Mojo.Event.tap,fn);}}return this.inherited(arguments);}});});},"dojox/mobile/app/ImageThumbView":function(){define(["dijit","dojo","dojox","dojo/require!dijit/_WidgetBase,dojo/string"],function(_13,_14,_15){_14.provide("dojox.mobile.app.ImageThumbView");_14.experimental("dojox.mobile.app.ImageThumbView");_14.require("dijit._WidgetBase");_14.require("dojo.string");_14.declare("dojox.mobile.app.ImageThumbView",_13._WidgetBase,{items:[],urlParam:"url",labelParam:null,itemTemplate:"<div class=\"mblThumbInner\">"+"<div class=\"mblThumbOverlay\"></div>"+"<div class=\"mblThumbMask\">"+"<div class=\"mblThumbSrc\" style=\"background-image:url(${url})\"></div>"+"</div>"+"</div>",minPadding:4,maxPerRow:3,maxRows:-1,baseClass:"mblImageThumbView",thumbSize:"medium",animationEnabled:true,selectedIndex:-1,cache:null,cacheMustMatch:false,clickEvent:"onclick",cacheBust:false,disableHide:false,constructor:function(_16,_17){},postCreate:function(){this.inherited(arguments);var _18=this;var _19="mblThumbHover";this.addThumb=_14.hitch(this,this.addThumb);this.handleImgLoad=_14.hitch(this,this.handleImgLoad);this.hideCached=_14.hitch(this,this.hideCached);this._onLoadImages={};this.cache=[];this.visibleImages=[];this._cacheCounter=0;this.connect(this.domNode,this.clickEvent,function(_1a){var _1b=_18._getItemNodeFromEvent(_1a);if(_1b&&!_1b._cached){_18.onSelect(_1b._item,_1b._index,_18.items);_14.query(".selected",this.domNode).removeClass("selected");_14.addClass(_1b,"selected");}});_14.addClass(this.domNode,this.thumbSize);this.resize();this.render();},onSelect:function(_1c,_1d,_1e){},_setAnimationEnabledAttr:function(_1f){this.animationEnabled=_1f;_14[_1f?"addClass":"removeClass"](this.domNode,"animated");},_setItemsAttr:function(_20){this.items=_20||[];var _21={};var i;for(i=0;i<this.items.length;i++){_21[this.items[i][this.urlParam]]=1;}var _22=[];for(var url in this._onLoadImages){if(!_21[url]&&this._onLoadImages[url]._conn){_14.disconnect(this._onLoadImages[url]._conn);this._onLoadImages[url].src=null;_22.push(url);}}for(i=0;i<_22.length;i++){delete this._onLoadImages[url];}this.render();},_getItemNode:function(_23){while(_23&&!_14.hasClass(_23,"mblThumb")&&_23!=this.domNode){_23=_23.parentNode;}return (_23==this.domNode)?null:_23;},_getItemNodeFromEvent:function(_24){if(_24.touches&&_24.touches.length>0){_24=_24.touches[0];}return this._getItemNode(_24.target);},resize:function(){this._thumbSize=null;this._size=_14.contentBox(this.domNode);this.disableHide=true;this.render();this.disableHide=false;},hideCached:function(){for(var i=0;i<this.cache.length;i++){if(this.cache[i]){_14.style(this.cache[i],"display","none");}}},render:function(){var i;var url;var _25;var _26;while(this.visib