Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/adapter/yui/ext-yui-adapter-debug.js view on Meta::CPAN
* </ul></p>
* <p>Before each invocation, Ext injects the property <code>taskRunCount</code> into the task object so
* that calculations based on the repeat count can be performed.</p>
* @return {Object} The task
*/
this.start = function(task){
tasks.push(task);
task.taskStartTime = new Date().getTime();
task.taskRunTime = 0;
task.taskRunCount = 0;
startThread();
return task;
};
/**
* Stops an existing running task.
* @method stop
* @param {Object} task The task to stop
* @return {Object} The task
*/
this.stop = function(task){
removeTask(task);
return task;
};
/**
* Stops all tasks that are currently running.
* @method stopAll
*/
this.stopAll = function(){
stopThread();
for(var i = 0, len = tasks.length; i < len; i++){
if(tasks[i].onStop){
tasks[i].onStop();
}
}
tasks = [];
removeQueue = [];
};
};
/**
* @class Ext.TaskMgr
* @extends Ext.util.TaskRunner
* A static {@link Ext.util.TaskRunner} instance that can be used to start and stop arbitrary tasks. See
* {@link Ext.util.TaskRunner} for supported methods and task config properties.
* <pre><code>
// Start a simple clock task that updates a div once per second
var task = {
run: function(){
Ext.fly('clock').update(new Date().format('g:i:s A'));
},
interval: 1000 //1 second
}
Ext.TaskMgr.start(task);
</code></pre>
* <p>See the {@link #start} method for details about how to configure a task object.</p>
* @singleton
*/
Ext.TaskMgr = new Ext.util.TaskRunner();if(typeof YAHOO == "undefined"){
throw "Unable to load Ext, core YUI utilities (yahoo, dom, event) not found.";
}
(function(){
var E = YAHOO.util.Event,
D = YAHOO.util.Dom,
CN = YAHOO.util.Connect,
ES = YAHOO.util.Easing,
A = YAHOO.util.Anim,
libFlyweight,
version = YAHOO.env.getVersion('yahoo').version.split('.'),
mouseEnterSupported = parseInt(version[0], 10) >= 3,
mouseCache = {},
elContains = function(parent, child){
if(parent && parent.firstChild){
while(child){
if(child === parent){
return true;
}
child = child.parentNode;
if(child && (child.nodeType != 1)){
child = null;
}
}
}
return false;
}, checkRelatedTarget = function(e){
return !elContains(e.currentTarget, Ext.lib.Event.getRelatedTarget(e));
};
Ext.lib.Dom = {
getViewWidth : function(full){
return full ? D.getDocumentWidth() : D.getViewportWidth();
},
getViewHeight : function(full){
return full ? D.getDocumentHeight() : D.getViewportHeight();
},
isAncestor : function(haystack, needle){
return D.isAncestor(haystack, needle);
},
getRegion : function(el){
return D.getRegion(el);
},
getY : function(el){
return this.getXY(el)[1];
},
getX : function(el){
return this.getXY(el)[0];
},
// original version based on YahooUI getXY
// this version fixes several issues in Safari and FF
// and boosts performance by removing the batch overhead, repetitive dom lookups and array index calls
getXY : function(el){
var p, pe, b, scroll, bd = (document.body || document.documentElement);
el = Ext.getDom(el);
( run in 0.550 second using v1.01-cache-2.11-cpan-adec679a428 )