rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
function get(id) obj.getElement ? obj.getElement(id) : document.getElementById(id); | function get(prefix, map, id) (obj.getElement || util.identity)(map[id] || document.getElementById(prefix + id)); | addElement: function (obj) { const self = this; this.elements[obj.name] = obj; function get(id) obj.getElement ? obj.getElement(id) : document.getElementById(id); this.active.__defineGetter__(obj.name, function () self.activeGroup[obj.name][obj.name]); this.activeGroup.__defineGetter__(obj.name, function () self.getGroup(obj.name)); memoize(this.statusbar, obj.name, function () get("dactyl-statusline-field-" + (obj.id || obj.name))); memoize(this.commandbar, obj.name, function () get("dactyl-" + (obj.id || obj.name))); if (!(obj.noValue || obj.getValue)) Object.defineProperty(this, obj.name, Modes.boundProperty({ get: function () { let elem = self.getGroup(obj.name, obj.value)[obj.name]; if (obj.value != null) return [obj.value[0], obj.get ? obj.get.call(this, elem) : elem.value]; return null; }, set: function (val) { if (val != null && !isArray(val)) val = [obj.defaultGroup || "", val]; obj.value = val; [this.commandbar, this.statusbar].forEach(function (nodeSet) { let elem = nodeSet[obj.name]; if (val != null) { highlight.highlightNode(elem, (val[0] != null ? val[0] : obj.defaultGroup) .split(/\s/).filter(util.identity) .map(function (g) g + " " + nodeSet.group + g) .join(" ")); elem.value = val[1]; if (obj.onChange) obj.onChange.call(this, elem); } }, this); this.updateVisibility(); return val; } }).init(obj.name)); else if (obj.defaultGroup) [this.commandbar, this.statusbar].forEach(function (nodeSet) { let elem = nodeSet[obj.name]; if (elem) highlight.highlightNode(elem, obj.defaultGroup.split(/\s/) .map(function (g) g + " " + nodeSet.group + g).join(" ")); }); }, |
memoize(this.statusbar, obj.name, function () get("dactyl-statusline-field-" + (obj.id || obj.name))); memoize(this.commandbar, obj.name, function () get("dactyl-" + (obj.id || obj.name))); | memoize(this.statusbar, obj.name, function () get("dactyl-statusline-field-", statusline.widgets, (obj.id || obj.name))); memoize(this.commandbar, obj.name, function () get("dactyl-", {}, (obj.id || obj.name))); | addElement: function (obj) { const self = this; this.elements[obj.name] = obj; function get(id) obj.getElement ? obj.getElement(id) : document.getElementById(id); this.active.__defineGetter__(obj.name, function () self.activeGroup[obj.name][obj.name]); this.activeGroup.__defineGetter__(obj.name, function () self.getGroup(obj.name)); memoize(this.statusbar, obj.name, function () get("dactyl-statusline-field-" + (obj.id || obj.name))); memoize(this.commandbar, obj.name, function () get("dactyl-" + (obj.id || obj.name))); if (!(obj.noValue || obj.getValue)) Object.defineProperty(this, obj.name, Modes.boundProperty({ get: function () { let elem = self.getGroup(obj.name, obj.value)[obj.name]; if (obj.value != null) return [obj.value[0], obj.get ? obj.get.call(this, elem) : elem.value]; return null; }, set: function (val) { if (val != null && !isArray(val)) val = [obj.defaultGroup || "", val]; obj.value = val; [this.commandbar, this.statusbar].forEach(function (nodeSet) { let elem = nodeSet[obj.name]; if (val != null) { highlight.highlightNode(elem, (val[0] != null ? val[0] : obj.defaultGroup) .split(/\s/).filter(util.identity) .map(function (g) g + " " + nodeSet.group + g) .join(" ")); elem.value = val[1]; if (obj.onChange) obj.onChange.call(this, elem); } }, this); this.updateVisibility(); return val; } }).init(obj.name)); else if (obj.defaultGroup) [this.commandbar, this.statusbar].forEach(function (nodeSet) { let elem = nodeSet[obj.name]; if (elem) highlight.highlightNode(elem, obj.defaultGroup.split(/\s/) .map(function (g) g + " " + nodeSet.group + g).join(" ")); }); }, |
function addEndSlash(str) { return rexpEndSlash.test(str) ? str : str + '/'; } | addEndSlash: function(str) { return rexpEndSlash.test(str) ? str : str + '/'; }, | function addEndSlash(str) { return rexpEndSlash.test(str) ? str : str + '/'; } |
this.throwIfDisposed_(); | activity.TimelineView.BarChart_.prototype.addEntry = function(opacity, duration) { this.throwIfDisposed_(); if (opacity == 0.0) { this.padToEndTime(this.endTime_ + duration); return; } /* * Now build the complete CSS style string. */ var style = [ 'opacity:', opacity.toFixed(2) ].join(''); this.appendSpacer_(duration, style); this.endTime_ += duration; this.lastEventEndTime_ = this.endTime_;}; |
|
this.throwIfDisposed(); | activity.TimelineModel.Timeline.prototype.addEvent = function(event) { this.throwIfDisposed(); var listeners = this.getListeners(); for (var i = 0, len = listeners.length; i < len; i++) { listeners[i].onEvent(event); }}; |
|
var opActivity=function(id,posturl){var t=this;var addEventListener=function(obj,type,listener,useCapture){if(obj.addEventListener){obj.addEventListener(type,listener,useCapture);}else if(obj.attachEvent){type='on'+type;obj.attachEvent(type,listener);}};var getHttpRequest=function(){var req=null;if(window.XMLHttpRequest){req=new XMLHttpRequest();req.overrideMimeType("text/xml");}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){req=new ActiveXObject("Microsoft.XMLHTTP");}} | var opActivity=function(id,posturl){var t=this;var addEventListener=function(obj,type,listener,useCapture){if(obj.addEventListener){obj.addEventListener(type,listener,useCapture);}else if(obj.attachEvent){type='on'+type;obj.attachEvent(type,listener);}};var getHttpRequest=function(){var req=null;if(window.XMLHttpRequest){req=new XMLHttpRequest();}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){req=new ActiveXObject("Microsoft.XMLHTTP");}} | var opActivity=function(id,posturl){var t=this;var addEventListener=function(obj,type,listener,useCapture){if(obj.addEventListener){obj.addEventListener(type,listener,useCapture);}else if(obj.attachEvent){type='on'+type;obj.attachEvent(type,listener);}};var getHttpRequest=function(){var req=null;if(window.XMLHttpRequest){req=new XMLHttpRequest();req.overrideMimeType("text/xml");}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){req=new ActiveXObject("Microsoft.XMLHTTP");}} |
this.throwIfDisposed(); | activity.Listenable.prototype.addListener = function(listener) { this.throwIfDisposed(); this.listeners_.push(listener);}; |
|
Element.addMethods = function(methods) { var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; if (!methods) { Object.extend(Form, Form.Methods); Object.extend(Form.Element, Form.Element.Methods); Object.extend(Element.Methods.ByTag, { "FORM": Object.clone(Form.Methods), "INPUT": Object.clone(Form.Element.Methods), "SELECT": Object.clone(Form.Element.Methods), "TEXTAREA": Object.clone(Form.Element.Methods) }); } if (arguments.length == 2) { var tagName = methods; methods = arguments[1]; } if (!tagName) Object.extend(Element.Methods, methods || { }); else { if (Object.isArray(tagName)) tagName.each(extend); else extend(tagName); } function extend(tagName) { tagName = tagName.toUpperCase(); if (!Element.Methods.ByTag[tagName]) Element.Methods.ByTag[tagName] = { }; Object.extend(Element.Methods.ByTag[tagName], methods); } function copy(methods, destination, onlyIfAbsent) { onlyIfAbsent = onlyIfAbsent || false; for (var property in methods) { var value = methods[property]; if (!Object.isFunction(value)) continue; if (!onlyIfAbsent || !(property in destination)) destination[property] = value.methodize(); } } function findDOMClass(tagName) { var klass; var trans = { "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": "FrameSet", "IFRAME": "IFrame" }; if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element'; if (window[klass]) return window[klass]; klass = 'HTML' + tagName + 'Element'; if (window[klass]) return window[klass]; klass = 'HTML' + tagName.capitalize() + 'Element'; if (window[klass]) return window[klass]; window[klass] = { }; window[klass].prototype = document.createElement(tagName)['__proto__']; return window[klass]; } if (F.ElementExtensions) { copy(Element.Methods, HTMLElement.prototype); copy(Element.Methods.Simulated, HTMLElement.prototype, true); } if (F.SpecificElementExtensions) { for (var tag in Element.Methods.ByTag) { var klass = findDOMClass(tag); if (Object.isUndefined(klass)) continue; copy(T[tag], klass.prototype); } } Object.extend(Element, Element.Methods); delete Element.ByTag; if (Element.extend.refresh) Element.extend.refresh(); Element.cache = { }; }; | 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])*?\*\ | Element.addMethods = function(methods) { var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; if (!methods) { Object.extend(Form, Form.Methods); Object.extend(Form.Element, Form.Element.Methods); Object.extend(Element.Methods.ByTag, { "FORM": Object.clone(Form.Methods), "INPUT": Object.clone(Form.Element.Methods), "SELECT": Object.clone(Form.Element.Methods), "TEXTAREA": Object.clone(Form.Element.Methods) }); } if (arguments.length == 2) { var tagName = methods; methods = arguments[1]; } if (!tagName) Object.extend(Element.Methods, methods || { }); else { if (Object.isArray(tagName)) tagName.each(extend); else extend(tagName); } function extend(tagName) { tagName = tagName.toUpperCase(); if (!Element.Methods.ByTag[tagName]) Element.Methods.ByTag[tagName] = { }; Object.extend(Element.Methods.ByTag[tagName], methods); } function copy(methods, destination, onlyIfAbsent) { onlyIfAbsent = onlyIfAbsent || false; for (var property in methods) { var value = methods[property]; if (!Object.isFunction(value)) continue; if (!onlyIfAbsent || !(property in destination)) destination[property] = value.methodize(); } } function findDOMClass(tagName) { var klass; var trans = { "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": "FrameSet", "IFRAME": "IFrame" }; if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element'; if (window[klass]) return window[klass]; klass = 'HTML' + tagName + 'Element'; if (window[klass]) return window[klass]; klass = 'HTML' + tagName.capitalize() + 'Element'; if (window[klass]) return window[klass]; window[klass] = { }; window[klass].prototype = document.createElement(tagName)['__proto__']; return window[klass]; } if (F.ElementExtensions) { copy(Element.Methods, HTMLElement.prototype); copy(Element.Methods.Simulated, HTMLElement.prototype, true); } if (F.SpecificElementExtensions) { for (var tag in Element.Methods.ByTag) { var klass = findDOMClass(tag); if (Object.isUndefined(klass)) continue; copy(T[tag], klass.prototype); } } Object.extend(Element, Element.Methods); delete Element.ByTag; if (Element.extend.refresh) Element.extend.refresh(); Element.cache = { };}; |
arguments[1] = UTF8(prompt); | addMode: function (mode, prompt, action, tags) { this._hintModes[mode] = Hints.Mode.apply(Hints.Mode, arguments); }, |
|
var c=0;var found=false; for (c=0;c<TreeParents[field].length;c++) { if (TreeParents[field][c]==-100) {found=true;break;} } if (found==false) {c=TreeParents[field].length;} | var found = false; | function AddNode(field,nodeparent,nodeid,nodename,nodeclickable,nodechecked,nodeexpand) { //try to find an empty space first var c=0;var found=false; for (c=0;c<TreeParents[field].length;c++) { if (TreeParents[field][c]==-100) {found=true;break;} } if (found==false) {c=TreeParents[field].length;} TreeParents[field][c]=nodeparent; TreeID[field][c]=nodeid; TreeNames[field][c]=nodename; TreeExpand[field][c]=false; TreeClickable[field][c]=nodeclickable; TreeChecked[field][c]=nodechecked; TreeExpand[field][c]=nodeexpand; } |
TreeParents[field][c]=nodeparent; TreeID[field][c]=nodeid; TreeNames[field][c]=nodename; TreeExpand[field][c]=false; TreeClickable[field][c]=nodeclickable; TreeChecked[field][c]=nodechecked; TreeExpand[field][c]=nodeexpand; | for( var c = 0; c < TreeParents[field].length; c++ ) { if( TreeParents[field][c] == -100 ) { found = true; break; } | function AddNode(field,nodeparent,nodeid,nodename,nodeclickable,nodechecked,nodeexpand) { //try to find an empty space first var c=0;var found=false; for (c=0;c<TreeParents[field].length;c++) { if (TreeParents[field][c]==-100) {found=true;break;} } if (found==false) {c=TreeParents[field].length;} TreeParents[field][c]=nodeparent; TreeID[field][c]=nodeid; TreeNames[field][c]=nodename; TreeExpand[field][c]=false; TreeClickable[field][c]=nodeclickable; TreeChecked[field][c]=nodechecked; TreeExpand[field][c]=nodeexpand; } |
if( found == false ) { c = TreeParents[field].length; } TreeParents[field][c] = nodeparent; TreeID[field][c] = nodeid; TreeNames[field][c] = nodename; TreeExpand[field][c] = false; TreeClickable[field][c] = nodeclickable; TreeChecked[field][c] = nodechecked; TreeExpand[field][c] = false; } | function AddNode(field,nodeparent,nodeid,nodename,nodeclickable,nodechecked,nodeexpand) { //try to find an empty space first var c=0;var found=false; for (c=0;c<TreeParents[field].length;c++) { if (TreeParents[field][c]==-100) {found=true;break;} } if (found==false) {c=TreeParents[field].length;} TreeParents[field][c]=nodeparent; TreeID[field][c]=nodeid; TreeNames[field][c]=nodename; TreeExpand[field][c]=false; TreeClickable[field][c]=nodeclickable; TreeChecked[field][c]=nodechecked; TreeExpand[field][c]=nodeexpand; } |
|
jsio.__path[baseModule] = path; | this.__path[baseModule] = path; | this.addPath = function(path, baseModule) { if (baseModule) { jsio.__path[baseModule] = path; } else { jsio.__path.__default__.push(path); } } |
jsio.__path.__default__.push(path); | this.__path.__default__.push(path); | this.addPath = function(path, baseModule) { if (baseModule) { jsio.__path[baseModule] = path; } else { jsio.__path.__default__.push(path); } } |
jsio.path[baseModule] = path; | jsio.__path[baseModule] = path; | this.addPath = function(path, baseModule) { if (baseModule) { jsio.path[baseModule] = path; } else { jsio.path.__default__.push(path); } } |
jsio.path.__default__.push(path); | jsio.__path.__default__.push(path); | this.addPath = function(path, baseModule) { if (baseModule) { jsio.path[baseModule] = path; } else { jsio.path.__default__.push(path); } } |
$this.after('<div class="atd-ajax-load"></div>'); | jQuery.fn.addProofreader = function(options) { this.id = 0; var parent = this; var opts = jQuery.extend({}, jQuery.fn.addProofreader.defaults, options); return this.each(function() { $this = jQuery(this); if ($this.css('display') == 'none' || $this.attr('spellcheck') == false) return; if ($this.attr('id').length == 0) { $this.attr('id', 'AtD_' + parent.id++); } var id = $this.attr('id'); var node = jQuery('<span></span>'); node.attr('id', 'AtD_' + parent.id++); node.html(opts.proofread_content); node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }); $this.wrap('<div></div>'); /* attach a submit listener to the parent form */ $this.parents('form').submit(function(event) { AtD.restoreTextArea(id); }); $this.before(node); });}; |
|
$this.parents('form').submit(function(event) { | $this.parents('form').submit(function(e) { | jQuery.fn.addProofreader = function(options) { this.id = 0; var parent = this; var opts = jQuery.extend({}, jQuery.fn.addProofreader.defaults, options); return this.each(function() { $this = jQuery(this); if ($this.css('display') == 'none' || $this.attr('spellcheck') == false) return; if ($this.attr('id').length == 0) { $this.attr('id', 'AtD_' + parent.id++); } var id = $this.attr('id'); var node = jQuery('<span></span>'); node.attr('id', 'AtD_' + parent.id++); node.html(opts.proofread_content); node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }); $this.wrap('<div></div>'); /* attach a submit listener to the parent form */ $this.parents('form').submit(function(event) { AtD.restoreTextArea(id); }); $this.before(node); });}; |
if (AtD.autoproofread == 1 && AtD.proofread_click_count <= 0){ e.preventDefault(); jQuery('.atd-ajax-load').css('height','16px'); AtD_check( id, node, AtD_submit_check_callback ); } | jQuery.fn.addProofreader = function(options) { this.id = 0; var parent = this; var opts = jQuery.extend({}, jQuery.fn.addProofreader.defaults, options); return this.each(function() { $this = jQuery(this); if ($this.css('display') == 'none' || $this.attr('spellcheck') == false) return; if ($this.attr('id').length == 0) { $this.attr('id', 'AtD_' + parent.id++); } var id = $this.attr('id'); var node = jQuery('<span></span>'); node.attr('id', 'AtD_' + parent.id++); node.html(opts.proofread_content); node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }); $this.wrap('<div></div>'); /* attach a submit listener to the parent form */ $this.parents('form').submit(function(event) { AtD.restoreTextArea(id); }); $this.before(node); });}; |
|
if (AtD.autoproofread == 1 && AtD.proofread_click_count == 0 && $this.val() != ""){ | if (AtD.autoproofread != undefined && AtD.autoproofread == 1 && AtD.proofread_click_count <= 0 && $this.val() != ""){ | jQuery.fn.addProofreader = function(options) { this.id = 0; var parent = this; var opts = jQuery.extend({}, jQuery.fn.addProofreader.defaults, options); return this.each(function() { $this = jQuery(this); if ($this.css('display') == 'none' || $this.attr('spellcheck') == false) return; if ($this.attr('id').length == 0) { $this.attr('id', 'AtD_' + parent.id++); } var id = $this.attr('id'); var node = jQuery('<span></span>'); node.attr('id', 'AtD_' + parent.id++); node.html(opts.proofread_content); node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } if($this.val() != "") { AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }else{ jAlert( AtD.getLang('message_error_no_text', 'Please enter some text in the post textbox to be checked!' ), AtD.getLang('message_error', 'Error!' ) ); } }); $this.wrap('<div></div>'); /* attach a submit listener to the parent form */ $this.parents('form').submit(function(e) { AtD.restoreTextArea(id); if (AtD.autoproofread == 1 && AtD.proofread_click_count == 0 && $this.val() != ""){ e.preventDefault(); AtD_check( id, node, AtD_submit_check_callback ); } }); $this.before(node); });}; |
AtD_check( id, node, AtD_submit_check_callback ); | AtD_check( id, node ); | jQuery.fn.addProofreader = function(options) { this.id = 0; var parent = this; var opts = jQuery.extend({}, jQuery.fn.addProofreader.defaults, options); return this.each(function() { $this = jQuery(this); if ($this.css('display') == 'none' || $this.attr('spellcheck') == false) return; if ($this.attr('id').length == 0) { $this.attr('id', 'AtD_' + parent.id++); } var id = $this.attr('id'); var node = jQuery('<span></span>'); node.attr('id', 'AtD_' + parent.id++); node.html(opts.proofread_content); node.click(function(event) { if (AtD.current_id != undefined && AtD.current_id != id) { AtD.restoreTextArea(AtD.current_id); } if($this.val() != "") { AtD.checkTextArea(id, node.attr('id'), opts.edit_text_content); AtD.current_id = id; }else{ jAlert( AtD.getLang('message_error_no_text', 'Please enter some text in the post textbox to be checked!' ), AtD.getLang('message_error', 'Error!' ) ); } }); $this.wrap('<div></div>'); /* attach a submit listener to the parent form */ $this.parents('form').submit(function(e) { AtD.restoreTextArea(id); if (AtD.autoproofread == 1 && AtD.proofread_click_count == 0 && $this.val() != ""){ e.preventDefault(); AtD_check( id, node, AtD_submit_check_callback ); } }); $this.before(node); });}; |
this._stylesDidChange = this._deleteComboStyles(styles, nameOrStyles); | didChange = this._deleteComboStyles(styles, nameOrStyles); | addStyle: function(nameOrStyles, value) { // get the current hash of styles. This will extract the styles and // clone them if needed. This will get the actual styles hash so we can // edit it directly. var key, didChange = NO, styles = this.styles(); // simple form if (typeof nameOrStyles === SC.T_STRING) { if (value === undefined) { // reader return styles[nameOrStyles]; } else { // writer this._stylesDidChange = this._deleteComboStyles(styles, nameOrStyles); if (styles[nameOrStyles] !== value) { styles[nameOrStyles] = value ; this._stylesDidChange = YES ; } } // bulk form } else { for(key in nameOrStyles) { if (!nameOrStyles.hasOwnProperty(key)) continue ; didChange = this._deleteComboStyles(styles, key); value = nameOrStyles[key]; if (styles[key] !== value) { styles[key] = value; didChange = YES; } } if (didChange) this._stylesDidChange = YES ; } return this ; }, |
this._stylesDidChange = YES ; | didChange = YES ; | addStyle: function(nameOrStyles, value) { // get the current hash of styles. This will extract the styles and // clone them if needed. This will get the actual styles hash so we can // edit it directly. var key, didChange = NO, styles = this.styles(); // simple form if (typeof nameOrStyles === SC.T_STRING) { if (value === undefined) { // reader return styles[nameOrStyles]; } else { // writer this._stylesDidChange = this._deleteComboStyles(styles, nameOrStyles); if (styles[nameOrStyles] !== value) { styles[nameOrStyles] = value ; this._stylesDidChange = YES ; } } // bulk form } else { for(key in nameOrStyles) { if (!nameOrStyles.hasOwnProperty(key)) continue ; didChange = this._deleteComboStyles(styles, key); value = nameOrStyles[key]; if (styles[key] !== value) { styles[key] = value; didChange = YES; } } if (didChange) this._stylesDidChange = YES ; } return this ; }, |
if (didChange) this._stylesDidChange = YES; | addStyle: function(nameOrStyles, value) { // get the current hash of styles. This will extract the styles and // clone them if needed. This will get the actual styles hash so we can // edit it directly. var key, didChange = NO, styles = this.styles(); // simple form if (typeof nameOrStyles === SC.T_STRING) { if (value === undefined) { // reader return styles[nameOrStyles]; } else { // writer this._stylesDidChange = this._deleteComboStyles(styles, nameOrStyles); if (styles[nameOrStyles] !== value) { styles[nameOrStyles] = value ; this._stylesDidChange = YES ; } } // bulk form } else { for(key in nameOrStyles) { if (!nameOrStyles.hasOwnProperty(key)) continue ; didChange = this._deleteComboStyles(styles, key); value = nameOrStyles[key]; if (styles[key] !== value) { styles[key] = value; didChange = YES; } } if (didChange) this._stylesDidChange = YES ; } return this ; }, |
|
didChange = this._deleteComboStyles(styles, key); | addStyle: function(nameOrStyles, value) { // get the current hash of styles. This will extract the styles and // clone them if needed. This will get the actual styles hash so we can // edit it directly. var key, didChange = NO, styles = this.styles(); // simple form if (typeof nameOrStyles === SC.T_STRING) { if (value === undefined) { // reader return styles[nameOrStyles]; } else { // writer if (styles[nameOrStyles] !== value) { styles[nameOrStyles] = value ; this._stylesDidChange = YES ; } } // bulk form } else { for(key in nameOrStyles) { if (!nameOrStyles.hasOwnProperty(key)) continue ; value = nameOrStyles[key]; if (styles[key] !== value) { styles[key] = value; didChange = YES; } } if (didChange) this._stylesDidChange = YES ; } return this ; }, |
|
didChange = this._deleteComboStyles(styles, key); | didChange = didChange || this._deleteComboStyles(styles, key); | addStyle: function(nameOrStyles, value) { // get the current hash of styles. This will extract the styles and // clone them if needed. This will get the actual styles hash so we can // edit it directly. var key, didChange = NO, styles = this.styles(); // simple form if (typeof nameOrStyles === SC.T_STRING) { if (value === undefined) { // reader return styles[nameOrStyles]; } else { // writer didChange = this._deleteComboStyles(styles, nameOrStyles); if (styles[nameOrStyles] !== value) { styles[nameOrStyles] = value ; didChange = YES ; } if (didChange) this._stylesDidChange = YES; } // bulk form } else { for(key in nameOrStyles) { if (!nameOrStyles.hasOwnProperty(key)) continue ; didChange = this._deleteComboStyles(styles, key); value = nameOrStyles[key]; if (styles[key] !== value) { styles[key] = value; didChange = YES; } } if (didChange) this._stylesDidChange = YES ; } return this ; }, |
if(urlData.hostname.length == 0) { urlData.hostnameExact=true; } | addUrl : function() { var urlData = new Object(); urlData.hostname = document.getElementById("myanmarConverter.options.urlHostname").value; urlData.hostnameExact = document.getElementById("myanmarConverter.options.urlHostnameExact").selected; urlData.pathname = document.getElementById("myanmarConverter.options.urlPathname").value; urlData.pathnameExact = document.getElementById("myanmarConverter.options.urlPathnameExact").selected; urlData.enableConversion = document.getElementById("myanmarConverter.options.enableConversionForPattern").checked; var urlList = document.getElementById("myanmarConverter.options.urlList"); if (urlData.hostname.length || urlData.pathname.length) // ignore if no hostname { if (urlData.hostname.indexOf("/") == -1) { if (!this.urlPatterns) this.urlPatterns = new Array(); for (var i = 0; i < this.urlPatterns.length; i++) { // only allow one entry with the same hostname and pathname if (this.urlPatterns[i].hostname == urlData.hostname && this.urlPatterns[i].pathname == urlData.pathname) { this.urlPatterns.splice(i, 1); urlList.removeItemAt(i); break; } } this.urlPatterns.push(urlData); var listitem = this.createUrlListEntry(urlData); urlList.appendChild(listitem); } else { document.getElementById("myanmarConverter.options.urlHostname").value = urlData.hostname.replace("/",""); } } }, |
|
if (urlData.hostname.length) | if (urlData.hostname.length || urlData.pathname.length) | addUrl : function() { var urlData = new Object(); urlData.hostname = document.getElementById("myanmarConverter.options.urlHostname").value; urlData.hostnameExact = document.getElementById("myanmarConverter.options.urlHostnameExact").selected; urlData.pathname = document.getElementById("myanmarConverter.options.urlPathname").value; urlData.pathnameExact = document.getElementById("myanmarConverter.options.urlPathnameExact").selected; urlData.enableConversion = document.getElementById("myanmarConverter.options.enableConversionForPattern").checked; var urlList = document.getElementById("myanmarConverter.options.urlList"); if (urlData.hostname.length) // ignore if no hostname { if (urlData.hostname.indexOf("/") == -1) { if (!this.urlPatterns) this.urlPatterns = new Array(); for (var i = 0; i < this.urlPatterns.length; i++) { // only allow one entry with the same hostname and pathname if (this.urlPatterns[i].hostname == urlData.hostname && this.urlPatterns[i].pathname == urlData.pathname) { this.urlPatterns.splice(i, 1); urlList.removeItemAt(i); break; } } this.urlPatterns.push(urlData); var listitem = this.createUrlListEntry(urlData); urlList.appendChild(listitem); } else { document.getElementById("myanmarConverter.options.urlHostname").value = urlData.hostname.replace("/",""); } } }, |
}).uniq() | }).uniq(); | addUsageCommand: function (params) { commands.add(params.name, params.description, function (args) { let results = array(params.iterate(args)) .sort(function (a, b) String.localeCompare(a.name, b.name)); if (args.length) results = results.filter(function (item) args.map(String.toLowerCase) .every(function (arg) (item.name + item.description).toLowerCase().indexOf(arg) >= 0)); commandline.commandOutput( template.usage(results, params.format)); }, { argCount: "0", completer: function (context, args) { context.keys.text = util.identity; context.keys.description = function () seen[this.text] + " matching items"; let seen = {}; context.completions = array(item.description.toLowerCase().split(/[()\s]+/) for (item in params.iterate(args))) .flatten().filter(function (w) /^\w[\w-_']+$/.test(w)) .map(function (k) { seen[k] = (seen[k] || 0) + 1; return k; }).uniq() }, options: params.options || [] }); if (params.index) this.indices[params.index] = function () { for (let obj in (params.iterateIndex || params.iterate)()) if (obj.helpTag in services["dactyl:"].HELP_TAGS) yield dactyl.generateHelp(obj, null, null, true); } }, |
this._removeMap(mode, name, extra.matchingUrls); | this._removeMap(mode, name, map.matchingUrls); | addUserMap: function (modes, keys, description, action, extra) { keys = keys.map(this._expandLeader); extra = extra || {}; extra.user = true; let map = Map(modes, keys, description || "User defined mapping", action, extra); // remove all old mappings to this key sequence for (let [, name] in Iterator(map.names)) { for (let [, mode] in Iterator(map.modes)) this._removeMap(mode, name, extra.matchingUrls); } this._addMap(map); }, |
let map = Map(modes, keys, description || "User defined mapping", action, extra); | let map = Map(modes, keys, description || "User-defined mapping", action, extra); | addUserMap: function (modes, keys, description, action, extra) { keys = keys.map(this._expandLeader); extra = extra || {}; extra.user = true; let map = Map(modes, keys, description || "User defined mapping", action, extra); // remove all old mappings to this key sequence for (let [, name] in Iterator(map.names)) { for (let [, mode] in Iterator(map.modes)) this._removeMap(mode, name); } this._addMap(map); }, |
form.getForm().submit({ | user.getForm().submit({ | AddUserWindow = function(){ var user = new Ext.form.FormPanel({ title: 'User-Infomation', labelWidth: 120, width: 400, baseCls: 'x-plain', items: [ { fieldLabel: 'User-Name', xtype: 'textfield', name: 'user_name', anchor: '100%', allowBlank:false } ,{ fieldLabel: 'Password', xtype: 'textfield', inputType : 'password', name: 'password', anchor: '100%', allowBlank:false } ,{ fieldLabel: 'E-Mail', xtype: 'textfield', name: 'email', anchor: '100%', allowBlank:false } ,{ fieldLabel: 'enable', xtype: 'checkbox', width: 100, name: "enable", checked : true } ,{ fieldLabel: 'Memo', xtype: 'textarea', name: 'memo', anchor: '100%' } ],buttons: [{ text:'Save', handler: function(){ form.getForm().submit({ url: '/user-create', waitMsg: 'Saveing...', method: 'POST', scope: this, success: function(form, action) { store.reload(); this.close(); }, failure: function(form, action) { alert('Add user failure.'); this.close(); } }); }, scope:this },{ text: 'Close', handler: function(){ this.close(); }, scope:this }] }); var dsUserProfile = new Ext.data.SimpleStore({ fields : ["Account-Name","ID"], data : [ ["Axsh(Soumu)","1"], ["Axsh(Eigyo)","2"], ["Damazon","3"], ["yaboo","4"] ] }); var tabwin = new Ext.TabPanel({ activeTab: 0, baseCls: 'x-plain', defaults:{bodyStyle:'padding:5px'}, items: [user] }); AddUserWindow.superclass.constructor.call(this, { iconCls: 'icon-panel', width: 500, height: 400, closeAction:'hide', title: 'Add User', plain: true, layout:'fit', items: [tabwin] }); } |
alert('Add user failure.'); this.close(); | if(!form.isValid()){ alert('Validate error'); }else{ alert('Add user failure.'); } | AddUserWindow = function(){ var user = new Ext.form.FormPanel({ title: 'User-Infomation', labelWidth: 120, width: 400, baseCls: 'x-plain', items: [ { fieldLabel: 'User-Name', xtype: 'textfield', name: 'user_name', anchor: '100%', allowBlank:false } ,{ fieldLabel: 'Password', xtype: 'textfield', inputType : 'password', name: 'password', anchor: '100%', allowBlank:false } ,{ fieldLabel: 'E-Mail', xtype: 'textfield', name: 'email', anchor: '100%', allowBlank:false } ,{ fieldLabel: 'enable', xtype: 'checkbox', width: 100, name: "enable", checked : true } ,{ fieldLabel: 'Memo', xtype: 'textarea', name: 'memo', anchor: '100%' } ],buttons: [{ text:'Save', handler: function(){ form.getForm().submit({ url: '/user-create', waitMsg: 'Saveing...', method: 'POST', scope: this, success: function(form, action) { store.reload(); this.close(); }, failure: function(form, action) { alert('Add user failure.'); this.close(); } }); }, scope:this },{ text: 'Close', handler: function(){ this.close(); }, scope:this }] }); var dsUserProfile = new Ext.data.SimpleStore({ fields : ["Account-Name","ID"], data : [ ["Axsh(Soumu)","1"], ["Axsh(Eigyo)","2"], ["Damazon","3"], ["yaboo","4"] ] }); var tabwin = new Ext.TabPanel({ activeTab: 0, baseCls: 'x-plain', defaults:{bodyStyle:'padding:5px'}, items: [user] }); AddUserWindow.superclass.constructor.call(this, { iconCls: 'icon-panel', width: 500, height: 400, closeAction:'hide', title: 'Add User', plain: true, layout:'fit', items: [tabwin] }); } |
refresh(); | store.reload(); | AddUserWindow = function(){ var user = new Ext.form.FormPanel({ title: 'User-Infomation', labelWidth: 120, width: 400, baseCls: 'x-plain', items: [ { fieldLabel: 'User-Name', xtype: 'textfield', name: 'user_name', anchor: '100%', allowBlank:false } ,{ fieldLabel: 'Password', xtype: 'textfield', inputType : 'password', name: 'password', anchor: '100%', allowBlank:false } ,{ fieldLabel: 'E-Mail', xtype: 'textfield', name: 'email', anchor: '100%', allowBlank:false } ,{ fieldLabel: 'enable', xtype: 'checkbox', width: 100, name: "enable", checked : true } ,{ fieldLabel: 'Memo', xtype: 'textarea', name: 'memo', anchor: '100%' } ],buttons: [{ text:'Save', handler: function(){ form.getForm().submit({ url: '/user-create', waitMsg: 'Saveing...', method: 'POST', scope: this, success: function(form, action) { refresh(); this.close(); }, failure: function(form, action) { alert('Add user failure.'); this.close(); } }); }, scope:this },{ text: 'Close', handler: function(){ this.close(); }, scope:this }] }); var dsUserProfile = new Ext.data.SimpleStore({ fields : ["Account-Name","ID"], data : [ ["Axsh(Soumu)","1"], ["Axsh(Eigyo)","2"], ["Damazon","3"], ["yaboo","4"] ] }); var tabwin = new Ext.TabPanel({ activeTab: 0, baseCls: 'x-plain', defaults:{bodyStyle:'padding:5px'}, items: [user] }); AddUserWindow.superclass.constructor.call(this, { iconCls: 'icon-panel', width: 500, height: 400, closeAction:'hide', title: 'Add User', plain: true, layout:'fit', items: [tabwin] }); } |
this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this, "after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},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(Ga,"").replace(Y,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ta(this,b);ta(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType=== | prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, 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); | this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},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(Ga,"").replace(Y,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ta(this,b);ta(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType=== |
after: function(element, node) { element.parentNode.insertBefore(node, element.nextSibling); }, | 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])*?\*\ | after: function(element, node) { element.parentNode.insertBefore(node, element.nextSibling); }, |
After: function(element, content) { return Element.insert(element, {after:content}); } | 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])*?\*\ | After: function(element, content) { return Element.insert(element, {after:content}); } |
text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(p,o,j,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(p,x,j);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(r,q){(e.context?c(e.context):c.event).trigger(r,q)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,o,p=e.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data, e.traditional);if(e.dataType==="jsonp"){if(n==="GET")O.test(e.url)||(e.url+=(ma.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!O.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&O.test(e.data)||O.test(e.url))){i=e.jsonpCallback||"jsonp"+qb++;if(e.data)e.data=(e.data+"").replace(O,"="+i+"$1");e.url=e.url.replace(O,"="+i+"$1");e.dataType="script";A[i]=A[i]||function(r){o=r;b();d();A[i]=w;try{delete A[i]}catch(q){}B&& B.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var t=K(),z=e.url.replace(ub,"$1_="+t+"$2");e.url=z+(z===e.url?(ma.test(e.url)?"&":"?")+"_="+t:"")}if(e.data&&n==="GET")e.url+=(ma.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");t=(t=vb.exec(e.url))&&(t[1]&&t[1]!==location.protocol||t[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&t){var B=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script"); C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!i){var D=false;C.onload=C.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;b();d();C.onload=C.onreadystatechange=null;B&&C.parentNode&&B.removeChild(C)}}}B.insertBefore(C,B.firstChild);return w}var F=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type", e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}t||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ia){}if(e.beforeSend&&e.beforeSend.call(p,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend", [x,e]);var g=x.onreadystatechange=function(r){if(!x||x.readyState===0){F||d();F=true;if(x)x.onreadystatechange=c.noop}else if(!F&&x&&(x.readyState===4||r==="timeout")){F=true;x.onreadystatechange=c.noop;j=r==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";if(j==="success")try{o=c.httpData(x,e.dataType,e)}catch(q){j="parsererror"}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,x,j);d();r==="timeout"&&x.abort();if(e.async)x= null}};try{var h=x.abort;x.abort=function(){if(x){h.call(x);if(x)x.readyState=0}g()}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){x&&!F&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||A,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol=== | global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== | text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(p,o,j,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(p,x,j);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(r,q){(e.context?c(e.context):c.event).trigger(r,q)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,o,p=e.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")O.test(e.url)||(e.url+=(ma.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!O.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&O.test(e.data)||O.test(e.url))){i=e.jsonpCallback||"jsonp"+qb++;if(e.data)e.data=(e.data+"").replace(O,"="+i+"$1");e.url=e.url.replace(O,"="+i+"$1");e.dataType="script";A[i]=A[i]||function(r){o=r;b();d();A[i]=w;try{delete A[i]}catch(q){}B&&B.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var t=K(),z=e.url.replace(ub,"$1_="+t+"$2");e.url=z+(z===e.url?(ma.test(e.url)?"&":"?")+"_="+t:"")}if(e.data&&n==="GET")e.url+=(ma.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");t=(t=vb.exec(e.url))&&(t[1]&&t[1]!==location.protocol||t[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&t){var B=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!i){var D=false;C.onload=C.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;b();d();C.onload=C.onreadystatechange=null;B&&C.parentNode&&B.removeChild(C)}}}B.insertBefore(C,B.firstChild);return w}var F=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}t||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ia){}if(e.beforeSend&&e.beforeSend.call(p,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(r){if(!x||x.readyState===0){F||d();F=true;if(x)x.onreadystatechange=c.noop}else if(!F&&x&&(x.readyState===4||r==="timeout")){F=true;x.onreadystatechange=c.noop;j=r==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";if(j==="success")try{o=c.httpData(x,e.dataType,e)}catch(q){j="parsererror"}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,x,j);d();r==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){if(x){h.call(x);if(x)x.readyState=0}g()}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){x&&!F&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||A,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol=== |
_Cache.clear(); | this.ajax_getData = function(url, params, fSuccess, fFailure) { var thisRef = this; currentUrl = window.location.toString() portIndex = currentUrl.indexOf('?port='); if (portIndex > -1) { port = '' isNumber = true; index = portIndex + 6 while(isNumber){ char = currentUrl[index]; if(char == '0' || char == '1' || char =='2' || char == '3' || char == '4' || char =='5' || char == '6' || char == '7' || char =='8' || char =='9'){ port = port + currentUrl[index]; index++; } else{ isNumber = false } } url = this.addPortNumber(url, port); } var key = $.base64Encode($.param.querystring(url, params, 2)); _Cache.clear(); var data = _Cache.get(key); if (data) { fSuccess(data); } else { ajaxAnimation.show(); $.ajax({ type: "GET", url: url, data: params, dataType: "jsonp", jsonp: 'jsonp_callback', success: function(data) { _Cache.add(key, data); fSuccess(data); ajaxAnimation.hide(); }, error: function() { ajaxAnimation.hide(); fFailure(); } }); } }; |
|
dataType: "jsonp", jsonp: 'jsonp_callback', | dataType: (jsonp ? "jsonp" : "json"), jsonp: "jsonp_callback", | this.ajax_getData = function(url, params, fSuccess, fFailure) { var thisRef = this; currentUrl = window.location.toString() portIndex = currentUrl.indexOf('?port='); if (portIndex > -1) { port = '' isNumber = true; index = portIndex + 6 while(isNumber){ char = currentUrl[index]; if(char == '0' || char == '1' || char =='2' || char == '3' || char == '4' || char =='5' || char == '6' || char == '7' || char =='8' || char =='9'){ port = port + currentUrl[index]; index++; } else{ isNumber = false } } url = this.addPortNumber(url, port); } var key = $.base64Encode($.param.querystring(url, params, 2)); _Cache.clear(); var data = _Cache.get(key); if (data) { fSuccess(data); } else { ajaxAnimation.show(); $.ajax({ type: "GET", url: url, data: params, dataType: "jsonp", jsonp: 'jsonp_callback', success: function(data) { _Cache.add(key, data); fSuccess(data); ajaxAnimation.hide(); }, error: function() { ajaxAnimation.hide(); fFailure(); } }); } }; |
var key = $.base64Encode($.param.querystring(url, params, 2)); var data = _Cache.get(key); if (data) { fSuccess(data, obj); } else { ajaxAnimation.show(); $.ajax({ type: "GET", url: url, async: true, data: params, dataType: "jsonp", jsonp: 'jsonp_callback', success: function(data) { fSuccess(data, obj); ajaxAnimation.hide(); }, error: function() { ajaxAnimation.hide(); fFailure(obj); } }); } | ajaxAnimation.show(); $.ajax({ type: "GET", url: url, async: true, data: params, dataType: (jsonp ? "jsonp" : "json"), jsonp: "jsonp_callback", success: function(data) { fSuccess(data, obj); ajaxAnimation.hide(); }, error: function() { ajaxAnimation.hide(); fFailure(obj); } }); | this.ajax_getData_charts = function(url, params, fSuccess, fFailure, obj) { var thisRef = this; currentUrl = window.location.toString() portIndex = currentUrl.indexOf('?port='); if (portIndex > -1) { port = '' isNumber = true; index = portIndex + 6 while(isNumber){ char = currentUrl[index]; if(char == '0' || char == '1' || char =='2' || char == '3' || char == '4' || char =='5' || char == '6' || char == '7' || char =='8' || char =='9'){ port = port + currentUrl[index]; index++; } else{ isNumber = false } } url = this.addPortNumber(url, port); } var key = $.base64Encode($.param.querystring(url, params, 2)); var data = _Cache.get(key); if (data) { fSuccess(data, obj); } else { ajaxAnimation.show(); $.ajax({ type: "GET", url: url, async: true, data: params, dataType: "jsonp", jsonp: 'jsonp_callback', success: function(data) { fSuccess(data, obj); ajaxAnimation.hide(); }, error: function() { ajaxAnimation.hide(); fFailure(obj); } }); } }; |
async: true, | this.ajax_getData_charts = function(url, params, fSuccess, fFailure, obj) { var thisRef = this; currentUrl = window.location.toString() portIndex = currentUrl.indexOf('?port='); if (portIndex > -1) { port = '' isNumber = true; index = portIndex + 6 while(isNumber){ char = currentUrl[index]; if(char == '0' || char == '1' || char =='2' || char == '3' || char == '4' || char =='5' || char == '6' || char == '7' || char =='8' || char =='9'){ port = port + currentUrl[index]; index++; } else{ isNumber = false } } url = this.addPortNumber(url, port); } var key = $.base64Encode($.param.querystring(url, params, 2)); var data = _Cache.get(key); if (data) { fSuccess(data, obj); } else { ajaxAnimation.show(); $.ajax({ type: "GET", url: url, data: params, dataType: "jsonp", jsonp: 'jsonp_callback', success: function(data) { fSuccess(data, obj); ajaxAnimation.hide(); }, error: function() { ajaxAnimation.hide(); fFailure(obj); } }); } }; |
|
})(win || window.content); | })(win || content); | allFrames: function (win, focusedFirst) { let frames = []; (function rec(frame) { if (frame.document.body instanceof HTMLBodyElement) frames.push(frame); Array.forEach(frame.frames, rec); })(win || window.content); if (focusedFirst) return frames.filter(function (f) f === buffer.focusedFrame).concat( frames.filter(function (f) f !== buffer.focusedFrame)); return frames; }, |
ancestors: function(element) { return $(element).recursivelyCollect('parentNode'); }, | 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])*?\*\ | ancestors: function(element) { return $(element).recursivelyCollect('parentNode'); }, |
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(sa(a[0])||sa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", | "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", | "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(sa(a[0])||sa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", |
c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"), p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a); else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle", | animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing= j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]); | c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"),p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a);else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle", |
SC.View.runCallback(animation.callback); | if (options.callback) SC.View.runCallback(options.callback); | animate: function(key, value, options) { if (typeof options === SC.T_NUMBER) options = { duration: options }; if (options.timing) { if (SC.typeOf(options.timing) != SC.T_STRING) { options.timing = "cubic-bezier("+options.timing[0]+", "+options.timing[1]+", "+ options.timing[2]+", "+options.timing[3]+")"; } } else { options.timing = 'linear'; } if (options.callback) { if (SC.typeOf(options.callback) !== SC.T_HASH) options.callback = { action: options.callback }; options.callback.source = this; if (!options.callback.target) options.callback.target = this; } if (SC.platform.supportsCSSTransitions) { var layer = this.get('layer'), hasAcceleratedLayer = this.get('hasAcceleratedLayer'), layout = this.get('layout'), actualKey, css = [], activeKey; // These rules mirror the ones in layoutStyle if ( hasAcceleratedLayer && ( (key === 'left' && !SC.empty(layout.width)) || (key === 'top' && !SC.empty(layout.height)) ) && !SC.none(value) && !SC.isPercentage(value) ) { actualKey = "-"+SC.platform.cssPrefix+"-transform"; } else { actualKey = key; } if (this._activeAnimations[actualKey]) console.warn("Already animating '"+actualKey+"', will be overridden!"); this._activeAnimations[actualKey] = { css: actualKey + " " + options.duration + "s " + options.timing, callback: options.callback }; for (activeKey in this._activeAnimations) css.push(this._activeAnimations[actualKey].css); layer.style[SC.platform.domCSSPrefix+"Transition"] = css.join(", "); this.adjust(key, value); } else { console.warn("Animations not supported by this platform!"); this.adjust(key, value); SC.View.runCallback(animation.callback); } return this; }, |
null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(), | c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement? | null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(), |
any: function(iterator, context) { iterator = iterator || Prototype.K; var result = false; this.each(function(value, index) { if (result = !!iterator.call(context, value, index)) throw $break; }); return result; }, | 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=" | any: function(iterator, context) { iterator = iterator || Prototype.K; var result = false; this.each(function(value, index) { if (result = !!iterator.call(context, value, index)) throw $break; }); return result; }, |
var fileUrl = 'http: | var fileUrl = 'http: + type + '/' + branch + '/' + file.filename; | function appendFile(type, revision, file) { var platform = getPlatform(file); var platformDesc = descriptions[type][platform]; var size = "" + Math.round(file.size/1024.0/1024.0*100.0)/100.0 + " MB"; var fileUrl = 'http://builds.appcelerator.com.s3.amazonaws.com/' + type + '/' + file.filename; var row = $('<tr/>') .append($('<td/>') .append($('<img/>').attr('src', 'images/'+platform+'.png')) .append($('<a/>').attr('href', fileUrl).text(platformDesc)) .append($('<div/>').addClass('sha1').text('filename: '+file.filename)) .append($('<div/>').addClass('sha1').text('sha1: '+file.sha1))) .append($('<td/>').text(size)); $('#'+type+'_table').append(row); } |
this.items[this.selectedIndex].style.backgroundColor = '#ccf0ff'; | addElementClass(this.items[this.selectedIndex], "selected"); | appendItems: function(cands){ if(cands.length > this.maxRows){ cands.length = this.maxRows; } this.cands = cands; this.items = cands.map(function(item){ var li = this.createItem(item) this.element.appendChild(li); return li; }, this); this.rowCount = cands.length; this.selectedIndex = 0; this.items[this.selectedIndex].style.backgroundColor = '#ccf0ff'; }, |
function applyPreprocessors(moduleDef, names, opts) { | function applyPreprocessors(path, moduleDef, names, opts) { | function applyPreprocessors(moduleDef, names, opts) { for (var i = 0, len = names.length; i < len; ++i) { p = getPreprocessor(names[i]); if (p) { moduleDef.src = p(moduleDef.src, opts); } } } |
moduleDef.src = p(moduleDef.src, opts); | p(path, moduleDef, opts); | function applyPreprocessors(moduleDef, names, opts) { for (var i = 0, len = names.length; i < len; ++i) { p = getPreprocessor(names[i]); if (p) { moduleDef.src = p(moduleDef.src, opts); } } } |
return (b.frequency != a.frequency)? | return (b.frequency !== a.frequency)? | arrangeSuggestions: function(res){ var pops = res.popular || []; var recos = res.recommended || []; var recoTable = recos.reduce(function(memo, i){ memo[i.toLowerCase()] = i; return memo; }, {}); var tags = (res.tags || []).sort(function(a, b){ return (b.frequency != a.frequency)? compare(b.frequency, a.frequency) : compare(a.name, b.name); }).map(itemgetter('name')); var tagsTable = tags.reduce(function(memo, i){ memo[i.toLowerCase()] = i; return memo; }, {}); for(var i = 0, len = pops.length; i < len; ++i){ var pop = pops[i].toLowerCase(); if(pop in tagsTable){ pops.splice(i--, 1); len--; if(!(pop in recoTable)) recos.push(tagsTable[pop]); } } res.recommended = recos; res.popular = pops; res.tags = tags; }, |
memo[i.toLowerCase()] = i; | if(i) memo[i.toLowerCase()] = i; | arrangeSuggestions: function(res){ var pops = res.popular || []; var recos = res.recommended || []; var recoTable = recos.reduce(function(memo, i){ memo[i.toLowerCase()] = i; return memo; }, {}); var tags = (res.tags || []).sort(function(a, b){ return (b.frequency !== a.frequency)? compare(b.frequency, a.frequency) : compare(a.name, b.name); }).map(itemgetter('name')); var tagsTable = tags.reduce(function(memo, i){ memo[i.toLowerCase()] = i; return memo; }, {}); for(var i = 0, len = pops.length; i < len; ++i){ var pop = pops[i].toLowerCase(); if(pop in tagsTable){ pops.splice(i--, 1); len--; if(!(pop in recoTable)) recos.push(tagsTable[pop]); } } res.recommended = recos; res.popular = pops; res.tags = tags; }, |
doctest._reprTrackRestore(restorer); | doctest.arrayRepr = function (obj, indent, maxLen) { var s = "["; for (var i=0; i<obj.length; i++) { s += doctest.repr(obj[i], indent, maxLen); if (i != obj.length-1) { s += ", "; } } s += "]"; if (s.length > (maxLen + indent.length)) { return doctest.multilineArrayRepr(obj, indent, maxLen); } return s;}; |
|
if( ((typeof notExpected == "object")&&((typeof actual == "object")))&& (this._objPropEq(notExpected, actual)) ){ throw new doh._AssertFailure("assertNotEqual() failed: not expected |"+notExpected+"| but got |"+actual+"|", hint); | if( ((typeof notExpected == "object")&&((typeof actual == "object"))) ){ var isequal = false; try{ isequal = this._objPropEq(notExpected, actual); }catch(e){ if(!(e instanceof doh._AssertFailure)){ throw e; } } if(isequal){ throw new doh._AssertFailure("assertNotEqual() failed: not expected |"+notExpected+"| but got |"+actual+"|", hint); } | doh.isNot = doh.assertNotEqual = function(/*Object*/ notExpected, /*Object*/ actual, /*String?*/ hint){ // summary: // are the passed notexpected and actual objects/values deeply // not equivalent? // Compare undefined always with three equal signs, because undefined==null // is true, but undefined===null is false. if((notExpected === undefined)&&(actual === undefined)){ throw new doh._AssertFailure("assertNotEqual() failed: not expected |"+notExpected+"| but got |"+actual+"|", hint); } if(arguments.length < 2){ throw doh._AssertFailure("assertEqual failed because it was not passed 2 arguments"); } if((notExpected === actual)||(notExpected == actual)){ throw new doh._AssertFailure("assertNotEqual() failed: not expected |"+notExpected+"| but got |"+actual+"|", hint); } if( (this._isArray(notExpected) && this._isArray(actual))&& (this._arrayEq(notExpected, actual)) ){ throw new doh._AssertFailure("assertNotEqual() failed: not expected |"+notExpected+"| but got |"+actual+"|", hint); } if( ((typeof notExpected == "object")&&((typeof actual == "object")))&& (this._objPropEq(notExpected, actual)) ){ throw new doh._AssertFailure("assertNotEqual() failed: not expected |"+notExpected+"| but got |"+actual+"|", hint); } return true;} |
function AtD_check(form_id, node, callback) { | function AtD_check(id, node, callback) { | function AtD_check(form_id, node, callback) { AtD_ajax_load('show'); AtD.check(form_id, { success: function() { callback(0, form_id, node); }, ready: function(count) { callback(count, form_id, node); }, error: function() { callback(-1, form_id, node); } });} |
AtD.check(form_id, { success: function() { callback(0, form_id, node); | jQuery.ajax({ type : "POST", url : AtD.rpc + '?url=/checkDocument&lang=' + AtD.lang, data : 'key=' + AtD.api_key + '&data=' + jQuery('#'+id).val(), format : 'raw', dataType : (jQuery.browser.msie) ? "text" : "xml", error : function(XHR, status, error) { AtD_update_post(id); | function AtD_check(form_id, node, callback) { AtD_ajax_load('show'); AtD.check(form_id, { success: function() { callback(0, form_id, node); }, ready: function(count) { callback(count, form_id, node); }, error: function() { callback(-1, form_id, node); } });} |
ready: function(count) { callback(count, form_id, node); }, error: function() { callback(-1, form_id, node); | success : function(data) { var xml; if (typeof data == "string") { xml = new ActiveXObject("Microsoft.XMLDOM"); xml.async = false; xml.loadXML(data); } else { xml = data; } AtD_ajax_load('hide'); if (AtD.core.hasErrorMessage(xml)) { AtD_update_post(id); } var results = AtD.core.processXML(xml); if (results.count > 0) { var message = AtD.getLang('dialog_confirm_post', 'The proofreader has suggestions for your reply. Are you sure you want to post it?')+"\n\n"+AtD.getLang('dialog_confirm_post2', 'Press OK to post your reply, or Cancel to view the suggestions and edit your reply.'); jConfirm(message, '', function(r) { if ( r == true ) { AtD_update_post(id); } else { AtD.checkTextArea(id, node.attr('id'), jQuery.fn.addProofreader.defaults.edit_text_content); } }); } else { AtD_update_post(id); } | function AtD_check(form_id, node, callback) { AtD_ajax_load('show'); AtD.check(form_id, { success: function() { callback(0, form_id, node); }, ready: function(count) { callback(count, form_id, node); }, error: function() { callback(-1, form_id, node); } });} |
url : AtD.rpc + '?url=/checkDocument&lang=' + AtD.lang, data : 'key=' + AtD.api_key + '&data=' + jQuery('#'+id).val(), | url : AtD.rpc, data : 'data=' + jQuery('#'+id).val(), | function AtD_check(id, node, callback) { AtD_ajax_load('show'); jQuery.ajax({ type : "POST", url : AtD.rpc + '?url=/checkDocument&lang=' + AtD.lang, data : 'key=' + AtD.api_key + '&data=' + jQuery('#'+id).val(), format : 'raw', dataType : (jQuery.browser.msie) ? "text" : "xml", error : function(XHR, status, error) { AtD_update_post(id); }, success : function(data) { var xml; if (typeof data == "string") { xml = new ActiveXObject("Microsoft.XMLDOM"); xml.async = false; xml.loadXML(data); } else { xml = data; } AtD_ajax_load('hide'); if (AtD.core.hasErrorMessage(xml)) { AtD_update_post(id); } var results = AtD.core.processXML(xml); if (results.count > 0) { /* Okay, the user has tried to publish/update already but there are still errors. Ask them what to do */ var message = AtD.getLang('dialog_confirm_post', 'The proofreader has suggestions for your reply. Are you sure you want to post it?')+"\n\n"+AtD.getLang('dialog_confirm_post2', 'Press OK to post your reply, or Cancel to view the suggestions and edit your reply.'); jConfirm(message, '', function(r) { if ( r == true ) { /* User doesn't want the errors to be fixed */ AtD_update_post(id); } else { /* Do the real checking */ AtD.checkTextArea(id, node.attr('id'), jQuery.fn.addProofreader.defaults.edit_text_content); } }); } else { AtD_update_post(id); } } });} |
AtD.checkTextArea(id, node.attr('id'), jQuery.fn.addProofreader.defaults.edit_text_content); | node.click(); | function AtD_check(id, node, callback) { AtD_ajax_load('show'); jQuery.ajax({ type : "POST", url : AtD.rpc + '?url=/checkDocument&lang=' + AtD.lang, data : 'key=' + AtD.api_key + '&data=' + jQuery('#'+id).val(), format : 'raw', dataType : (jQuery.browser.msie) ? "text" : "xml", error : function(XHR, status, error) { AtD_update_post(id); }, success : function(data) { var xml; if (typeof data == "string") { xml = new ActiveXObject("Microsoft.XMLDOM"); xml.async = false; xml.loadXML(data); } else { xml = data; } AtD_ajax_load('hide'); if (AtD.core.hasErrorMessage(xml)) { AtD_update_post(id); } var results = AtD.core.processXML(xml); if (results.count > 0) { /* Okay, the user has tried to publish/update already but there are still errors. Ask them what to do */ var message = AtD.getLang('dialog_confirm_post', 'The proofreader has suggestions for your reply. Are you sure you want to post it?')+"\n\n"+AtD.getLang('dialog_confirm_post2', 'Press OK to post your reply, or Cancel to view the suggestions and edit your reply.'); jConfirm(message, '', function(r) { if ( r == true ) { /* User doesn't want the errors to be fixed */ AtD_update_post(id); } else { /* Do the real checking */ AtD.checkTextArea(id, node.attr('id'), jQuery.fn.addProofreader.defaults.edit_text_content); } }); } else { AtD_update_post(id); } } });} |
atd_show_phrases( jQuery( '#atd_ignored_phrases' ).val().split( /,/g ) ); | if(jQuery( '#atd_ignored_phrases' ).val()) atd_show_phrases( jQuery( '#atd_ignored_phrases' ).val().split( /,/g ) ); | function atd_ignore_init() { jQuery( '#atd_message' ).hide(); atd_show_phrases( jQuery( '#atd_ignored_phrases' ).val().split( /,/g ) );} |
function AtD_update_post( form_id ) { AtD.proofread_click_count = 1; jQuery('#'+form_id).parents('form').submit(); | function AtD_update_post( id ) { AtD.proofread_click_count = 2; jQuery('#'+id).parents('form').submit(); | function AtD_update_post( form_id ) { AtD.proofread_click_count = 1; /* Just increase the count to prevent a loop */ jQuery('#'+form_id).parents('form').submit();} |
if ($('#edit-vertical_tabs_example-enabled', context).attr('checked')) { return Drupal.checkPlain($('#edit-vertical_tabs_example-custom-setting', context).val()); | if ($('#edit-vertical-tabs-example-enabled', context).attr('checked')) { return Drupal.checkPlain($('#edit-vertical-tabs-example-custom-setting', context).val()); | attach: function (context) { // Use the fieldset class to identify the vertical tab element $('fieldset.vertical_tabs_example-custom-form', context).setSummary(function (context) { // Depending on the checkbox status, the settings will be customized, so // update the summary with the custom setting textfield string or a use a // default string. if ($('#edit-vertical_tabs_example-enabled', context).attr('checked')) { return Drupal.checkPlain($('#edit-vertical_tabs_example-custom-setting', context).val()); } else { return Drupal.t('Using default.'); } }); } |
return Drupal.t('Using default.'); | return Drupal.t('Using default'); | attach: function (context) { // Use the fieldset class to identify the vertical tab element $('fieldset.vertical_tabs_example-custom-form', context).setSummary(function (context) { // Depending on the checkbox status, the settings will be customized, so // update the summary with the custom setting textfield string or a use a // default string. if ($('#edit-vertical_tabs_example-enabled', context).attr('checked')) { return Drupal.checkPlain($('#edit-vertical_tabs_example-custom-setting', context).val()); } else { return Drupal.t('Using default.'); } }); } |
$('fieldset#edit-path', context).drupalSetSummary(function (context) { var path = $('#edit-path-alias').val(); var automatic = $('#edit-path-pathauto-perform-alias').attr('checked'); | $('fieldset.path-form', context).drupalSetSummary(function (context) { var path = $('.form-item-path-alias input').val(); var automatic = $('.form-item-path-pathauto input').attr('checked'); | attach: function (context) { $('fieldset#edit-path', context).drupalSetSummary(function (context) { var path = $('#edit-path-alias').val(); var automatic = $('#edit-path-pathauto-perform-alias').attr('checked'); if (automatic) { return Drupal.t('Automatic alias'); } if (path) { return Drupal.t('Alias: @alias', { '@alias': path }); } else { return Drupal.t('No alias'); } }); } |
-1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue; if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType=== | c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, | -1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType=== |
if (typeof value === "undefined" && typeof key === "string") return jQuery.fn.html.apply(this, arguments); | if (typeof value === "undefined" && typeof key === "string") { if (this.length < 1) return false; var buffer = jQuery.Buffer.bufferForElement(this[0]); return buffer.attr(key); } | attr: function(key, value) { // first, handle the get-case if (typeof value === "undefined" && typeof key === "string") return jQuery.fn.html.apply(this, arguments); // now, buffer the command. var len = this.length, i; for (i = 0; i < len; i++) { var buffer = jQuery.Buffer.bufferForElement(this[i]); buffer.attr(key, value); } return this; }, |
callLater(0.1, Form.resize); | callLater(0.5, Form.resize); | audio: function(){ var ps = this.ps; var title = this.savers['item'] = this.title = new Title(ps); var link = this.savers['itemUrl'] = this.link = new Audio(ps); var tags = this.savers['tags'] = this.tags = new Tags(ps, true); var desc = this.savers['description'] = this.desc = new Desc(ps, true); this.toggles = [title, tags, link, desc]; callLater(0.1, Form.resize); }, |
context.completions = config.autocommands; | context.completions = Iterator(config.autocommands); | completion.autocmdEvent = function autocmdEvent(context) { context.completions = config.autocommands; }; |
dactyl.trapErrors(function () { | dactyl.trapErrors(function _autocompleteTell() { | this._autocompleteTimer = Timer(200, 500, function autocompleteTell(tabPressed) { dactyl.trapErrors(function () { if (!events.feedingKeys && self._completions && options["autocomplete"].length) { self._completions.complete(true, false); if (self._completions) self._completions.itemList.show(); } }); }); |
location.hash = ''; | location.hash = '#doctest-testall'; | doctest.autoSetup = function (parent) { var tags = doctest.getElementsByTagAndClassName('div', 'test', parent); // First we'll make sure everything has an ID var tagsById = {}; for (var i=0; i<tags.length; i++) { var tagId = tags[i].getAttribute('id'); if (! tagId) { tagId = 'test-' + (++doctest.autoSetup._idCount); tags[i].setAttribute('id', tagId); } // FIXME: test uniqueness here, warn tagsById[tagId] = tags[i]; } // Then fill in the labels for (i=0; i<tags.length; i++) { var el = document.createElement('span'); el.className = 'test-id'; var anchor = document.createElement('a'); anchor.setAttribute('href', '#' + tags[i].getAttribute('id')); anchor.appendChild(document.createTextNode(tagId)); var button = document.createElement('button'); button.innerHTML = 'test'; button.setAttribute('type', 'button'); button.setAttribute('test-id', tags[i].getAttribute('id')); button.onclick = function () { location.hash = '#' + this.getAttribute('test-id'); location.reload(); }; el.appendChild(anchor); el.appendChild(button); tags[i].insertBefore(el, tags[i].childNodes[0]); } // Lastly, create output areas in each section for (i=0; i<tags.length; i++) { var outEl = doctest.getElementsByTagAndClassName('pre', 'output', tags[i]); if (! outEl.length) { outEl = document.createElement('pre'); outEl.className = 'output'; outEl.setAttribute('id', tags[i].getAttribute('id') + '-output'); } } if (location.hash.length > 1) { // This makes the :target CSS work, since if the hash points to an // element whose id has just been added, it won't be noticed location.hash = location.hash; } var output = document.getElementById('doctestOutput'); if (! output) { output = document.createElement('pre'); output.setAttribute('id', 'doctestOutput'); output.className = 'output'; tags[0].parentNode.insertBefore(output, tags[0]); } var reloader = document.getElementById('doctestReload'); if (! reloader) { reloader = document.createElement('button'); reloader.setAttribute('type', 'button'); reloader.innerHTML = 'test all'; reloader.onclick = function () { location.hash = ''; location.reload(); }; output.parentNode.insertBefore(reloader, output); }}; |
this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",k,m=0;g[m];m++){k=g[m];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache=== k){y=m[u.sizset];break}if(u.nodeType===1&&!q){u.sizcache=k;u.sizset=r}if(u.nodeName.toLowerCase()===h){y=u;break}u=u[g]}m[r]=y}}}function d(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===k){y=m[u.sizset];break}if(u.nodeType===1){if(!q){u.sizcache=k;u.sizset=r}if(typeof h!=="string"){if(u===h){y=true;break}}else if(p.filter(h,[u]).length>0){y=u;break}}u=u[g]}m[r]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, | function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q]; if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, | this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",k,m=0;g[m];m++){k=g[m];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===k){y=m[u.sizset];break}if(u.nodeType===1&&!q){u.sizcache=k;u.sizset=r}if(u.nodeName.toLowerCase()===h){y=u;break}u=u[g]}m[r]=y}}}function d(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===k){y=m[u.sizset];break}if(u.nodeType===1){if(!q){u.sizcache=k;u.sizset=r}if(typeof h!=="string"){if(u===h){y=true;break}}else if(p.filter(h,[u]).length>0){y=u;break}}u=u[g]}m[r]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, |
h){return"\\"+(h-0+1)}))}var B=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){B=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,m=g.length;k<m;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var D;if(s.documentElement.compareDocumentPosition)D=function(g,h){if(!g.compareDocumentPosition|| | !h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m= h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& | h){return"\\"+(h-0+1)}))}var B=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){B=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,m=g.length;k<m;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var D;if(s.documentElement.compareDocumentPosition)D=function(g,h){if(!g.compareDocumentPosition|| |
var tokenizePHP=function(){function i(e){return function(c,a){var b=e,d=p(e,c,function(f){b=f});b!=e&&a(i(b));return d}}function p(e,c,a){function b(){c.nextWhileMatches(q);var l=c.get(),m=k.hasOwnProperty(l)&&k.propertyIsEnumerable(l)&&k[l];return m?{type:m.type,style:m.style,content:l}:{type:"t_string",style:"php-t_string",content:l}}function d(){c.nextWhileMatches(q);var l=c.get();return l=="$this"?{type:"variable",style:"php-keyword",content:l}:{type:"variable",style:"php-variable",content:l}} | 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), | var tokenizePHP=function(){function i(e){return function(c,a){var b=e,d=p(e,c,function(f){b=f});b!=e&&a(i(b));return d}}function p(e,c,a){function b(){c.nextWhileMatches(q);var l=c.get(),m=k.hasOwnProperty(l)&&k.propertyIsEnumerable(l)&&k[l];return m?{type:m.type,style:m.style,content:l}:{type:"t_string",style:"php-t_string",content:l}}function d(){c.nextWhileMatches(q);var l=c.get();return l=="$this"?{type:"variable",style:"php-keyword",content:l}:{type:"variable",style:"php-variable",content:l}} |
document.getElementById(back_id).type = "hidden"; document.getElementById(text_id).type = "hidden"; | document.getElementById(back_id).style.visibility = "hidden"; document.getElementById(text_id).style.visibility = "hidden"; | function backSelectOpt(select_id, back_id, text_id){ document.getElementById(select_id).style.visibility = "visible"; document.getElementById(back_id).type = "hidden"; document.getElementById(text_id).type = "hidden"; } |
var evenOrOdd = (idx % 2 == 0) ? 'even' : 'odd'; | var evenOrOdd = (idx % 2 === 0) ? 'even' : 'odd'; | function basic(view, sel, disabled) { var cq = view.$(); ok(cq.hasClass('sc-list-item-view'), 'should have sc-list-item-view class'); equals(cq.hasClass('sel'), !!sel, 'expect sel class'); equals(cq.hasClass('disabled'), !!disabled, 'expect disabled class'); var idx = view.get('contentIndex'); var evenOrOdd = (idx % 2 == 0) ? 'even' : 'odd'; ok(cq.hasClass(evenOrOdd), 'should have an %@ class'.fmt(evenOrOdd));} |
let popup = document.getElementById("dactyl-visualbell"); let win = config.visualbellWindow; let rect = win.getBoundingClientRect(); let width = rect.right - rect.left; let height = rect.bottom - rect.top; | dactyl.callInMainThread(function () { let popup = document.getElementById("dactyl-visualbell"); let win = config.visualbellWindow; let rect = win.getBoundingClientRect(); let width = rect.right - rect.left; let height = rect.bottom - rect.top; | beep: function () { // FIXME: popups clear the command line if (options["visualbell"]) { // flash the visual bell let popup = document.getElementById("dactyl-visualbell"); let win = config.visualbellWindow; let rect = win.getBoundingClientRect(); let width = rect.right - rect.left; let height = rect.bottom - rect.top; // NOTE: this doesn't seem to work in FF3 with full box dimensions popup.openPopup(win, "overlap", 1, 1, false, false); popup.sizeTo(width - 2, height - 2); setTimeout(function () { popup.hidePopup(); }, 20); } else { let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound); soundService.beep(); } return false; // so you can do: if (...) return dactyl.beep(); }, |
popup.openPopup(win, "overlap", 1, 1, false, false); popup.sizeTo(width - 2, height - 2); setTimeout(function () { popup.hidePopup(); }, 20); | popup.openPopup(win, "overlap", 1, 1, false, false); popup.sizeTo(width - 2, height - 2); setTimeout(function () { popup.hidePopup(); }, 20); }); | beep: function () { // FIXME: popups clear the command line if (options["visualbell"]) { // flash the visual bell let popup = document.getElementById("dactyl-visualbell"); let win = config.visualbellWindow; let rect = win.getBoundingClientRect(); let width = rect.right - rect.left; let height = rect.bottom - rect.top; // NOTE: this doesn't seem to work in FF3 with full box dimensions popup.openPopup(win, "overlap", 1, 1, false, false); popup.sizeTo(width - 2, height - 2); setTimeout(function () { popup.hidePopup(); }, 20); } else { let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound); soundService.beep(); } return false; // so you can do: if (...) return dactyl.beep(); }, |
let bell = document.getElementById("dactyl-bell"); let strut = document.getElementById("dactyl-bell-strut"); if (!bell) { bell = document.documentElement.insertBefore( util.xmlToDom(<hbox xmlns={XUL} style="display: none" highlight="Bell" id="dactyl-bell"/>, document), document.documentElement.firstChild); strut = document.documentElement.appendChild( util.xmlToDom(<hbox xmlns={XUL} style="display: none" highlight="Bell" id="dactyl-bell-strut"/>, document)); | let elems = { bell: document.getElementById("dactyl-bell"), strut: document.getElementById("dactyl-bell-strut") | beep: function () { if (options["visualbell"]) { let bell = document.getElementById("dactyl-bell"); let strut = document.getElementById("dactyl-bell-strut"); if (!bell) { bell = document.documentElement.insertBefore( util.xmlToDom(<hbox xmlns={XUL} style="display: none" highlight="Bell" id="dactyl-bell"/>, document), document.documentElement.firstChild); strut = document.documentElement.appendChild( util.xmlToDom(<hbox xmlns={XUL} style="display: none" highlight="Bell" id="dactyl-bell-strut"/>, document)); } bell.style.height = window.innerHeight + "px"; strut.style.marginBottom = -window.innerHeight + "px"; strut.style.display = bell.style.display = ""; util.timeout(function () { strut.style.display = bell.style.display = "none"; }, 20); } else { let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound); soundService.beep(); } }, |
bell.style.height = window.innerHeight + "px"; strut.style.marginBottom = -window.innerHeight + "px"; strut.style.display = bell.style.display = ""; | elems.bell.style.height = window.innerHeight + "px"; elems.strut.style.marginBottom = -window.innerHeight + "px"; elems.strut.style.display = elems.bell.style.display = ""; | beep: function () { if (options["visualbell"]) { let bell = document.getElementById("dactyl-bell"); let strut = document.getElementById("dactyl-bell-strut"); if (!bell) { bell = document.documentElement.insertBefore( util.xmlToDom(<hbox xmlns={XUL} style="display: none" highlight="Bell" id="dactyl-bell"/>, document), document.documentElement.firstChild); strut = document.documentElement.appendChild( util.xmlToDom(<hbox xmlns={XUL} style="display: none" highlight="Bell" id="dactyl-bell-strut"/>, document)); } bell.style.height = window.innerHeight + "px"; strut.style.marginBottom = -window.innerHeight + "px"; strut.style.display = bell.style.display = ""; util.timeout(function () { strut.style.display = bell.style.display = "none"; }, 20); } else { let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound); soundService.beep(); } }, |
util.timeout(function () { strut.style.display = bell.style.display = "none"; }, 20); | util.timeout(function () { elems.strut.style.display = elems.bell.style.display = "none"; }, 20); | beep: function () { if (options["visualbell"]) { let bell = document.getElementById("dactyl-bell"); let strut = document.getElementById("dactyl-bell-strut"); if (!bell) { bell = document.documentElement.insertBefore( util.xmlToDom(<hbox xmlns={XUL} style="display: none" highlight="Bell" id="dactyl-bell"/>, document), document.documentElement.firstChild); strut = document.documentElement.appendChild( util.xmlToDom(<hbox xmlns={XUL} style="display: none" highlight="Bell" id="dactyl-bell-strut"/>, document)); } bell.style.height = window.innerHeight + "px"; strut.style.marginBottom = -window.innerHeight + "px"; strut.style.display = bell.style.display = ""; util.timeout(function () { strut.style.display = bell.style.display = "none"; }, 20); } else { let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound); soundService.beep(); } }, |
util.timeout(function () { document.documentElement.removeAttributeNS(NS, "highlight"); }, 20); | util.timeout(function () { document.documentElement.removeAttributeNS(NS, "highlight"); }, 5); | beep: function () { if (options["visualbell"]) { // flash the visual bell let panel = document.getElementById("dactyl-deck-bell"); if (panel) { let restore = panel.parentNode.selectedPanel; if (restore !== panel) { panel.parentNode.selectedPanel = panel; util.timeout(function () { panel.parentNode.selectedPanel = restore; }, 20); } } else { highlight.highlightNode(document.documentElement, "Bell"); util.timeout(function () { document.documentElement.removeAttributeNS(NS, "highlight"); }, 20); } } else { let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound); soundService.beep(); } }, |
this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this, | prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, | this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this, |
before: function(element, node) { element.parentNode.insertBefore(node, 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])*?\*\ | before: function(element, node) { element.parentNode.insertBefore(node, element); }, |
Before: function(element, content) { return Element.insert(element, {before:content}); }, | 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])*?\*\ | Before: function(element, content) { return Element.insert(element, {before:content}); }, |
if(view.get('isEditable')) view.beginEditing(); | if(view.get('isEditable') && !view.isTextField) view.beginEditing(); | beginEditing: function() { var childViews = this.childViews, i, len = childViews.length, view; for(i = 0; i < len; i++) { view = childViews[i]; if(view.get('isEditable')) view.beginEditing(); } if(this.get('isEditing')) return YES; return this.invokeDelegateMethod(this.get('editorDelegate'), 'beginEditingFor', this, this.get('value')); }, |
canScale: this.get("canScale") && SC.platform.pinchToScale, | canScale: this.get("canScale") && SC.platform.pinchToZoom, | beginTouchTracking: function(touch, starting) { var avg = touch.averagedTouchesForView(this, starting); var verticalScrollOffset = this._scroll_verticalScrollOffset || 0, horizontalScrollOffset = this._scroll_horizontalScrollOffset || 0, startClipOffsetX = horizontalScrollOffset, startClipOffsetY = verticalScrollOffset, needsScrollEnd = NO; if (this.touch && this.touch.timeout) { // clear the timeout clearTimeout(this.touch.timeout); this.touch.timeout = null; // get the scroll offsets startClipOffsetX = this.touch.startClipOffset.x; startClipOffsetY = this.touch.startClipOffset.y; needsScrollEnd = YES; } // calculate container+content width/height var view = this.get('contentView') ; var contentWidth = view ? view.get('frame').width : 0, contentHeight = view ? view.get('frame').height : 0; if(view.calculatedWidth && view.calculatedWidth!==0) contentWidth = view.calculatedWidth; if (view.calculatedHeight && view.calculatedHeight !==0) contentHeight = view.calculatedHeight; var containerWidth = this.get('containerView').get('frame').width, containerHeight = this.get('containerView').get('frame').height; // calculate position in content var globalFrame = this.convertFrameToView(this.get("frame"), null), positionInContentX = (horizontalScrollOffset + (avg.x - globalFrame.x)) / this._scale, positionInContentY = (verticalScrollOffset + (avg.y - globalFrame.y)) / this._scale; this.touch = { startTime: touch.timeStamp, notCalculated: YES, enableScrolling: { x: contentWidth * this._scale > containerWidth || this.get("alwaysBounceHorizontal"), y: contentHeight * this._scale > containerHeight || this.get("alwaysBounceVertical") }, scrolling: { x: NO, y: NO }, enableBouncing: SC.platform.bounceOnScroll, // offsets and velocities startClipOffset: { x: startClipOffsetX, y: startClipOffsetY }, lastScrollOffset: { x: horizontalScrollOffset, y: verticalScrollOffset }, startTouchOffset: { x: avg.x, y: avg.y }, scrollVelocity: { x: 0, y: 0 }, startTouchOffsetInContent: { x: positionInContentX, y: positionInContentY }, containerSize: { width: containerWidth, height: containerHeight }, contentSize: { width: contentWidth, height: contentHeight }, startScale: this._scale, startDistance: avg.d, canScale: this.get("canScale") && SC.platform.pinchToScale, minimumScale: this.get("minimumScale"), maximumScale: this.get("maximumScale"), globalFrame: globalFrame, // cache some things layer: this.get("contentView").get('layer'), // some constants resistanceCoefficient: 0.998, resistanceAsymptote: 320, decelerationFromEdge: 0.05, accelerationToEdge: 0.1, // how much percent of the other drag direction you must drag to start dragging that direction too. scrollTolerance: { x: 15, y: 15 }, scaleTolerance: 5, secondaryScrollTolerance: 30, scrollLock: 500, decelerationRate: this.get("decelerationRate"), // general status lastEventTime: touch.timeStamp, // the touch used touch: (starting ? touch : (this.touch ? this.touch.touch : null)), // needsScrollEnd will cause a scrollDidEnd even if this particular touch does not start a scroll. // the reason for this is because we don't want to say we've stopped scrolling just because we got // another touch, but simultaneously, we still need to send a touch end eventually. // there are two cases in which this will be used: // // 1. If the touch was sent to content touches (in which case we will not be scrolling) // 2. If the touch ends before scrolling starts (no scrolling then, either) needsScrollEnd: needsScrollEnd }; if (!this.tracking) { this.tracking = YES; this.dragging = NO; } }, |
var binaryRequest = function(url, opt){ | function binaryRequest(url, opt){ | var binaryRequest = function(url, opt){ return request(url, update({ charset: 'text/plain; charset=x-user-defined' }, opt)).addCallback(function(res){ res.responseText = res.responseText.replace(/[\u0100-\uffff]/g, function(c){ return String.fromCharCode(c.charCodeAt(0) & 0xff); }); return res; });}; |
}; | } | function binaryRequest(url, opt){ return request(url, update({ charset: 'text/plain; charset=x-user-defined' }, opt)).addCallback(function(res){ res.responseText = res.responseText.replace(/[\u0100-\uffff]/g, function(c){ return String.fromCharCode(c.charCodeAt(0) & 0xff); }); return res; });}; |
c = (l + r) / 2; | c = Math.floor((l + r) / 2); | binarySearch: function(list, val, l, r, cmp) { l = l || 0; r = (!r || r <= l) ? list.length : r; while (l < r) { c = (l + r) / 2; if (list[c] == val) return c; if (cmp && cmp(list[c], val) < 0 || list[c] < 0) l = c + 1; else r = c; } return l; }, |
if (cmp && cmp(list[c], val) < 0 || list[c] < 0) | if (cmp && cmp(list[c], val) < 0 || list[c] < val) | binarySearch: function(list, val, l, r, cmp) { l = l || 0; r = (!r || r <= l) ? list.length : r; while (l < r) { c = (l + r) / 2; if (list[c] == val) return c; if (cmp && cmp(list[c], val) < 0 || list[c] < 0) l = c + 1; else r = c; } return l; }, |
? function() { | ? function $$boundMethod() { | exports.bind = function(context, method /*, VARGS*/) { if(arguments.length > 2) { var args = SLICE.call(arguments, 2); return typeof method == 'string' ? function() { if (context[method]) { return context[method].apply(context, args.concat(SLICE.call(arguments, 0))); } else { throw logger.error('No method:', method, 'for context', context); } } : function() { return method.apply(context, args.concat(SLICE.call(arguments, 0))); } } else { return typeof method == 'string' ? function() { if (context[method]) { return context[method].apply(context, arguments); } else { throw logger.error('No method:', method, 'for context', context); } } : function() { return method.apply(context, arguments); } }} |
: function() { return method.apply(context, args.concat(SLICE.call(arguments, 0))); } | : function $$boundMethod() { return method.apply(context, args.concat(SLICE.call(arguments, 0))); } | exports.bind = function(context, method /*, VARGS*/) { if(arguments.length > 2) { var args = SLICE.call(arguments, 2); return typeof method == 'string' ? function() { if (context[method]) { return context[method].apply(context, args.concat(SLICE.call(arguments, 0))); } else { throw logger.error('No method:', method, 'for context', context); } } : function() { return method.apply(context, args.concat(SLICE.call(arguments, 0))); } } else { return typeof method == 'string' ? function() { if (context[method]) { return context[method].apply(context, arguments); } else { throw logger.error('No method:', method, 'for context', context); } } : function() { return method.apply(context, arguments); } }} |
: function() { return method.apply(context, arguments); } | : function $$boundMethod() { return method.apply(context, arguments); } | exports.bind = function(context, method /*, VARGS*/) { if(arguments.length > 2) { var args = SLICE.call(arguments, 2); return typeof method == 'string' ? function() { if (context[method]) { return context[method].apply(context, args.concat(SLICE.call(arguments, 0))); } else { throw logger.error('No method:', method, 'for context', context); } } : function() { return method.apply(context, args.concat(SLICE.call(arguments, 0))); } } else { return typeof method == 'string' ? function() { if (context[method]) { return context[method].apply(context, arguments); } else { throw logger.error('No method:', method, 'for context', context); } } : function() { return method.apply(context, arguments); } }} |
} | }; | bind: function(context, method/*, args... */) { var args = Array.prototype.slice.call(arguments, 2); return function(){ method = (typeof method == 'string' ? context[method] : method); return method.apply(context, args.concat(Array.prototype.slice.call(arguments, 0))); } }, |
bind = function(context, method) { var args = Array.prototype.slice.call(arguments, 2); return function(){ method = (typeof method == 'string' ? context[method] : method); return method.apply(context, args.concat(Array.prototype.slice.call(arguments, 0))); } }, | bind: function(context, method) { var args = Array.prototype.slice.call(arguments, 2); return function(){ method = (typeof method == 'string' ? context[method] : method); return method.apply(context, args.concat(Array.prototype.slice.call(arguments, 0))); } }, | bind = function(context, method/*, args... */) { var args = Array.prototype.slice.call(arguments, 2); return function(){ method = (typeof method == 'string' ? context[method] : method); return method.apply(context, args.concat(Array.prototype.slice.call(arguments, 0))); } }, |
? function() { exports.log('crash?', method, context, arguments); return context[method].apply(context, arguments); } | ? function() { return context[method].apply(context, arguments); } | exports.bind = function(context, method /*, VARGS*/) { if(arguments.length > 2) { var args = Array.prototype.slice.call(arguments, 2); return typeof method == 'string' ? function() { return context[method].apply(context, args.concat(Array.prototype.slice.call(arguments, 0))); } : function() { return method.apply(context, args.concat(Array.prototype.slice.call(arguments, 0))); } } else { return typeof method == 'string' ? function() { exports.log('crash?', method, context, arguments); return context[method].apply(context, arguments); } : function() { return method.apply(context, arguments); } }} |
}; | }, | bind = function(context, method/*, args... */) { var args = Array.prototype.slice.call(arguments, 2); return function(){ method = (typeof method == 'string' ? context[method] : method); return method.apply(context, args.concat(Array.prototype.slice.call(arguments, 0))); } }; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.