Author: damoxc
Revision: 4989
Log:
fix the spacer image trying to be retrieved from extjs.com
Diff:
Modified: trunk/deluge/ui/web/css/deluge.css
===================================================================
--- trunk/deluge/ui/web/css/deluge.css 2009-04-02 15:02:33 UTC (rev 4988)
+++ trunk/deluge/ui/web/css/deluge.css 2009-04-02 18:09:34 UTC (rev 4989)
@@ -96,16 +96,20 @@
background: url('/icons/add.png') no-repeat 2px;
}
-.x-deluge-add-file {
+/*.x-deluge-add-file {
background: url('/icons/add_file.png');
padding-left: 20px;
-}
+}*/
.x-form-file-wrap, .x-form-file {
cursor: pointer;
}
/* Add Url Window */
+.x-deluge-add-file, .x-btn .x-deluge-add-file {
+ background: url('/icons/add_file.png') no-repeat 2px;
+}
+
.x-deluge-add-url-window-icon {
background: url('/icons/add_url.png') no-repeat 2px;
}
Added: trunk/deluge/ui/web/images/s.gif
===================================================================
(Binary files differ)
Property changes on: trunk/deluge/ui/web/images/s.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/deluge/ui/web/js/deluge-add.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-add.js 2009-04-02 15:02:33 UTC (rev
4988)
+++ trunk/deluge/ui/web/js/deluge-add.js 2009-04-02 18:09:34 UTC (rev
4989)
@@ -50,6 +50,10 @@
this.Window.hide();
},
+ onFile: function() {
+ this.File.Window.show();
+ },
+
onRender: function(window) {
new Ext.tree.TreeSorter(this.Files, {
folderSort: true
@@ -160,8 +164,10 @@
{
id: 'file',
cls: 'x-btn-text-icon',
- icon: '/icons/add_file.png',
- text: _('File')
+ iconCls: 'x-deluge-add-file',
+ text: _('File'),
+ handler: Deluge.Add.onFile,
+ scope: Deluge.Add
}, {
id: 'url',
cls: 'x-btn-text-icon',
@@ -201,11 +207,52 @@
}]
});
+Deluge.Add.File = {
+
+}
+
+Deluge.Add.File.form = new Ext.form.FormPanel({
+ defaultType: 'textfield',
+ id: 'fileAddForm',
+ baseCls: 'x-plain',
+ labelWidth: 55,
+ items: [new Ext.form.FileUploadField({
+ fieldLabel: _('File'),
+ id: 'file',
+ name: 'file',
+ listeners: {
+ 'specialkey': {
+ fn: Deluge.Add.File.onAdd,
+ scope: Deluge.Add.File
+ }
+ }
+ })]
+});
+
+Deluge.Add.File.Window = new Ext.Window({
+ layout: 'fit',
+ width: 350,
+ height: 115,
+ bodyStyle: 'padding: 10px 5px;',
+ buttonAlign: 'center',
+ closeAction: 'hide',
+ modal: true,
+ plain: true,
+ title: _('Add from File'),
+ iconCls: 'x-deluge-add-file',
+ items: Deluge.Add.File.form,
+ buttons: [{
+ text: _('Add'),
+ handler: Deluge.Add.File.onAdd,
+ scope: Deluge.Add.File
+ }]
+});
+
Deluge.Add.Url = {
onAdd: function(field, e) {
if (field.id == 'url' && e.getKey() != e.ENTER) return;
- var field = this.Form.items.get('url');
+ var field = this.form.items.get('url');
var url = field.getValue();
Deluge.Client.web.download_torrent_from_url(url, {
@@ -222,12 +269,12 @@
onGotInfo: function(info) {
var bound = Deluge.Add.onTorrentAdded.bind(Deluge.Add)
- this.Form.items.get('url').setValue('');
+ this.form.items.get('url').setValue('');
bound(info);
}
}
-Deluge.Add.Url.Form = new Ext.form.FormPanel({
+Deluge.Add.Url.form = new Ext.form.FormPanel({
defaultType: 'textfield',
id: 'urlAddForm',
baseCls: 'x-plain',
@@ -258,7 +305,7 @@
plain: true,
title: _('Add from Url'),
iconCls: 'x-deluge-add-url-window-icon',
- items: Deluge.Add.Url.Form,
+ items: Deluge.Add.Url.form,
buttons: [{
text: _('Add'),
handler: Deluge.Add.Url.onAdd,
@@ -288,5 +335,10 @@
handler: Deluge.Add.onAdd,
scope: Deluge.Add
}],
- listeners: {'render': {fn: Deluge.Add.onRender, scope: Deluge.Add}}
+ listeners: {
+ 'render': {
+ fn: Deluge.Add.onRender,
+ scope: Deluge.Add
+ }
+ }
});
\ No newline at end of file
Modified: trunk/deluge/ui/web/js/ext-mootools-adapter.js
===================================================================
--- trunk/deluge/ui/web/js/ext-mootools-adapter.js 2009-04-02 15:02:33 UTC
(rev 4988)
+++ trunk/deluge/ui/web/js/ext-mootools-adapter.js 2009-04-02 18:09:34 UTC
(rev 4989)
@@ -5,7 +5,7 @@
* Version: 0.9a
*/
-Ext={version:"2.0.2"};window["undefined"]=window["undefined"];Ext.apply=function(C,D,B){if(B){Ext.apply(C,B)}if(C&&D&&typeof
D=="object"){for(var A in D){C[A]=D[A]}}return C};(function(){var idSeed=0;var
ua=navigator.userAgent.toLowerCase();var
isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf("webkit/5")!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie
7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac
os
x")!=-1),isAir=(ua.indexOf("adobeair")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true
,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var
p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return
o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return
}var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var
s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var
id=prefix+(++idSeed);return
el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m
in o){this[m]=o[m]}};var oc=Object.prototype.constructor;return
function(sb,sp,overrides){if(typeof
sp=="object"){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor:function(){sp.apply(this,arguments)}}var
F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new
F();sbp.constructor=sb;sb.supercl
ass=spp;if(spp.constructor==oc){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o)};return
sb}}(),override:function(origclass,overrides){if(overrides){var
p=origclass.prototype;for(var method in
overrides){p[method]=overrides[method]}}},namespace:function(){var
a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval("if
(typeof "+rt+" == \"undefined\"){"+rt+" = {};} o =
"+rt+";");for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]]}}},urlEncode:function(o){if(!o){return""}var
buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var
type=typeof
ov;if(type=="undefined"){buf.push(k,"=&")}else{if(type!="function"&&type!="object"){buf.push(k,"=",encodeURIComponent(ov),"&")}else{if(Ext.isArray(ov)){if(ov.length){for(var
i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?"":ov[i]),"&")}}else{buf.push(k,"=&")}}}}}buf.pop(
);return
buf.join("")},urlDecode:function(string,overwrite){if(!string||!string.length){return{}}var
obj={};var pairs=string.split("&");var pair,name,value;for(var
i=0,len=pairs.length;i<len;i++){pair=pairs[i].split("=");name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof
obj[name]=="undefined"){obj[name]=value}else{if(typeof
obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value)}else{obj[name].push(value)}}}else{obj[name]=value}}return
obj},each:function(array,fn,scope){if(typeof array.length=="undefined"||typeof
array=="string"){array=[array]}for(var
i=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){return
i}}},combine:function(){var as=arguments,l=as.length,r=[];for(var
i=0;i<l;i++){var
a=as[i];if(Ext.isArray(a)){r=r.concat(a)}else{if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0))}else{r.push(a)}}}return
r},escapeRe:function(s){return s.replace(/([.*+?
^${}()|[\]\/\\])/g,"\\$1")},callback:function(cb,scope,args,delay){if(typeof
cb=="function"){if(delay){cb.defer(delay,scope,args||[])}else{cb.apply(scope,args||[])}}},getDom:function(el){if(!el||!document){return
null}return el.dom?el.dom:(typeof
el=="string"?document.getElementById(el):el)},getDoc:function(){return
Ext.get(document)},getBody:function(){return
Ext.get(document.body||document.documentElement)},getCmp:function(id){return
Ext.ComponentMgr.get(id)},num:function(v,defaultValue){if(typeof
v!="number"){return defaultValue}return v},destroy:function(){for(var
i=0,a=arguments,len=a.length;i<len;i++){var as=a[i];if(as){if(typeof
as.destroy=="function"){as.destroy()}else{if(as.dom){as.removeAllListeners();as.remove()}}}}},removeNode:isIE?function(){var
d;return
function(n){if(n&&n.tagName!="BODY"){d=d||document.createElement("div");d.appendChild(n);d.innerHTML=""}}}():function(n){if(n&&n.parentNode&&n.tagName!="BODY"){n.parentNode.removeChild(n)}},type:function(o){if(o
===undefined||o===null){return false}if(o.htmlElement){return"element"}var
t=typeof o;if(t=="object"&&o.nodeName){switch(o.nodeType){case
1:return"element";case
3:return(/\S/).test(o.nodeValue)?"textnode":"whitespace"}}if(t=="object"||t=="function"){switch(o.constructor){case
Array:return"array";case RegExp:return"regexp"}if(typeof
o.length=="number"&&typeof o.item=="function"){return"nodelist"}}return
t},isEmpty:function(v,allowBlank){return
v===null||v===undefined||(!allowBlank?v==="":false)},value:function(v,defaultValue,allowBlank){return
Ext.isEmpty(v,allowBlank)?defaultValue:v},isArray:function(v){return v&&typeof
v.pop=="function"},isDate:function(v){return v&&typeof
v.getFullYear=="function"},isOpera:isOpera,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7,isIE7:isIE7,isGecko:isGecko,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isGecko&&isMac))});Ext.ns=
Ext.namespace})();Ext.ns("Ext","Ext.util","Ext.grid","Ext.dd","Ext.tree","Ext.data","Ext.form","Ext.menu","Ext.state","Ext.lib","Ext.layout","Ext.app","Ext.ux");Ext.apply(Function.prototype,{createCallback:function(){var
A=arguments;var B=this;return function(){return
B.apply(window,A)}},createDelegate:function(C,B,A){var D=this;return
function(){var
F=B||arguments;if(A===true){F=Array.prototype.slice.call(arguments,0);F=F.concat(B)}else{if(typeof
A=="number"){F=Array.prototype.slice.call(arguments,0);var
E=[A,0].concat(B);Array.prototype.splice.apply(F,E)}}return
D.apply(C||window,F)}},defer:function(C,E,B,A){var
D=this.createDelegate(E,B,A);if(C){return setTimeout(D,C)}D();return
0},createSequence:function(B,A){if(typeof B!="function"){return this}var
C=this;return function(){var
D=C.apply(this||window,arguments);B.apply(A||this||window,arguments);return
D}},createInterceptor:function(B,A){if(typeof B!="function"){return this}var
C=this;return function(){B.target=this;B.me
thod=C;if(B.apply(A||this||window,arguments)===false){return }return
C.apply(this||window,arguments)}}});Ext.applyIf(String,{escape:function(A){return
A.replace(/('|\\)/g,"\\$1")},leftPad:function(D,B,C){var A=new
String(D);if(!C){C=" "}while(A.length<B){A=C+A}return
A.toString()},format:function(B){var
A=Array.prototype.slice.call(arguments,1);return
B.replace(/\{(\d+)\}/g,function(C,D){return
A[D]})}});String.prototype.toggle=function(B,A){return
this==B?A:B};String.prototype.trim=function(){var A=/^\s+|\s+$/g;return
function(){return
this.replace(A,"")}}();Ext.applyIf(Number.prototype,{constrain:function(B,A){return
Math.min(Math.max(this,B),A)}});Ext.applyIf(Array.prototype,{indexOf:function(C){for(var
B=0,A=this.length;B<A;B++){if(this[B]==C){return B}}return
-1},remove:function(B){var A=this.indexOf(B);if(A!=-1){this.splice(A,1)}return
this}});Date.prototype.getElapsed=function(A){return Math.abs((A||new
Date()).getTime()-this.getTime())};
+Ext={version:"2.0.2"};window["undefined"]=window["undefined"];Ext.apply=function(C,D,B){if(B){Ext.apply(C,B)}if(C&&D&&typeof
D=="object"){for(var A in D){C[A]=D[A]}}return C};(function(){var idSeed=0;var
ua=navigator.userAgent.toLowerCase();var
isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf("webkit/5")!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie
7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac
os
x")!=-1),isAir=(ua.indexOf("adobeair")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true
,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"/images/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var
p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return
o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return
}var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var
s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var
id=prefix+(++idSeed);return
el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m
in o){this[m]=o[m]}};var oc=Object.prototype.constructor;return
function(sb,sp,overrides){if(typeof
sp=="object"){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor:function(){sp.apply(this,arguments)}}var
F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new
F();sbp.constructor=sb;sb.superclass=spp;if(s
pp.constructor==oc){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o)};return
sb}}(),override:function(origclass,overrides){if(overrides){var
p=origclass.prototype;for(var method in
overrides){p[method]=overrides[method]}}},namespace:function(){var
a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval("if
(typeof "+rt+" == \"undefined\"){"+rt+" = {};} o =
"+rt+";");for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]]}}},urlEncode:function(o){if(!o){return""}var
buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var
type=typeof
ov;if(type=="undefined"){buf.push(k,"=&")}else{if(type!="function"&&type!="object"){buf.push(k,"=",encodeURIComponent(ov),"&")}else{if(Ext.isArray(ov)){if(ov.length){for(var
i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?"":ov[i]),"&")}}else{buf.push(k,"=&")}}}}}buf.pop();return
buf
.join("")},urlDecode:function(string,overwrite){if(!string||!string.length){return{}}var
obj={};var pairs=string.split("&");var pair,name,value;for(var
i=0,len=pairs.length;i<len;i++){pair=pairs[i].split("=");name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof
obj[name]=="undefined"){obj[name]=value}else{if(typeof
obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value)}else{obj[name].push(value)}}}else{obj[name]=value}}return
obj},each:function(array,fn,scope){if(typeof array.length=="undefined"||typeof
array=="string"){array=[array]}for(var
i=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){return
i}}},combine:function(){var as=arguments,l=as.length,r=[];for(var
i=0;i<l;i++){var
a=as[i];if(Ext.isArray(a)){r=r.concat(a)}else{if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0))}else{r.push(a)}}}return
r},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/
\\])/g,"\\$1")},callback:function(cb,scope,args,delay){if(typeof
cb=="function"){if(delay){cb.defer(delay,scope,args||[])}else{cb.apply(scope,args||[])}}},getDom:function(el){if(!el||!document){return
null}return el.dom?el.dom:(typeof
el=="string"?document.getElementById(el):el)},getDoc:function(){return
Ext.get(document)},getBody:function(){return
Ext.get(document.body||document.documentElement)},getCmp:function(id){return
Ext.ComponentMgr.get(id)},num:function(v,defaultValue){if(typeof
v!="number"){return defaultValue}return v},destroy:function(){for(var
i=0,a=arguments,len=a.length;i<len;i++){var as=a[i];if(as){if(typeof
as.destroy=="function"){as.destroy()}else{if(as.dom){as.removeAllListeners();as.remove()}}}}},removeNode:isIE?function(){var
d;return
function(n){if(n&&n.tagName!="BODY"){d=d||document.createElement("div");d.appendChild(n);d.innerHTML=""}}}():function(n){if(n&&n.parentNode&&n.tagName!="BODY"){n.parentNode.removeChild(n)}},type:function(o){if(o===undefined
||o===null){return false}if(o.htmlElement){return"element"}var t=typeof
o;if(t=="object"&&o.nodeName){switch(o.nodeType){case 1:return"element";case
3:return(/\S/).test(o.nodeValue)?"textnode":"whitespace"}}if(t=="object"||t=="function"){switch(o.constructor){case
Array:return"array";case RegExp:return"regexp"}if(typeof
o.length=="number"&&typeof o.item=="function"){return"nodelist"}}return
t},isEmpty:function(v,allowBlank){return
v===null||v===undefined||(!allowBlank?v==="":false)},value:function(v,defaultValue,allowBlank){return
Ext.isEmpty(v,allowBlank)?defaultValue:v},isArray:function(v){return v&&typeof
v.pop=="function"},isDate:function(v){return v&&typeof
v.getFullYear=="function"},isOpera:isOpera,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7,isIE7:isIE7,isGecko:isGecko,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isGecko&&isMac))});Ext.ns=Ext.namespac
e})();Ext.ns("Ext","Ext.util","Ext.grid","Ext.dd","Ext.tree","Ext.data","Ext.form","Ext.menu","Ext.state","Ext.lib","Ext.layout","Ext.app","Ext.ux");Ext.apply(Function.prototype,{createCallback:function(){var
A=arguments;var B=this;return function(){return
B.apply(window,A)}},createDelegate:function(C,B,A){var D=this;return
function(){var
F=B||arguments;if(A===true){F=Array.prototype.slice.call(arguments,0);F=F.concat(B)}else{if(typeof
A=="number"){F=Array.prototype.slice.call(arguments,0);var
E=[A,0].concat(B);Array.prototype.splice.apply(F,E)}}return
D.apply(C||window,F)}},defer:function(C,E,B,A){var
D=this.createDelegate(E,B,A);if(C){return setTimeout(D,C)}D();return
0},createSequence:function(B,A){if(typeof B!="function"){return this}var
C=this;return function(){var
D=C.apply(this||window,arguments);B.apply(A||this||window,arguments);return
D}},createInterceptor:function(B,A){if(typeof B!="function"){return this}var
C=this;return function(){B.target=this;B.method=C;if(B.
apply(A||this||window,arguments)===false){return }return
C.apply(this||window,arguments)}}});Ext.applyIf(String,{escape:function(A){return
A.replace(/('|\\)/g,"\\$1")},leftPad:function(D,B,C){var A=new
String(D);if(!C){C=" "}while(A.length<B){A=C+A}return
A.toString()},format:function(B){var
A=Array.prototype.slice.call(arguments,1);return
B.replace(/\{(\d+)\}/g,function(C,D){return
A[D]})}});String.prototype.toggle=function(B,A){return
this==B?A:B};String.prototype.trim=function(){var A=/^\s+|\s+$/g;return
function(){return
this.replace(A,"")}}();Ext.applyIf(Number.prototype,{constrain:function(B,A){return
Math.min(Math.max(this,B),A)}});Ext.applyIf(Array.prototype,{indexOf:function(C){for(var
B=0,A=this.length;B<A;B++){if(this[B]==C){return B}}return
-1},remove:function(B){var A=this.indexOf(B);if(A!=-1){this.splice(A,1)}return
this}});Date.prototype.getElapsed=function(A){return Math.abs((A||new
Date()).getTime()-this.getTime())};
(function(){Ext.lib.Dom={getViewWidth:function(full){return
document['get'+(full?'Scroll':'')+'Width']();},getViewHeight:function(full){return
document['get'+(full?'Scroll':'')+'Height']();},getDocumentHeight:function(){return
document.getScrollHeight();},getDocumentWidth:function(){return
document.getScrollWidth();},getViewportHeight:function(){return
document.getHeight();},getViewportWidth:function(){return
document.getWidth();},isAncestor:function(p,c){return
$(p).hasChild(c);},getRegion:function(el){return
Ext.lib.Region.getRegion(el);},getY:function(el){return
$(el).getTop();},getX:function(el){return
$(el).getLeft();},getXY:function(el){return
Hash.getValues($(el).getPosition());},setXY:function(el,xy){var
pts=Ext.get(el).translatePoints(xy);Hash.each(pts,function(v,i){if(!v)return;$(el).setStyle(i,v+'px');});},setX:function(el,x){this.setXY(el,[x,false]);},setY:function(el,y){this.setXY(el,[false,y]);}};function
getElement(el){if($type(el)=='object')return new Documen
t(el);return $(el);}
Ext.lib.Event={getPageX:function(e){return new
Event(e.browserEvent||e).page.x;},getPageY:function(e){return new
Event(e.browserEvent||e).page.y;},getXY:function(e){var p=new
Event(e.browserEvent||e).page;return
p?[p.x,p.y]:[0,0];},getTarget:function(e){return new
Event(e.browserEvent||e).target;},resolveTextNode:function(node){return
node&&3==node.nodeType?node.parentNode:node;},getRelatedTarget:function(e){return
new
Event(e.browserEvent||e).relatedTarget;},on:function(el,e,fn){el=getElement(el);if(el)el.addListener(e,fn);},un:function(el,e,fn){el=getElement(el);if(el)el.removeListener(e,fn);},purgeElement:function(el){el=getElement(el);if(el)el.removeEvents();},preventDefault:function(e){new
Event(e.browserEvent||e).preventDefault();},stopPropagation:function(e){new
Event(e.browserEvent||e).stopPropagation();},stopEvent:function(e){new
Event(e.browserEvent||e).stop();},onAvailable:function(id,fn,scope){if(Browser.loaded)fn.call(scope||window,$(id));else
document.addEvent(
'domready',fn);}};Ext.lib.Ajax=function(){var
createSuccess=function(cb){return
cb.success?function(text,xml){cb.success.call(cb.scope||window,{responseText:text,responseXML:xml,argument:cb.argument});}:Ext.emptyFn;};var
createFailure=function(cb){return
cb.failure?function(text,xml){cb.failure.call(cb.scope||window,{responseText:text,responseXML:xml,argument:cb.argument});}:Ext.emptyFn;};return{request:function(method,uri,cb,data,options){var
o={url:uri,method:method.toLowerCase(),data:data||'',onSuccess:createSuccess(cb),onFailure:createFailure(cb)};if(options){if(options.headers)
o.headers=options.headers;if(options.xmlData){o.method='post';o.headers={'Content-type':'text/xml'};o.data=options.xmlData;}
@@ -13,4 +13,4 @@
new
Request(o).send();},formRequest:function(form,uri,cb,data,isUpload,sslUri){new
Request({url:uri,method:(Ext.getDom(form).method||'post').toLowerCase(),data:$(form).toQueryString()+(data?'&'+data:''),onSuccess:createSuccess(cb),onFailure:createFailure(cb)}).send();},isCallInProgress:function(trans){return
false;},abort:function(trans){return
false;},serializeForm:function(form){return
$(form.dom||form).toQueryString();}};}();Ext.lib.Anim=function(){var
createAnim=function(cb,scope){return{stop:function(skipToLast){this.effect.pause();},isAnimated:function(){return!!this.effect.timer;},proxyCallback:function(){Ext.callback(cb,scope);}};};var
transition=function(t){if(!Fx.Transitions[t])t='linear';return
Fx.Transitions[t];};var
obj={scroll:function(el,args,duration,easing,cb,scope){var
anim=createAnim(cb,scope);anim.effect=new
Fx.Scroll(el,{duration:duration*1000,transisions:transition(easing),onComplete:anim.proxyCallback}).start(args);return
anim;},run:function(el,args,du
ration,easing,cb,scope,type){if(easing=='easeNone')easing='linear';var
anim=createAnim(cb,scope);var style={};for(i in args){if(i=='points'){var
by,p,e=Ext.fly(el,'_animrun');e.position();if(by=args[i].by){var
xy=e.getXY();p=e.translatePoints([xy[0]+by[0],xy[1]+by[1]]);}else{p=e.translatePoints(args[i].to);}
style.left=p.left;style.top=p.top;}else{style[i]=args[i].from?[args[i].from,args[i].to]:[args[i].to];}}
anim.effect=new
Fx.Morph(el,{duration:duration*1000,transition:transition(easing),onComplete:anim.proxyCallback}).start(style);return
anim;}};return
Hash.extend(obj,{motion:obj.run,color:obj.run});}();Ext.lib.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};Ext.lib.Region.prototype={contains:function(region){return(region.left>=this.left&®ion.right<=this.right&®ion.top>=this.top&®ion.bottom<=this.bottom);},getArea:function(){return((this.bottom-this.top)*(this.right-this.left));},intersect:function(region){var
t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var
b=Math.min(this.bottom,region.bottom);var
l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new
Ext.lib.Region(t,r,b,l);}else{return null;}},union:function(region){var
t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var
b=Math.max(this.bottom,region.bottom);var
l=Math.min(this.left,region.left);return new Ext
.lib.Region(t,r,b,l);},constrainTo:function(r){this.top=this.top.constrain(r.top,r.bottom);this.bottom=this.bottom.constrain(r.top,r.bottom);this.left=this.left.constrain(r.left,r.right);this.right=this.right.constrain(r.left,r.right);return
this;},adjust:function(t,l,b,r){this.top+=t;this.left+=l;this.right+=r;this.bottom+=b;return
this;}};Ext.lib.Region.getRegion=function(el){var p=Ext.lib.Dom.getXY(el);var
t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return
new
Ext.lib.Region(t,r,b,l);};Ext.lib.Point=function(x,y){if(Ext.isArray(x)){y=x[1];x=x[0];}
-this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};Ext.lib.Point.prototype=new
Ext.lib.Region();})();
\ No newline at end of file
+this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};Ext.lib.Point.prototype=new
Ext.lib.Region();})();
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---