Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / mobile / app / compat.js @ 9

History | View | Annotate | Download (1.76 KB)

1
/*
2
        Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
        Available via Academic Free License >= 2.1 OR the modified BSD license.
4
        see: http://dojotoolkit.org/license for details
5
*/
6

    
7

    
8
if(!dojo._hasResource["dojox.mobile.app.compat"]){
9
dojo._hasResource["dojox.mobile.app.compat"]=true;
10
dojo.provide("dojox.mobile.app.compat");
11
dojo.require("dojox.mobile.compat");
12
dojo.extend(dojox.mobile.app.AlertDialog,{_doTransition:function(_1){
13
var h=dojo.marginBox(this.domNode.firstChild).h;
14
var _2=this.controller.getWindowSize().h;
15
var _3=_2-h;
16
var _4=_2;
17
var _5=dojo.fx.slideTo({node:this.domNode,duration:400,top:{start:_1<0?_3:_4,end:_1<0?_4:_3}});
18
var _6=dojo[_1<0?"fadeOut":"fadeIn"]({node:this.mask,duration:400});
19
var _7=dojo.fx.combine([_5,_6]);
20
var _8=this;
21
dojo.connect(_7,"onEnd",this,function(){
22
if(_1<0){
23
_8.domNode.style.display="none";
24
dojo.destroy(_8.domNode);
25
dojo.destroy(_8.mask);
26
}
27
});
28
_7.play();
29
}});
30
dojo.extend(dojox.mobile.app.List,{deleteRow:function(){
31
var _9=this._selectedRow;
32
dojo.style(_9,{visibility:"hidden",minHeight:"0px"});
33
dojo.removeClass(_9,"hold");
34
var _a=dojo.contentBox(_9).h;
35
dojo.animateProperty({node:_9,duration:800,properties:{height:{start:_a,end:1},paddingTop:{end:0},paddingBottom:{end:0}},onEnd:this._postDeleteAnim}).play();
36
}});
37
if(dojox.mobile.app.ImageView&&!dojo.create("canvas").getContext){
38
dojo.extend(dojox.mobile.app.ImageView,{buildRendering:function(){
39
this.domNode.innerHTML="ImageView widget is not supported on this browser."+"Please try again with a modern browser, e.g. "+"Safari, Chrome or Firefox";
40
this.canvas={};
41
},postCreate:function(){
42
}});
43
}
44
if(dojox.mobile.app.ImageThumbView){
45
dojo.extend(dojox.mobile.app.ImageThumbView,{place:function(_b,x,y){
46
dojo.style(_b,{top:y+"px",left:x+"px",visibility:"visible"});
47
}});
48
}
49
}