upgraded yui to 2.2.2 and yui-ext to 1.0.1a
This commit is contained in:
parent
4d9af2c691
commit
547ced6500
1992 changed files with 645731 additions and 0 deletions
365
www/extras/yui-ext/package/button/button-debug.js
vendored
Normal file
365
www/extras/yui-ext/package/button/button-debug.js
vendored
Normal file
|
|
@ -0,0 +1,365 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
|
||||
Ext.Button = function(renderTo, config){
|
||||
Ext.apply(this, config);
|
||||
this.addEvents({
|
||||
|
||||
"click" : true,
|
||||
|
||||
"toggle" : true,
|
||||
|
||||
'mouseover' : true,
|
||||
|
||||
'mouseout': true
|
||||
});
|
||||
if(this.menu){
|
||||
this.menu = Ext.menu.MenuMgr.get(this.menu);
|
||||
}
|
||||
if(renderTo){
|
||||
this.render(renderTo);
|
||||
}
|
||||
Ext.Button.superclass.constructor.call(this);
|
||||
};
|
||||
|
||||
Ext.extend(Ext.Button, Ext.util.Observable, {
|
||||
|
||||
hidden : false,
|
||||
|
||||
disabled : false,
|
||||
|
||||
pressed : false,
|
||||
|
||||
|
||||
enableToggle: false,
|
||||
|
||||
menu : undefined,
|
||||
|
||||
menuAlign : "tl-bl?",
|
||||
|
||||
|
||||
menuClassTarget: 'tr',
|
||||
|
||||
clickEvent : 'click',
|
||||
handleMouseEvents : true,
|
||||
|
||||
|
||||
tooltipType : 'qtip',
|
||||
|
||||
|
||||
render : function(renderTo){
|
||||
var btn;
|
||||
if(this.hideParent){
|
||||
this.parentEl = Ext.get(renderTo);
|
||||
}
|
||||
if(!this.dhconfig){
|
||||
if(!this.template){
|
||||
if(!Ext.Button.buttonTemplate){
|
||||
|
||||
Ext.Button.buttonTemplate = new Ext.Template(
|
||||
'<table border="0" cellpadding="0" cellspacing="0" class="x-btn-wrap"><tbody><tr>',
|
||||
'<td class="x-btn-left"><i> </i></td><td class="x-btn-center"><em><button class="x-btn-text">{0}</button></em></td><td class="x-btn-right"><i> </i></td>',
|
||||
"</tr></tbody></table>");
|
||||
}
|
||||
this.template = Ext.Button.buttonTemplate;
|
||||
}
|
||||
btn = this.template.append(renderTo, [this.text || ' '], true);
|
||||
var btnEl = btn.child("button:first");
|
||||
btnEl.on('focus', this.onFocus, this);
|
||||
btnEl.on('blur', this.onBlur, this);
|
||||
if(this.cls){
|
||||
btn.addClass(this.cls);
|
||||
}
|
||||
if(this.icon){
|
||||
btnEl.setStyle('background-image', 'url(' +this.icon +')');
|
||||
}
|
||||
if(this.tooltip){
|
||||
if(typeof this.tooltip == 'object'){
|
||||
Ext.QuickTips.tips(Ext.apply({
|
||||
target: btnEl.id
|
||||
}, this.tooltip));
|
||||
} else {
|
||||
btnEl.dom[this.tooltipType] = this.tooltip;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
btn = Ext.DomHelper.append(Ext.get(renderTo).dom, this.dhconfig, true);
|
||||
}
|
||||
this.el = btn;
|
||||
if(this.id){
|
||||
this.el.dom.id = this.el.id = this.id;
|
||||
}
|
||||
if(this.menu){
|
||||
this.el.child(this.menuClassTarget).addClass("x-btn-with-menu");
|
||||
this.menu.on("show", this.onMenuShow, this);
|
||||
this.menu.on("hide", this.onMenuHide, this);
|
||||
}
|
||||
btn.addClass("x-btn");
|
||||
if(Ext.isIE && !Ext.isIE7){
|
||||
this.autoWidth.defer(1, this);
|
||||
}else{
|
||||
this.autoWidth();
|
||||
}
|
||||
if(this.handleMouseEvents){
|
||||
btn.on("mouseover", this.onMouseOver, this);
|
||||
btn.on("mouseout", this.onMouseOut, this);
|
||||
btn.on("mousedown", this.onMouseDown, this);
|
||||
}
|
||||
btn.on(this.clickEvent, this.onClick, this);
|
||||
|
||||
if(this.hidden){
|
||||
this.hide();
|
||||
}
|
||||
if(this.disabled){
|
||||
this.disable();
|
||||
}
|
||||
Ext.ButtonToggleMgr.register(this);
|
||||
if(this.pressed){
|
||||
this.el.addClass("x-btn-pressed");
|
||||
}
|
||||
if(this.repeat){
|
||||
var repeater = new Ext.util.ClickRepeater(btn,
|
||||
typeof this.repeat == "object" ? this.repeat : {}
|
||||
);
|
||||
repeater.on("click", this.onClick, this);
|
||||
}
|
||||
},
|
||||
|
||||
getEl : function(){
|
||||
return this.el;
|
||||
},
|
||||
|
||||
|
||||
destroy : function(){
|
||||
Ext.ButtonToggleMgr.unregister(this);
|
||||
this.el.removeAllListeners();
|
||||
this.purgeListeners();
|
||||
this.el.remove();
|
||||
},
|
||||
|
||||
|
||||
autoWidth : function(){
|
||||
if(this.el){
|
||||
this.el.setWidth("auto");
|
||||
if(Ext.isIE7 && Ext.isStrict){
|
||||
var ib = this.el.child('button');
|
||||
if(ib && ib.getWidth() > 20){
|
||||
ib.clip();
|
||||
ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr'));
|
||||
}
|
||||
}
|
||||
if(this.minWidth){
|
||||
if(this.hidden){
|
||||
this.el.beginMeasure();
|
||||
}
|
||||
if(this.el.getWidth() < this.minWidth){
|
||||
this.el.setWidth(this.minWidth);
|
||||
}
|
||||
if(this.hidden){
|
||||
this.el.endMeasure();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
setHandler : function(handler, scope){
|
||||
this.handler = handler;
|
||||
this.scope = scope;
|
||||
},
|
||||
|
||||
|
||||
setText : function(text){
|
||||
this.text = text;
|
||||
if(this.el){
|
||||
this.el.child("td.x-btn-center button.x-btn-text").update(text);
|
||||
}
|
||||
this.autoWidth();
|
||||
},
|
||||
|
||||
|
||||
getText : function(){
|
||||
return this.text;
|
||||
},
|
||||
|
||||
|
||||
show: function(){
|
||||
this.hidden = false;
|
||||
if(this.el){
|
||||
this[this.hideParent? 'parentEl' : 'el'].setStyle("display", "");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
hide: function(){
|
||||
this.hidden = true;
|
||||
if(this.el){
|
||||
this[this.hideParent? 'parentEl' : 'el'].setStyle("display", "none");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
setVisible: function(visible){
|
||||
if(visible) {
|
||||
this.show();
|
||||
}else{
|
||||
this.hide();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
toggle : function(state){
|
||||
state = state === undefined ? !this.pressed : state;
|
||||
if(state != this.pressed){
|
||||
if(state){
|
||||
this.el.addClass("x-btn-pressed");
|
||||
this.pressed = true;
|
||||
this.fireEvent("toggle", this, true);
|
||||
}else{
|
||||
this.el.removeClass("x-btn-pressed");
|
||||
this.pressed = false;
|
||||
this.fireEvent("toggle", this, false);
|
||||
}
|
||||
if(this.toggleHandler){
|
||||
this.toggleHandler.call(this.scope || this, this, state);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
focus : function(){
|
||||
this.el.child('button:first').focus();
|
||||
},
|
||||
|
||||
|
||||
disable : function(){
|
||||
if(this.el){
|
||||
this.el.addClass("x-btn-disabled");
|
||||
}
|
||||
this.disabled = true;
|
||||
},
|
||||
|
||||
|
||||
enable : function(){
|
||||
if(this.el){
|
||||
this.el.removeClass("x-btn-disabled");
|
||||
}
|
||||
this.disabled = false;
|
||||
},
|
||||
|
||||
|
||||
setDisabled : function(v){
|
||||
this[v !== true ? "enable" : "disable"]();
|
||||
},
|
||||
|
||||
|
||||
onClick : function(e){
|
||||
if(e){
|
||||
e.preventDefault();
|
||||
}
|
||||
if(!this.disabled){
|
||||
if(this.enableToggle){
|
||||
this.toggle();
|
||||
}
|
||||
if(this.menu && !this.menu.isVisible()){
|
||||
this.menu.show(this.el, this.menuAlign);
|
||||
}
|
||||
this.fireEvent("click", this, e);
|
||||
if(this.handler){
|
||||
this.el.removeClass("x-btn-over");
|
||||
this.handler.call(this.scope || this, this, e);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onMouseOver : function(e){
|
||||
if(!this.disabled){
|
||||
this.el.addClass("x-btn-over");
|
||||
this.fireEvent('mouseover', this, e);
|
||||
}
|
||||
},
|
||||
|
||||
onMouseOut : function(e){
|
||||
if(!e.within(this.el, true)){
|
||||
this.el.removeClass("x-btn-over");
|
||||
this.fireEvent('mouseout', this, e);
|
||||
}
|
||||
},
|
||||
|
||||
onFocus : function(e){
|
||||
if(!this.disabled){
|
||||
this.el.addClass("x-btn-focus");
|
||||
}
|
||||
},
|
||||
|
||||
onBlur : function(e){
|
||||
this.el.removeClass("x-btn-focus");
|
||||
},
|
||||
|
||||
onMouseDown : function(){
|
||||
if(!this.disabled){
|
||||
this.el.addClass("x-btn-click");
|
||||
Ext.get(document).on('mouseup', this.onMouseUp, this);
|
||||
}
|
||||
},
|
||||
|
||||
onMouseUp : function(){
|
||||
this.el.removeClass("x-btn-click");
|
||||
Ext.get(document).un('mouseup', this.onMouseUp, this);
|
||||
},
|
||||
|
||||
onMenuShow : function(e){
|
||||
this.el.addClass("x-btn-menu-active");
|
||||
},
|
||||
|
||||
onMenuHide : function(e){
|
||||
this.el.removeClass("x-btn-menu-active");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Ext.ButtonToggleMgr = function(){
|
||||
var groups = {};
|
||||
|
||||
function toggleGroup(btn, state){
|
||||
if(state){
|
||||
var g = groups[btn.toggleGroup];
|
||||
for(var i = 0, l = g.length; i < l; i++){
|
||||
if(g[i] != btn){
|
||||
g[i].toggle(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
register : function(btn){
|
||||
if(!btn.toggleGroup){
|
||||
return;
|
||||
}
|
||||
var g = groups[btn.toggleGroup];
|
||||
if(!g){
|
||||
g = groups[btn.toggleGroup] = [];
|
||||
}
|
||||
g.push(btn);
|
||||
btn.on("toggle", toggleGroup);
|
||||
},
|
||||
|
||||
unregister : function(btn){
|
||||
if(!btn.toggleGroup){
|
||||
return;
|
||||
}
|
||||
var g = groups[btn.toggleGroup];
|
||||
if(g){
|
||||
g.remove(btn);
|
||||
btn.un("toggle", toggleGroup);
|
||||
}
|
||||
}
|
||||
};
|
||||
}();
|
||||
10
www/extras/yui-ext/package/button/button.js
vendored
Normal file
10
www/extras/yui-ext/package/button/button.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
www/extras/yui-ext/package/color-palette.js
vendored
Normal file
10
www/extras/yui-ext/package/color-palette.js
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
Ext.ColorPalette=function(_1){Ext.ColorPalette.superclass.constructor.call(this,_1);this.addEvents({select:true});if(this.handler){this.on("select",this.handler,this.scope,true);}};Ext.extend(Ext.ColorPalette,Ext.Component,{itemCls:"x-color-palette",value:null,ctype:"Ext.ColorPalette",colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],onRender:function(_2,_3){var t=new Ext.MasterTemplate("<tpl><a href=\"#\" class=\"color-{0}\" hidefocus=\"on\"><em><span style=\"background:#{0}\"> </span></em></a></tpl>");var c=this.colors;for(var i=0,_7=c.length;i<_7;i++){t.add([c[i]]);}var el=document.createElement("div");el.className=this.itemCls;t.overwrite(el);_2.dom.insertBefore(el,_3);this.el=Ext.get(el);this.el.on("click",this.handleClick,this,{delegate:"a"});},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var s=this.value;this.value=null;this.select(s);}},handleClick:function(e,t){e.preventDefault();if(!this.disabled){var c=t.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(c.toUpperCase());}},select:function(_d){_d=_d.replace("#","");if(_d!=this.value){var el=this.el;if(this.value){el.child("a.color-"+this.value).removeClass("x-color-palette-sel");}el.child("a.color-"+_d).addClass("x-color-palette-sel");this.value=_d;this.fireEvent("select",this,_d);}}});
|
||||
|
||||
36
www/extras/yui-ext/package/data/data.js
vendored
Normal file
36
www/extras/yui-ext/package/data/data.js
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
Ext.data.SortTypes={none:function(s){return s;},stripTagsRE:/<\/?[^>]+>/gi,asText:function(s){return String(s).replace(this.stripTagsRE,"");},asUCText:function(s){return String(s).toUpperCase().replace(this.stripTagsRE,"");},asUCString:function(s){return String(s).toUpperCase();},asDate:function(s){if(!s){return 0;}if(s instanceof Date){return s.getTime();}return Date.parse(String(s));},asFloat:function(s){var _7=parseFloat(String(s).replace(/,/g,""));if(isNaN(_7)){_7=0;}return _7;},asInt:function(s){var _9=parseInt(String(s).replace(/,/g,""));if(isNaN(_9)){_9=0;}return _9;}};
|
||||
|
||||
Ext.data.Record=function(_1,id){this.id=(id||id===0)?id:++Ext.data.Record.AUTO_ID;this.data=_1;};Ext.data.Record.create=function(o){var f=function(){f.superclass.constructor.apply(this,arguments);};Ext.extend(f,Ext.data.Record);var p=f.prototype;p.fields=new Ext.util.MixedCollection(false,function(_6){return _6.name;});for(var i=0,_8=o.length;i<_8;i++){p.fields.add(new Ext.data.Field(o[i]));}f.getField=function(_9){return p.fields.get(_9);};return f;};Ext.data.Record.AUTO_ID=1000;Ext.data.Record.EDIT="edit";Ext.data.Record.REJECT="reject";Ext.data.Record.COMMIT="commit";Ext.data.Record.prototype={dirty:false,editing:false,error:null,modified:null,join:function(_a){this.store=_a;},set:function(_b,_c){if(this.data[_b]==_c){return;}this.dirty=true;if(!this.modified){this.modified={};}if(typeof this.modified[_b]=="undefined"){this.modified[_b]=this.data[_b];}this.data[_b]=_c;if(!this.editing){this.store.afterEdit(this);}},get:function(_d){return this.data[_d];},beginEdit:function(){this.editing=true;this.modified={};},cancelEdit:function(){this.editing=false;delete this.modified;},endEdit:function(){this.editing=false;if(this.dirty&&this.store){this.store.afterEdit(this);}},reject:function(){var m=this.modified;for(var n in m){if(typeof m[n]!="function"){this.data[n]=m[n];}}this.dirty=false;delete this.modified;this.editing=false;if(this.store){this.store.afterReject(this);}},commit:function(){this.dirty=false;delete this.modified;this.editing=false;if(this.store){this.store.afterCommit(this);}},hasError:function(){return this.error!=null;},clearError:function(){this.error=null;}};
|
||||
|
||||
Ext.data.Store=function(_1){this.data=new Ext.util.MixedCollection(false);this.data.getKey=function(o){return o.id;};this.baseParams={};this.paramNames={"start":"start","limit":"limit","sort":"sort","dir":"dir"};Ext.apply(this,_1);if(this.reader&&!this.recordType){this.recordType=this.reader.recordType;}this.fields=this.recordType.prototype.fields;this.modified=[];this.addEvents({datachanged:true,add:true,remove:true,update:true,clear:true,beforeload:true,load:true,loadexception:true});if(this.proxy){this.relayEvents(this.proxy,["loadexception"]);}this.sortToggle={};Ext.data.Store.superclass.constructor.call(this);};Ext.extend(Ext.data.Store,Ext.util.Observable,{remoteSort:false,lastOptions:null,add:function(_3){_3=[].concat(_3);for(var i=0,_5=_3.length;i<_5;i++){_3[i].join(this);}var _6=this.data.length;this.data.addAll(_3);this.fireEvent("add",this,_3,_6);},remove:function(_7){var _8=this.data.indexOf(_7);this.data.removeAt(_8);this.fireEvent("remove",this,_7,_8);},removeAll:function(){this.data.clear();this.fireEvent("clear",this);},insert:function(_9,_a){_a=[].concat(_a);for(var i=0,_c=_a.length;i<_c;i++){this.data.insert(_9,_a[i]);_a[i].join(this);}this.fireEvent("add",this,_a,_9);},indexOf:function(_d){return this.data.indexOf(_d);},indexOfId:function(id){return this.data.indexOfKey(id);},getById:function(id){return this.data.key(id);},getAt:function(_10){return this.data.itemAt(_10);},getRange:function(_11,end){return this.data.getRange(_11,end);},storeOptions:function(o){o=Ext.apply({},o);delete o.callback;delete o.scope;this.lastOptions=o;},load:function(_14){_14=_14||{};if(this.fireEvent("beforeload",this,_14)!==false){this.storeOptions(_14);var p=Ext.apply(_14.params||{},this.baseParams);if(this.sortInfo&&this.remoteSort){var pn=this.paramNames;p[pn["sort"]]=this.sortInfo.field;p[pn["dir"]]=this.sortInfo.direction;}this.proxy.load(p,this.reader,this.loadRecords,this,_14);}},reload:function(_17){this.load(Ext.applyIf(_17||{},this.lastOptions));},loadRecords:function(o,_19,_1a){if(!o||_1a===false){if(_1a!==false){this.fireEvent("load",this,[],_19);}if(_19.callback){_19.callback.call(_19.scope||this,[],_19,false);}return;}var r=o.records,t=o.totalRecords||r.length;for(var i=0,len=r.length;i<len;i++){r[i].join(this);}if(!_19||_19.add!==true){this.data.clear();this.data.addAll(r);this.totalLength=t;this.applySort();this.fireEvent("datachanged",this);}else{this.totalLength=Math.max(t,this.data.length+r.length);this.data.addAll(r);}this.fireEvent("load",this,r,_19);if(_19.callback){_19.callback.call(_19.scope||this,r,_19,true);}},loadData:function(o,_20){var r=this.reader.readRecords(o);this.loadRecords(r,{add:_20},true);},getCount:function(){return this.data.length||0;},getTotalCount:function(){return this.totalLength||0;},getSortState:function(){return this.sortInfo;},applySort:function(){if(this.sortInfo&&!this.remoteSort){var s=this.sortInfo,f=s.field;var st=this.fields.get(f).sortType;var fn=function(r1,r2){var v1=st(r1.data[f]),v2=st(r2.data[f]);return v1>v2?1:(v1<v2?-1:0);};this.data.sort(s.direction,fn);if(this.snapshot&&this.snapshot!=this.data){this.snapshot.sort(s.direction,fn);}}},setDefaultSort:function(_2a,dir){this.sortInfo={field:_2a,direction:dir?dir.toUpperCase():"ASC"};},sort:function(_2c,dir){var f=this.fields.get(_2c);if(!dir){if(this.sortInfo&&this.sortInfo.field==f.name){dir=(this.sortToggle[f.name]||"ASC").toggle("ASC","DESC");}else{dir=f.sortDir;}}this.sortToggle[f.name]=dir;this.sortInfo={field:f.name,direction:dir};if(!this.remoteSort){this.applySort();this.fireEvent("datachanged",this);}else{this.load(this.lastOptions);}},each:function(fn,_30){this.data.each(fn,_30);},getModifiedRecords:function(){return this.modified;},filter:function(_31,_32){if(!_32.exec){_32=String(_32);if(_32.length==0){return this.clearFilter();}_32=new RegExp("^"+Ext.escapeRe(_32),"i");}this.filterBy(function(r){return _32.test(r.data[_31]);});},filterBy:function(fn,_35){var _36=this.snapshot||this.data;this.snapshot=_36;this.data=_36.filterBy(fn,_35);this.fireEvent("datachanged",this);},clearFilter:function(_37){if(this.snapshot&&this.snapshot!=this.data){this.data=this.snapshot;delete this.snapshot;if(_37!==true){this.fireEvent("datachanged",this);}}},afterEdit:function(_38){if(this.modified.indexOf(_38)==-1){this.modified.push(_38);}this.fireEvent("update",this,_38,Ext.data.Record.EDIT);},afterReject:function(_39){this.modified.remove(_39);this.fireEvent("update",this,_39,Ext.data.Record.REJECT);},afterCommit:function(_3a){this.modified.remove(_3a);this.fireEvent("update",this,_3a,Ext.data.Record.COMMIT);},commitChanges:function(){var m=this.modified.slice(0);this.modified=[];for(var i=0,len=m.length;i<len;i++){m[i].commit();}},rejectChanges:function(){var m=this.modified.slice(0);this.modified=[];for(var i=0,len=m.length;i<len;i++){m[i].reject();}}});
|
||||
|
||||
Ext.data.SimpleStore=function(_1){Ext.data.SimpleStore.superclass.constructor.call(this,{reader:new Ext.data.ArrayReader({id:_1.id},Ext.data.Record.create(_1.fields)),proxy:new Ext.data.MemoryProxy(_1.data)});this.load();};Ext.extend(Ext.data.SimpleStore,Ext.data.Store);
|
||||
|
||||
Ext.data.Connection=function(_1){Ext.apply(this,_1);this.addEvents({"beforerequest":true,"requestcomplete":true,"requestexception":true});Ext.data.Connection.superclass.constructor.call(this);};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,request:function(_2){if(this.fireEvent("beforerequest",this,_2)!==false){var p=_2.params;if(typeof p=="object"){p=Ext.urlEncode(Ext.apply(_2.params,this.extraParams));}var cb={success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{options:_2},timeout:this.timeout};var _5=_2.method||this.method||(p?"POST":"GET");var _6=_2.url||this.url;if(this.autoAbort!==false){this.abort();}if(_5=="GET"&&p){_6+=(_6.indexOf("?")!=-1?"&":"?")+p;p="";}this.transId=Ext.lib.Ajax.request(_5,_6,cb,p);}else{if(typeof _2.callback=="function"){_2.callback.call(_2.scope||window,_2,null,null);}}},isLoading:function(){return this.transId?true:false;},abort:function(){if(this.isLoading()){Ext.lib.Ajax.abort(this.transId);}},handleResponse:function(_7){this.transId=false;var _8=_7.argument.options;this.fireEvent("requestcomplete",this,_7,_8);if(typeof _8.callback=="function"){_8.callback.call(_8.scope||window,_8,true,_7);}},handleFailure:function(_9,e){this.transId=false;var _b=_9.argument.options;this.fireEvent("requestexception",this,_9,_b,e);if(typeof _b.callback=="function"){_b.callback.call(_b.scope||window,_b,false,_9);}}});
|
||||
|
||||
Ext.data.Field=function(_1){if(typeof _1=="string"){_1={name:_1};}Ext.apply(this,_1);if(!this.type){this.type="auto";}var st=Ext.data.SortTypes;if(typeof this.sortType=="string"){this.sortType=st[this.sortType];}if(!this.sortType){switch(this.type){case "string":this.sortType=st.asUCString;break;case "date":this.sortType=st.asDate;break;default:this.sortType=st.none;}}var _3=/[\$,%]/g;if(!this.convert){var cv,_5=this.dateFormat;switch(this.type){case "":case "auto":case undefined:cv=function(v){return v;};break;case "string":cv=function(v){return String(v);};break;case "int":cv=function(v){return v!==undefined&&v!==null&&v!==""?parseInt(String(v).replace(_3,""),10):"";};break;case "float":cv=function(v){return v!==undefined&&v!==null&&v!==""?parseFloat(String(v).replace(_3,""),10):"";};break;case "bool":case "boolean":cv=function(v){return v===true||v==="true"||v==1;};break;case "date":cv=function(v){if(!v){return "";}if(v instanceof Date){return v;}if(_5){if(_5=="timestamp"){return new Date(v*1000);}return Date.parseDate(v,_5);}var _c=Date.parse(v);return _c?new Date(_c):null;};break;}this.convert=cv;}};Ext.data.Field.prototype={dateFormat:null,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC"};
|
||||
|
||||
Ext.data.DataReader=function(_1,_2){this.meta=_1;this.recordType=_2 instanceof Array?Ext.data.Record.create(_2):_2;};Ext.data.DataReader.prototype={};
|
||||
|
||||
Ext.data.DataProxy=function(){this.addEvents({beforeload:true,load:true,loadexception:true});Ext.data.DataProxy.superclass.constructor.call(this);};Ext.extend(Ext.data.DataProxy,Ext.util.Observable);
|
||||
|
||||
Ext.data.MemoryProxy=function(_1){Ext.data.MemoryProxy.superclass.constructor.call(this);this.data=_1;};Ext.extend(Ext.data.MemoryProxy,Ext.data.DataProxy,{load:function(_2,_3,_4,_5,_6){_2=_2||{};var _7;try{_7=_3.readRecords(this.data);}catch(e){this.fireEvent("loadexception",this,_6,null,e);_4.call(_5,null,_6,false);return;}_4.call(_5,_7,_6,true);},update:function(_8,_9){}});
|
||||
|
||||
Ext.data.HttpProxy=function(_1){Ext.data.HttpProxy.superclass.constructor.call(this);this.conn=_1.events?_1:new Ext.data.Connection(_1);};Ext.extend(Ext.data.HttpProxy,Ext.data.DataProxy,{getConnection:function(){return this.conn;},load:function(_2,_3,_4,_5,_6){if(this.fireEvent("beforeload",this,_2)!==false){this.conn.request({params:_2||{},request:{callback:_4,scope:_5,arg:_6},reader:_3,callback:this.loadResponse,scope:this});}else{_4.call(_5||this,null,_6,false);}},loadResponse:function(o,_8,_9){if(!_8){this.fireEvent("loadexception",this,o,_9);o.request.callback.call(o.request.scope,null,o.request.arg,false);return;}var _a;try{_a=o.reader.read(_9);}catch(e){this.fireEvent("loadexception",this,o,_9,e);o.request.callback.call(o.request.scope,null,o.request.arg,false);return;}this.fireEvent("load",this,o,o.request.arg);o.request.callback.call(o.request.scope,_a,o.request.arg,true);},update:function(_b){},updateResponse:function(_c){}});
|
||||
|
||||
Ext.data.ScriptTagProxy=function(_1){Ext.data.ScriptTagProxy.superclass.constructor.call(this);Ext.apply(this,_1);this.head=document.getElementsByTagName("head")[0];};Ext.data.ScriptTagProxy.TRANS_ID=1000;Ext.extend(Ext.data.ScriptTagProxy,Ext.data.DataProxy,{timeout:30000,callbackParam:"callback",nocache:true,load:function(_2,_3,_4,_5,_6){if(this.fireEvent("beforeload",this,_2)!==false){var p=Ext.urlEncode(Ext.apply(_2,this.extraParams));var _8=this.url;_8+=(_8.indexOf("?")!=-1?"&":"?")+p;if(this.nocache){_8+="&_dc="+(new Date().getTime());}var _9=++Ext.data.ScriptTagProxy.TRANS_ID;var _a={id:_9,cb:"stcCallback"+_9,scriptId:"stcScript"+_9,params:_2,arg:_6,url:_8,callback:_4,scope:_5,reader:_3};var _b=this;window[_a.cb]=function(o){_b.handleResponse(o,_a);};_8+=String.format("&{0}={1}",this.callbackParam,_a.cb);if(this.autoAbort!==false){this.abort();}_a.timeoutId=this.handleFailure.defer(this.timeout,this,[_a]);var _d=document.createElement("script");_d.setAttribute("src",_8);_d.setAttribute("type","text/javascript");_d.setAttribute("id",_a.scriptId);this.head.appendChild(_d);this.trans=_a;}else{_4.call(_5||this,null,_6,false);}},isLoading:function(){return this.trans?true:false;},abort:function(){if(this.isLoading()){this.destroyTrans(this.trans);}},destroyTrans:function(_e,_f){this.head.removeChild(document.getElementById(_e.scriptId));clearTimeout(_e.timeoutId);if(_f){window[_e.cb]=undefined;try{delete window[_e.cb];}catch(e){}}else{window[_e.cb]=function(){window[_e.cb]=undefined;try{delete window[_e.cb];}catch(e){}};}},handleResponse:function(o,_11){this.trans=false;this.destroyTrans(_11,true);var _12;try{_12=_11.reader.readRecords(o);}catch(e){this.fireEvent("loadexception",this,o,_11.arg,e);_11.callback.call(_11.scope||window,null,_11.arg,false);return;}this.fireEvent("load",this,o,_11.arg);_11.callback.call(_11.scope||window,_12,_11.arg,true);},handleFailure:function(_13){this.trans=false;this.destroyTrans(_13,false);this.fireEvent("loadexception",this,null,_13.arg);_13.callback.call(_13.scope||window,null,_13.arg,false);}});
|
||||
|
||||
Ext.data.JsonReader=function(_1,_2){Ext.data.JsonReader.superclass.constructor.call(this,_1,_2);};Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(_3){var _4=_3.responseText;var o=eval("("+_4+")");if(!o){throw {message:"JsonReader.read: Json object not found"};}return this.readRecords(o);},simpleAccess:function(_6,_7){return _6[_7];},getJsonAccessor:function(){var re=/[\[\.]/;return function(_9){try{return (re.test(_9))?new Function("obj","return obj."+_9):function(_a){return _a[_9];};}catch(e){}return Ext.emptyFn;};}(),readRecords:function(o){this.jsonData=o;var s=this.meta,_d=this.recordType,f=_d.prototype.fields,fi=f.items,fl=f.length;if(!this.ef){if(s.totalProperty){this.getTotal=this.getJsonAccessor(s.totalProperty);}if(s.successProperty){this.getSuccess=this.getJsonAccessor(s.successProperty);}this.getRoot=s.root?this.getJsonAccessor(s.root):function(p){return p;};if(s.id){var g=this.getJsonAccessor(s.id);this.getId=function(rec){var r=g(rec);return (r===undefined||r==="")?null:r;};}else{this.getId=function(){return null;};}this.ef=[];for(var i=0;i<fl;i++){f=fi[i];var map=(f.mapping!==undefined&&f.mapping!==null)?f.mapping:f.name;this.ef[i]=this.getJsonAccessor(map);}}var _17=this.getRoot(o),c=_17.length,_19=c,_1a=true;if(s.totalProperty){var v=parseInt(this.getTotal(o),10);if(!isNaN(v)){_19=v;}}if(s.successProperty){var v=this.getSuccess(o);if(v===false||v==="false"){_1a=false;}}var _1c=[];for(var i=0;i<c;i++){var n=_17[i];var _1e={};var id=this.getId(n);for(var j=0;j<fl;j++){f=fi[j];var v=this.ef[j](n);_1e[f.name]=f.convert((v!==undefined)?v:f.defaultValue);}var _21=new _d(_1e,id);_21.json=n;_1c[i]=_21;}return {success:_1a,records:_1c,totalRecords:_19};}});
|
||||
|
||||
Ext.data.XmlReader=function(_1,_2){Ext.data.XmlReader.superclass.constructor.call(this,_1,_2);};Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(_3){var _4=_3.responseXML;if(!_4){throw {message:"XmlReader.read: XML Document not available"};}return this.readRecords(_4);},readRecords:function(_5){this.xmlData=_5;var _6=_5.documentElement||_5;var q=Ext.DomQuery;var _8=this.recordType,_9=_8.prototype.fields;var _a=this.meta.id;var _b=0,_c=true;if(this.meta.totalRecords){_b=q.selectNumber(this.meta.totalRecords,_6,0);}if(this.meta.success){var sv=q.selectValue(this.meta.success,_6,true);_c=sv!==false&&sv!=="false";}var _e=[];var ns=q.select(this.meta.record,_6);for(var i=0,len=ns.length;i<len;i++){var n=ns[i];var _13={};var id=_a?q.selectValue(_a,n):undefined;for(var j=0,_16=_9.length;j<_16;j++){var f=_9.items[j];var v=q.selectValue(f.mapping||f.name,n,f.defaultValue);v=f.convert(v);_13[f.name]=v;}var _19=new _8(_13,id);_19.node=n;_e[_e.length]=_19;}return {success:_c,records:_e,totalRecords:_b||_e.length};}});
|
||||
|
||||
Ext.data.ArrayReader=function(_1,_2){Ext.data.ArrayReader.superclass.constructor.call(this,_1,_2);};Ext.extend(Ext.data.ArrayReader,Ext.data.JsonReader,{readRecords:function(o){var _4=this.meta?this.meta.id:null;var _5=this.recordType,_6=_5.prototype.fields;var _7=[];var _8=o;for(var i=0;i<_8.length;i++){var n=_8[i];var _b={};var id=((_4||_4===0)&&n[_4]!==undefined&&n[_4]!==""?n[_4]:null);for(var j=0,_e=_6.length;j<_e;j++){var f=_6.items[j];var k=f.mapping!==undefined&&f.mapping!==null?f.mapping:j;var v=n[k]!==undefined?n[k]:f.defaultValue;v=f.convert(v);_b[f.name]=v;}var _12=new _5(_b,id);_12.json=n;_7[_7.length]=_12;}return {records:_7,totalRecords:_7.length};}});
|
||||
|
||||
10
www/extras/yui-ext/package/date.js
vendored
Normal file
10
www/extras/yui-ext/package/date.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
www/extras/yui-ext/package/datepicker/datepicker.js
vendored
Normal file
10
www/extras/yui-ext/package/datepicker/datepicker.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1241
www/extras/yui-ext/package/dialog/dialogs-debug.js
vendored
Normal file
1241
www/extras/yui-ext/package/dialog/dialogs-debug.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
12
www/extras/yui-ext/package/dialog/dialogs.js
vendored
Normal file
12
www/extras/yui-ext/package/dialog/dialogs.js
vendored
Normal file
File diff suppressed because one or more lines are too long
24
www/extras/yui-ext/package/dragdrop/dragdrop.js
vendored
Normal file
24
www/extras/yui-ext/package/dragdrop/dragdrop.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2697
www/extras/yui-ext/package/form/form-debug.js
vendored
Normal file
2697
www/extras/yui-ext/package/form/form-debug.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
38
www/extras/yui-ext/package/form/form.js
vendored
Normal file
38
www/extras/yui-ext/package/form/form.js
vendored
Normal file
File diff suppressed because one or more lines are too long
319
www/extras/yui-ext/package/grid/edit-grid-debug.js
vendored
Normal file
319
www/extras/yui-ext/package/grid/edit-grid-debug.js
vendored
Normal file
|
|
@ -0,0 +1,319 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
|
||||
Ext.grid.EditorGrid = function(container, config){
|
||||
Ext.grid.EditorGrid.superclass.constructor.call(this, container, config);
|
||||
this.container.addClass("xedit-grid");
|
||||
|
||||
if(!this.selModel){
|
||||
this.selModel = new Ext.grid.CellSelectionModel();
|
||||
}
|
||||
|
||||
this.activeEditor = null;
|
||||
|
||||
this.addEvents({
|
||||
|
||||
"beforeedit" : true,
|
||||
|
||||
"afteredit" : true,
|
||||
|
||||
"validateedit" : true
|
||||
});
|
||||
this.on("bodyscroll", this.stopEditing, this);
|
||||
this.on(this.clicksToEdit == 1 ? "cellclick" : "celldblclick", this.onCellDblClick, this);
|
||||
};
|
||||
|
||||
Ext.extend(Ext.grid.EditorGrid, Ext.grid.Grid, {
|
||||
isEditor : true,
|
||||
clicksToEdit: 2,
|
||||
trackMouseOver: false,
|
||||
|
||||
onCellDblClick : function(g, row, col){
|
||||
this.startEditing(row, col);
|
||||
},
|
||||
|
||||
onEditComplete : function(ed, value, startValue){
|
||||
this.editing = false;
|
||||
this.activeEditor = null;
|
||||
ed.un("specialkey", this.selModel.onEditorKey, this.selModel);
|
||||
if(String(value) != String(startValue)){
|
||||
var r = ed.record;
|
||||
var field = this.colModel.getDataIndex(ed.col);
|
||||
var e = {
|
||||
grid: this,
|
||||
record: r,
|
||||
field: field,
|
||||
originalValue: startValue,
|
||||
value: value,
|
||||
row: ed.row,
|
||||
column: ed.col,
|
||||
cancel:false
|
||||
};
|
||||
if(this.fireEvent("validateedit", e) !== false && !e.cancel){
|
||||
r.set(field, e.value);
|
||||
delete e.cancel;
|
||||
this.fireEvent("afteredit", e);
|
||||
}
|
||||
}
|
||||
this.view.focusCell(ed.row, ed.col);
|
||||
},
|
||||
|
||||
|
||||
startEditing : function(row, col){
|
||||
this.stopEditing();
|
||||
if(this.colModel.isCellEditable(col, row)){
|
||||
this.view.focusCell(row, col);
|
||||
var r = this.dataSource.getAt(row);
|
||||
var field = this.colModel.getDataIndex(col);
|
||||
var e = {
|
||||
grid: this,
|
||||
record: r,
|
||||
field: field,
|
||||
value: r.data[field],
|
||||
row: row,
|
||||
column: col,
|
||||
cancel:false
|
||||
};
|
||||
if(this.fireEvent("beforeedit", e) !== false && !e.cancel){
|
||||
this.editing = true;
|
||||
(function(){
|
||||
var ed = this.colModel.getCellEditor(col, row);
|
||||
ed.row = row;
|
||||
ed.col = col;
|
||||
ed.record = r;
|
||||
ed.on("complete", this.onEditComplete, this, {single: true});
|
||||
ed.on("specialkey", this.selModel.onEditorKey, this.selModel);
|
||||
this.activeEditor = ed;
|
||||
var v = r.data[field];
|
||||
ed.startEdit(this.view.getCell(row, col), v);
|
||||
}).defer(50, this);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
stopEditing : function(){
|
||||
if(this.activeEditor){
|
||||
this.activeEditor.completeEdit();
|
||||
}
|
||||
this.activeEditor = null;
|
||||
}
|
||||
});
|
||||
Ext.grid.GridEditor = function(field, config){
|
||||
Ext.grid.GridEditor.superclass.constructor.call(this, field, config);
|
||||
field.monitorTab = false;
|
||||
};
|
||||
|
||||
Ext.extend(Ext.grid.GridEditor, Ext.Editor, {
|
||||
alignment: "tl-tl",
|
||||
autoSize: "width",
|
||||
hideEl : false,
|
||||
cls: "x-small-editor x-grid-editor",
|
||||
shim:false,
|
||||
shadow:"frame"
|
||||
});
|
||||
Ext.grid.PropertyRecord = Ext.data.Record.create([
|
||||
{name:'name',type:'string'}, 'value'
|
||||
]);
|
||||
|
||||
Ext.grid.PropertyStore = function(grid, source){
|
||||
this.grid = grid;
|
||||
this.store = new Ext.data.Store({
|
||||
recordType : Ext.grid.PropertyRecord
|
||||
});
|
||||
this.store.on('update', this.onUpdate, this);
|
||||
if(source){
|
||||
this.setSource(source);
|
||||
}
|
||||
Ext.grid.PropertyStore.superclass.constructor.call(this);
|
||||
};
|
||||
Ext.extend(Ext.grid.PropertyStore, Ext.util.Observable, {
|
||||
setSource : function(o){
|
||||
this.source = o;
|
||||
this.store.removeAll();
|
||||
var data = [];
|
||||
for(var k in o){
|
||||
if(this.isEditableValue(o[k])){
|
||||
data.push(new Ext.grid.PropertyRecord({name: k, value: o[k]}, k));
|
||||
}
|
||||
}
|
||||
this.store.loadRecords({records: data}, {}, true);
|
||||
},
|
||||
|
||||
onUpdate : function(ds, record, type){
|
||||
if(type == Ext.data.Record.EDIT){
|
||||
var v = record.data['value'];
|
||||
var oldValue = record.modified['value'];
|
||||
if(this.grid.fireEvent('beforepropertychange', this.source, record.id, v, oldValue) !== false){
|
||||
this.source[record.id] = v;
|
||||
record.commit();
|
||||
this.grid.fireEvent('propertychange', this.source, record.id, v, oldValue);
|
||||
}else{
|
||||
record.reject();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getProperty : function(row){
|
||||
return this.store.getAt(row);
|
||||
},
|
||||
|
||||
isEditableValue: function(val){
|
||||
if(val && val instanceof Date){
|
||||
return true;
|
||||
}else if(typeof val == 'object' || typeof val == 'function'){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
setValue : function(prop, value){
|
||||
this.source[prop] = value;
|
||||
this.store.getById(prop).set('value', value);
|
||||
},
|
||||
|
||||
getSource : function(){
|
||||
return this.source;
|
||||
}
|
||||
});
|
||||
|
||||
Ext.grid.PropertyColumnModel = function(grid, store){
|
||||
this.grid = grid;
|
||||
var g = Ext.grid;
|
||||
g.PropertyColumnModel.superclass.constructor.call(this, [
|
||||
{header: this.nameText, sortable: true, dataIndex:'name', id: 'name'},
|
||||
{header: this.valueText, resizable:false, dataIndex: 'value', id: 'value'}
|
||||
]);
|
||||
this.store = store;
|
||||
this.bselect = Ext.DomHelper.append(document.body, {
|
||||
tag: 'select', style:'display:none', cls: 'x-grid-editor', children: [
|
||||
{tag: 'option', value: 'true', html: 'true'},
|
||||
{tag: 'option', value: 'false', html: 'false'}
|
||||
]
|
||||
});
|
||||
Ext.id(this.bselect);
|
||||
var f = Ext.form;
|
||||
this.editors = {
|
||||
'date' : new g.GridEditor(new f.DateField({selectOnFocus:true})),
|
||||
'string' : new g.GridEditor(new f.TextField({selectOnFocus:true})),
|
||||
'number' : new g.GridEditor(new f.NumberField({selectOnFocus:true, style:'text-align:left;'})),
|
||||
'boolean' : new g.GridEditor(new f.Field({el:this.beselect,selectOnFocus:true}))
|
||||
};
|
||||
this.renderCellDelegate = this.renderCell.createDelegate(this);
|
||||
this.renderPropDelegate = this.renderProp.createDelegate(this);
|
||||
};
|
||||
|
||||
Ext.extend(Ext.grid.PropertyColumnModel, Ext.grid.ColumnModel, {
|
||||
nameText : 'Name',
|
||||
valueText : 'Value',
|
||||
dateFormat : 'm/j/Y',
|
||||
renderDate : function(dateVal){
|
||||
return dateVal.dateFormat(this.dateFormat);
|
||||
},
|
||||
|
||||
renderBool : function(bVal){
|
||||
return bVal ? 'true' : 'false';
|
||||
},
|
||||
|
||||
isCellEditable : function(colIndex, rowIndex){
|
||||
return colIndex == 1;
|
||||
},
|
||||
|
||||
getRenderer : function(col){
|
||||
return col == 1 ?
|
||||
this.renderCellDelegate : this.renderPropDelegate;
|
||||
},
|
||||
|
||||
renderProp : function(v){
|
||||
return this.getPropertyName(v);
|
||||
},
|
||||
|
||||
renderCell : function(val){
|
||||
var rv = val;
|
||||
if(val instanceof Date){
|
||||
rv = this.renderDate(val);
|
||||
}else if(typeof val == 'boolean'){
|
||||
rv = this.renderBool(val);
|
||||
}
|
||||
return Ext.util.Format.htmlEncode(rv);
|
||||
},
|
||||
|
||||
getPropertyName : function(name){
|
||||
var pn = this.grid.propertyNames;
|
||||
return pn && pn[name] ? pn[name] : name;
|
||||
},
|
||||
|
||||
getCellEditor : function(colIndex, rowIndex){
|
||||
var p = this.store.getProperty(rowIndex);
|
||||
var n = p.data['name'], val = p.data['value'];
|
||||
if(this.grid.customEditors[n]){
|
||||
return this.grid.customEditors[n];
|
||||
}
|
||||
if(val instanceof Date){
|
||||
return this.editors['date'];
|
||||
}else if(typeof val == 'number'){
|
||||
return this.editors['number'];
|
||||
}else if(typeof val == 'boolean'){
|
||||
return this.editors['boolean'];
|
||||
}else{
|
||||
return this.editors['string'];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Ext.grid.PropertyGrid = function(container, config){
|
||||
config = config || {};
|
||||
var store = new Ext.grid.PropertyStore(this);
|
||||
this.store = store;
|
||||
var cm = new Ext.grid.PropertyColumnModel(this, store);
|
||||
store.store.sort('name', 'ASC');
|
||||
Ext.grid.PropertyGrid.superclass.constructor.call(this, container, Ext.apply({
|
||||
ds: store.store,
|
||||
cm: cm,
|
||||
enableColLock:false,
|
||||
enableColumnMove:false,
|
||||
stripeRows:false,
|
||||
trackMouseOver: false,
|
||||
clicksToEdit:1
|
||||
}, config));
|
||||
this.container.addClass('x-props-grid');
|
||||
this.lastEditRow = null;
|
||||
this.on('columnresize', this.onColumnResize, this);
|
||||
this.addEvents({
|
||||
beforepropertychange: true,
|
||||
propertychange: true
|
||||
});
|
||||
this.customEditors = this.customEditors || {};
|
||||
};
|
||||
Ext.extend(Ext.grid.PropertyGrid, Ext.grid.EditorGrid, {
|
||||
render : function(){
|
||||
Ext.grid.PropertyGrid.superclass.render.call(this);
|
||||
this.autoSize.defer(100, this);
|
||||
},
|
||||
|
||||
autoSize : function(){
|
||||
Ext.grid.PropertyGrid.superclass.autoSize.call(this);
|
||||
if(this.view){
|
||||
this.view.fitColumns();
|
||||
}
|
||||
},
|
||||
|
||||
onColumnResize : function(){
|
||||
this.colModel.setColumnWidth(1, this.container.getWidth(true)-this.colModel.getColumnWidth(0));
|
||||
this.autoSize();
|
||||
},
|
||||
|
||||
setSource : function(source){
|
||||
this.store.setSource(source);
|
||||
},
|
||||
|
||||
getSource : function(){
|
||||
return this.store.getSource();
|
||||
}
|
||||
});
|
||||
14
www/extras/yui-ext/package/grid/edit-grid.js
vendored
Normal file
14
www/extras/yui-ext/package/grid/edit-grid.js
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
Ext.grid.EditorGrid=function(_1,_2){Ext.grid.EditorGrid.superclass.constructor.call(this,_1,_2);this.container.addClass("xedit-grid");if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel();}this.activeEditor=null;this.addEvents({"beforeedit":true,"afteredit":true,"validateedit":true});this.on("bodyscroll",this.stopEditing,this);this.on(this.clicksToEdit==1?"cellclick":"celldblclick",this.onCellDblClick,this);};Ext.extend(Ext.grid.EditorGrid,Ext.grid.Grid,{isEditor:true,clicksToEdit:2,trackMouseOver:false,onCellDblClick:function(g,_4,_5){this.startEditing(_4,_5);},onEditComplete:function(ed,_7,_8){this.editing=false;this.activeEditor=null;ed.un("specialkey",this.selModel.onEditorKey,this.selModel);if(String(_7)!=String(_8)){var r=ed.record;var _a=this.colModel.getDataIndex(ed.col);var e={grid:this,record:r,field:_a,originalValue:_8,value:_7,row:ed.row,column:ed.col,cancel:false};if(this.fireEvent("validateedit",e)!==false&&!e.cancel){r.set(_a,e.value);delete e.cancel;this.fireEvent("afteredit",e);}}this.view.focusCell(ed.row,ed.col);},startEditing:function(_c,_d){this.stopEditing();if(this.colModel.isCellEditable(_d,_c)){this.view.focusCell(_c,_d);var r=this.dataSource.getAt(_c);var _f=this.colModel.getDataIndex(_d);var e={grid:this,record:r,field:_f,value:r.data[_f],row:_c,column:_d,cancel:false};if(this.fireEvent("beforeedit",e)!==false&&!e.cancel){this.editing=true;(function(){var ed=this.colModel.getCellEditor(_d,_c);ed.row=_c;ed.col=_d;ed.record=r;ed.on("complete",this.onEditComplete,this,{single:true});ed.on("specialkey",this.selModel.onEditorKey,this.selModel);this.activeEditor=ed;var v=r.data[_f];ed.startEdit(this.view.getCell(_c,_d),v);}).defer(50,this);}}},stopEditing:function(){if(this.activeEditor){this.activeEditor.completeEdit();}this.activeEditor=null;}});
|
||||
|
||||
Ext.grid.GridEditor=function(_1,_2){Ext.grid.GridEditor.superclass.constructor.call(this,_1,_2);_1.monitorTab=false;};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:"frame"});
|
||||
|
||||
Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=function(_1,_2){this.grid=_1;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(_2){this.setSource(_2);}Ext.grid.PropertyStore.superclass.constructor.call(this);};Ext.extend(Ext.grid.PropertyStore,Ext.util.Observable,{setSource:function(o){this.source=o;this.store.removeAll();var _4=[];for(var k in o){if(this.isEditableValue(o[k])){_4.push(new Ext.grid.PropertyRecord({name:k,value:o[k]},k));}}this.store.loadRecords({records:_4},{},true);},onUpdate:function(ds,_7,_8){if(_8==Ext.data.Record.EDIT){var v=_7.data["value"];var _a=_7.modified["value"];if(this.grid.fireEvent("beforepropertychange",this.source,_7.id,v,_a)!==false){this.source[_7.id]=v;_7.commit();this.grid.fireEvent("propertychange",this.source,_7.id,v,_a);}else{_7.reject();}}},getProperty:function(_b){return this.store.getAt(_b);},isEditableValue:function(_c){if(_c&&_c instanceof Date){return true;}else{if(typeof _c=="object"||typeof _c=="function"){return false;}}return true;},setValue:function(_d,_e){this.source[_d]=_e;this.store.getById(_d).set("value",_e);},getSource:function(){return this.source;}});Ext.grid.PropertyColumnModel=function(_f,_10){this.grid=_f;var g=Ext.grid;g.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,sortable:true,dataIndex:"name",id:"name"},{header:this.valueText,resizable:false,dataIndex:"value",id:"value"}]);this.store=_10;this.bselect=Ext.DomHelper.append(document.body,{tag:"select",style:"display:none",cls:"x-grid-editor",children:[{tag:"option",value:"true",html:"true"},{tag:"option",value:"false",html:"false"}]});Ext.id(this.bselect);var f=Ext.form;this.editors={"date":new g.GridEditor(new f.DateField({selectOnFocus:true})),"string":new g.GridEditor(new f.TextField({selectOnFocus:true})),"number":new g.GridEditor(new f.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new g.GridEditor(new f.Field({el:this.beselect,selectOnFocus:true}))};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this);};Ext.extend(Ext.grid.PropertyColumnModel,Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",renderDate:function(_13){return _13.dateFormat(this.dateFormat);},renderBool:function(_14){return _14?"true":"false";},isCellEditable:function(_15,_16){return _15==1;},getRenderer:function(col){return col==1?this.renderCellDelegate:this.renderPropDelegate;},renderProp:function(v){return this.getPropertyName(v);},renderCell:function(val){var rv=val;if(val instanceof Date){rv=this.renderDate(val);}else{if(typeof val=="boolean"){rv=this.renderBool(val);}}return Ext.util.Format.htmlEncode(rv);},getPropertyName:function(_1b){var pn=this.grid.propertyNames;return pn&&pn[_1b]?pn[_1b]:_1b;},getCellEditor:function(_1d,_1e){var p=this.store.getProperty(_1e);var n=p.data["name"],val=p.data["value"];if(this.grid.customEditors[n]){return this.grid.customEditors[n];}if(val instanceof Date){return this.editors["date"];}else{if(typeof val=="number"){return this.editors["number"];}else{if(typeof val=="boolean"){return this.editors["boolean"];}else{return this.editors["string"];}}}}});Ext.grid.PropertyGrid=function(_22,_23){_23=_23||{};var _24=new Ext.grid.PropertyStore(this);this.store=_24;var cm=new Ext.grid.PropertyColumnModel(this,_24);_24.store.sort("name","ASC");Ext.grid.PropertyGrid.superclass.constructor.call(this,_22,Ext.apply({ds:_24.store,cm:cm,enableColLock:false,enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1},_23));this.container.addClass("x-props-grid");this.lastEditRow=null;this.on("columnresize",this.onColumnResize,this);this.addEvents({beforepropertychange:true,propertychange:true});this.customEditors=this.customEditors||{};};Ext.extend(Ext.grid.PropertyGrid,Ext.grid.EditorGrid,{render:function(){Ext.grid.PropertyGrid.superclass.render.call(this);this.autoSize.defer(100,this);},autoSize:function(){Ext.grid.PropertyGrid.superclass.autoSize.call(this);if(this.view){this.view.fitColumns();}},onColumnResize:function(){this.colModel.setColumnWidth(1,this.container.getWidth(true)-this.colModel.getColumnWidth(0));this.autoSize();},setSource:function(_26){this.store.setSource(_26);},getSource:function(){return this.store.getSource();}});
|
||||
|
||||
28
www/extras/yui-ext/package/grid/grid.js
vendored
Normal file
28
www/extras/yui-ext/package/grid/grid.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2032
www/extras/yui-ext/package/layout/layout-debug.js
vendored
Normal file
2032
www/extras/yui-ext/package/layout/layout-debug.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
26
www/extras/yui-ext/package/layout/layout.js
vendored
Normal file
26
www/extras/yui-ext/package/layout/layout.js
vendored
Normal file
File diff suppressed because one or more lines are too long
32
www/extras/yui-ext/package/menu/menus.js
vendored
Normal file
32
www/extras/yui-ext/package/menu/menus.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
www/extras/yui-ext/package/qtips/qtips.js
vendored
Normal file
10
www/extras/yui-ext/package/qtips/qtips.js
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
Ext.QuickTips=function(){var el,_2,_3,_4,tm,_6,_7,_8={},_9,_a=null,_b,_c;var ce,bd,xy,dd;var _11=false,_12=true,_13=false;var _14=1,_15=1,_16=1,_17=[];var _18=function(e){if(_12){return;}var t=e.getTarget();if(!t||t.nodeType!==1||t==document||t==document.body){return;}if(ce&&t==ce.el){clearTimeout(_15);return;}if(t&&_8[t.id]){_8[t.id].el=t;_14=_1b.defer(tm.showDelay,tm,[_8[t.id]]);return;}var ttp,et=Ext.fly(t);var ns=_6.namespace;if(tm.interceptTitles&&t.title){ttp=t.title;t.qtip=ttp;t.removeAttribute("title");e.preventDefault();}else{ttp=t.qtip||et.getAttributeNS(ns,_6.attribute);}if(ttp){_14=_1b.defer(tm.showDelay,tm,[{el:t,text:ttp,width:et.getAttributeNS(ns,_6.width),autoHide:et.getAttributeNS(ns,_6.hide)!="user",title:et.getAttributeNS(ns,_6.title),cls:et.getAttributeNS(ns,_6.cls)}]);}};var _1f=function(e){clearTimeout(_14);var t=e.getTarget();if(t&&ce&&ce.el==t&&(tm.autoHide&&ce.autoHide!==false)){_15=setTimeout(_22,tm.hideDelay);}};var _23=function(e){if(_12){return;}xy=e.getXY();xy[1]+=18;if(tm.trackMouse&&ce){el.setXY(xy);}};var _25=function(e){clearTimeout(_14);clearTimeout(_15);if(!e.within(el)){if(tm.hideOnClick){_22();tm.disable();}}};var _27=function(e){tm.enable();};var _29=function(){return _b.getPadding("l")+_c.getPadding("r");};var _1b=function(o){if(_12){return;}clearTimeout(_16);ce=o;if(_a){el.removeClass(_a);_a=null;}if(ce.cls){el.addClass(ce.cls);_a=ce.cls;}if(ce.title){_4.update(ce.title);_4.show();}else{_4.update("");_4.hide();}el.dom.style.width=tm.maxWidth+"px";_3.update(o.text);var p=_29(),w=ce.width;if(!w){var td=_3.dom;var aw=Math.max(td.offsetWidth,td.clientWidth,td.scrollWidth);if(aw>tm.maxWidth){w=tm.maxWidth;}else{if(aw<tm.minWidth){w=tm.minWidth;}else{w=aw;}}}el.setWidth(parseInt(w,10)+p);if(!ce.autoHide){_7.setDisplayed(true);if(dd){dd.unlock();}}else{_7.setDisplayed(false);if(dd){dd.lock();}}if(xy){el.avoidY=xy[1]-18;el.setXY(xy);}if(tm.animate){el.setOpacity(0.1);el.setStyle("visibility","visible");el.fadeIn({callback:_2f});}else{_2f();}};var _2f=function(){if(ce){el.show();_9.enable();if(tm.autoDismiss&&ce.autoHide!==false){_16=setTimeout(_22,tm.autoDismissDelay);}}};var _22=function(_30){clearTimeout(_16);clearTimeout(_15);ce=null;if(el.isVisible()){_9.disable();if(_30!==true&&tm.animate){el.fadeOut({callback:_31});}else{_31();}}};var _31=function(){el.hide();if(_a){el.removeClass(_a);_a=null;}};return {minWidth:40,maxWidth:300,interceptTitles:false,trackMouse:false,hideOnClick:true,showDelay:500,hideDelay:200,autoHide:true,autoDismiss:true,autoDismissDelay:5000,animate:false,init:function(){tm=Ext.QuickTips;_6=tm.tagConfig;if(!_13){el=new Ext.Layer({cls:"x-tip",shadow:"drop",shim:true,constrain:true,shadowOffset:3});el.fxDefaults={stopFx:true};el.update("<div class=\"x-tip-top-left\"><div class=\"x-tip-top-right\"><div class=\"x-tip-top\"></div></div></div><div class=\"x-tip-bd-left\"><div class=\"x-tip-bd-right\"><div class=\"x-tip-bd\"><div class=\"x-tip-close\"></div><h3></h3><div class=\"x-tip-bd-inner\"></div><div class=\"x-clear\"></div></div></div></div><div class=\"x-tip-ft-left\"><div class=\"x-tip-ft-right\"><div class=\"x-tip-ft\"></div></div></div>");_4=el.child("h3");_4.enableDisplayMode("block");_2=el.child("div.x-tip-bd");_3=el.child("div.x-tip-bd-inner");_b=el.child("div.x-tip-bd-left");_c=el.child("div.x-tip-bd-right");_7=el.child("div.x-tip-close");_7.enableDisplayMode("block");_7.on("click",_22);d=Ext.get(document);d.on("mousedown",_25);d.on("mouseup",_27);d.on("mouseover",_18);d.on("mouseout",_1f);d.on("mousemove",_23);_9=d.addKeyListener(27,_22);_9.disable();if(Ext.dd.DD){dd=el.initDD("default",null,{onDrag:function(){el.sync();}});dd.setHandleElId(_4.id);dd.lock();}_13=true;}this.enable();},register:function(_32){var cs=_32 instanceof Array?_32:arguments;for(var i=0,len=cs.length;i<len;i++){var c=cs[i];var _37=c.target;if(_37){if(_37 instanceof Array){for(var j=0,_39=_37.length;j<_39;j++){_8[_37[j]]=c;}}else{_8[typeof _37=="string"?_37:Ext.id(_37.id)]=c;}}}},unregister:function(el){delete _8[Ext.id(el)];},enable:function(){if(_13){_17.pop();if(_17.length<1){_12=false;}}},disable:function(){_12=true;clearTimeout(_14);clearTimeout(_15);clearTimeout(_16);if(ce){_22(true);}_17.push(1);},isEnabled:function(){return !_12;},tagConfig:{namespace:"ext",attribute:"qtip",width:"width",target:"target",title:"qtitle",hide:"hide",cls:"qclass"}};}();Ext.QuickTips.tips=Ext.QuickTips.register;
|
||||
|
||||
10
www/extras/yui-ext/package/resizable.js
vendored
Normal file
10
www/extras/yui-ext/package/resizable.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
www/extras/yui-ext/package/splitbar.js
vendored
Normal file
10
www/extras/yui-ext/package/splitbar.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
www/extras/yui-ext/package/tabs/tabs.js
vendored
Normal file
10
www/extras/yui-ext/package/tabs/tabs.js
vendored
Normal file
File diff suppressed because one or more lines are too long
12
www/extras/yui-ext/package/toolbar/toolbar.js
vendored
Normal file
12
www/extras/yui-ext/package/toolbar/toolbar.js
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
Ext.Toolbar=function(_1,_2,_3){if(_1 instanceof Array){_2=_1;_3=_2;_1=null;}Ext.apply(this,_3);this.buttons=_2;if(_1){this.render(_1);}};Ext.Toolbar.prototype={render:function(ct){this.el=Ext.get(ct);if(this.cls){this.el.addClass(this.cls);}this.el.update("<div class=\"x-toolbar x-small-editor\"><table cellspacing=\"0\"><tr></tr></table></div>");this.tr=this.el.child("tr",true);var _5=0;this.items=new Ext.util.MixedCollection(false,function(o){return o.id||("item"+(++_5));});if(this.buttons){this.add.apply(this,this.buttons);delete this.buttons;}},add:function(){var a=arguments,l=a.length;for(var i=0;i<l;i++){var el=a[i];if(el.applyTo){this.addField(el);}else{if(el.render){this.addItem(el);}else{if(typeof el=="string"){if(el=="separator"||el=="-"){this.addSeparator();}else{if(el==" "){this.addSpacer();}else{this.addText(el);}}}else{if(el.tagName){this.addElement(el);}else{if(typeof el=="object"){this.addButton(el);}}}}}}},getEl:function(){return this.el;},addSeparator:function(){return this.addItem(new Ext.Toolbar.Separator());},addSpacer:function(){return this.addItem(new Ext.Toolbar.Spacer());},addElement:function(el){return this.addItem(new Ext.Toolbar.Item(el));},addItem:function(_c){var td=this.nextBlock();_c.render(td);this.items.add(_c);return _c;},addButton:function(_e){if(_e instanceof Array){var _f=[];for(var i=0,len=_e.length;i<len;i++){_f.push(this.addButton(_e[i]));}return _f;}var b=_e;if(!(_e instanceof Ext.Toolbar.Button)){b=new Ext.Toolbar.Button(_e);}var td=this.nextBlock();b.render(td);this.items.add(b);return b;},addText:function(_14){return this.addItem(new Ext.Toolbar.TextItem(_14));},insertButton:function(_15,_16){if(_16 instanceof Array){var _17=[];for(var i=0,len=_16.length;i<len;i++){_17.push(this.insertButton(_15+i,_16[i]));}return _17;}if(!(_16 instanceof Ext.Toolbar.Button)){_16=new Ext.Toolbar.Button(_16);}var td=document.createElement("td");this.tr.insertBefore(td,this.tr.childNodes[_15]);_16.render(td);this.items.insert(_15,_16);return _16;},addDom:function(_1b,_1c){var td=this.nextBlock();Ext.DomHelper.overwrite(td,_1b);var ti=new Ext.Toolbar.Item(td.firstChild);ti.render(td);this.items.add(ti);return ti;},addField:function(_1f){var td=this.nextBlock();_1f.render(td);var ti=new Ext.Toolbar.Item(td.firstChild);ti.render(td);this.items.add(ti);return ti;},nextBlock:function(){var td=document.createElement("td");this.tr.appendChild(td);return td;}};Ext.Toolbar.Item=function(el){this.el=Ext.getDom(el);this.id=Ext.id(this.el);this.hidden=false;};Ext.Toolbar.Item.prototype={getEl:function(){return this.el;},render:function(td){this.td=td;td.appendChild(this.el);},destroy:function(){this.td.parentNode.removeChild(this.td);},show:function(){this.hidden=false;this.td.style.display="";},hide:function(){this.hidden=true;this.td.style.display="none";},setVisible:function(_25){if(_25){this.show();}else{this.hide();}},focus:function(){Ext.fly(this.el).focus();},disable:function(){Ext.fly(this.td).addClass("x-item-disabled");this.disabled=true;this.el.disabled=true;},enable:function(){Ext.fly(this.td).removeClass("x-item-disabled");this.disabled=false;this.el.disabled=false;}};Ext.Toolbar.Separator=function(){var s=document.createElement("span");s.className="ytb-sep";Ext.Toolbar.Separator.superclass.constructor.call(this,s);};Ext.extend(Ext.Toolbar.Separator,Ext.Toolbar.Item);Ext.Toolbar.Spacer=function(){var s=document.createElement("div");s.className="ytb-spacer";Ext.Toolbar.Separator.superclass.constructor.call(this,s);};Ext.extend(Ext.Toolbar.Spacer,Ext.Toolbar.Item);Ext.Toolbar.TextItem=function(_28){var s=document.createElement("span");s.className="ytb-text";s.innerHTML=_28;Ext.Toolbar.TextItem.superclass.constructor.call(this,s);};Ext.extend(Ext.Toolbar.TextItem,Ext.Toolbar.Item);Ext.Toolbar.Button=function(_2a){Ext.Toolbar.Button.superclass.constructor.call(this,null,_2a);};Ext.extend(Ext.Toolbar.Button,Ext.Button,{render:function(td){this.td=td;Ext.Toolbar.Button.superclass.render.call(this,td);},destroy:function(){Ext.Toolbar.Button.superclass.destroy.call(this);this.td.parentNode.removeChild(this.td);},show:function(){this.hidden=false;this.td.style.display="";},hide:function(){this.hidden=true;this.td.style.display="none";},disable:function(){Ext.fly(this.td).addClass("x-item-disabled");this.disabled=true;},enable:function(){Ext.fly(this.td).removeClass("x-item-disabled");this.disabled=false;}});Ext.ToolbarButton=Ext.Toolbar.Button;Ext.Toolbar.MenuButton=function(_2c){Ext.Toolbar.MenuButton.superclass.constructor.call(this,null,_2c);};Ext.extend(Ext.Toolbar.MenuButton,Ext.MenuButton,{render:function(td){this.td=td;Ext.Toolbar.MenuButton.superclass.render.call(this,td);},destroy:function(){Ext.Toolbar.MenuButton.superclass.destroy.call(this);this.td.parentNode.removeChild(this.td);},show:function(){this.hidden=false;this.td.style.display="";},hide:function(){this.hidden=true;this.td.style.display="none";}});
|
||||
|
||||
Ext.PagingToolbar=function(el,ds,_3){Ext.PagingToolbar.superclass.constructor.call(this,el,null,_3);this.ds=ds;this.cursor=0;this.renderButtons(this.el);this.bind(ds);};Ext.extend(Ext.PagingToolbar,Ext.Toolbar,{pageSize:20,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",renderButtons:function(el){this.first=this.addButton({tooltip:this.firstText,cls:"x-btn-icon x-grid-page-first",disabled:true,handler:this.onClick.createDelegate(this,["first"])});this.prev=this.addButton({tooltip:this.prevText,cls:"x-btn-icon x-grid-page-prev",disabled:true,handler:this.onClick.createDelegate(this,["prev"])});this.addSeparator();this.add(this.beforePageText);this.field=Ext.get(this.addDom({tag:"input",type:"text",size:"3",value:"1",cls:"x-grid-page-number"}).el);this.field.on("keydown",this.onPagingKeydown,this);this.field.on("focus",function(){this.dom.select();});this.afterTextEl=this.addText(String.format(this.afterPageText,1));this.field.setHeight(18);this.addSeparator();this.next=this.addButton({tooltip:this.nextText,cls:"x-btn-icon x-grid-page-next",disabled:true,handler:this.onClick.createDelegate(this,["next"])});this.last=this.addButton({tooltip:this.lastText,cls:"x-btn-icon x-grid-page-last",disabled:true,handler:this.onClick.createDelegate(this,["last"])});this.addSeparator();this.loading=this.addButton({tooltip:this.refreshText,cls:"x-btn-icon x-grid-loading",disabled:true,handler:this.onClick.createDelegate(this,["refresh"])});if(this.displayInfo){this.displayEl=this.el.createChild({cls:"x-paging-info"});}},updateInfo:function(){if(this.displayEl){var _5=this.ds.getCount();var _6=_5==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+_5,this.ds.getTotalCount());this.displayEl.update(_6);}},onLoad:function(ds,r,o){this.cursor=o.params?o.params.start:0;var d=this.getPageData(),ap=d.activePage,ps=d.pages;this.afterTextEl.el.innerHTML=String.format(this.afterPageText,d.pages);this.field.dom.value=ap;this.first.setDisabled(ap==1);this.prev.setDisabled(ap==1);this.next.setDisabled(ap==ps);this.last.setDisabled(ap==ps);this.loading.enable();this.updateInfo();},getPageData:function(){var _d=this.ds.getTotalCount();return {total:_d,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:_d<this.pageSize?1:Math.ceil(_d/this.pageSize)};},onLoadError:function(){this.loading.enable();},onPagingKeydown:function(e){var k=e.getKey();var d=this.getPageData();if(k==e.RETURN){var v=this.field.dom.value,_12;if(!v||isNaN(_12=parseInt(v,10))){this.field.dom.value=d.activePage;return;}_12=Math.min(Math.max(1,_12),d.pages)-1;this.ds.load({params:{start:_12*this.pageSize,limit:this.pageSize}});e.stopEvent();}else{if(k==e.HOME||(k==e.UP&&e.ctrlKey)||(k==e.PAGEUP&&e.ctrlKey)||(k==e.RIGHT&&e.ctrlKey)||k==e.END||(k==e.DOWN&&e.ctrlKey)||(k==e.LEFT&&e.ctrlKey)||(k==e.PAGEDOWN&&e.ctrlKey)){var _12=(k==e.HOME||(k==e.DOWN&&e.ctrlKey)||(k==e.LEFT&&e.ctrlKey)||(k==e.PAGEDOWN&&e.ctrlKey))?1:d.pages;this.field.dom.value=_12;this.ds.load({params:{start:(_12-1)*this.pageSize,limit:this.pageSize}});e.stopEvent();}else{if(k==e.UP||k==e.RIGHT||k==e.PAGEUP||k==e.DOWN||k==e.LEFT||k==e.PAGEDOWN){var v=this.field.dom.value,_12;var _13=(e.shiftKey)?10:1;if(k==e.DOWN||k==e.LEFT||k==e.PAGEDOWN){_13*=-1;}if(!v||isNaN(_12=parseInt(v,10))){this.field.dom.value=d.activePage;return;}else{if(parseInt(v,10)+_13>=1&parseInt(v,10)+_13<=d.pages){this.field.dom.value=parseInt(v,10)+_13;_12=Math.min(Math.max(1,_12+_13),d.pages)-1;this.ds.load({params:{start:_12*this.pageSize,limit:this.pageSize}});}}e.stopEvent();}}}},beforeLoad:function(){if(this.loading){this.loading.disable();}},onClick:function(_14){var ds=this.ds;switch(_14){case "first":ds.load({params:{start:0,limit:this.pageSize}});break;case "prev":ds.load({params:{start:Math.max(0,this.cursor-this.pageSize),limit:this.pageSize}});break;case "next":ds.load({params:{start:this.cursor+this.pageSize,limit:this.pageSize}});break;case "last":var _16=ds.getTotalCount();var _17=_16%this.pageSize;var _18=_17?(_16-_17):_16-this.pageSize;ds.load({params:{start:_18,limit:this.pageSize}});break;case "refresh":ds.load({params:{start:this.cursor,limit:this.pageSize}});break;}},unbind:function(ds){ds.un("beforeload",this.beforeLoad,this);ds.un("load",this.onLoad,this);ds.un("loadexception",this.onLoadError,this);},bind:function(ds){ds.on("beforeload",this.beforeLoad,this);ds.on("load",this.onLoad,this);ds.on("loadexception",this.onLoadError,this);}});
|
||||
|
||||
32
www/extras/yui-ext/package/tree/tree.js
vendored
Normal file
32
www/extras/yui-ext/package/tree/tree.js
vendored
Normal file
File diff suppressed because one or more lines are too long
26
www/extras/yui-ext/package/util.js
vendored
Normal file
26
www/extras/yui-ext/package/util.js
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
Ext.util.DelayedTask=function(fn,_2,_3){var id=null,d,t;var _7=function(){var _8=new Date().getTime();if(_8-t>=d){clearInterval(id);id=null;fn.apply(_2,_3||[]);}};this.delay=function(_9,_a,_b,_c){if(id&&_9!=d){this.cancel();}d=_9;t=new Date().getTime();fn=_a||fn;_2=_b||_2;_3=_c||_3;if(!id){id=setInterval(_7,d);}};this.cancel=function(){if(id){clearInterval(id);id=null;}};};
|
||||
|
||||
Ext.util.MixedCollection=function(_1,_2){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents({"clear":true,"add":true,"replace":true,"remove":true,"sort":true});this.allowFunctions=_1===true;if(_2){this.getKey=_2;}Ext.util.MixedCollection.superclass.constructor.call(this);};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(_3,o){if(arguments.length==1){o=arguments[0];_3=this.getKey(o);}if(typeof _3=="undefined"||_3===null){this.length++;this.items.push(o);this.keys.push(null);}else{var _5=this.map[_3];if(_5){return this.replace(_3,o);}this.length++;this.items.push(o);this.map[_3]=o;this.keys.push(_3);}this.fireEvent("add",this.length-1,o,_3);return o;},getKey:function(o){return o.id;},replace:function(_7,o){if(arguments.length==1){o=arguments[0];_7=this.getKey(o);}var _9=this.item(_7);if(typeof _7=="undefined"||_7===null||typeof _9=="undefined"){return this.add(_7,o);}var _a=this.indexOfKey(_7);this.items[_a]=o;this.map[_7]=o;this.fireEvent("replace",_7,_9,o);return o;},addAll:function(_b){if(arguments.length>1||_b instanceof Array){var _c=arguments.length>1?arguments:_b;for(var i=0,_e=_c.length;i<_e;i++){this.add(_c[i]);}}else{for(var _f in _b){if(this.allowFunctions||typeof _b[_f]!="function"){this.add(_b[_f],_f);}}}},each:function(fn,_11){var _12=[].concat(this.items);for(var i=0,len=_12.length;i<len;i++){if(fn.call(_11||_12[i],_12[i],i,len)===false){break;}}},eachKey:function(fn,_16){for(var i=0,len=this.keys.length;i<len;i++){fn.call(_16||window,this.keys[i],this.items[i],i,len);}},find:function(fn,_1a){for(var i=0,len=this.items.length;i<len;i++){if(fn.call(_1a||window,this.items[i],this.keys[i])){return this.items[i];}}return null;},insert:function(_1d,key,o){if(arguments.length==2){o=arguments[1];key=this.getKey(o);}if(_1d>=this.length){return this.add(key,o);}this.length++;this.items.splice(_1d,0,o);if(typeof key!="undefined"&&key!=null){this.map[key]=o;}this.keys.splice(_1d,0,key);this.fireEvent("add",_1d,o,key);return o;},remove:function(o){return this.removeAt(this.indexOf(o));},removeAt:function(_21){if(_21<this.length&&_21>=0){this.length--;var o=this.items[_21];this.items.splice(_21,1);var key=this.keys[_21];if(typeof key!="undefined"){delete this.map[key];}this.keys.splice(_21,1);this.fireEvent("remove",o,key);}},removeKey:function(key){return this.removeAt(this.indexOfKey(key));},getCount:function(){return this.length;},indexOf:function(o){if(!this.items.indexOf){for(var i=0,len=this.items.length;i<len;i++){if(this.items[i]==o){return i;}}return -1;}else{return this.items.indexOf(o);}},indexOfKey:function(key){if(!this.keys.indexOf){for(var i=0,len=this.keys.length;i<len;i++){if(this.keys[i]==key){return i;}}return -1;}else{return this.keys.indexOf(key);}},item:function(key){var _2c=typeof this.map[key]!="undefined"?this.map[key]:this.items[key];return typeof _2c!="function"||this.allowFunctions?_2c:null;},itemAt:function(_2d){return this.items[_2d];},key:function(key){return this.map[key];},contains:function(o){return this.indexOf(o)!=-1;},containsKey:function(key){return typeof this.map[key]!="undefined";},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear");},first:function(){return this.items[0];},last:function(){return this.items[this.length-1];},_sort:function(_31,dir,fn){var dsc=String(dir).toUpperCase()=="DESC"?-1:1;fn=fn||function(a,b){return a-b;};var c=[],k=this.keys,_39=this.items;for(var i=0,len=_39.length;i<len;i++){c[c.length]={key:k[i],value:_39[i],index:i};}c.sort(function(a,b){var v=fn(a[_31],b[_31])*dsc;if(v==0){v=(a.index<b.index?-1:1);}return v;});for(var i=0,len=c.length;i<len;i++){_39[i]=c[i].value;k[i]=c[i].key;}this.fireEvent("sort",this);},sort:function(dir,fn){this._sort("value",dir,fn);},keySort:function(dir,fn){this._sort("key",dir,fn||function(a,b){return String(a).toUpperCase()-String(b).toUpperCase();});},getRange:function(_45,end){var _47=this.items;if(_47.length<1){return [];}_45=_45||0;end=Math.min(typeof end=="undefined"?this.length-1:end,this.length-1);var r=[];if(_45<=end){for(var i=_45;i<=end;i++){r[r.length]=_47[i];}}else{for(var i=_45;i>=end;i--){r[r.length]=_47[i];}}return r;},filter:function(_4a,_4b){if(!_4b.exec){_4b=String(_4b);if(_4b.length==0){return this.clone();}_4b=new RegExp("^"+Ext.escapeRe(_4b),"i");}return this.filterBy(function(o){return o&&_4b.test(o[_4a]);});},filterBy:function(fn,_4e){var r=new Ext.util.MixedCollection();r.getKey=this.getKey;var k=this.keys,it=this.items;for(var i=0,len=it.length;i<len;i++){if(fn.call(_4e||this,it[i],k[i])){r.add(k[i],it[i]);}}return r;},clone:function(){var r=new Ext.util.MixedCollection();var k=this.keys,it=this.items;for(var i=0,len=it.length;i<len;i++){r.add(k[i],it[i]);}r.getKey=this.getKey;return r;}});Ext.util.MixedCollection.prototype.get=Ext.util.MixedCollection.prototype.item;
|
||||
|
||||
Ext.util.JSON=new (function(){var _1={}.hasOwnProperty?true:false;var _2=function(n){return n<10?"0"+n:n;};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"};var _5=function(s){if(/["\\\x00-\x1f]/.test(s)){return "\""+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}c=b.charCodeAt();return "\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);})+"\"";}return "\""+s+"\"";};var _a=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=1){v=o[i];switch(typeof v){case "undefined":case "function":case "unknown":break;default:if(b){a.push(",");}a.push(v===null?"null":Ext.util.JSON.encode(v));b=true;}}a.push("]");return a.join("");};var _11=function(o){return "\""+o.getFullYear()+"-"+_2(o.getMonth()+1)+"-"+_2(o.getDate())+"T"+_2(o.getHours())+":"+_2(o.getMinutes())+":"+_2(o.getSeconds())+"\"";};this.encode=function(o){if(typeof o=="undefined"||o===null){return "null";}else{if(o instanceof Array){return _a(o);}else{if(o instanceof Date){return _11(o);}else{if(typeof o=="string"){return _5(o);}else{if(typeof o=="number"){return isFinite(o)?String(o):"null";}else{if(typeof o=="boolean"){return String(o);}else{var a=["{"],b,i,v;for(i in o){if(!_1||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case "undefined":case "function":case "unknown":break;default:if(b){a.push(",");}a.push(this.encode(i),":",v===null?"null":this.encode(v));b=true;}}}a.push("}");return a.join("");}}}}}}};this.decode=function(_18){return eval("("+_18+")");};})();Ext.encode=Ext.util.JSON.encode;Ext.decode=Ext.util.JSON.decode;
|
||||
|
||||
Ext.util.Format=function(){var _1=/^\s+|\s+$/g;return {ellipsis:function(_2,_3){if(_2&&_2.length>_3){return _2.substr(0,_3-3)+"...";}return _2;},undef:function(_4){return typeof _4!="undefined"?_4:"";},htmlEncode:function(_5){return !_5?_5:String(_5).replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<").replace(/"/g,""");},trim:function(_6){return String(_6).replace(_1,"");},substr:function(_7,_8,_9){return String(_7).substr(_8,_9);},lowercase:function(_a){return String(_a).toLowerCase();},uppercase:function(_b){return String(_b).toUpperCase();},capitalize:function(_c){return !_c?_c:_c.charAt(0).toUpperCase()+_c.substr(1).toLowerCase();},call:function(_d,fn){if(arguments.length>2){var _f=Array.prototype.slice.call(arguments,2);_f.unshift(_d);return eval(fn).apply(window,_f);}else{return eval(fn).call(window,_d);}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);return "$"+v;},date:function(v,_12){if(!v){return "";}if(!(v instanceof Date)){v=new Date(Date.parse(v));}return v.dateFormat(_12||"m/d/Y");},dateRenderer:function(_13){return function(v){return Ext.util.Format.date(v,_13);};},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"");}};}();
|
||||
|
||||
Ext.util.CSS=function(){var _1=null;var _2=document;var _3=/(-[a-z])/gi;var _4=function(m,a){return a.charAt(1).toUpperCase();};return {createStyleSheet:function(_7){var ss;if(Ext.isIE){ss=_2.createStyleSheet();ss.cssText=_7;}else{var _9=_2.getElementsByTagName("head")[0];var _a=_2.createElement("style");_a.setAttribute("type","text/css");try{_a.appendChild(_2.createTextNode(_7));}catch(e){_a.cssText=_7;}_9.appendChild(_a);ss=_a.styleSheet?_a.styleSheet:(_a.sheet||_2.styleSheets[_2.styleSheets.length-1]);}this.cacheStyleSheet(ss);return ss;},removeStyleSheet:function(id){var _c=_2.getElementById(id);if(_c){_c.parentNode.removeChild(_c);}},swapStyleSheet:function(id,_e){this.removeStyleSheet(id);var ss=_2.createElement("link");ss.setAttribute("rel","stylesheet");ss.setAttribute("type","text/css");ss.setAttribute("id",id);ss.setAttribute("href",_e);_2.getElementsByTagName("head")[0].appendChild(ss);},refreshCache:function(){return this.getRules(true);},cacheStyleSheet:function(ss){if(!_1){_1={};}try{var _11=ss.cssRules||ss.rules;for(var j=_11.length-1;j>=0;--j){_1[_11[j].selectorText]=_11[j];}}catch(e){}},getRules:function(_13){if(_1==null||_13){_1={};var ds=_2.styleSheets;for(var i=0,len=ds.length;i<len;i++){try{this.cacheStyleSheet(ds[i]);}catch(e){}}}return _1;},getRule:function(_17,_18){var rs=this.getRules(_18);if(!(_17 instanceof Array)){return rs[_17];}for(var i=0;i<_17.length;i++){if(rs[_17[i]]){return rs[_17[i]];}}return null;},updateRule:function(_1b,_1c,_1d){if(!(_1b instanceof Array)){var _1e=this.getRule(_1b);if(_1e){_1e.style[_1c.replace(_3,_4)]=_1d;return true;}}else{for(var i=0;i<_1b.length;i++){if(this.updateRule(_1b[i],_1c,_1d)){return true;}}}return false;}};}();
|
||||
|
||||
Ext.util.ClickRepeater=function(el,_2){this.el=Ext.get(el);this.el.unselectable();Ext.apply(this,_2);this.addEvents({"mousedown":true,"click":true,"mouseup":true});this.el.on("mousedown",this.handleMouseDown,this);if(this.preventDefault||this.stopDefault){this.el.on("click",function(e){if(this.preventDefault){e.preventDefault();}if(this.stopDefault){e.stopEvent();}},this);}if(this.handler){this.on("click",this.handler,this.scope||this);}Ext.util.ClickRepeater.superclass.constructor.call(this);};Ext.extend(Ext.util.ClickRepeater,Ext.util.Observable,{interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,docEl:Ext.get(document),handleMouseDown:function(){clearTimeout(this.timer);this.el.blur();if(this.pressClass){this.el.addClass(this.pressClass);}this.mousedownTime=new Date();this.docEl.on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this);this.fireEvent("click",this);this.timer=this.click.defer(this.delay||this.interval,this);},click:function(){this.fireEvent("click",this);this.timer=this.click.defer(this.getInterval(),this);},getInterval:function(){if(!this.accelerate){return this.interval;}var _4=this.mousedownTime.getElapsed();if(_4<500){return 400;}else{if(_4<1700){return 320;}else{if(_4<2600){return 250;}else{if(_4<3500){return 180;}else{if(_4<4400){return 140;}else{if(_4<5300){return 80;}else{if(_4<6200){return 50;}else{return 10;}}}}}}}},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressClass){this.el.removeClass(this.pressClass);}this.el.on("mouseover",this.handleMouseReturn,this);},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn);if(this.pressClass){this.el.addClass(this.pressClass);}this.click();},handleMouseUp:function(){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn);this.el.un("mouseout",this.handleMouseOut);this.docEl.un("mouseup",this.handleMouseUp);this.el.removeClass(this.pressClass);this.fireEvent("mouseup",this);}});
|
||||
|
||||
Ext.KeyNav=function(el,_2){this.el=Ext.get(el);Ext.apply(this,_2);if(!this.disabled){this.disabled=true;this.enable();}};Ext.KeyNav.prototype={disabled:false,defaultEventAction:"stopEvent",prepareEvent:function(e){var k=e.getKey();var h=this.keyToHandler[k];if(Ext.isSafari&&h&&k>=37&&k<=40){e.stopEvent();}},relay:function(e){var k=e.getKey();var h=this.keyToHandler[k];if(h&&this[h]){if(this.doRelay(e,this[h],h)!==true){e[this.defaultEventAction]();}}},doRelay:function(e,h,_b){return h.call(this.scope||this,e);},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(Ext.isIE){this.el.on("keydown",this.relay,this);}else{this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this);}this.disabled=false;}},disable:function(){if(!this.disabled){if(Ext.isIE){this.el.un("keydown",this.relay);}else{this.el.un("keydown",this.prepareEvent);this.el.un("keypress",this.relay);}this.disabled=true;}}};
|
||||
|
||||
Ext.KeyMap=function(el,_2,_3){this.el=Ext.get(el);this.eventName=_3||"keydown";this.bindings=[];if(_2 instanceof Array){for(var i=0,_5=_2.length;i<_5;i++){this.addBinding(_2[i]);}}else{this.addBinding(_2);}this.keyDownDelegate=Ext.EventManager.wrap(this.handleKeyDown,this,true);this.enable();};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(_6){var _7=_6.key,_8=_6.shift,_9=_6.ctrl,_a=_6.alt,fn=_6.fn,_c=_6.scope;if(typeof _7=="string"){var ks=[];var _e=_7.toUpperCase();for(var j=0,len=_e.length;j<len;j++){ks.push(_e.charCodeAt(j));}_7=ks;}var _11=_7 instanceof Array;var _12=function(e){if((!_8||e.shiftKey)&&(!_9||e.ctrlKey)&&(!_a||e.altKey)){var k=e.getKey();if(_11){for(var i=0,len=_7.length;i<len;i++){if(_7[i]==k){if(this.stopEvent){e.stopEvent();}fn.call(_c||window,k,e);return;}}}else{if(k==_7){if(this.stopEvent){e.stopEvent();}fn.call(_c||window,k,e);}}}};this.bindings.push(_12);},handleKeyDown:function(e){if(this.enabled){var b=this.bindings;for(var i=0,len=b.length;i<len;i++){b[i].call(this,e);}}},isEnabled:function(){return this.enabled;},enable:function(){if(!this.enabled){this.el.on(this.eventName,this.keyDownDelegate);this.enabled=true;}},disable:function(){if(this.enabled){this.el.removeListener(this.eventName,this.keyDownDelegate);this.enabled=false;}}};
|
||||
|
||||
Ext.util.TextMetrics=function(){var _1;return {measure:function(el,_3,_4){if(!_1){_1=Ext.util.TextMetrics.Instance(el,_4);}_1.bind(el);_1.setFixedWidth(_4||"auto");return _1.getSize(_3);},createInstance:function(el,_6){return Ext.util.TextMetrics.Instance(el,_6);}};}();Ext.util.TextMetrics.Instance=function(_7,_8){var ml=new Ext.Element(document.createElement("div"));document.body.appendChild(ml.dom);ml.position("absolute");ml.setLeftTop(-1000,-1000);ml.hide();if(_8){mi.setWidth(_8);}var _a={getSize:function(_b){ml.update(_b);var s=ml.getSize();ml.update("");return s;},bind:function(el){ml.setStyle(Ext.fly(el).getStyles("font-size","font-style","font-weight","font-family","line-height"));},setFixedWidth:function(_e){ml.setWidth(_e);},getWidth:function(_f){ml.dom.style.width="auto";return this.getSize(_f).width;},getHeight:function(_10){return this.getSize(_10).height;}};_a.bind(_7);return _a;};Ext.Element.measureText=Ext.util.TextMetrics.measure;
|
||||
|
||||
14
www/extras/yui-ext/package/widget-core.js
vendored
Normal file
14
www/extras/yui-ext/package/widget-core.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue