rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
aoColumns: _Settings.aoColumns,
aoColumns: _Settings.aoColumns
this.drawJobsTable = function() { var thisRef = this; var _Settings = this.Settings.Jobs; // Shortcut // "draw" function is calling lkfw.datatable plugin to create table filled with data var draw = function(data) { thisRef.jobsTable = $('#content').lkfw_dataTable({ dTable: thisRef.jobsTable, tableId: 'jobs', items: data, tblLabels: _Settings['tblLabels'], sorting: _Settings.sorting, fnContentChange: function(el) { thisRef.jobsTableContent_change(el) }, dataTable: { iDisplayLength: _Settings.iDisplayLength, sPaginationType: "input", bLengthChange: false, aoColumns: _Settings.aoColumns, }, }); }; // "getData" function converts data given by ajax request onto // lkfw.datatable plugin readable format // Arguments: // data - object returned by ajax call var getData = function(data) { var taskJobs = _Settings.getDataArray(data); var t = new Date(); // Save the data thisRef.Data.mem.jobs = { user: this.Data.user, timestamp: Math.floor(t.getTime()/1000), data: taskJobs }; // Draw data table draw(_Settings.translateData(taskJobs)); tSettings = thisRef.jobsTable[0].fnSettings(); tPages = parseInt( (tSettings.fnRecordsDisplay()-1) / tSettings._iDisplayLength, 10 ) + 1; if ( $.bbq.getState('p') && ($.bbq.getState('p') <= tPages) ) { $('#url-page').trigger('click'); // Load page number from URL } else { thisRef.Data.p = 1; thisRef.Data.noreload = true; thisRef.setupURL(); } }; // Get the data from ajax call this.Data.ajax_getData(_Settings.dataURL, _Settings.dataURL_params(this.Data), getData, function(){}); };
srchFldLbl: _Settings.searchLabel,
srchFldLbl: _Settings.searchLabel
this.drawUsers = function() { var thisRef = this; var _Settings = this.Settings.Users; // Shortcut // "draw" function is calling lkfw.searchable.list plugin to create searchable list of users var draw = function() { $('#content').lkfw_searchableList({ listId: 'users', items: thisRef.Data.mem.users, srchFldLbl: _Settings.searchLabel, }); $('#users_0 li').unbind('click').click( function() { thisRef.userListItem_Click(this) }); $('#users_0 li').unbind('mouseover').mouseover( function() { thisRef.userListItem_MouseOver(this) }); $('#users_0 li').unbind('mouseout').mouseout( function() { thisRef.userListItem_MouseOut(this) }); }; // Draw searchable list if (this.Data.mem.users) draw(); };
root : '/taskmodel-core-view/icons/base.gif', folder : '/taskmodel-core-view/icons/folder.gif', folderOpen : '/taskmodel-core-view/icons/folderopen.gif', node : '/taskmodel-core-view/icons/page.gif', empty : '/taskmodel-core-view/icons/empty.gif', line : '/taskmodel-core-view/icons/line.gif', join : '/taskmodel-core-view/icons/join.gif', joinBottom : '/taskmodel-core-view/icons/joinbottom.gif', plus : '/taskmodel-core-view/icons/plus.gif', plusBottom : '/taskmodel-core-view/icons/plusbottom.gif', minus : '/taskmodel-core-view/icons/minus.gif', minusBottom : '/taskmodel-core-view/icons/minusbottom.gif', nlPlus : '/taskmodel-core-view/icons/nolines_plus.gif', nlMinus : '/taskmodel-core-view/icons/nolines_minus.gif'
root : 'icons/base.gif', folder : 'icons/folder.gif', folderOpen : 'icons/folderopen.gif', node : 'icons/page.gif', empty : 'icons/empty.gif', line : 'icons/line.gif', join : 'icons/join.gif', joinBottom : 'icons/joinbottom.gif', plus : 'icons/plus.gif', plusBottom : 'icons/plusbottom.gif', minus : 'icons/minus.gif', minusBottom : 'icons/minusbottom.gif', nlPlus : 'icons/nolines_plus.gif', nlMinus : 'icons/nolines_minus.gif'
function dTree(objName) { this.config = { target : null, folderLinks : true, useSelection : true, useCookies : true, useLines : true, useIcons : true, useStatusText : true, closeSameLevel : false, inOrder : false } this.icon = { root : '/taskmodel-core-view/icons/base.gif', folder : '/taskmodel-core-view/icons/folder.gif', folderOpen : '/taskmodel-core-view/icons/folderopen.gif', node : '/taskmodel-core-view/icons/page.gif', empty : '/taskmodel-core-view/icons/empty.gif', line : '/taskmodel-core-view/icons/line.gif', join : '/taskmodel-core-view/icons/join.gif', joinBottom : '/taskmodel-core-view/icons/joinbottom.gif', plus : '/taskmodel-core-view/icons/plus.gif', plusBottom : '/taskmodel-core-view/icons/plusbottom.gif', minus : '/taskmodel-core-view/icons/minus.gif', minusBottom : '/taskmodel-core-view/icons/minusbottom.gif', nlPlus : '/taskmodel-core-view/icons/nolines_plus.gif', nlMinus : '/taskmodel-core-view/icons/nolines_minus.gif' }; this.obj = objName; this.aNodes = []; this.aIndent = []; this.root = new Node(-1); this.selectedNode = null; this.selectedFound = false; this.completed = false;};
liberator.dump((msg || "Stack") + "\n" + stack);
liberator.dump((msg || "Stack") + "\n" + stack + "\n");
dumpStack: function (msg, frames) { let stack = Error().stack.replace(/(?:.*\n){2}/, ""); if (frames != null) [stack] = stack.match(RegExp("(?:.*\n){0," + frames + "}")); liberator.dump((msg || "Stack") + "\n" + stack); },
true)){a("<<<");return{type:"<<<",style:"php-punctuation"}}else return j();else return n.test(e)?j():b()}var k=function(){function e(a,b){return{type:a,style:b}}var c={};["if","elseif","while","declare"].forEach(function(a){c[a]=e("keyword a","php-keyword")});["do","else","try"].forEach(function(a){c[a]=e("keyword b","php-keyword")});["return","break","continue","new","clone","throw"].forEach(function(a){c[a]=e("keyword c","php-keyword")});["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__METHOD__",
y+"px"}}}function b(){i.scrollTop=p.scrollTop||m.documentElement.scrollTop||0}function c(h){var o=j.firstChild.offsetHeight;if(o!=0){o=Math.ceil((50+Math.max(p.offsetHeight,Math.max(d.offsetHeight,p.scrollHeight||0)))/o);for(var r=j.childNodes.length;r<=o;r++){var v=document.createElement("DIV");v.appendChild(document.createTextNode(h?String(r+k.options.firstLineNumber):"\u00a0"));j.appendChild(v)}}}function e(){function h(){c(true);b()}k.updateNumbers=h;var o=f.addEventHandler(f,"scroll",b,true), r=f.addEventHandler(f,"resize",h,true);x=function(){o();r();if(k.updateNumbers==h)k.updateNumbers=null};h()}function g(){function h(n,z){q||(q=j.appendChild(document.createElement("DIV")));H&&H(q,z,n);t.push(q);t.push(n);A=q.offsetHeight+q.offsetTop;q=q.nextSibling}function o(){for(var n=0;n<t.length;n+=2)t[n].innerHTML=t[n+1];t=[]}function r(){if(!(!j.parentNode||j.parentNode!=k.lineNumbers)){for(var n=(new Date).getTime()+k.options.lineNumberTime;l;){for(h(B++,l.previousSibling);l&&!f.isBR(l);l=
true)){a("<<<");return{type:"<<<",style:"php-punctuation"}}else return j();else return n.test(e)?j():b()}var k=function(){function e(a,b){return{type:a,style:b}}var c={};["if","elseif","while","declare"].forEach(function(a){c[a]=e("keyword a","php-keyword")});["do","else","try"].forEach(function(a){c[a]=e("keyword b","php-keyword")});["return","break","continue","new","clone","throw"].forEach(function(a){c[a]=e("keyword c","php-keyword")});["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__METHOD__",
a("}"),A,b)}function x(t){t.type=="function"?r():e(f(["function"],[r]))}function y(t){function I(P){P.type==","&&e(t,I)}return function(){c(t,I)}}function A(t){t.type=="}"?e():c(h,A)}function v(t){t.content=="array"&&e(f("("),f(")"))}function z(t){t.content=="="&&e(f(["t_string","string","number","atom"],[v,null,null]))}function L(t){if(t.type=="variable")e(z);else t.content=="&"&&e(f("variable"),z)}function H(t){t.type=="t_string"?e(L):L(t)}function E(t){t.type=="t_double_colon"&&e(O)}function O(){c(f("t_string"),
var CodeMirrorConfig=window.CodeMirrorConfig||{},CodeMirror=function(){function C(a,b){for(var c in b)a.hasOwnProperty(c)||(a[c]=b[c])}function D(a,b){for(var c=0;c<a.length;c++)b(a[c])}function E(a,b){var c=document.createElement("DIV"),e=document.createElement("DIV");c.style.position="absolute";c.style.height="100%";if(c.style.setExpression)try{c.style.setExpression("height","this.previousSibling.offsetHeight + 'px'")}catch(g){}c.style.top="0px";c.style.left="0px";c.style.overflow="hidden";a.appendChild(c); e.className="CodeMirror-line-numbers";c.appendChild(e);e.innerHTML="<div>"+b+"</div>";return c}function F(a){if(typeof a.parserfile=="string")a.parserfile=[a.parserfile];if(typeof a.basefiles=="string")a.basefiles=[a.basefiles];if(typeof a.stylesheet=="string")a.stylesheet=[a.stylesheet];var b=['<!DOCTYPE HTML PUBLIC "-
a("}"),A,b)}function x(t){t.type=="function"?r():e(f(["function"],[r]))}function y(t){function I(P){P.type==","&&e(t,I)}return function(){c(t,I)}}function A(t){t.type=="}"?e():c(h,A)}function v(t){t.content=="array"&&e(f("("),f(")"))}function z(t){t.content=="="&&e(f(["t_string","string","number","atom"],[v,null,null]))}function L(t){if(t.type=="variable")e(z);else t.content=="&"&&e(f("variable"),z)}function H(t){t.type=="t_string"?e(L):L(t)}function E(t){t.type=="t_double_colon"&&e(O)}function O(){c(f("t_string"),
0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||
"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||
flags |= commandline.APPEND_TO_MESSAGES | commandline.DISALLOW_MULTILINE;
flags |= commandline.APPEND_TO_MESSAGES;
echomsg: function (str, verbosity, flags) { // TODO: is there a reason for this? --djk // yes, it doesn't show the MOW on startup if you have e.g. some qmarks in your vimperatorrc. // Feel free to add another flag like DONT_OPEN_MULTILINE if really needed --mst // // But it's _supposed_ to show the MOW on startup when there are // messages, surely? As far as I'm concerned it essentially works // exactly as it should with the DISALLOW_MULTILINE flag removed. // Sending N messages to the command line in a row and having them // overwrite each other is completely broken. I also think many of // those messages like "Added quick mark" are plain silly but if // you don't like them you can set verbose=0, or use :silent when // someone adds it. I reckon another flag and 'class' of messages // is just going to unnecessarily complicate things. --djk flags |= commandline.APPEND_TO_MESSAGES | commandline.DISALLOW_MULTILINE; if (verbosity == null) verbosity = 0; // verbosity level is exclusionary if (options["verbose"] >= verbosity) commandline.echo(str, commandline.HL_INFOMSG, flags); },
this._error = {start: seg.m, end: seg.n};
this.error = {start: seg.m, end: seg.n};
edit: function (input) { if (input == undefined) { input = this.input; } this._reset(); this.input = input; if (input.length > 0) { var seg = this._backend.segmentation (this.schema, input); this._segmentation = seg; this._display = this._calculateDisplayText(input, seg); if (seg.m != seg.n) { this._error = {start: seg.m, end: seg.n}; } } this._updateUI(); },
refresh();
store.reload();
EditAccountWindow = function(accountData){ var form = new Ext.form.FormPanel({ labelWidth: 120, width: 400, baseCls: 'x-plain', items: [ { fieldLabel: 'Account-ID', xtype: 'displayfield', value: accountData.get('id'), anchor: '100%' } ,{ xtype: 'hidden', id: 'id', value: accountData.get('id'), } ,{ fieldLabel: 'Account-Name', xtype: 'textfield', name: 'nm', value: accountData.get('nm'), anchor: '100%' } ,{ fieldLabel: 'Useful', xtype: 'radiogroup', defaultType: "radio", anchor: '100%', items: [{ name: "en", inputValue: "true", boxLabel: "enable", checked: accountData.get('en') == "true" }, { name: "en", inputValue: "false", boxLabel: "disable", checked: accountData.get('en') == "false" }] } ,{ fieldLabel: 'Contract-Date', xtype: 'textfield', name: "cn", value: accountData.get('cn'), anchor: '100%' } ,{ fieldLabel: 'Memo', xtype: 'textarea', name: "mm", value: accountData.get('mm'), anchor: '100%' } ] }); EditAccountWindow.superclass.constructor.call(this, { iconCls: 'icon-panel', collapsible:true, titleCollapse:true, width: 500, height: 250, layout:'fit', title: 'Edit Account', modal: true, plain: true, defaults:{bodyStyle:'padding:15px'}, items: [form], buttons: [{ text:'Save', handler: function(){ form.getForm().submit({ url: '/account-save', waitMsg: 'Saveing...', method: 'POST', scope: this, success: function(form, action) { refresh(); this.close(); }, failure: function(form, action) { alert('Add account failure.'); this.close(); } }); }, scope:this },{ text: 'Close', handler: function(){ this.close(); }, scope:this }] }); }
liberator.callFunctionInThread(null, io.run, io.expandPath(args.shift()), args, true);
io.run(io.expandPath(args.shift()), args, true);
editFileExternally: function (path) { // TODO: save return value in v:shell_error let args = commands.parseArgs(options["editor"], [], "*", true); liberator.assert(args.length >= 1, "No editor specified"); args.push(path); liberator.callFunctionInThread(null, io.run, io.expandPath(args.shift()), args, true); },
editFileExternally: function (path, line, column, async) { let args = options.get("editor").format({ file: path, line: line, column: column });
editFileExternally: function (args, blocking) { if (!isObject(args)) args = { file: args }; let args = options.get("editor").format(args);
editFileExternally: function (path, line, column, async) { let args = options.get("editor").format({ file: path, line: line, column: column }); dactyl.assert(args.length >= 1, "No editor specified"); io.run(io.expandPath(args.shift()), args, !async); },
io.run(io.expandPath(args.shift()), args, !async);
io.run(io.expandPath(args.shift()), args, blocking);
editFileExternally: function (path, line, column, async) { let args = options.get("editor").format({ file: path, line: line, column: column }); dactyl.assert(args.length >= 1, "No editor specified"); io.run(io.expandPath(args.shift()), args, !async); },
util.callInThread(null, io.run, io.expandPath(args.shift()), args, true);
io.run(io.expandPath(args.shift()), args, true);
editFileExternally: function (path) { // TODO: save return value in v:shell_error let args = commands.parseArgs(options["editor"], { argCount: "*", allowUnknownOptions: true }); dactyl.assert(args.length >= 1, "No editor specified"); args.push(path); util.callInThread(null, io.run, io.expandPath(args.shift()), args, true); },
editFileExternally: function (path, line, column) {
editFileExternally: function (path, line, column, async) {
editFileExternally: function (path, line, column) { let args = options.get("editor").format({ file: path, line: line, column: column }); dactyl.assert(args.length >= 1, "No editor specified"); io.run(io.expandPath(args.shift()), args, true); },
io.run(io.expandPath(args.shift()), args, true);
io.run(io.expandPath(args.shift()), args, !async);
editFileExternally: function (path, line, column) { let args = options.get("editor").format({ file: path, line: line, column: column }); dactyl.assert(args.length >= 1, "No editor specified"); io.run(io.expandPath(args.shift()), args, true); },
if (AtD.callback_f != undefined && AtD.callback_f.editSelection != undefined)
if (AtD.callback_f != undefined && AtD.callback_f.editSelection != undefined){
AtD.editSelection = function() { var parent = AtD.errorElement.parent(); if (AtD.callback_f != undefined && AtD.callback_f.editSelection != undefined) AtD.callback_f.editSelection(AtD.errorElement); if (AtD.errorElement.parent() != parent) { AtD.counter --; if (AtD.counter == 0 && AtD.callback_f != undefined && AtD.callback_f.success != undefined) AtD.callback_f.success(AtD.count); }};
if (AtD.errorElement.parent() != parent) { AtD.counter --; if (AtD.counter == 0 && AtD.callback_f != undefined && AtD.callback_f.success != undefined) AtD.callback_f.success(AtD.count);
AtD.editSelection = function() { var parent = AtD.errorElement.parent(); if (AtD.callback_f != undefined && AtD.callback_f.editSelection != undefined) AtD.callback_f.editSelection(AtD.errorElement); if (AtD.errorElement.parent() != parent) { AtD.counter --; if (AtD.counter == 0 && AtD.callback_f != undefined && AtD.callback_f.success != undefined) AtD.callback_f.success(AtD.count); }};
this.Element = function(tagName, attributes) { attributes = attributes || { }; tagName = tagName.toLowerCase(); var cache = Element.cache; if (Prototype.Browser.IE && attributes.name) { tagName = '<' + tagName + ' name="' + attributes.name + '">'; delete attributes.name; return Element.writeAttribute(document.createElement(tagName), attributes); } if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName)); return Element.writeAttribute(cache[tagName].cloneNode(false), attributes); };
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
this.Element = function(tagName, attributes) { attributes = attributes || { }; tagName = tagName.toLowerCase(); var cache = Element.cache; if (Prototype.Browser.IE && attributes.name) { tagName = '<' + tagName + ' name="' + attributes.name + '">'; delete attributes.name; return Element.writeAttribute(document.createElement(tagName), attributes); } if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName)); return Element.writeAttribute(cache[tagName].cloneNode(false), attributes); };
empty: function(element) { return $(element).innerHTML.blank(); },
Ext.DomHelper=function(){var m=null;var g=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var b=/^table|tbody|tr|td$/i;var a=function(w){if(typeof w=="string"){return w}var q="";if(Ext.isArray(w)){for(var u=0,r=w.length;u<r;u++){q+=a(w[u])}return q}if(!w.tag){w.tag="div"}q+="<"+w.tag;for(var p in w){if(p=="tag"||p=="children"||p=="cn"||p=="html"||typeof w[p]=="function"){continue}if(p=="style"){var v=w.style;if(typeof v=="function"){v=v.call()}if(typeof v=="string"){q+=' style="'+v+'"'}else{if(typeof v=="object"){q+=' style="';for(var t in v){if(typeof v[t]!="function"){q+=t+":"+v[t]+";"}}q+='"'}}}else{if(p=="cls"){q+=' class="'+w.cls+'"'}else{if(p=="htmlFor"){q+=' for="'+w.htmlFor+'"'}else{q+=" "+p+'="'+w[p]+'"'}}}}if(g.test(w.tag)){q+="/>"}else{q+=">";var x=w.children||w.cn;if(x){q+=a(x)}else{if(w.html){q+=w.html}}q+="</"+w.tag+">"}return q};var n=function(v,q){var u;if(Ext.isArray(v)){u=document.createDocumentFragment();for(var t=0,r=v.length;t<r;t++){n(v[t],u)}}else{if(typeof v=="string"){u=document.createTextNode(v)}else{u=document.createElement(v.tag||"div");var s=!!u.setAttribute;for(var p in v){if(p=="tag"||p=="children"||p=="cn"||p=="html"||p=="style"||typeof v[p]=="function"){continue}if(p=="cls"){u.className=v.cls}else{if(s){u.setAttribute(p,v[p])}else{u[p]=v[p]}}}Ext.DomHelper.applyStyles(u,v.style);var w=v.children||v.cn;if(w){n(w,u)}else{if(v.html){u.innerHTML=v.html}}}}if(q){q.appendChild(u)}return u};var j=function(u,r,q,t){m.innerHTML=[r,q,t].join("");var o=-1,p=m;while(++o<u){p=p.firstChild}return p};var k="<table>",e="</table>",c=k+"<tbody>",l="</tbody>"+e,i=c+"<tr>",d="</tr>"+l;var h=function(o,p,r,q){if(!m){m=document.createElement("div")}var s;var t=null;if(o=="td"){if(p=="afterbegin"||p=="beforeend"){return}if(p=="beforebegin"){t=r;r=r.parentNode}else{t=r.nextSibling;r=r.parentNode}s=j(4,i,q,d)}else{if(o=="tr"){if(p=="beforebegin"){t=r;r=r.parentNode;s=j(3,c,q,l)}else{if(p=="afterend"){t=r.nextSibling;r=r.parentNode;s=j(3,c,q,l)}else{if(p=="afterbegin"){t=r.firstChild}s=j(4,i,q,d)}}}else{if(o=="tbody"){if(p=="beforebegin"){t=r;r=r.parentNode;s=j(2,k,q,e)}else{if(p=="afterend"){t=r.nextSibling;r=r.parentNode;s=j(2,k,q,e)}else{if(p=="afterbegin"){t=r.firstChild}s=j(3,c,q,l)}}}else{if(p=="beforebegin"||p=="afterend"){return}if(p=="afterbegin"){t=r.firstChild}s=j(2,k,q,e)}}}r.insertBefore(s,t);return s};return{useDom:false,markup:function(p){return a(p)},applyStyles:function(q,r){if(r){q=Ext.fly(q);if(typeof r=="string"){var p=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var s;while((s=p.exec(r))!=null){q.setStyle(s[1],s[2])}}else{if(typeof r=="object"){for(var o in r){q.setStyle(o,r[o])}}else{if(typeof r=="function"){Ext.DomHelper.applyStyles(q,r.call())}}}}},insertHtml:function(q,s,r){q=q.toLowerCase();if(s.insertAdjacentHTML){if(b.test(s.tagName)){var p;if(p=h(s.tagName.toLowerCase(),q,s,r)){return p}}switch(q){case"beforebegin":s.insertAdjacentHTML("BeforeBegin",r);return s.previousSibling;case"afterbegin":s.insertAdjacentHTML("AfterBegin",r);return s.firstChild;case"beforeend":s.insertAdjacentHTML("BeforeEnd",r);return s.lastChild;case"afterend":s.insertAdjacentHTML("AfterEnd",r);return s.nextSibling}throw'Illegal insertion point -> "'+q+'"'}var o=s.ownerDocument.createRange();var t;switch(q){case"beforebegin":o.setStartBefore(s);t=o.createContextualFragment(r);s.parentNode.insertBefore(t,s);return s.previousSibling;case"afterbegin":if(s.firstChild){o.setStartBefore(s.firstChild);t=o.createContextualFragment(r);s.insertBefore(t,s.firstChild);return s.firstChild}else{s.innerHTML=r;return s.firstChild}case"beforeend":if(s.lastChild){o.setStartAfter(s.lastChild);t=o.createContextualFragment(r);s.appendChild(t);return s.lastChild}else{s.innerHTML=r;return s.lastChild}case"afterend":o.setStartAfter(s);t=o.createContextualFragment(r);s.parentNode.insertBefore(t,s.nextSibling);return s.nextSibling}throw'Illegal insertion point -> "'+q+'"'},insertBefore:function(p,r,q){return this.doInsert(p,r,q,"beforeBegin")},insertAfter:function(p,r,q){return this.doInsert(p,r,q,"afterEnd","nextSibling")},insertFirst:function(p,r,q){return this.doInsert(p,r,q,"afterBegin","firstChild")},doInsert:function(s,u,t,v,r){s=Ext.getDom(s);var q;if(this.useDom){q=n(u,null);(r==="firstChild"?s:s.parentNode).insertBefore(q,r?s[r]:s)}else{var p=a(u);q=this.insertHtml(v,s,p)}return t?Ext.get(q,true):q},append:function(r,t,s){r=Ext.getDom(r);var q;if(this.useDom){q=n(t,null);r.appendChild(q)}else{var p=a(t);q=this.insertHtml("beforeEnd",r,p)}return s?Ext.get(q,true):q},overwrite:function(p,r,q){p=Ext.getDom(p);p.innerHTML=a(r);return q?Ext.get(p.firstChild,true):p.firstChild},createTemplate:function(q){var p=a(q);return new Ext.Template(p)}}}();Ext.Template=function(g){var c=arguments;if(Ext.isArray(g)){g=g.join("")}else{if(c.length>1){var d=[];for(var e=0,b=c.length;e<b;e++){if(typeof c[e]=="object"){Ext.apply(this,c[e])}else{d[d.length]=c[e]}}g=d.join("")}}this.html=g;if(this.compiled){this.compile()}};Ext.Template.prototype={applyTemplate:function(b){if(this.compiled){return this.compiled(b)}var a=this.disableFormats!==true;var e=Ext.util.Format,c=this;var d=function(h,k,o,j){if(o&&a){if(o.substr(0,5)=="this."){return c.call(o.substr(5),b[k],b)}else{if(j){var n=/^\s*['"](.*)["']\s*$/;j=j.split(",");for(var l=0,g=j.length;l<g;l++){j[l]=j[l].replace(n,"$1")}j=[b[k]].concat(j)}else{j=[b[k]]}return e[o].apply(e,j)}}else{return b[k]!==undefined?b[k]:""}};return this.html.replace(this.re,d)},set:function(a,b){this.html=a;this.compiled=null;if(b){this.compile()}return this},disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Ext.util.Format;var useF=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,name,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format='this.call("'+format.substr(5)+'", ';args=", values"}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'"};var body;if(Ext.isGecko){body="this.compiled = function(values){ return '"+this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+"';};"}else{body=["this.compiled = function(values){ return ['"];body.push(this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn));body.push("'].join('');};");body=body.join("")}eval(body);return this},call:function(c,b,a){return this[c](b,a)},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.DomHelper.Template=Ext.Template;Ext.Template.from=function(b,a){b=Ext.getDom(b);return new Ext.Template(b.value||b.innerHTML,a||"")};Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={};var nonSpace=/\S/;var trimRe=/^\s+|\s+$/g;var tplRe=/\{(\d+)\}/g;var modeRe=/^(\s?[\/>+~]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;function child(p,index){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){result[++ri]=n}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[++ri]=ci}}return r}function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r}}return r}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{";var f=Ext.DomQuery.operators[op];for(var i=0,ci;ci=cs[i];i++){var a;if(st){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci}}return r}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}var isIE=window.ActiveXObject?true:false;eval("var batch = 30803;");var key=30803;function nodupIEXml(cs){var d=++key;cs[0].setAttribute("_nodup",d);var r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key;for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length;if(!len1){return c2}if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2)}var d=++key;for(var i=0;i<len1;i++){c1[i]._qdiff=d}var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,null,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"];var q=path,mode,lq;var tk=Ext.DomQuery.matchers;var tklen=tk.length;var mm;var lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");'}q=q.replace(tm[0],"")}else{if(q.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");'}q=q.replace(tm[0],"")}}while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});q=q.replace(m[0],"");matched=true;break}}if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"'}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,"")+'";';q=q.replace(mm[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},select:function(path,root,type){if(!root||root==document){root=document}if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(",");var results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p]){throw p+" is not a valid selector"}}var result=cache[p](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root);n=n[0]?n[0]:n;var v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el);var result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1;var m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|");var r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended!==true){var a=this.events[arguments[0].toLowerCase()];if(typeof a=="object"){return a.fire.apply(a,Array.prototype.slice.call(arguments,1))}}return true},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(a,c,b,h){if(typeof a=="object"){h=a;for(var g in h){if(this.filterOptRe.test(g)){continue}if(typeof h[g]=="function"){this.addListener(g,h[g],h.scope,h)}else{this.addListener(g,h[g].fn,h[g].scope,h[g])}}return}h=(!h||typeof h=="boolean")?{}:h;a=a.toLowerCase();var d=this.events[a]||true;if(typeof d=="boolean"){d=new Ext.util.Event(this,a);this.events[a]=d}d.addListener(c,b,h)},removeListener:function(a,c,b){var d=this.events[a.toLowerCase()];if(typeof d=="object"){d.removeListener(c,b)}},purgeListeners:function(){for(var a in this.events){if(typeof this.events[a]=="object"){this.events[a].clearListeners()}}},relayEvents:function(g,d){var e=function(h){return function(){return this.fireEvent.apply(this,Ext.combine(h,Array.prototype.slice.call(arguments,0)))}};for(var c=0,a=d.length;c<a;c++){var b=d[c];if(!this.events[b]){this.events[b]=true}g.on(b,e(b),this)}},addEvents:function(e){if(!this.events){this.events={}}if(typeof e=="string"){for(var d=0,b=arguments,c;c=b[d];d++){if(!this.events[b[d]]){this.events[b[d]]=true}}}else{Ext.applyIf(this.events,e)}},hasListener:function(a){var b=this.events[a];return typeof b=="object"&&b.listeners.length>0},suspendEvents:function(){this.eventsSuspended=true},resumeEvents:function(){this.eventsSuspended=false},getMethodEvent:function(i){if(!this.methodEvents){this.methodEvents={}}var h=this.methodEvents[i];if(!h){h={};this.methodEvents[i]=h;h.originalFn=this[i];h.methodName=i;h.before=[];h.after=[];var c,b,d;var g=this;var a=function(k,j,e){if((b=k.apply(j||g,e))!==undefined){if(typeof b==="object"){if(b.returnValue!==undefined){c=b.returnValue}else{c=b}if(b.cancel===true){d=true}}else{if(b===false){d=true}else{c=b}}}};this[i]=function(){c=b=undefined;d=false;var j=Array.prototype.slice.call(arguments,0);for(var k=0,e=h.before.length;k<e;k++){a(h.before[k].fn,h.before[k].scope,j);if(d){return c}}if((b=h.originalFn.apply(g,j))!==undefined){c=b}for(var k=0,e=h.after.length;k<e;k++){a(h.after[k].fn,h.after[k].scope,j);if(d){return c}}return c}}return h},beforeMethod:function(d,b,a){var c=this.getMethodEvent(d);c.before.push({fn:b,scope:a})},afterMethod:function(d,b,a){var c=this.getMethodEvent(d);c.after.push({fn:b,scope:a})},removeMethodListener:function(h,d,c){var g=this.getMethodEvent(h);for(var b=0,a=g.before.length;b<a;b++){if(g.before[b].fn==d&&g.before[b].scope==c){g.before.splice(b,1);return}}for(var b=0,a=g.after.length;b<a;b++){if(g.after[b].fn==d&&g.after[b].scope==c){g.after.splice(b,1);return}}}};Ext.util.Observable.prototype.on=Ext.util.Observable.prototype.addListener;Ext.util.Observable.prototype.un=Ext.util.Observable.prototype.removeListener;Ext.util.Observable.capture=function(c,b,a){c.fireEvent=c.fireEvent.createInterceptor(b,a)};Ext.util.Observable.releaseCapture=function(a){a.fireEvent=Ext.util.Observable.prototype.fireEvent};(function(){var b=function(g,i,e){var d=new Ext.util.DelayedTask();return function(){d.delay(i.buffer,g,e,Array.prototype.slice.call(arguments,0))}};var c=function(i,j,g,d){return function(){j.removeListener(g,d);return i.apply(d,arguments)}};var a=function(e,g,d){return function(){var h=Array.prototype.slice.call(arguments,0);setTimeout(function(){e.apply(d,h)},g.delay||10)}};Ext.util.Event=function(e,d){this.name=d;this.obj=e;this.listeners=[]};Ext.util.Event.prototype={addListener:function(h,g,e){g=g||this.obj;if(!this.isListening(h,g)){var d=this.createListener(h,g,e);if(!this.firing){this.listeners.push(d)}else{this.listeners=this.listeners.slice(0);this.listeners.push(d)}}},createListener:function(i,g,j){j=j||{};g=g||this.obj;var d={fn:i,scope:g,options:j};var e=i;if(j.delay){e=a(e,j,g)}if(j.single){e=c(e,this,i,g)}if(j.buffer){e=b(e,j,g)}d.fireFn=e;return d},findListener:function(k,j){j=j||this.obj;var g=this.listeners;for(var h=0,d=g.length;h<d;h++){var e=g[h];if(e.fn==k&&e.scope==j){return h}}return -1},isListening:function(e,d){return this.findListener(e,d)!=-1},removeListener:function(g,e){var d;if((d=this.findListener(g,e))!=-1){if(!this.firing){this.listeners.splice(d,1)}else{this.listeners=this.listeners.slice(0);this.listeners.splice(d,1)}return true}return false},clearListeners:function(){this.listeners=[]},fire:function(){var g=this.listeners,k,d=g.length;if(d>0){this.firing=true;var h=Array.prototype.slice.call(arguments,0);for(var j=0;j<d;j++){var e=g[j];if(e.fireFn.apply(e.scope||this.obj||window,arguments)===false){this.firing=false;return false}}this.firing=false}return true}}})();Ext.EventManager=function(){var w,p,l=false;var m,v,g,r;var o=Ext.lib.Event;var q=Ext.lib.Dom;var a="Ext";var i={};var n=function(C,y,B,A,z){var E=Ext.id(C);if(!i[E]){i[E]={}}var D=i[E];if(!D[y]){D[y]=[]}var x=D[y];x.push({id:E,ename:y,fn:B,wrap:A,scope:z});o.on(C,y,A);if(y=="mousewheel"&&C.addEventListener){C.addEventListener("DOMMouseScroll",A,false);o.on(window,"unload",function(){C.removeEventListener("DOMMouseScroll",A,false)})}if(y=="mousedown"&&C==document){Ext.EventManager.stoppedMouseDownEvent.addListener(A)}};var h=function(z,B,F,H){z=Ext.getDom(z);var x=Ext.id(z),G=i[x],y;if(G){var D=G[B],A;if(D){for(var C=0,E=D.length;C<E;C++){A=D[C];if(A.fn==F&&(!H||A.scope==H)){y=A.wrap;o.un(z,B,y);D.splice(C,1);break}}}}if(B=="mousewheel"&&z.addEventListener&&y){z.removeEventListener("DOMMouseScroll",y,false)}if(B=="mousedown"&&z==document&&y){Ext.EventManager.stoppedMouseDownEvent.removeListener(y)}};var d=function(B){B=Ext.getDom(B);var D=Ext.id(B),C=i[D],y;if(C){for(var A in C){if(C.hasOwnProperty(A)){y=C[A];for(var z=0,x=y.length;z<x;z++){o.un(B,A,y[z].wrap);y[z]=null}}C[A]=null}delete i[D]}};var c=function(){if(!l){l=true;Ext.isReady=true;if(p){clearInterval(p)}if(Ext.isGecko||Ext.isOpera){document.removeEventListener("DOMContentLoaded",c,false)}if(Ext.isIE){var x=document.getElementById("ie-deferred-loader");if(x){x.onreadystatechange=null;x.parentNode.removeChild(x)}}if(w){w.fire();w.clearListeners()}}};var b=function(){w=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){document.addEventListener("DOMContentLoaded",c,false)}else{if(Ext.isIE){document.write('<script id="ie-deferred-loader" defer="defer" src="
empty: function(element) { return $(element).innerHTML.blank(); },
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!p(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!p(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
emptyFunction: function() { },
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
emptyFunction: function() { },
enable: function(element) { element = $(element); element.disabled = false; return element; }
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
enable: function(element) { element = $(element); element.disabled = false; return element; }
console.log('LOADING VIEW: ' + ajax_target_id); console.log(html);
$.fn.enable_Ajax = function(){ $(this).each( function( index, value){ var selector = this; var ajax_target_id = '#'+$(this).val(); initializeSubmitButtons( selector, ajax_target_id); }); function initializeSubmitButtons( selector, ajax_target_id){ $( selector ).parents('form').submit( function(){ form = this; getGraphData(ajax_target_id); return false; }); } function getGraphData( ajax_target_id ){ showLoaderGraphic(); $.ajax({ type: 'GET', url: 'index.php', data: serializeFormData(), success: function(JSONtext){ loadView( ajax_target_id, JSONtext);// initializeSubmitButtons(); $( ajax_target_id ).initialize_Gtd(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { hideLoaderGraphic(); log('ajax request failed'); } }); } function loadView( ajax_target_id, html ){ console.log('LOADING VIEW: ' + ajax_target_id); console.log(html); $(ajax_target_id).html( html ); hideLoaderGraphic(); } function serializeFormData() { var sel, serializedData = ""; if (!form) return false; $( ':input', form).each(function(){ serializedData += $(this).attr('name') + "=" + $(this).val() + "&"; }); selectBoxes = form.getElementsByTagName("select"); if( selectBoxes) { total = selectBoxes.length; } else { total = 0; } for ( i=0; i<total; i++) { sel = selectBoxes[i]; serializedData += sel.name + "=" + sel.options[sel.selectedIndex].value + "&"; } return encodeURI( serializedData); } function showLoaderGraphic() { $('.loader').html('<div style="margin: 25% 44%">'+ '<div style="text-align:center; width:50px"><img src="/img/ajax-loader.gif" /></div>'+ '<div style="color:#993333; text-align:center; width:50px; font-weight:bold">Loading</div>'+ '</div>'); } function hideLoaderGraphic() { $(' .loader').html(''); } function url( param) { var regex = '[?&]' + param + '=([^&#]*)'; var results = (new RegExp(regex)).exec(window.location.href); if(results) return results[1].replace('%20',' '); return false; } return this;}
); } $.fn.enable_DateField= function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd'}); return this; } $.fn.enable_TableSort = function (){ $(this).tablesorter({widgets: ['zebra']}); return this; } $.fn.enable_QuickSearch = function (){ $(this).each( function() { rows = $(this) .children('.basic-table') .children('tbody') .children('tr'); selector = $(this) .children('.quicksearch') .children('form') .children('.qs-input'); selector.quicksearch(rows); }); return this; } $.fn.enable_Swappable = function (){ $(this).each( function(){ $(this).click( function(){ $(this).siblings('.swappable-item').toggle(); }) }); return this; } $.fn.enable_MultipleButtons= function (){ $(this).each( function(){ $(this).click( function(){ item = $('[data-id=' + $(this).attr('data-id') + ']', '.multiple-buttons-targets'); if (item.css('display')=='none'){ item.siblings().hide(); item.show(); setTimeout( function(){ $(':input:visible:first', item).focus(); }, 100); }else{ item.hide(); } }) }); return this; } $.fn.enable_Hideable = function (){ $(this).each( function(){ $(this).click( function(){ item = $(this).siblings('.hideable-item'); if ( item.css('display') == 'none' ){ item.slideFadeIn(180,'easeOutCubic'); } else { item.slideFadeOut(180,'easeInCubic'); } }) }); return this; } $.fn.enable_MultiSelect = function(){ $(this).multiSelect({oneOrMoreSelected: '*'}); return this; } $.fn.enable_AutoSubmit = function(){ $(this).each( function(){ auto_submit_input_name = '[name*='+$(this).val()+']'; form = $( this ).parents('form'); $('.submit-container',form).hide(); $(auto_submit_input_name,form).change(function(){ $(form).submit(); });
);
$.fn.enable_Button= function(){ $(this).each(function(){ $(this).hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); } ); }$.fn.enable_DateField= function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd'}); return this;}$.fn.enable_TableSort = function (){ $(this).tablesorter({widgets: ['zebra']}); return this;}$.fn.enable_QuickSearch = function (){ $(this).each( function() { rows = $(this) .children('.basic-table') .children('tbody') .children('tr'); selector = $(this) .children('.quicksearch') .children('form') .children('.qs-input'); selector.quicksearch(rows); }); return this;}$.fn.enable_Swappable = function (){ $(this).each( function(){ $(this).click( function(){ $(this).siblings('.swappable-item').toggle(); }) }); return this;}$.fn.enable_MultipleButtons= function (){ $(this).each( function(){ $(this).click( function(){ item = $('[data-id=' + $(this).attr('data-id') + ']', '.multiple-buttons-targets'); if (item.css('display')=='none'){ item.siblings().hide(); item.show(); setTimeout( function(){ $(':input:visible:first', item).focus(); }, 100); }else{ item.hide(); } }) }); return this;}$.fn.enable_Hideable = function (){ $(this).each( function(){ $(this).click( function(){ item = $(this).siblings('.hideable-item'); if ( item.css('display') == 'none' ){ item.slideFadeIn(180,'easeOutCubic'); } else { item.slideFadeOut(180,'easeInCubic'); } }) }); return this;}$.fn.enable_MultiSelect = function(){ $(this).multiSelect({oneOrMoreSelected: '*'}); return this;}$.fn.enable_AutoSubmit = function(){ $(this).each( function(){ auto_submit_input_name = '[name*='+$(this).val()+']'; form = $( this ).parents('form'); $('.submit-container',form).hide(); $(auto_submit_input_name,form).change(function(){ $(form).submit(); }); });}$.fn.enable_Ajax = function(){ var selector = this; var ajax_target_id = '#'+$(this).val(); initializeSubmitButtons( ); function initializeSubmitButtons( ){ $( selector ).parents('form').submit( function(){ form = this; getGraphData(); return false; }); } function getGraphData(){ showLoaderGraphic(); $.ajax({ type: 'GET', url: 'index.php', data: serializeFormData(), success: function(JSONtext){ loadView(JSONtext);// initializeSubmitButtons(); $( ajax_target_id ).initialize_Gtd(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { hideLoaderGraphic(); log('ajax request failed'); } }); } function loadView( html ){ $(ajax_target_id).html( html ); hideLoaderGraphic(); } function serializeFormData() { var sel, serializedData = ""; if (!form) return false; $( ':input', form).each(function(){ serializedData += $(this).attr('name') + "=" + $(this).val() + "&"; }); selectBoxes = form.getElementsByTagName("select"); if( selectBoxes) { total = selectBoxes.length; } else { total = 0; } for ( i=0; i<total; i++) { sel = selectBoxes[i]; serializedData += sel.name + "=" + sel.options[sel.selectedIndex].value + "&"; } return encodeURI( serializedData); } function showLoaderGraphic() { $('.loader').html('<div style="margin: 25% 44%">'+ '<div style="text-align:center; width:50px"><img src="/img/ajax-loader.gif" /></div>'+ '<div style="color:#993333; text-align:center; width:50px; font-weight:bold">Loading</div>'+ '</div>'); } function hideLoaderGraphic() { $(' .loader').html(''); } function url( param) { var regex = '[?&]' + param + '=([^&#]*)'; var results = (new RegExp(regex)).exec(window.location.href); if(results) return results[1].replace('%20',' '); return false; } return this;}
$.fn.enable_Ajax = function(){ var selector = this; var ajax_target_id = '#'+$(this).val(); initializeSubmitButtons( ); function initializeSubmitButtons( ){ $( selector ).parents('form').submit( function(){ form = this; getGraphData(); return false; }); } function getGraphData(){ showLoaderGraphic(); $.ajax({ type: 'GET', url: 'index.php', data: serializeFormData(), success: function(JSONtext){ loadView(JSONtext); $( ajax_target_id ).initialize_Gtd(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { hideLoaderGraphic(); log('ajax request failed'); } }); } function loadView( html ){ $(ajax_target_id).html( html ); hideLoaderGraphic(); } function serializeFormData() { var sel, serializedData = ""; if (!form) return false; $( ':input', form).each(function(){ serializedData += $(this).attr('name') + "=" + $(this).val() + "&"; }); selectBoxes = form.getElementsByTagName("select"); if( selectBoxes) { total = selectBoxes.length; } else { total = 0; } for ( i=0; i<total; i++) { sel = selectBoxes[i]; serializedData += sel.name + "=" + sel.options[sel.selectedIndex].value + "&"; } return encodeURI( serializedData); } function showLoaderGraphic() { $('.loader').html('<div style="margin: 25% 44%">'+ '<div style="text-align:center; width:50px"><img src="/img/ajax-loader.gif" /></div>'+ '<div style="color:#993333; text-align:center; width:50px; font-weight:bold">Loading</div>'+ '</div>'); } function hideLoaderGraphic() { $(' .loader').html(''); } function url( param) { var regex = '[?&]' + param + '=([^&#]*)'; var results = (new RegExp(regex)).exec(window.location.href); if(results) return results[1].replace('%20',' '); return false; } return this; }
$.fn.enable_Button= function(){ $(this).each(function(){ $(this).hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); } ); }$.fn.enable_DateField= function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd'}); return this;}$.fn.enable_TableSort = function (){ $(this).tablesorter({widgets: ['zebra']}); return this;}$.fn.enable_QuickSearch = function (){ $(this).each( function() { rows = $(this) .children('.basic-table') .children('tbody') .children('tr'); selector = $(this) .children('.quicksearch') .children('form') .children('.qs-input'); selector.quicksearch(rows); }); return this;}$.fn.enable_Swappable = function (){ $(this).each( function(){ $(this).click( function(){ $(this).siblings('.swappable-item').toggle(); }) }); return this;}$.fn.enable_MultipleButtons= function (){ $(this).each( function(){ $(this).click( function(){ item = $('[data-id=' + $(this).attr('data-id') + ']', '.multiple-buttons-targets'); if (item.css('display')=='none'){ item.siblings().hide(); item.show(); setTimeout( function(){ $(':input:visible:first', item).focus(); }, 100); }else{ item.hide(); } }) }); return this;}$.fn.enable_Hideable = function (){ $(this).each( function(){ $(this).click( function(){ item = $(this).siblings('.hideable-item'); if ( item.css('display') == 'none' ){ item.slideFadeIn(180,'easeOutCubic'); } else { item.slideFadeOut(180,'easeInCubic'); } }) }); return this;}$.fn.enable_MultiSelect = function(){ $(this).multiSelect({oneOrMoreSelected: '*'}); return this;}$.fn.enable_AutoSubmit = function(){ $(this).each( function(){ auto_submit_input_name = '[name*='+$(this).val()+']'; form = $( this ).parents('form'); $('.submit-container',form).hide(); $(auto_submit_input_name,form).change(function(){ $(form).submit(); }); });}$.fn.enable_Ajax = function(){ var selector = this; var ajax_target_id = '#'+$(this).val(); initializeSubmitButtons( ); function initializeSubmitButtons( ){ $( selector ).parents('form').submit( function(){ form = this; getGraphData(); return false; }); } function getGraphData(){ showLoaderGraphic(); $.ajax({ type: 'GET', url: 'index.php', data: serializeFormData(), success: function(JSONtext){ loadView(JSONtext);// initializeSubmitButtons(); $( ajax_target_id ).initialize_Gtd(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { hideLoaderGraphic(); log('ajax request failed'); } }); } function loadView( html ){ $(ajax_target_id).html( html ); hideLoaderGraphic(); } function serializeFormData() { var sel, serializedData = ""; if (!form) return false; $( ':input', form).each(function(){ serializedData += $(this).attr('name') + "=" + $(this).val() + "&"; }); selectBoxes = form.getElementsByTagName("select"); if( selectBoxes) { total = selectBoxes.length; } else { total = 0; } for ( i=0; i<total; i++) { sel = selectBoxes[i]; serializedData += sel.name + "=" + sel.options[sel.selectedIndex].value + "&"; } return encodeURI( serializedData); } function showLoaderGraphic() { $('.loader').html('<div style="margin: 25% 44%">'+ '<div style="text-align:center; width:50px"><img src="/img/ajax-loader.gif" /></div>'+ '<div style="color:#993333; text-align:center; width:50px; font-weight:bold">Loading</div>'+ '</div>'); } function hideLoaderGraphic() { $(' .loader').html(''); } function url( param) { var regex = '[?&]' + param + '=([^&#]*)'; var results = (new RegExp(regex)).exec(window.location.href); if(results) return results[1].replace('%20',' '); return false; } return this;}
var encodedRequest = function(url, opt){
function encodedRequest(url, opt){
var encodedRequest = function(url, opt){ return binaryRequest(url, opt).addCallback(function(res){ var binary = res.responseText; var charset = null; var header = res.getResponseHeader('Content-Type'); if(header) charset = getCharset(header); if(!charset) charset = getEncoding(binary); if(!charset) charset = 'utf-8'; return request(url, update({ charset: 'text/html; charset='+charset }, opt)); });};
};
}
function encodedRequest(url, opt){ return binaryRequest(url, opt).addCallback(function(res){ var binary = res.responseText; var charset = null; var header = res.getResponseHeader('Content-Type'); if(header) charset = getCharset(header); if(!charset) charset = getEncoding(binary); if(!charset) charset = 'utf-8'; return request(url, update({ charset: 'text/html; charset='+charset }, opt)); });};
charset: 'text/html; charset='+charset,
charset: 'text/html; charset='+charset
var encodedRequest = function(url, opt){ return binaryRequest(url, opt).addCallback(function(res){ var binary = res.responseText; var charset = null; var header = res.getResponseHeader('Content-Type'); if(header) charset = getCharset(header); if(!charset) charset = getEncoding(binary); if(!charset) charset = 'utf-8'; return request(url, update({ charset: 'text/html; charset='+charset, }, opt)); });};
console.log("END");
end: function(ev) { this.status = null; removeElementClass(table, status); addElementClass(table, 'normal'); console.log("END"); }
0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject|| c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];o=e[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(o)?[]:{};a[i]=c.extend(f,j,o)}else if(o!==w)a[i]=
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];o=e[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(o)?[]:{};a[i]=c.extend(f,j,o)}else if(o!==w)a[i]=
if (!isNaN(value) && !(key === "zIndex" || key === "font-weight")) value += "px";
if (typeof key === SC.T_NUMBER && (key !== "zIndex" && key !== "opacity")) value += "px";
end: function() { // console.log('%@.end() called'.fmt(this)); // NOTE: If you modify this method, be careful to consider memory usage // and performance here. This method is called frequently during renders // and we want it to be as fast as possible. // generate opening tag. // get attributes first. Copy in className + styles... var tag = this._TAG_ARRAY, pair, joined, key , value, attrs = this._attrs, className = this._classNames, id = this._id, styles = this._styles; // add tag to tag array tag[0] = '<'; tag[1] = this._tagName ; // add any attributes... if (attrs || className || styles || id) { if (!attrs) attrs = this._DEFAULT_ATTRS ; if (id) attrs.id = id ; if (className) attrs['class'] = className.join(' '); // add in styles. note how we avoid memory allocs here to keep things // fast... if (styles) { joined = this._JOIN_ARRAY ; pair = this._STYLE_PAIR_ARRAY; for(key in styles) { if(!styles.hasOwnProperty(key)) continue ; value = styles[key]; if (value === null) continue; // skip empty styles if (!isNaN(value) && !(key === "zIndex" || key === "font-weight")) value += "px"; pair[0] = this._dasherizeStyleName(key); pair[1] = value; joined.push(pair.join(': ')); } attrs.style = joined.join('; ') ; // reset temporary object. pair does not need to be reset since it // is always overwritten joined.length = 0; } // now convert attrs hash to tag array... tag.push(' '); // add space for joining0 for(key in attrs) { if (!attrs.hasOwnProperty(key)) continue ; value = attrs[key]; if (value === null) continue ; // skip empty attrs tag.push(key, '="', value, '" '); } // if we are using the DEFAULT_ATTRS temporary object, make sure we // reset. if (attrs === this._DEFAULT_ATTRS) { delete attrs.style; delete attrs['class']; delete attrs.id; } } // this is self closing if there is no content in between and selfClosing // is not set to false. var strings = this.strings; var selfClosing = (this._selfClosing === NO) ? NO : (this.length === 1) ; tag.push(selfClosing ? ' />' : '>') ; // console.log('selfClosing == %@'.fmt(selfClosing)); strings[this.offset] = tag.join(''); tag.length = 0 ; // reset temporary object // now generate closing tag if needed... if (!selfClosing) { tag[0] = '</' ; tag[1] = this._tagName; tag[2] = '>'; strings.push(tag.join('')); // increase length of receiver and all parents var c = this; while(c) { c.length++; c = c.prevObject; } tag.length = 0; // reset temporary object again } // if there was a source element, cleanup to avoid memory leaks this._elem = null; return this.prevObject || this ; },
this._selected = [];
end: function () { if (!this.beingConverted()) { return false; } this._selected = []; this._updateCandidates(this._predict()); },
window.getSelection().empty();
endGesture: function(e) { if (!this.in_gesture) { return true; } this.in_gesture = false; this.collectGestures(e); window.getSelection().empty(); this.canvas.showLineTo(this.last_pos.x, this.last_pos.y, true); if (this.seq != "") { this.takeAction(this.seq); this.seq = ""; } this.canvas.hideCanvas(); this.last_pos = {x: -1, y: -1}; if (e.preventDefault) { e.preventDefault (); } return false; },
this.takeAction(this.seq);
if (this.takeAction(this.seq)) { window.getSelection().empty(); }
endGesture: function(e) { if (!this.in_gesture) { return true; } this.in_gesture = false; this.collectGestures(e); window.getSelection().empty(); this.canvas.showLineTo(this.last_pos.x, this.last_pos.y, true); if (this.seq != "") { this.takeAction(this.seq); this.seq = ""; } this.canvas.hideCanvas(); this.last_pos = {x: -1, y: -1}; if (e.preventDefault) { e.preventDefault (); } return false; },
this.canvas.showLineTo(this.last_pos.x, this.last_pos.y, true);
endGesture: function(e) { if (!this.in_gesture) { return true; } this.in_gesture = false; this.collectGestures(e); this.canvas.showLineTo(this.last_pos.x, this.last_pos.y, true); if (this.seq != "") { this.takeAction(this.seq); this.seq = ""; } document.removeEventListener('mousemove', mouseMove, false); window.getSelection().empty(); this.canvas.hideCanvas(); this.last_pos = {x: -1, y: -1}; if (e.preventDefault) { e.preventDefault (); } return false; },
this.takeAction(this.seq);
this.canvas.showLineTo(this.last_pos.x, this.last_pos.y, true); if (this.takeAction(this.seq)) { window.getSelection().empty(); }
endGesture: function(e) { if (!this.in_gesture) { return true; } this.in_gesture = false; this.collectGestures(e); this.canvas.showLineTo(this.last_pos.x, this.last_pos.y, true); if (this.seq != "") { this.takeAction(this.seq); this.seq = ""; } document.removeEventListener('mousemove', mouseMove, false); window.getSelection().empty(); this.canvas.hideCanvas(); this.last_pos = {x: -1, y: -1}; if (e.preventDefault) { e.preventDefault (); } return false; },
window.getSelection().empty(); this.canvas.hideCanvas();
endGesture: function(e) { if (!this.in_gesture) { return true; } this.in_gesture = false; this.collectGestures(e); this.canvas.showLineTo(this.last_pos.x, this.last_pos.y, true); if (this.seq != "") { this.takeAction(this.seq); this.seq = ""; } document.removeEventListener('mousemove', mouseMove, false); window.getSelection().empty(); this.canvas.hideCanvas(); this.last_pos = {x: -1, y: -1}; if (e.preventDefault) { e.preventDefault (); } return false; },
if (e.preventDefault) { e.preventDefault (); }
endGesture: function(e) { if (!this.in_gesture) { return true; } this.in_gesture = false; this.collectGestures(e); this.canvas.showLineTo(this.last_pos.x, this.last_pos.y, true); if (this.seq != "") { this.takeAction(this.seq); this.seq = ""; } document.removeEventListener('mousemove', mouseMove, false); window.getSelection().empty(); this.canvas.hideCanvas(); this.last_pos = {x: -1, y: -1}; if (e.preventDefault) { e.preventDefault (); } return false; },
if (this.takeAction(this.seq)) { window.getSelection().empty(); }
this.takeAction(this.seq);
endGesture: function(e) { if (!this.in_gesture) { return true; } this.in_gesture = false; this.collectGestures(e); this.canvas.showLineTo(this.last_pos.x, this.last_pos.y, true); if (this.seq != "") { if (this.takeAction(this.seq)) { window.getSelection().empty(); } this.seq = ""; } this.canvas.hideCanvas(); this.last_pos = {x: -1, y: -1}; if (e.preventDefault) { e.preventDefault (); } return false; },
document.removeEventListener('mousemove', mouseMove, false); window.getSelection().empty();
endGesture: function(e) { if (!this.in_gesture) { return true; } this.in_gesture = false; this.collectGestures(e); this.canvas.showLineTo(this.last_pos.x, this.last_pos.y, true); if (this.seq != "") { if (this.takeAction(this.seq)) { window.getSelection().empty(); } this.seq = ""; } this.canvas.hideCanvas(); this.last_pos = {x: -1, y: -1}; if (e.preventDefault) { e.preventDefault (); } return false; },
endsWith: function(pattern) { var d = this.length - pattern.length; return d >= 0 && this.lastIndexOf(pattern) === d; },
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
endsWith: function(pattern) { var d = this.length - pattern.length; return d >= 0 && this.lastIndexOf(pattern) === d; },
if (prev.mainMode.input || prev.mainMode.ownsFocus)
if (!stack.fromFocus && (prev.mainMode.input || prev.mainMode.ownsFocus))
enter: function (stack, prev) { if (prefs.get("accessibility.browsewithcaret")) prefs.set("accessibility.browsewithcaret", false); statusline.updateUrl(); if (prev.mainMode.input || prev.mainMode.ownsFocus) dactyl.focusContent(true); if (prev.main == modes.NORMAL) { dactyl.focusContent(true); for (let frame in values(buffer.allFrames())) { // clear any selection made let selection = frame.getSelection(); if (selection && !selection.isCollapsed) selection.collapseToStart(); } } }
debugger;
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); }, cwd = null, path = null; this.name = 'browser'; this.global = window; this.global.jsio = jsio; this.log = function() { var args = SLICE.call(arguments, 0); if (typeof console != 'undefined' && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { // IE doesn't support log.apply, and the argument cannot be arguments - it must be an array console.log(args); } } return args.join(' '); } this.getCwd = function() { if(!cwd) { var location = window.location.toString().split('#')[0]; cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'), scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { ENV.log("a syntax error is preventing execution of " + path); try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write(window.parent.CODE_WITH_ERROR)'; window.CODE_WITH_ERROR = "<scr"+"ipt>" + code + "</scr"+"ipt>" setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } } this.fetch = function(path) { var xhr = new XHR(); try { xhr.open('GET', path, false); xhr.send(null); } catch(e) { ENV.log('e:', e); return false; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { return false; } return xhr.responseText; } };
var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); }
var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); }, SLICE = Array.prototype.slice, cwd = null, path = null;
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); } this.global = window; this.global.jsio = jsio; var SLICE = Array.prototype.slice; this.log = function() { var args = SLICE.call(arguments, 0); if (typeof console != 'undefined' && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { // IE doesn't support log.apply, and the argument cannot be arguments - it must be an array console.log(args); } } return args.join(' '); } var cwd = null, path = null; this.getCwd = function() { if(!cwd) { var location = window.location.toString(); cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'); var scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error"; try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write("<scr"+"ipt src=\'' + path + '\'></scr"+"ipt>")'; setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } } this.findModule = function(possibilities) { for (var i = 0, possible; possible = possibilities[i]; ++i) { var xhr = new XHR(); try { xhr.open('GET', possible.filePath, false); xhr.send(null); } catch(e) { ENV.log('e:', e); continue; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { continue; } possible.src = xhr.responseText; return possible; } return false; } };
var SLICE = Array.prototype.slice;
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); } this.global = window; this.global.jsio = jsio; var SLICE = Array.prototype.slice; this.log = function() { var args = SLICE.call(arguments, 0); if (typeof console != 'undefined' && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { // IE doesn't support log.apply, and the argument cannot be arguments - it must be an array console.log(args); } } return args.join(' '); } var cwd = null, path = null; this.getCwd = function() { if(!cwd) { var location = window.location.toString(); cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'); var scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error"; try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write("<scr"+"ipt src=\'' + path + '\'></scr"+"ipt>")'; setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } } this.findModule = function(possibilities) { for (var i = 0, possible; possible = possibilities[i]; ++i) { var xhr = new XHR(); try { xhr.open('GET', possible.filePath, false); xhr.send(null); } catch(e) { ENV.log('e:', e); continue; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { continue; } possible.src = xhr.responseText; return possible; } return false; } };
var cwd = null, path = null;
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); } this.global = window; this.global.jsio = jsio; var SLICE = Array.prototype.slice; this.log = function() { var args = SLICE.call(arguments, 0); if (typeof console != 'undefined' && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { // IE doesn't support log.apply, and the argument cannot be arguments - it must be an array console.log(args); } } return args.join(' '); } var cwd = null, path = null; this.getCwd = function() { if(!cwd) { var location = window.location.toString(); cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'); var scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error"; try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write("<scr"+"ipt src=\'' + path + '\'></scr"+"ipt>")'; setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } } this.findModule = function(possibilities) { for (var i = 0, possible; possible = possibilities[i]; ++i) { var xhr = new XHR(); try { xhr.open('GET', possible.filePath, false); xhr.send(null); } catch(e) { ENV.log('e:', e); continue; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { continue; } possible.src = xhr.responseText; return possible; } return false; } };
var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'); var scripts = document.getElementsByTagName('script');
var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'), scripts = document.getElementsByTagName('script');
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); } this.global = window; this.global.jsio = jsio; var SLICE = Array.prototype.slice; this.log = function() { var args = SLICE.call(arguments, 0); if (typeof console != 'undefined' && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { // IE doesn't support log.apply, and the argument cannot be arguments - it must be an array console.log(args); } } return args.join(' '); } var cwd = null, path = null; this.getCwd = function() { if(!cwd) { var location = window.location.toString(); cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'); var scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error"; try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write("<scr"+"ipt src=\'' + path + '\'></scr"+"ipt>")'; setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } } this.findModule = function(possibilities) { for (var i = 0, possible; possible = possibilities[i]; ++i) { var xhr = new XHR(); try { xhr.open('GET', possible.filePath, false); xhr.send(null); } catch(e) { ENV.log('e:', e); continue; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { continue; } possible.src = xhr.responseText; return possible; } return false; } };
e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error";
ENV.log("a syntax error is preventing execution of " + path);
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); }, cwd = null, path = null; this.name = 'browser'; this.global = window; this.global.jsio = jsio; this.log = function() { var args = SLICE.call(arguments, 0); if (typeof console != 'undefined' && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { // IE doesn't support log.apply, and the argument cannot be arguments - it must be an array console.log(args); } } return args.join(' '); } this.getCwd = function() { if(!cwd) { var location = window.location.toString().split('#')[0]; cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'), scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error"; try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write(window.parent.CODE_WITH_ERROR)'; window.CODE_WITH_ERROR = "<scr"+"ipt>" + code + "</scr"+"ipt>" setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } } this.fetch = function(filePath) { var xhr = new XHR(); try { xhr.open('GET', filePath, false); xhr.send(null); } catch(e) { ENV.log('e:', e); return false; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { return false; } return xhr.responseText; } };
this.fetch = function(filePath) {
this.fetch = function(path) {
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); }, cwd = null, path = null; this.name = 'browser'; this.global = window; this.global.jsio = jsio; this.log = function() { var args = SLICE.call(arguments, 0); if (typeof console != 'undefined' && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { // IE doesn't support log.apply, and the argument cannot be arguments - it must be an array console.log(args); } } return args.join(' '); } this.getCwd = function() { if(!cwd) { var location = window.location.toString().split('#')[0]; cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'), scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error"; try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write(window.parent.CODE_WITH_ERROR)'; window.CODE_WITH_ERROR = "<scr"+"ipt>" + code + "</scr"+"ipt>" setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } } this.fetch = function(filePath) { var xhr = new XHR(); try { xhr.open('GET', filePath, false); xhr.send(null); } catch(e) { ENV.log('e:', e); return false; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { return false; } return xhr.responseText; } };
xhr.open('GET', filePath, false);
xhr.open('GET', path, false);
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); }, cwd = null, path = null; this.name = 'browser'; this.global = window; this.global.jsio = jsio; this.log = function() { var args = SLICE.call(arguments, 0); if (typeof console != 'undefined' && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { // IE doesn't support log.apply, and the argument cannot be arguments - it must be an array console.log(args); } } return args.join(' '); } this.getCwd = function() { if(!cwd) { var location = window.location.toString().split('#')[0]; cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'), scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error"; try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write(window.parent.CODE_WITH_ERROR)'; window.CODE_WITH_ERROR = "<scr"+"ipt>" + code + "</scr"+"ipt>" setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } } this.fetch = function(filePath) { var xhr = new XHR(); try { xhr.open('GET', filePath, false); xhr.send(null); } catch(e) { ENV.log('e:', e); return false; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { return false; } return xhr.responseText; } };
if(typeof console != 'undefined' && console.log) { console.log.apply(console, arguments);
var args = SLICE.call(arguments, 0); if (typeof console != 'undefined' && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { console.log(args); }
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); } this.global = window; this.global.jsio = jsio; this.log = function() { if(typeof console != 'undefined' && console.log) { console.log.apply(console, arguments); } return Array.prototype.join.call(arguments, ' '); } var cwd = null, path = null; this.getCwd = function() { if(!cwd) { var location = window.location.toString(); cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'); var scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { var src = 'javascript:document.open();document.write("<scr"+"ipt src=\'' + path + '\'></scr"+"ipt>")'; var callback = function() { var el = document.createElement('iframe'); with(el.style) { position = 'absolute'; top = left = '-999px'; width = height = '1px'; visibility = 'hidden'; } el.src = src; setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); } if(document.body) { callback(); } else { window.addEventListener('load', callback, false); } throw new Error("forcing halt on load of " + path); } throw e; } } this.findModule = function(possibilities) { for (var i = 0, possible; possible = possibilities[i]; ++i) { var xhr = new XHR(); try { xhr.open('GET', possible.filePath, false); xhr.send(null); } catch(e) { ENV.log('e:', e); continue; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { continue; } possible.src = xhr.responseText; return possible; } return false; } };
return Array.prototype.join.call(arguments, ' ');
return args.join(' ');
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); } this.global = window; this.global.jsio = jsio; this.log = function() { if(typeof console != 'undefined' && console.log) { console.log.apply(console, arguments); } return Array.prototype.join.call(arguments, ' '); } var cwd = null, path = null; this.getCwd = function() { if(!cwd) { var location = window.location.toString(); cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'); var scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { var src = 'javascript:document.open();document.write("<scr"+"ipt src=\'' + path + '\'></scr"+"ipt>")'; var callback = function() { var el = document.createElement('iframe'); with(el.style) { position = 'absolute'; top = left = '-999px'; width = height = '1px'; visibility = 'hidden'; } el.src = src; setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); } if(document.body) { callback(); } else { window.addEventListener('load', callback, false); } throw new Error("forcing halt on load of " + path); } throw e; } } this.findModule = function(possibilities) { for (var i = 0, possible; possible = possibilities[i]; ++i) { var xhr = new XHR(); try { xhr.open('GET', possible.filePath, false); xhr.send(null); } catch(e) { ENV.log('e:', e); continue; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { continue; } possible.src = xhr.responseText; return possible; } return false; } };
var location = window.location.toString();
var location = window.location.toString().split('#')[0];
function ENV_browser() { var XHR = window.XMLHttpRequest || function() { return new ActiveXObject("Msxml2.XMLHTTP"); }, SLICE = Array.prototype.slice, cwd = null, path = null; this.global = window; this.global.jsio = jsio; this.log = function() { var args = SLICE.call(arguments, 0); if (typeof console != 'undefined' && console.log) { if (console.log.apply) { console.log.apply(console, arguments); } else { // IE doesn't support log.apply, and the argument cannot be arguments - it must be an array console.log(args); } } return args.join(' '); } this.getCwd = function() { if(!cwd) { var location = window.location.toString(); cwd = location.substring(0, location.lastIndexOf('/') + 1); } return cwd; } this.getPath = function() { if(!path) { try { var filename = new RegExp('(.*?)' + jsio.__filename + '(\\?.*)?$'), scripts = document.getElementsByTagName('script'); for (var i = 0, script; script = scripts[i]; ++i) { var result = script.src.match(filename); if (result) { path = result[1]; if (/^[A-Za-z]*:\/\//.test(path)) { path = makeRelativePath(path, this.getCwd()); } break; } } } catch(e) {} if(!path) { path = '.'; } } return path; } // IE6 won't return an anonymous function from eval, so use the function constructor instead var rawEval = typeof eval('(function(){})') == 'undefined' ? function(src, path) { return (new Function('return ' + src))(); } : function(src, path) { var src = src + '\n//@ sourceURL=' + path; return window.eval(src); } // provide an eval with reasonable debugging this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error"; try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write("<scr"+"ipt src=\'' + path + '\'></scr"+"ipt>")'; setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } } this.findModule = function(possibilities) { for (var i = 0, possible; possible = possibilities[i]; ++i) { var xhr = new XHR(); try { xhr.open('GET', possible.filePath, false); xhr.send(null); } catch(e) { ENV.log('e:', e); continue; // firefox file:// } if (xhr.status == 404 || // all browsers, http:// xhr.status == -1100 || // safari file:// // XXX: We have no way to tell in opera if a file exists and is empty, or is 404 // XXX: Use flash? //(!failed && xhr.status == 0 && !xhr.responseText && EXISTS)) // opera false) { continue; } possible.src = xhr.responseText; return possible; } return false; } };
return makeRelativePath(segments.join('/') || '.', this.getCwd());
return util.makeRelativePath(segments.join('/') || '.', this.getCwd());
function ENV_node() { var fs = require('fs'), sys = require('sys'); this.name = 'node'; this.global = GLOBAL; this.getCwd = process.cwd; this.hasCommonJS = true; this.log = function() { var msg; try { sys.error(msg = Array.prototype.map.call(arguments, function(a) { if ((a instanceof Error) && a.message) { return 'Error:' + a.message + '\nStack:' + a.stack + '\nArguments:' + a.arguments; } return typeof a == 'string' ? a : JSON.stringify(a); }).join(' ')); } catch(e) { sys.error(msg = Array.prototype.join.call(arguments, ' ') + '\n'); } return msg; } this.getPath = function() { var segments = __filename.split('/'); segments.pop(); return makeRelativePath(segments.join('/') || '.', this.getCwd()); } this.eval = process.compile; this.fetch = function(path) { try { return fs.readFileSync(path, 'utf8'); } catch(e) {} return false; } this.require = require; this.include = include; }
this.hasCommonJS = true;
function ENV_node() { var fs = require('fs'), sys = require('sys'); this.name = 'node'; this.global = GLOBAL; this.getCwd = process.cwd; this.hasCommonJS = true; this.log = function() { var msg; try { sys.error(msg = Array.prototype.map.call(arguments, function(a) { if ((a instanceof Error) && a.message) { return 'Error:' + a.message + '\nStack:' + a.stack + '\nArguments:' + a.arguments; } return typeof a == 'string' ? a : JSON.stringify(a); }).join(' ')); } catch(e) { sys.error(msg = Array.prototype.join.call(arguments, ' ') + '\n'); } return msg; } this.getPath = function() { var segments = __filename.split('/'); segments.pop(); return util.makeRelativePath(segments.join('/') || '.', this.getCwd()); } this.eval = process.compile; this.fetch = function(path) { try { return fs.readFileSync(path, 'utf8'); } catch(e) {} return false; } this.require = require; this.include = include; }
this.include = include;
function ENV_node() { var fs = require('fs'), sys = require('sys'); this.name = 'node'; this.global = GLOBAL; this.getCwd = process.cwd; this.hasCommonJS = true; this.log = function() { var msg; try { sys.error(msg = Array.prototype.map.call(arguments, function(a) { if ((a instanceof Error) && a.message) { return 'Error:' + a.message + '\nStack:' + a.stack + '\nArguments:' + a.arguments; } return typeof a == 'string' ? a : JSON.stringify(a); }).join(' ')); } catch(e) { sys.error(msg = Array.prototype.join.call(arguments, ' ') + '\n'); } return msg; } this.getPath = function() { var segments = __filename.split('/'); segments.pop(); return util.makeRelativePath(segments.join('/') || '.', this.getCwd()); } this.eval = process.compile; this.fetch = function(path) { try { return fs.readFileSync(path, 'utf8'); } catch(e) {} return false; } this.require = require; this.include = include; }
this.log = function() { process.stdio.writeError(Array.prototype.join.call(arguments, ' ') + '\n'); }
this.log = function() { try { process.stdio.writeError(Array.prototype.map.call(arguments, JSON.stringify).join(' ') + '\n'); } catch(e) { process.stdio.writeError(Array.prototype.join.call(arguments, ' ') + '\n'); } }
function ENV_node() { var posix = require('posix'); this.global = GLOBAL; this.getCwd = process.cwd; this.log = function() { process.stdio.writeError(Array.prototype.join.call(arguments, ' ') + '\n'); } this.getPath = function() { var segments = __filename.split('/'); segments.pop(); return segments.join('/') || '.'; } this.eval = function(code, path) { try { return process.compile(code, path); } catch(e) { if(e instanceof SyntaxError) { this.log("Syntax Error loading ", args.location, e); } throw e; } } this.findModule = function(possibilities) { for (var i = 0, possible; possible = possibilities[i]; ++i) { try { possible.src = posix.cat(possible.filePath).wait(); return possible; } catch(e) {} } return false; } this.require = require; this.include = include; }
this.eval = function(code, path) { try { return process.compile(code, path); } catch(e) { if(e instanceof SyntaxError) { this.log("Syntax Error loading ", args.location, e); } throw e; } }
this.eval = process.compile;
function ENV_node() { var posix = require('posix'); this.global = GLOBAL; this.getCwd = process.cwd; this.log = function() { process.stdio.writeError(Array.prototype.join.call(arguments, ' ') + '\n'); } this.getPath = function() { var segments = __filename.split('/'); segments.pop(); return segments.join('/') || '.'; } this.eval = function(code, path) { try { return process.compile(code, path); } catch(e) { if(e instanceof SyntaxError) { this.log("Syntax Error loading ", args.location, e); } throw e; } } this.findModule = function(possibilities) { for (var i = 0, possible; possible = possibilities[i]; ++i) { try { possible.src = posix.cat(possible.filePath).wait(); return possible; } catch(e) {} } return false; } this.require = require; this.include = include; }
try { return fs.readFileSync(path); } catch(e) {}
try { return fs.readFileSync(path, 'utf8'); } catch(e) {}
function ENV_node() { var fs = require('fs'), sys = require('sys'); this.name = 'node'; this.global = GLOBAL; this.getCwd = process.cwd; this.hasCommonJS = true; this.log = function() { var msg; try { sys.error(msg = Array.prototype.map.call(arguments, function(a) { if ((a instanceof Error) && a.message) { return 'Error:' + a.message + '\nStack:' + a.stack + '\nArguments:' + a.arguments; } return typeof a == 'string' ? a : JSON.stringify(a); }).join(' ')); } catch(e) { sys.error(msg = Array.prototype.join.call(arguments, ' ') + '\n'); } return msg; } this.getPath = function() { var segments = __filename.split('/'); segments.pop(); return makeRelativePath(segments.join('/') || '.', this.getCwd()); } this.eval = process.compile; this.fetch = function(path) { try { return fs.readFileSync(path); } catch(e) {} return false; } this.require = require; this.include = include; }
return segments.join('/') || '.';
return makeRelativePath(segments.join('/') || '.', this.getCwd());
function ENV_node() { var fs = require('fs'), sys = require('sys'); this.name = 'node'; this.global = GLOBAL; this.getCwd = process.cwd; this.log = function() { var msg; try { sys.error(msg = Array.prototype.map.call(arguments, function(a) { if ((a instanceof Error) && a.message) { return 'Error:' + a.message + '\nStack:' + a.stack + '\nArguments:' + a.arguments; } return typeof a == 'string' ? a : JSON.stringify(a); }).join(' ')); } catch(e) { sys.error(msg = Array.prototype.join.call(arguments, ' ') + '\n'); } return msg; } this.getPath = function() { var segments = __filename.split('/'); segments.pop(); return segments.join('/') || '.'; } this.eval = process.compile; this.fetch = function(filePath) { try { return fs.readFileSync(filePath); } catch(e) {} return false; } this.require = require; this.include = include; }
this.fetch = function(filePath) { try { return fs.readFileSync(filePath); } catch(e) {}
this.fetch = function(path) { try { return fs.readFileSync(path); } catch(e) {}
function ENV_node() { var fs = require('fs'), sys = require('sys'); this.name = 'node'; this.global = GLOBAL; this.getCwd = process.cwd; this.log = function() { var msg; try { sys.error(msg = Array.prototype.map.call(arguments, function(a) { if ((a instanceof Error) && a.message) { return 'Error:' + a.message + '\nStack:' + a.stack + '\nArguments:' + a.arguments; } return typeof a == 'string' ? a : JSON.stringify(a); }).join(' ')); } catch(e) { sys.error(msg = Array.prototype.join.call(arguments, ' ') + '\n'); } return msg; } this.getPath = function() { var segments = __filename.split('/'); segments.pop(); return segments.join('/') || '.'; } this.eval = process.compile; this.fetch = function(filePath) { try { return fs.readFileSync(filePath); } catch(e) {} return false; } this.require = require; this.include = include; }
let command = dactyl.has("Win32") ? "set" : "env";
let command = dactyl.has("WINNT") ? "set" : "env";
completion.environment = function environment(context) { let command = dactyl.has("Win32") ? "set" : "env"; let lines = io.system(command).split("\n"); lines.pop(); context.title = ["Environment Variable", "Value"]; context.generate = function () lines.map(function (line) (line.match(/([^=]+)=(.+)/) || []).slice(1)); };
}
},
equal: function (r1, r2) { try { return !r1.compareBoundaryPoints(Range.START_TO_START, r2) && !r1.compareBoundaryPoints(Range.END_TO_END, r2) } catch (e) {} return false; }
equal: function (r1, r2) !r1.compareBoundaryPoints(Range.START_TO_START, r2) && !r1.compareBoundaryPoints(Range.END_TO_END, r2) });
equal: function (r1, r2) { try { return !r1.compareBoundaryPoints(Range.START_TO_START, r2) && !r1.compareBoundaryPoints(Range.END_TO_END, r2) } catch (e) {} return false; }
equal: function (r1, r2) !r1.compareBoundaryPoints(Range.START_TO_START, r2) && !r1.compareBoundaryPoints(Range.END_TO_END, r2)});
if (!ajaxAnimation.attr('class')) ajaxAnimation.hide(); fFailure(obj);
error: function() { ajaxAnimation.removeClass(xhrName); if (!ajaxAnimation.attr('class')) ajaxAnimation.hide(); fFailure(obj); }
$("#list_load_mask").unmask();
alert('Dcmgr connection '+status);
error: function(xhr, status, error){ $("#list_load_mask").unmask(); }
RegExp.escape = function(str) { return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); };
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
RegExp.escape = function(str) { return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');};
escapeHTML: function() { return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'); },
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
escapeHTML: function() { return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'); },
debugger;
this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { ENV.log("a syntax error is preventing execution of " + path); try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write(window.parent.CODE_WITH_ERROR)'; window.CODE_WITH_ERROR = "<scr"+"ipt>" + code + "</scr"+"ipt>" setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } }
try { return process.compile(code, path); } catch(e) {
try { return rawEval(code, path); } catch(e) {
this.eval = function(code, path) { try { return process.compile(code, path); } catch(e) { if(e instanceof SyntaxError) { this.log("Syntax Error loading ", args.location, e); } throw e; } }
this.log("Syntax Error loading ", args.location, e);
var src = 'javascript:document.open();document.write("<scr"+"ipt src=\'' + path + '\'></scr"+"ipt>")'; var callback = function() { var el = document.createElement('iframe'); with(el.style) { position = 'absolute'; top = left = '-999px'; width = height = '1px'; visibility = 'hidden'; } el.src = src; setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); } if(document.body) { callback(); } else { window.addEventListener('load', callback, false); } throw new Error("forcing halt on load of " + path);
this.eval = function(code, path) { try { return process.compile(code, path); } catch(e) { if(e instanceof SyntaxError) { this.log("Syntax Error loading ", args.location, e); } throw e; } }
e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error";
ENV.log("a syntax error is preventing execution of " + path);
this.eval = function(code, path) { try { return rawEval(code, path); } catch(e) { if(e instanceof SyntaxError) { e.message = "a syntax error is preventing execution of " + path; e.type = "syntax_error"; try { var cb = function() { var el = document.createElement('iframe'); el.style.cssText = "position:absolute;top:-999px;left:-999px;width:1px;height:1px;visibility:hidden"; el.src = 'javascript:document.open();document.write(window.parent.CODE_WITH_ERROR)'; window.CODE_WITH_ERROR = "<scr"+"ipt>" + code + "</scr"+"ipt>" setTimeout(function() {try{document.body.appendChild(el)}catch(e){}}, 0); }; if (document.body) { cb(); } else { window.addEventListener('load', cb, false); } } catch(f) {} } throw e; } }
evalJSON: function(sanitize) { var json = this.unfilterJSON(); try { if (!sanitize || json.isJSON()) return eval('(' + json + ')'); } catch (e) { } throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); },
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
evalJSON: function(sanitize) { var json = this.unfilterJSON(); try { if (!sanitize || json.isJSON()) return eval('(' + json + ')'); } catch (e) { } throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); },
evalResponse: function() { try { return eval((this.transport.responseText || '').unfilterJSON()); } catch (e) { this.dispatchException(e); } },
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
evalResponse: function() { try { return eval((this.transport.responseText || '').unfilterJSON()); } catch (e) { this.dispatchException(e); } },
evalScripts: function() { return this.extractScripts().map(function(script) { return eval(script) }); },
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
evalScripts: function() { return this.extractScripts().map(function(script) { return eval(script) }); },
return { evaluate: function(){ return true; } };
evaluate: function (r,w) { return undefined; }
return { evaluate: function(){ return true; } };
evaluate: function(object) { if (Object.isFunction(object.toTemplateReplacements)) object = object.toTemplateReplacements(); return this.template.gsub(this.pattern, function(match) { if (object == null) return ''; var before = match[1] || ''; if (before == '\\') return match[2]; var ctx = object, expr = match[3]; var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/; match = pattern.exec(expr); if (match == null) return before; while (match != null) { var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1]; ctx = ctx[comp]; if (null == ctx || '' == match[3]) break; expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); match = pattern.exec(expr); } return before + String.interpret(ctx); }); }
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
evaluate: function(object) { if (Object.isFunction(object.toTemplateReplacements)) object = object.toTemplateReplacements(); return this.template.gsub(this.pattern, function(match) { if (object == null) return ''; var before = match[1] || ''; if (before == '\\') return match[2]; var ctx = object, expr = match[3]; var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/; match = pattern.exec(expr); if (match == null) return before; while (match != null) { var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1]; ctx = ctx[comp]; if (null == ctx || '' == match[3]) break; expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); match = pattern.exec(expr); } return before + String.interpret(ctx); }); }
result.__iterator__ = asIterator
return { __proto__: result, __iterator__: asIterator
evaluateXPath: function (expression, doc, elem, asIterator) { if (!doc) doc = window.content.document; if (!elem) elem = doc; if (util.isArray(expression)) expression = util.makeXPath(expression); let result = doc.evaluate(expression, elem, function lookupNamespaceURI(prefix) { return { xhtml: "http://www.w3.org/1999/xhtml", xhtml2: "http://www.w3.org/2002/06/xhtml2", liberator: NS.uri }[prefix] || null; }, asIterator ? XPathResult.ORDERED_NODE_ITERATOR_TYPE : XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); result.__iterator__ = asIterator ? function () { let elem; while ((elem = this.iterateNext())) yield elem; } : function () { for (let i = 0; i < this.snapshotLength; i++) yield this.snapshotItem(i); }; return result; },
: function () { for (let i = 0; i < this.snapshotLength; i++) yield this.snapshotItem(i); }; return result;
: function () { for (let i = 0; i < this.snapshotLength; i++) yield this.snapshotItem(i); } }
evaluateXPath: function (expression, doc, elem, asIterator) { if (!doc) doc = window.content.document; if (!elem) elem = doc; if (util.isArray(expression)) expression = util.makeXPath(expression); let result = doc.evaluate(expression, elem, function lookupNamespaceURI(prefix) { return { xhtml: "http://www.w3.org/1999/xhtml", xhtml2: "http://www.w3.org/2002/06/xhtml2", liberator: NS.uri }[prefix] || null; }, asIterator ? XPathResult.ORDERED_NODE_ITERATOR_TYPE : XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); result.__iterator__ = asIterator ? function () { let elem; while ((elem = this.iterateNext())) yield elem; } : function () { for (let i = 0; i < this.snapshotLength; i++) yield this.snapshotItem(i); }; return result; },
xhtml: "http:
xul: XUL.uri, xhtml: XHTML.uri,
evaluateXPath: function (expression, doc, elem, asIterator) { if (!doc) doc = window.content.document; if (!elem) elem = doc; if (isarray(expression)) expression = util.makeXPath(expression); let result = doc.evaluate(expression, elem, function lookupNamespaceURI(prefix) { return { xhtml: "http://www.w3.org/1999/xhtml", xhtml2: "http://www.w3.org/2002/06/xhtml2", dactyl: NS.uri }[prefix] || null; }, asIterator ? XPathResult.ORDERED_NODE_ITERATOR_TYPE : XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); return { __proto__: result, __iterator__: asIterator ? function () { let elem; while ((elem = this.iterateNext())) yield elem; } : function () { for (let i = 0; i < this.snapshotLength; i++) yield this.snapshotItem(i); } } },
if (version === 533.17) {
if (version === 533.19) {
SC.Event = function(originalEvent) { var idx, len; // copy properties from original event, if passed in. if (originalEvent) { this.originalEvent = originalEvent ; var props = SC.Event._props, key; len = props.length; idx = len; while(--idx >= 0) { key = props[idx] ; this[key] = originalEvent[key] ; } } // Fix timeStamp this.timeStamp = this.timeStamp || Date.now(); // Fix target property, if necessary // Fixes #1925 where srcElement might not be defined either if (!this.target) this.target = this.srcElement || document; // check if target is a textnode (safari) if (this.target.nodeType === 3 ) this.target = this.target.parentNode; // Add relatedTarget, if necessary if (!this.relatedTarget && this.fromElement) { this.relatedTarget = (this.fromElement === this.target) ? this.toElement : this.fromElement; } // Calculate pageX/Y if missing and clientX/Y available if (SC.none(this.pageX) && !SC.none(this.clientX)) { var doc = document.documentElement, body = document.body; this.pageX = this.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); this.pageY = this.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); } // Add which for key events if (!this.which && ((this.charCode || originalEvent.charCode === 0) ? this.charCode : this.keyCode)) { this.which = this.charCode || this.keyCode; } // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) if (!this.metaKey && this.ctrlKey) this.metaKey = this.ctrlKey; // Add which for click: 1 == left; 2 == middle; 3 == right // Note: button is not normalized, so don't use it if (!this.which && this.button) { this.which = ((this.button & 1) ? 1 : ((this.button & 2) ? 3 : ( (this.button & 4) ? 2 : 0 ) )); } // Normalize wheel delta values for mousewheel events if (this.type === 'mousewheel' || this.type === 'DOMMouseScroll') { var deltaMultiplier = 1, version = parseFloat(SC.browser.version); // normalize wheelDelta, wheelDeltaX, & wheelDeltaY for Safari if (SC.browser.safari && originalEvent.wheelDelta!==undefined) { this.wheelDelta = 0-(originalEvent.wheelDeltaY || originalEvent.wheelDeltaX); this.wheelDeltaY = 0-(originalEvent.wheelDeltaY||0); this.wheelDeltaX = 0-(originalEvent.wheelDeltaX||0); // Scrolling in Safari 5.0.1, which is huge for some reason if (version === 533.17) { deltaMultiplier = 0.004; // Scrolling in Safari 5.0 } else if (version < 533 || version >= 534) { deltaMultiplier = 40; } // normalize wheelDelta for Firefox // note that we multiple the delta on FF to make it's acceleration more // natural. } else if (!SC.none(originalEvent.detail)) { deltaMultiplier = 10; if (originalEvent.axis && (originalEvent.axis === originalEvent.HORIZONTAL_AXIS)) { this.wheelDeltaX = originalEvent.detail; this.wheelDeltaY = this.wheelDelta = 0; } else { this.wheelDeltaY = this.wheelDelta = originalEvent.detail ; this.wheelDeltaX = 0 ; } // handle all other legacy browser } else { this.wheelDelta = this.wheelDeltaY = SC.browser.msie ? 0-originalEvent.wheelDelta : originalEvent.wheelDelta ; this.wheelDeltaX = 0 ; } this.wheelDelta *= deltaMultiplier; this.wheelDeltaX *= deltaMultiplier; this.wheelDeltaY *= deltaMultiplier; } return this; } ;
if (version >= 533.17 && version <= 533.19) { deltaMultiplier = 0.004;
if (!SC.browser.chrome) { if (version >= 533.17 && version <= 533.19) { deltaMultiplier = 0.004;
SC.Event = function(originalEvent) { var idx, len; // copy properties from original event, if passed in. if (originalEvent) { this.originalEvent = originalEvent ; var props = SC.Event._props, key; len = props.length; idx = len; while(--idx >= 0) { key = props[idx] ; this[key] = originalEvent[key] ; } } // Fix timeStamp this.timeStamp = this.timeStamp || Date.now(); // Fix target property, if necessary // Fixes #1925 where srcElement might not be defined either if (!this.target) this.target = this.srcElement || document; // check if target is a textnode (safari) if (this.target.nodeType === 3 ) this.target = this.target.parentNode; // Add relatedTarget, if necessary if (!this.relatedTarget && this.fromElement) { this.relatedTarget = (this.fromElement === this.target) ? this.toElement : this.fromElement; } // Calculate pageX/Y if missing and clientX/Y available if (SC.none(this.pageX) && !SC.none(this.clientX)) { var doc = document.documentElement, body = document.body; this.pageX = this.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); this.pageY = this.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); } // Add which for key events if (!this.which && ((this.charCode || originalEvent.charCode === 0) ? this.charCode : this.keyCode)) { this.which = this.charCode || this.keyCode; } // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) if (!this.metaKey && this.ctrlKey) this.metaKey = this.ctrlKey; // Add which for click: 1 == left; 2 == middle; 3 == right // Note: button is not normalized, so don't use it if (!this.which && this.button) { this.which = ((this.button & 1) ? 1 : ((this.button & 2) ? 3 : ( (this.button & 4) ? 2 : 0 ) )); } // Normalize wheel delta values for mousewheel events if (this.type === 'mousewheel' || this.type === 'DOMMouseScroll') { var deltaMultiplier = 1, version = parseFloat(SC.browser.version); // normalize wheelDelta, wheelDeltaX, & wheelDeltaY for Safari if (SC.browser.safari && originalEvent.wheelDelta!==undefined) { this.wheelDelta = 0-(originalEvent.wheelDeltaY || originalEvent.wheelDeltaX); this.wheelDeltaY = 0-(originalEvent.wheelDeltaY||0); this.wheelDeltaX = 0-(originalEvent.wheelDeltaX||0); // Scrolling in Safari 5.0.1, which is huge for some reason if (version >= 533.17 && version <= 533.19) { deltaMultiplier = 0.004; // Scrolling in Safari 5.0 } else if (version < 533 || version >= 534) { deltaMultiplier = 40; } // normalize wheelDelta for Firefox // note that we multiple the delta on FF to make it's acceleration more // natural. } else if (!SC.none(originalEvent.detail)) { deltaMultiplier = 10; if (originalEvent.axis && (originalEvent.axis === originalEvent.HORIZONTAL_AXIS)) { this.wheelDeltaX = originalEvent.detail; this.wheelDeltaY = this.wheelDelta = 0; } else { this.wheelDeltaY = this.wheelDelta = originalEvent.detail ; this.wheelDeltaX = 0 ; } // handle all other legacy browser } else { this.wheelDelta = this.wheelDeltaY = SC.browser.msie ? 0-originalEvent.wheelDelta : originalEvent.wheelDelta ; this.wheelDeltaX = 0 ; } this.wheelDelta *= deltaMultiplier; this.wheelDeltaX *= deltaMultiplier; this.wheelDeltaY *= deltaMultiplier; } return this; } ;
} else if (version < 533 || version >= 534) { deltaMultiplier = 40;
} else if (version < 533 || version >= 534) { deltaMultiplier = 40; }
SC.Event = function(originalEvent) { var idx, len; // copy properties from original event, if passed in. if (originalEvent) { this.originalEvent = originalEvent ; var props = SC.Event._props, key; len = props.length; idx = len; while(--idx >= 0) { key = props[idx] ; this[key] = originalEvent[key] ; } } // Fix timeStamp this.timeStamp = this.timeStamp || Date.now(); // Fix target property, if necessary // Fixes #1925 where srcElement might not be defined either if (!this.target) this.target = this.srcElement || document; // check if target is a textnode (safari) if (this.target.nodeType === 3 ) this.target = this.target.parentNode; // Add relatedTarget, if necessary if (!this.relatedTarget && this.fromElement) { this.relatedTarget = (this.fromElement === this.target) ? this.toElement : this.fromElement; } // Calculate pageX/Y if missing and clientX/Y available if (SC.none(this.pageX) && !SC.none(this.clientX)) { var doc = document.documentElement, body = document.body; this.pageX = this.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); this.pageY = this.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); } // Add which for key events if (!this.which && ((this.charCode || originalEvent.charCode === 0) ? this.charCode : this.keyCode)) { this.which = this.charCode || this.keyCode; } // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) if (!this.metaKey && this.ctrlKey) this.metaKey = this.ctrlKey; // Add which for click: 1 == left; 2 == middle; 3 == right // Note: button is not normalized, so don't use it if (!this.which && this.button) { this.which = ((this.button & 1) ? 1 : ((this.button & 2) ? 3 : ( (this.button & 4) ? 2 : 0 ) )); } // Normalize wheel delta values for mousewheel events if (this.type === 'mousewheel' || this.type === 'DOMMouseScroll') { var deltaMultiplier = 1, version = parseFloat(SC.browser.version); // normalize wheelDelta, wheelDeltaX, & wheelDeltaY for Safari if (SC.browser.safari && originalEvent.wheelDelta!==undefined) { this.wheelDelta = 0-(originalEvent.wheelDeltaY || originalEvent.wheelDeltaX); this.wheelDeltaY = 0-(originalEvent.wheelDeltaY||0); this.wheelDeltaX = 0-(originalEvent.wheelDeltaX||0); // Scrolling in Safari 5.0.1, which is huge for some reason if (version >= 533.17 && version <= 533.19) { deltaMultiplier = 0.004; // Scrolling in Safari 5.0 } else if (version < 533 || version >= 534) { deltaMultiplier = 40; } // normalize wheelDelta for Firefox // note that we multiple the delta on FF to make it's acceleration more // natural. } else if (!SC.none(originalEvent.detail)) { deltaMultiplier = 10; if (originalEvent.axis && (originalEvent.axis === originalEvent.HORIZONTAL_AXIS)) { this.wheelDeltaX = originalEvent.detail; this.wheelDeltaY = this.wheelDelta = 0; } else { this.wheelDeltaY = this.wheelDelta = originalEvent.detail ; this.wheelDeltaX = 0 ; } // handle all other legacy browser } else { this.wheelDelta = this.wheelDeltaY = SC.browser.msie ? 0-originalEvent.wheelDelta : originalEvent.wheelDelta ; this.wheelDeltaX = 0 ; } this.wheelDelta *= deltaMultiplier; this.wheelDeltaX *= deltaMultiplier; this.wheelDeltaY *= deltaMultiplier; } return this; } ;
b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=K();this[H]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=
"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent= a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=K();this[H]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=
if (version === 533.17) {
if (version === 533.17 || version === 533.19) {
SC.Event = function(originalEvent) { var idx, len; // copy properties from original event, if passed in. if (originalEvent) { this.originalEvent = originalEvent ; var props = SC.Event._props, key; len = props.length; idx = len; while(--idx >= 0) { key = props[idx] ; this[key] = originalEvent[key] ; } } // Fix timeStamp this.timeStamp = this.timeStamp || Date.now(); // Fix target property, if necessary // Fixes #1925 where srcElement might not be defined either if (!this.target) this.target = this.srcElement || document; // check if target is a textnode (safari) if (this.target.nodeType === 3 ) this.target = this.target.parentNode; // Add relatedTarget, if necessary if (!this.relatedTarget && this.fromElement) { this.relatedTarget = (this.fromElement === this.target) ? this.toElement : this.fromElement; } // Calculate pageX/Y if missing and clientX/Y available if (SC.none(this.pageX) && !SC.none(this.clientX)) { var doc = document.documentElement, body = document.body; this.pageX = this.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); this.pageY = this.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); } // Add which for key events if (!this.which && ((this.charCode || originalEvent.charCode === 0) ? this.charCode : this.keyCode)) { this.which = this.charCode || this.keyCode; } // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) if (!this.metaKey && this.ctrlKey) this.metaKey = this.ctrlKey; // Add which for click: 1 == left; 2 == middle; 3 == right // Note: button is not normalized, so don't use it if (!this.which && this.button) { this.which = ((this.button & 1) ? 1 : ((this.button & 2) ? 3 : ( (this.button & 4) ? 2 : 0 ) )); } // Normalize wheel delta values for mousewheel events if (this.type === 'mousewheel' || this.type === 'DOMMouseScroll') { var deltaMultiplier = 1, version = parseFloat(SC.browser.version); // normalize wheelDelta, wheelDeltaX, & wheelDeltaY for Safari if (SC.browser.safari && originalEvent.wheelDelta!==undefined) { this.wheelDelta = 0-(originalEvent.wheelDeltaY || originalEvent.wheelDeltaX); this.wheelDeltaY = 0-(originalEvent.wheelDeltaY||0); this.wheelDeltaX = 0-(originalEvent.wheelDeltaX||0); // Scrolling in Safari 5.0.1, which is huge for some reason if (version === 533.17) { deltaMultiplier = 0.004; // Scrolling in Safari 5.0 } else if (version < 533 || version >= 534) { deltaMultiplier = 40; } // normalize wheelDelta for Firefox // note that we multiple the delta on FF to make it's acceleration more // natural. } else if (!SC.none(originalEvent.detail)) { deltaMultiplier = 10; if (originalEvent.axis && (originalEvent.axis === originalEvent.HORIZONTAL_AXIS)) { this.wheelDeltaX = originalEvent.detail; this.wheelDeltaY = this.wheelDelta = 0; } else { this.wheelDeltaY = this.wheelDelta = originalEvent.detail ; this.wheelDeltaX = 0 ; } // handle all other legacy browser } else { this.wheelDelta = this.wheelDeltaY = SC.browser.msie ? 0-originalEvent.wheelDelta : originalEvent.wheelDelta ; this.wheelDeltaX = 0 ; } this.wheelDelta *= deltaMultiplier; this.wheelDeltaX *= deltaMultiplier; this.wheelDeltaY *= deltaMultiplier; } return this; } ;
if (version === 533.19) {
if (version >= 533.17 && version <= 533.19) {
SC.Event = function(originalEvent) { var idx, len; // copy properties from original event, if passed in. if (originalEvent) { this.originalEvent = originalEvent ; var props = SC.Event._props, key; len = props.length; idx = len; while(--idx >= 0) { key = props[idx] ; this[key] = originalEvent[key] ; } } // Fix timeStamp this.timeStamp = this.timeStamp || Date.now(); // Fix target property, if necessary // Fixes #1925 where srcElement might not be defined either if (!this.target) this.target = this.srcElement || document; // check if target is a textnode (safari) if (this.target.nodeType === 3 ) this.target = this.target.parentNode; // Add relatedTarget, if necessary if (!this.relatedTarget && this.fromElement) { this.relatedTarget = (this.fromElement === this.target) ? this.toElement : this.fromElement; } // Calculate pageX/Y if missing and clientX/Y available if (SC.none(this.pageX) && !SC.none(this.clientX)) { var doc = document.documentElement, body = document.body; this.pageX = this.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0); this.pageY = this.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0); } // Add which for key events if (!this.which && ((this.charCode || originalEvent.charCode === 0) ? this.charCode : this.keyCode)) { this.which = this.charCode || this.keyCode; } // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) if (!this.metaKey && this.ctrlKey) this.metaKey = this.ctrlKey; // Add which for click: 1 == left; 2 == middle; 3 == right // Note: button is not normalized, so don't use it if (!this.which && this.button) { this.which = ((this.button & 1) ? 1 : ((this.button & 2) ? 3 : ( (this.button & 4) ? 2 : 0 ) )); } // Normalize wheel delta values for mousewheel events if (this.type === 'mousewheel' || this.type === 'DOMMouseScroll') { var deltaMultiplier = 1, version = parseFloat(SC.browser.version); // normalize wheelDelta, wheelDeltaX, & wheelDeltaY for Safari if (SC.browser.safari && originalEvent.wheelDelta!==undefined) { this.wheelDelta = 0-(originalEvent.wheelDeltaY || originalEvent.wheelDeltaX); this.wheelDeltaY = 0-(originalEvent.wheelDeltaY||0); this.wheelDeltaX = 0-(originalEvent.wheelDeltaX||0); // Scrolling in Safari 5.0.1, which is huge for some reason if (version === 533.19) { deltaMultiplier = 0.004; // Scrolling in Safari 5.0 } else if (version < 533 || version >= 534) { deltaMultiplier = 40; } // normalize wheelDelta for Firefox // note that we multiple the delta on FF to make it's acceleration more // natural. } else if (!SC.none(originalEvent.detail)) { deltaMultiplier = 10; if (originalEvent.axis && (originalEvent.axis === originalEvent.HORIZONTAL_AXIS)) { this.wheelDeltaX = originalEvent.detail; this.wheelDeltaY = this.wheelDelta = 0; } else { this.wheelDeltaY = this.wheelDelta = originalEvent.detail ; this.wheelDeltaX = 0 ; } // handle all other legacy browser } else { this.wheelDelta = this.wheelDeltaY = SC.browser.msie ? 0-originalEvent.wheelDelta : originalEvent.wheelDelta ; this.wheelDeltaX = 0 ; } this.wheelDelta *= deltaMultiplier; this.wheelDeltaX *= deltaMultiplier; this.wheelDeltaY *= deltaMultiplier; } return this; } ;
options.eventCallback = function(aEvent) { if (aEvent != "removed")
eventCallback: function(state) { if (!timeoutId) {
options.eventCallback = function(aEvent) { if (aEvent != "removed") return; options.contentWindow = null; options.sourceURI = null; };
options.contentWindow = null; options.sourceURI = null; };
} if (state == "dismissed") { clearTimeout(timeoutId); timeoutId = setTimeout(timeoutNotification, hiddenTimeoutDuration); return; } if (state == "shown") { clearTimeout(timeoutId); } }
options.eventCallback = function(aEvent) { if (aEvent != "removed") return; options.contentWindow = null; options.sourceURI = null; };
activity.JsEventFetcher.EventDispatcher_ = function(model) {
activity.JsEventFetcher.EventDispatcher_ = function(model, aggregateBrowserJS) {
activity.JsEventFetcher.EventDispatcher_ = function(model) { /** * @type {activity.TimelineModel} * @private */ this.model_ = model; /** * @type {Object} * @private */ this.eventMap_ = {}; /** * @type {Array.<activity.TimelineModel.Event>} * @private */ this.eventArray_ = [];};
this.aggregateBrowserJS_ = aggregateBrowserJS;
activity.JsEventFetcher.EventDispatcher_ = function(model) { /** * @type {activity.TimelineModel} * @private */ this.model_ = model; /** * @type {Object} * @private */ this.eventMap_ = {}; /** * @type {Array.<activity.TimelineModel.Event>} * @private */ this.eventArray_ = [];};
*/
events: function () { window.XULBrowserWindow = this.progressListener; window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShellTreeItem) .treeOwner .QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIXULWindow) .XULBrowserWindow = this.progressListener; try { config.browser.addProgressListener(this.progressListener, Ci.nsIWebProgress.NOTIFY_ALL); } catch (e) {} // Why? --djk let appContent = document.getElementById("appcontent"); if (appContent) { events.addSessionListener(appContent, "DOMContentLoaded", this.closure.onDOMContentLoaded, true); events.addSessionListener(appContent, "load", this.closure.onPageLoad, true); events.addSessionListener(appContent, "scroll", this.closure._updateBufferPosition, false); } },
let appContent = document.getElementById("appcontent"); if (appContent) { events.addSessionListener(appContent, "DOMContentLoaded", this.closure.onDOMContentLoaded, true); events.addSessionListener(appContent, "load", this.closure.onPageLoad, true); events.addSessionListener(appContent, "scroll", this.closure._updateBufferPosition, false); }
events.addSessionListener(config.browser, "DOMContentLoaded", this.closure.onDOMContentLoaded, true); events.addSessionListener(config.browser, "load", this.closure.onPageLoad, true); events.addSessionListener(config.browser, "scroll", this.closure._updateBufferPosition, false);
events: function () { try { config.browser.removeProgressListener(window.XULBrowserWindow); } catch (e) {} // Why? --djk // I hate this whole hack. --Kris let obj = window.XULBrowserWindow, getter; for (let p in properties(obj)) if ((getter = obj.__lookupGetter__(p)) && !obj.__lookupSetter__(p)) { this.progressListener.__defineGetter__(p, getter); delete obj[p]; } config.browser.addProgressListener(this.progressListener, Ci.nsIWebProgress.NOTIFY_ALL); window.XULBrowserWindow = this.progressListener; window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShellTreeItem).treeOwner .QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIXULWindow) .XULBrowserWindow = this.progressListener; let appContent = document.getElementById("appcontent"); if (appContent) { events.addSessionListener(appContent, "DOMContentLoaded", this.closure.onDOMContentLoaded, true); events.addSessionListener(appContent, "load", this.closure.onPageLoad, true); events.addSessionListener(appContent, "scroll", this.closure._updateBufferPosition, false); } },
try { config.browser.removeProgressListener(window.XULBrowserWindow); } catch (e) {} let obj = window.XULBrowserWindow, getter; for (let p in properties(obj)) if ((getter = obj.__lookupGetter__(p)) && !obj.__lookupSetter__(p)) { this.progressListener.__defineGetter__(p, getter); delete obj[p]; } config.browser.addProgressListener(this.progressListener, Ci.nsIWebProgress.NOTIFY_ALL); window.XULBrowserWindow = this.progressListener; window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShellTreeItem).treeOwner .QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIXULWindow) .XULBrowserWindow = this.progressListener;
events: function () { try { config.browser.removeProgressListener(window.XULBrowserWindow); } catch (e) {} // Why? --djk // I hate this whole hack. --Kris let obj = window.XULBrowserWindow, getter; for (let p in properties(obj)) if ((getter = obj.__lookupGetter__(p)) && !obj.__lookupSetter__(p)) { this.progressListener.__defineGetter__(p, getter); delete obj[p]; } config.browser.addProgressListener(this.progressListener, Ci.nsIWebProgress.NOTIFY_ALL); window.XULBrowserWindow = this.progressListener; window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShellTreeItem).treeOwner .QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIXULWindow) .XULBrowserWindow = this.progressListener; events.addSessionListener(config.browser, "DOMContentLoaded", this.closure.onDOMContentLoaded, true); events.addSessionListener(config.browser, "load", this.closure.onPageLoad, true); events.addSessionListener(config.browser, "scroll", this.closure._updateBufferPosition, false); },
context.highlight();
completion.ex = function ex(context) { // if there is no space between the command name and the cursor // then get completions of the command name let [count, cmd, bang, args] = commands.parseCommand(context.filter); let [, prefix, junk] = context.filter.match(/^(:*\d*)\w*(.?)/) || []; context.advance(prefix.length); if (!junk) { context.fork("", 0, this, "command"); return; } // dynamically get completions as specified with the command's completer function let command = cmd && commands.get(cmd); if (!command) { context.highlight(0, cmd && cmd.length, "SPELLCHECK"); return; } [prefix] = context.filter.match(/^(?:\w*[\s!]|!)\s*/); let cmdContext = context.fork(command.name, prefix.length); let argContext = context.fork("args", prefix.length); args = command.parseArgs(cmdContext.filter, argContext, { count: count, bang: bang }); if (args && !cmdContext.waitingForTab) { // FIXME: Move to parseCommand args.count = count; args.bang = bang; if (!args.completeOpt && command.completer) { cmdContext.advance(args.completeStart); cmdContext.quote = args.quote; cmdContext.filter = args.completeFilter; try { let compObject = command.completer.call(command, cmdContext, args); if (isarray(compObject)) // for now at least, let completion functions return arrays instead of objects compObject = { start: compObject[0], items: compObject[1] }; if (compObject != null) { cmdContext.advance(compObject.start); cmdContext.filterFunc = null; cmdContext.completions = compObject.items; } } catch (e) { dactyl.reportError(e); } } } };
context.highlight();
completion.ex = function ex(context) { // if there is no space between the command name and the cursor // then get completions of the command name let [count, cmd, bang, args] = commands.parseCommand(context.filter); let [, prefix, junk] = context.filter.match(/^(:*\d*)\w*(.?)/) || []; context.advance(prefix.length); if (!junk) { context.fork("", 0, this, "command"); return; } // dynamically get completions as specified with the command's completer function let command = cmd && commands.get(cmd); if (!command) { context.highlight(); context.highlight(0, cmd && cmd.length, "SPELLCHECK"); return; } [prefix] = context.filter.match(/^(?:\w*[\s!]|!)\s*/); let cmdContext = context.fork(command.name, prefix.length); let argContext = context.fork("args", prefix.length); args = command.parseArgs(cmdContext.filter, argContext, { count: count, bang: bang }); if (args && !cmdContext.waitingForTab) { // FIXME: Move to parseCommand args.count = count; args.bang = bang; if (!args.completeOpt && command.completer) { cmdContext.advance(args.completeStart); cmdContext.quote = args.quote; cmdContext.filter = args.completeFilter; try { let compObject = command.completer.call(command, cmdContext, args); if (isarray(compObject)) // for now at least, let completion functions return arrays instead of objects compObject = { start: compObject[0], items: compObject[1] }; if (compObject != null) { cmdContext.advance(compObject.start); cmdContext.filterFunc = null; cmdContext.completions = compObject.items; } } catch (e) { dactyl.reportError(e); } } } };
if (!args.completeOpt && command.completer) {
if (!args.completeOpt && command.completer && args.completeStart != null) {
completion.ex = function ex(context) { // if there is no space between the command name and the cursor // then get completions of the command name for (var [command, args] in commands.parseCommands(context.filter, context)) if (args.trailing) context.advance(args.commandString.length + 1); if (!args) args = { commandString: context.filter }; let [, prefix, junk] = args.commandString.match(/^(:*\s*\d*\s*)\w*(.?)/) || []; context.advance(prefix.length); if (!junk) { context.fork("", 0, this, "command"); return; } // dynamically get completions as specified with the command's completer function context.highlight(); if (!command) { context.highlight(0, args.commandName && args.commandName.length, "SPELLCHECK"); return; } [prefix] = args.commandString.match(/^(?:\w*[\s!])?\s*/); let cmdContext = context.fork(command.name, prefix.length); try { if (!cmdContext.waitingForTab) { if (!args.completeOpt && command.completer) { cmdContext.advance(args.completeStart); cmdContext.quote = args.quote; cmdContext.filter = args.completeFilter; command.completer.call(command, cmdContext, args); } } } catch (e) { dactyl.reportError(e); } };
let args = this._args(cmd, arguments);
let args = ex._args(cmd, arguments);
return update(function exCommand(options) { let args = this._args(cmd, arguments); args.verify(); return cmd.execute(args); }, {
this.nativeRuleResults = [];
PAGESPEED.LintRulesImpl.prototype.exec = function(browserTab) { this.browserTab_ = browserTab; this.onProgress(0, 'Running Page Speed rules'); this.completed = false; // Set in ruleCompleted() when all rules are done. this.url = null; // Set in ruleCompleted() when all rules are done. this.rulesRemaining = this.lintRules.length; // TODO Note that this next line will freeze the UI while the native rules // run; usually, this takes a fraction of a second, and is thus // acceptable, but in the future we should be running pieces of the // native rule set asynchronously, as we do with the JavaScript rules. try { this.nativeRuleResults = PAGESPEED.NativeLibrary.invokeNativeLibraryRules(); } catch (e) { PS_LOG("Exception while running pagespeed library rules: " + PAGESPEED.Utils.formatException(e)); } this.ruleCompleted();};
var code = "(function(_){with(_){delete _;(function(){" + moduleDef.src + "\n}).call(this)}})";
var code = "(function(_){with(_){delete _;return function " + moduleDef.path.replace(/\./g, '$') + "(){" + moduleDef.src + "\n}}})";
function execModuleDef(context, moduleDef) { var code = "(function(_){with(_){delete _;(function(){" + moduleDef.src + "\n}).call(this)}})"; var fn = ENV.eval(code, moduleDef.filePath); try { fn.call(context.exports, context); } catch(e) { if(e.type == "syntax_error") { throw new Error("error importing module: " + e.message); } else if (!e.jsioLogged) { e.jsioLogged = true; if (e.type == "stack_overflow") { ENV.log("Stack overflow in", moduleDef.filePath, ':', e); } else { ENV.log("ERROR LOADING", moduleDef.filePath, ENV.name == 'browser' ? e : ''); } } throw e; } };