rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
optionElements[i].element.value = options[j].value;
if (options[j].name == "hAxis.title" || options[j].name == "vAxis.title") { var wireType = xsdTypeToWireType(options[j].dataType); var columns = columnsByWireType(wireType); }
function initOptions(visType, optionElements, options){//alert(options.toSource()); for (var i in optionElements) for (var j in options) if (optionElements[i].optionType == options[j].type) //alert(optionElements[i].toSource()); //alert(options[j].toSource()); optionElements[i].element.value = options[j].value;}
var suffix = text.substr(word.caret); var delimiter = (terminate && suffix.charAt(0) != this.delimiter)? this.delimiter : '';
var suffix = text.substring(word.caret); var delimiter = (terminate && suffix[0] !== this.delimiter)? this.delimiter : '';
injectCandidates: function(cand, terminate, notify){ notify = (notify===undefined)? terminate : notify; var text = this.tags.value; var word = this.getCurrentWord(); var suffix = text.substr(word.caret); var delimiter = (terminate && suffix.charAt(0) != this.delimiter)? this.delimiter : ''; this.tags.value = text.substring(0, word.start) + cand + delimiter + suffix; var index = word.start + cand.length + delimiter.length; setTimeout(function(){ this.tags.selectionStart = this.tags.selectionEnd = index; }, 0); this.deleting = false; if(terminate){ //this.ensureCursorIsVisible(); if(notify) this.notify(); var event = document.createEvent('Event'); event.initEvent('terminate', false, true); this.tags.dispatchEvent(event); } },
this.$label().css("opacity", this._oldOpacity);
inlineEditorDidEndEditing: function(inlineEditor, finalValue) { this.set('isEditing', NO) ; var content = this.get('content') ; var del = this.displayDelegate ; var labelKey = this.getDelegateProperty('contentValueKey', del) ; if (labelKey && content && content.set) { content.set(labelKey, finalValue) ; } this.displayDidChange(); },
inlineEditorShouldBeginEditing: function(inlineEditor, finalValue) {
inlineEditorShouldBeginEditing: function(inlineEditor) {
inlineEditorShouldBeginEditing: function(inlineEditor, finalValue) { return YES ; },
input: function(element, value) { switch (element.type.toLowerCase()) { case 'checkbox': case 'radio': return Form.Element.Serializers.inputSelector(element, value); default: return Form.Element.Serializers.textarea(element, value); } },
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])*?\*\
input: function(element, value) { switch (element.type.toLowerCase()) { case 'checkbox': case 'radio': return Form.Element.Serializers.inputSelector(element, value); default: return Form.Element.Serializers.textarea(element, value); } },
initialinput : aInit,
initialInput : aInit,
function inputPost(aInit) { aInit = aInit || ""; prompt.reader( { message : "add bookmark:", onChange : remainTextLengthWatcher, initialinput : aInit, cursorEnd : aInit.length, callback : function post(aMsg) { let bookmark = { url : content.location.href, comment : aMsg }; let command = new hBookmark.RemoteCommand( "edit", { bookmark : bookmark, onComplete : function () { hBookmark.HTTPCache.entry.clear(bookmark.url); showPopup( { icon : PLUGIN_INFO.iconURL, title : M({ja: "ブックマークに追加しました", en: "Bookmarked"}), message : content.document.title } ); }, onError : function () { window.alert('error'); } }); command.execute(); } } ); }
message : content.document.title
message : title
function inputPost(aInit) { aInit = aInit || ""; prompt.reader( { message : "add bookmark:", onChange : remainTextLengthWatcher, initialinput : aInit, cursorEnd : aInit.length, callback : function post(aMsg) { let bookmark = { url : content.location.href, comment : aMsg }; let command = new hBookmark.RemoteCommand( "edit", { bookmark : bookmark, onComplete : function () { hBookmark.HTTPCache.entry.clear(bookmark.url); showPopup( { icon : PLUGIN_INFO.iconURL, title : M({ja: "ブックマークに追加しました", en: "Bookmarked"}), message : content.document.title } ); }, onError : function () { window.alert('error'); } }); command.execute(); } } ); }
window.alert('error');
display.echoStatusBar(M({ja: "はてなブックマークの追加に失敗しました", en: "Failed to add hatena bookmark"}), 3000);
function inputPost(aInit) { aInit = aInit || ""; prompt.reader( { message : "add bookmark:", onChange : remainTextLengthWatcher, initialinput : aInit, cursorEnd : aInit.length, callback : function post(aMsg) { let bookmark = { url : content.location.href, comment : aMsg }; let command = new hBookmark.RemoteCommand( "edit", { bookmark : bookmark, onComplete : function () { hBookmark.HTTPCache.entry.clear(bookmark.url); showPopup( { icon : PLUGIN_INFO.iconURL, title : M({ja: "ブックマークに追加しました", en: "Bookmarked"}), message : content.document.title } ); }, onError : function () { window.alert('error'); } }); command.execute(); } } ); }
inputSelector: function(element, value) { if (Object.isUndefined(value)) return element.checked ? element.value : null; else element.checked = !!value; },
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])*?\*\
inputSelector: function(element, value) { if (Object.isUndefined(value)) return element.checked ? element.value : null; else element.checked = !!value; },
completer : prompt.completer.match.migemo(filteredTags),
completer : prompt.completer.matcher.migemo(filteredTags),
function inputTag() { prompt.reader( { message : "tag: ", completer : prompt.completer.match.migemo(filteredTags), callback : function (tag) { inputPost(tagsToMsg(tag)); } } ); }
insert: function(element, insertions) { element = $(element); if (Object.isString(insertions) || Object.isNumber(insertions) || Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) insertions = {bottom:insertions}; var content, insert, tagName, childNodes; for (var position in insertions) { content = insertions[position]; position = position.toLowerCase(); insert = Element._insertionTranslations[position]; if (content && content.toElement) content = content.toElement(); if (Object.isElement(content)) { insert(element, content); continue; } content = Object.toHTML(content); tagName = ((position == 'before' || position == 'after') ? element.parentNode : element).tagName.toUpperCase(); childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); if (position == 'top' || position == 'after') childNodes.reverse(); childNodes.each(insert.curry(element)); content.evalScripts.bind(content).defer(); } return element; },
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
insert: function(element, insertions) { element = $(element); if (Object.isString(insertions) || Object.isNumber(insertions) || Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) insertions = {bottom:insertions}; var content, insert, tagName, childNodes; for (var position in insertions) { content = insertions[position]; position = position.toLowerCase(); insert = Element._insertionTranslations[position]; if (content && content.toElement) content = content.toElement(); if (Object.isElement(content)) { insert(element, content); continue; } content = Object.toHTML(content); tagName = ((position == 'before' || position == 'after') ? element.parentNode : element).tagName.toUpperCase(); childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); if (position == 'top' || position == 'after') childNodes.reverse(); childNodes.each(insert.curry(element)); content.evalScripts.bind(content).defer(); } return element; },
if(!next) debugger;
insertBetween: function(item, prev, next) { prev._next = item; item._prev = prev; next._prev = item; item._next = next; this.length++; return item; },
return cleanText(b.join(""))},setLineContent:function(a,b){this.history.commit();this.replaceRange({node:a,offset:0},{node:a,offset:this.history.textAfter(a).length},b);this.addDirtyNode(a);this.scheduleHighlight()},removeLine:function(a){for(var b=a?a.nextSibling:this.container.firstChild;b;){var d=b.nextSibling;removeElement(b);if(isBR(b))break;b=d}this.addDirtyNode(a);this.scheduleHighlight()},insertIntoLine:function(a,b,d){var f=null;if(b=="end")f=o(a,this.container);else for(var g=a?a.nextSibling: this.container.firstChild;g;g=g.nextSibling){if(b==0){f=g;break}var h=nodeText(g);if(h.length>b){f=g.nextSibling;d=h.slice(0,b)+d+h.slice(b);removeElement(g);break}b-=h.length}b=i(d);for(d=0;d<b.length;d++){d>0&&this.container.insertBefore(document.createElement("BR"),f);this.container.insertBefore(makePartSpan(b[d]),f)}this.addDirtyNode(a);this.scheduleHighlight()},selectedText:function(){var a=this.history;a.commit();var b=select.cursorPos(this.container,true),d=select.cursorPos(this.container,
lineContent:function(a){return this.editor.lineContent(a)},setLineContent:function(a,b){this.editor.setLineContent(a,b)},removeLine:function(a){this.editor.removeLine(a)},insertIntoLine:function(a,b,c){this.editor.insertIntoLine(a,b,c)},selectLines:function(a,b,c,e){this.win.focus();this.editor.selectLines(a,b,c,e)},nthLine:function(a){for(var b=this.firstLine();a>1&&b!==false;a--)b=this.nextLine(b);return b},lineNumber:function(a){for(var b=0;a!==false;){b++;a=this.prevLine(a)}return b},jumpToLine:function(a){if(typeof a==
return cleanText(b.join(""))},setLineContent:function(a,b){this.history.commit();this.replaceRange({node:a,offset:0},{node:a,offset:this.history.textAfter(a).length},b);this.addDirtyNode(a);this.scheduleHighlight()},removeLine:function(a){for(var b=a?a.nextSibling:this.container.firstChild;b;){var d=b.nextSibling;removeElement(b);if(isBR(b))break;b=d}this.addDirtyNode(a);this.scheduleHighlight()},insertIntoLine:function(a,b,d){var f=null;if(b=="end")f=o(a,this.container);else for(var g=a?a.nextSibling:this.container.firstChild;g;g=g.nextSibling){if(b==0){f=g;break}var h=nodeText(g);if(h.length>b){f=g.nextSibling;d=h.slice(0,b)+d+h.slice(b);removeElement(g);break}b-=h.length}b=i(d);for(d=0;d<b.length;d++){d>0&&this.container.insertBefore(document.createElement("BR"),f);this.container.insertBefore(makePartSpan(b[d]),f)}this.addDirtyNode(a);this.scheduleHighlight()},selectedText:function(){var a=this.history;a.commit();var b=select.cursorPos(this.container,true),d=select.cursorPos(this.container,
inspect: function() { return "#<Selector:" + this.expression.inspect() + ">"; }
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
inspect: function() { return "#<Selector:" + this.expression.inspect() + ">"; }
function install(data, reason) { dump("dactyl: bootstrap: install " + reasonToString(reason) + "\n") }
function install(data, reason) { dump("dactyl: bootstrap: install " + reasonToString(reason) + "\n"); }
function install(data, reason) { dump("dactyl: bootstrap: install " + reasonToString(reason) + "\n") }
function installPageLoadTimerOnTab(event) {
function installPageLoadTimerOnTab(event, opt_couldHaveMissedStart) {
function installPageLoadTimerOnTab(event) { // browser is the XUL element of the browser that's been added. var browserTab = event.target.linkedBrowser; if (browserTab.pagespeed_ && browserTab.pagespeed_.pageLoadTimer) { // Already installed. This should not happen. PS_LOG('Bug in page load timer: Install function called on the same ' + 'tab twice.'); return; } var plt = new PAGESPEED.PageLoadTimer(); var NSD = Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT; browserTab.addProgressListener(plt, NSD); // TODO: If other parts of PageSpeed need tab-specific state, // then break the tab specific code into its own file and // store other state under to pagespeed object. browserTab.pagespeed_ = { pageLoadTimer: plt };}
var plt = new PAGESPEED.PageLoadTimer();
var plt = new PAGESPEED.PageLoadTimer(!!opt_couldHaveMissedStart);
function installPageLoadTimerOnTab(event) { // browser is the XUL element of the browser that's been added. var browserTab = event.target.linkedBrowser; if (browserTab.pagespeed_ && browserTab.pagespeed_.pageLoadTimer) { // Already installed. This should not happen. PS_LOG('Bug in page load timer: Install function called on the same ' + 'tab twice.'); return; } var plt = new PAGESPEED.PageLoadTimer(); var NSD = Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT; browserTab.addProgressListener(plt, NSD); // TODO: If other parts of PageSpeed need tab-specific state, // then break the tab specific code into its own file and // store other state under to pagespeed object. browserTab.pagespeed_ = { pageLoadTimer: plt };}
installPageLoadTimerOnTab({target: {linkedBrowser: browserTab}});
installPageLoadTimerOnTab({target: {linkedBrowser: browserTab}}, true);
function installTabListeners() { var container = gBrowser.tabContainer; container.addEventListener('TabOpen', installPageLoadTimerOnTab, false); container.addEventListener('TabClose', removePageLoadTimerOnTab, false); // For any tab that already exists, call installPageLoadTimerOnTab(). var numTabs = gBrowser.browsers.length; for (var i = 0; i < numTabs; ++i) { var browserTab = gBrowser.getBrowserAtIndex(i); installPageLoadTimerOnTab({target: {linkedBrowser: browserTab}}); }}
c_list.element.bind('dcmgrGUI.beforeUpdate',function(){ $("#list_load_mask").mask("Loading..."); });
DcmgrGUI.prototype.instancePanel = function(){ var total = 0; var maxrow = 10; var page = 1; var list_request = { "url":DcmgrGUI.Util.getPagePath('/instances/list/',1), "data" : DcmgrGUI.Util.getPagenateData(page,maxrow) }; DcmgrGUI.List.prototype.getEmptyData = function(){ return [{ "id":'', "instance_id":'', "owner":'', "wmi_id":'', "state":'', "private_ip":'', "type":'' }] } DcmgrGUI.Detail.prototype.getEmptyData = function(){ return { "instance_id":'-', "wmi_id":'-', "zone":'-', "security_groups":'-', "type":'-', "status":'-', "owner":'-' } } var c_pagenate = new DcmgrGUI.Pagenate({ row:maxrow, total:total }); var c_list = new DcmgrGUI.List({ element_id:'#display_instances', template_id:'#instancesListTemplate' }); c_list.element.bind('dcmgrGUI.beforeUpdate',function(){ $("#list_load_mask").mask("Loading..."); }); c_list.setDetailTemplate({ template_id:'#instancesDetailTemplate', detail_path:'/instances/show/' }); c_list.element.bind('dcmgrGUI.contentChange',function(event,params){ var instance = params.data.instance; c_pagenate.changeTotal(instance.owner_total); c_list.setData(instance.results); c_list.multiCheckList(c_list.detail_template); $("#list_load_mask").unmask(); }); var bt_refresh = new DcmgrGUI.Refresh(); var bt_instance_start = new DcmgrGUI.Dialog({ target:'.start_instances', width:400, height:200, title:'Start Instances', path:'/start_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Start": function() { c_list.changeStatus('starting'); $(this).dialog("close"); } } }); var bt_instance_stop = new DcmgrGUI.Dialog({ target:'.stop_instances', width:400, height:200, title:'Stop Instances', path:'/stop_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Stop": function() { c_list.changeStatus('stopping'); $(this).dialog("close"); } } }); var bt_instance_reboot = new DcmgrGUI.Dialog({ target:'.reboot_instances', width:400, height:200, title:'Reboot Instances', path:'/reboot_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Reboot": function() { c_list.changeStatus('rebooting'); $(this).dialog("close"); } } }); var bt_instance_terminate = new DcmgrGUI.Dialog({ target:'.terminate_instances', width:400, height:200, title:'Terminate Instances', path:'/terminate_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Terminate": function() { c_list.changeStatus('terminating'); $(this).dialog("close"); } } }); bt_instance_start.target.bind('click',function(){ bt_instance_start.open(c_list.getCheckedInstanceIds()); }); bt_instance_stop.target.bind('click',function(){ bt_instance_stop.open(c_list.getCheckedInstanceIds()); }); bt_instance_reboot.target.bind('click',function(){ bt_instance_reboot.open(c_list.getCheckedInstanceIds()); }); bt_instance_terminate.target.bind('click',function(){ bt_instance_terminate.open(c_list.getCheckedInstanceIds()); }); bt_refresh.element.bind('dcmgrGUI.refresh',function(){ list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_pagenate.current_page); c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) //update detail $.each(c_list.checked_list,function(check_id,obj){ //todo:remove trigger event for detail $($('#detail').find('#'+check_id)).remove(); //todo:update trigger event for detail c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/instances/show/',check_id) },true); }); }); c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); }); //list c_list.setData(null); c_list.update(list_request,true);}
$("#list_load_mask").unmask();
DcmgrGUI.prototype.instancePanel = function(){ var total = 0; var maxrow = 10; var page = 1; var list_request = { "url":DcmgrGUI.Util.getPagePath('/instances/list/',1), "data" : DcmgrGUI.Util.getPagenateData(page,maxrow) }; DcmgrGUI.List.prototype.getEmptyData = function(){ return [{ "id":'', "instance_id":'', "owner":'', "wmi_id":'', "state":'', "private_ip":'', "type":'' }] } DcmgrGUI.Detail.prototype.getEmptyData = function(){ return { "instance_id":'-', "wmi_id":'-', "zone":'-', "security_groups":'-', "type":'-', "status":'-', "owner":'-' } } var c_pagenate = new DcmgrGUI.Pagenate({ row:maxrow, total:total }); var c_list = new DcmgrGUI.List({ element_id:'#display_instances', template_id:'#instancesListTemplate' }); c_list.element.bind('dcmgrGUI.beforeUpdate',function(){ $("#list_load_mask").mask("Loading..."); }); c_list.setDetailTemplate({ template_id:'#instancesDetailTemplate', detail_path:'/instances/show/' }); c_list.element.bind('dcmgrGUI.contentChange',function(event,params){ var instance = params.data.instance; c_pagenate.changeTotal(instance.owner_total); c_list.setData(instance.results); c_list.multiCheckList(c_list.detail_template); $("#list_load_mask").unmask(); }); var bt_refresh = new DcmgrGUI.Refresh(); var bt_instance_start = new DcmgrGUI.Dialog({ target:'.start_instances', width:400, height:200, title:'Start Instances', path:'/start_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Start": function() { c_list.changeStatus('starting'); $(this).dialog("close"); } } }); var bt_instance_stop = new DcmgrGUI.Dialog({ target:'.stop_instances', width:400, height:200, title:'Stop Instances', path:'/stop_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Stop": function() { c_list.changeStatus('stopping'); $(this).dialog("close"); } } }); var bt_instance_reboot = new DcmgrGUI.Dialog({ target:'.reboot_instances', width:400, height:200, title:'Reboot Instances', path:'/reboot_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Reboot": function() { c_list.changeStatus('rebooting'); $(this).dialog("close"); } } }); var bt_instance_terminate = new DcmgrGUI.Dialog({ target:'.terminate_instances', width:400, height:200, title:'Terminate Instances', path:'/terminate_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Terminate": function() { c_list.changeStatus('terminating'); $(this).dialog("close"); } } }); bt_instance_start.target.bind('click',function(){ bt_instance_start.open(c_list.getCheckedInstanceIds()); }); bt_instance_stop.target.bind('click',function(){ bt_instance_stop.open(c_list.getCheckedInstanceIds()); }); bt_instance_reboot.target.bind('click',function(){ bt_instance_reboot.open(c_list.getCheckedInstanceIds()); }); bt_instance_terminate.target.bind('click',function(){ bt_instance_terminate.open(c_list.getCheckedInstanceIds()); }); bt_refresh.element.bind('dcmgrGUI.refresh',function(){ list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_pagenate.current_page); c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) //update detail $.each(c_list.checked_list,function(check_id,obj){ //todo:remove trigger event for detail $($('#detail').find('#'+check_id)).remove(); //todo:update trigger event for detail c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/instances/show/',check_id) },true); }); }); c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); }); //list c_list.setData(null); c_list.update(list_request,true);}
template_id:'#instancesListTemplate'
template_id:'#instancesListTemplate', maxrow:maxrow, page:page
DcmgrGUI.prototype.instancePanel = function(){ var total = 0; var maxrow = 10; var page = 1; var list_request = { "url":DcmgrGUI.Util.getPagePath('/instances/list/',1), "data" : DcmgrGUI.Util.getPagenateData(page,maxrow) }; DcmgrGUI.List.prototype.getEmptyData = function(){ return [{ "id":'', "instance_id":'', "owner":'', "wmi_id":'', "state":'', "private_ip":'', "type":'' }] } DcmgrGUI.Detail.prototype.getEmptyData = function(){ return { "instance_id":'-', "wmi_id":'-', "zone":'-', "security_groups":'-', "type":'-', "status":'-', "owner":'-' } } var c_pagenate = new DcmgrGUI.Pagenate({ row:maxrow, total:total }); var c_list = new DcmgrGUI.List({ element_id:'#display_instances', template_id:'#instancesListTemplate' }); c_list.setDetailTemplate({ template_id:'#instancesDetailTemplate', detail_path:'/instances/show/' }); c_list.element.bind('dcmgrGUI.contentChange',function(event,params){ var instance = params.data.instance; c_pagenate.changeTotal(instance.owner_total); c_list.setData(instance.results); c_list.multiCheckList(c_list.detail_template); }); var bt_refresh = new DcmgrGUI.Refresh(); var instance_action_helper = function(action){ var instances = $(this).find('#instances').find('li'); var ids = []; $.each(instances, function() { ids.push($(this).text()); }); var data = $.param({ids:ids}); $.ajax({ "type": "POST", "async": true, "url": '/instances/'+ action, "dataType": "json", "data": data, success: function(json, status) { bt_refresh.element.trigger('dcmgrGUI.refresh'); } }); $(this).dialog("close"); }; var bt_instance_start = new DcmgrGUI.Dialog({ target:'.start_instances', width:400, height:200, title:'Start Instances', path:'/start_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Start": function() { $(this).dialog("close"); } } }); var bt_instance_stop = new DcmgrGUI.Dialog({ target:'.stop_instances', width:400, height:200, title:'Stop Instances', path:'/stop_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Stop": function() { $(this).dialog("close"); } } }); var bt_instance_reboot = new DcmgrGUI.Dialog({ target:'.reboot_instances', width:400, height:200, title:'Reboot Instances', path:'/reboot_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Reboot": function() { instance_action_helper.call(this,'reboot'); } } }); var bt_instance_terminate = new DcmgrGUI.Dialog({ target:'.terminate_instances', width:400, height:200, title:'Terminate Instances', path:'/terminate_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Terminate": function() { instance_action_helper.call(this,'terminate'); } } }); bt_instance_start.target.bind('click',function(){ bt_instance_start.open(c_list.getCheckedInstanceIds()); }); bt_instance_stop.target.bind('click',function(){ bt_instance_stop.open(c_list.getCheckedInstanceIds()); }); bt_instance_reboot.target.bind('click',function(){ bt_instance_reboot.open(c_list.getCheckedInstanceIds()); }); bt_instance_terminate.target.bind('click',function(){ bt_instance_terminate.open(c_list.getCheckedInstanceIds()); }); bt_refresh.element.bind('dcmgrGUI.refresh',function(){ list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_pagenate.current_page); c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) //update detail $.each(c_list.checked_list,function(check_id,obj){ //todo:remove trigger event for detail $($('#detail').find('#'+check_id)).remove(); //todo:update trigger event for detail c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/instances/show/',check_id) },true); }); }); c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); }); //list c_list.setData(null); c_list.update(list_request,true);}
list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_pagenate.current_page);
c_list.page = c_pagenate.current_page; list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_list.page); list_request.data = DcmgrGUI.Util.getPagenateData(c_pagenate.start,c_pagenate.row);
DcmgrGUI.prototype.instancePanel = function(){ var total = 0; var maxrow = 10; var page = 1; var list_request = { "url":DcmgrGUI.Util.getPagePath('/instances/list/',1), "data" : DcmgrGUI.Util.getPagenateData(page,maxrow) }; DcmgrGUI.List.prototype.getEmptyData = function(){ return [{ "id":'', "instance_id":'', "owner":'', "wmi_id":'', "state":'', "private_ip":'', "type":'' }] } DcmgrGUI.Detail.prototype.getEmptyData = function(){ return { "instance_id":'-', "wmi_id":'-', "zone":'-', "security_groups":'-', "type":'-', "status":'-', "owner":'-' } } var c_pagenate = new DcmgrGUI.Pagenate({ row:maxrow, total:total }); var c_list = new DcmgrGUI.List({ element_id:'#display_instances', template_id:'#instancesListTemplate' }); c_list.setDetailTemplate({ template_id:'#instancesDetailTemplate', detail_path:'/instances/show/' }); c_list.element.bind('dcmgrGUI.contentChange',function(event,params){ var instance = params.data.instance; c_pagenate.changeTotal(instance.owner_total); c_list.setData(instance.results); c_list.multiCheckList(c_list.detail_template); }); var bt_refresh = new DcmgrGUI.Refresh(); var instance_action_helper = function(action){ var instances = $(this).find('#instances').find('li'); var ids = []; $.each(instances, function() { ids.push($(this).text()); }); var data = $.param({ids:ids}); $.ajax({ "type": "POST", "async": true, "url": '/instances/'+ action, "dataType": "json", "data": data, success: function(json, status) { bt_refresh.element.trigger('dcmgrGUI.refresh'); } }); $(this).dialog("close"); }; var bt_instance_start = new DcmgrGUI.Dialog({ target:'.start_instances', width:400, height:200, title:'Start Instances', path:'/start_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Start": function() { $(this).dialog("close"); } } }); var bt_instance_stop = new DcmgrGUI.Dialog({ target:'.stop_instances', width:400, height:200, title:'Stop Instances', path:'/stop_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Stop": function() { $(this).dialog("close"); } } }); var bt_instance_reboot = new DcmgrGUI.Dialog({ target:'.reboot_instances', width:400, height:200, title:'Reboot Instances', path:'/reboot_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Reboot": function() { instance_action_helper.call(this,'reboot'); } } }); var bt_instance_terminate = new DcmgrGUI.Dialog({ target:'.terminate_instances', width:400, height:200, title:'Terminate Instances', path:'/terminate_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Terminate": function() { instance_action_helper.call(this,'terminate'); } } }); bt_instance_start.target.bind('click',function(){ bt_instance_start.open(c_list.getCheckedInstanceIds()); }); bt_instance_stop.target.bind('click',function(){ bt_instance_stop.open(c_list.getCheckedInstanceIds()); }); bt_instance_reboot.target.bind('click',function(){ bt_instance_reboot.open(c_list.getCheckedInstanceIds()); }); bt_instance_terminate.target.bind('click',function(){ bt_instance_terminate.open(c_list.getCheckedInstanceIds()); }); bt_refresh.element.bind('dcmgrGUI.refresh',function(){ list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_pagenate.current_page); c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) //update detail $.each(c_list.checked_list,function(check_id,obj){ //todo:remove trigger event for detail $($('#detail').find('#'+check_id)).remove(); //todo:update trigger event for detail c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/instances/show/',check_id) },true); }); }); c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); }); //list c_list.setData(null); c_list.update(list_request,true);}
}); c_list.element.bind('dcmgrGUI.contentChange',function(event,params){ c_list.setData(params.data); c_list.multiCheckList(c_list.detail_template);
DcmgrGUI.prototype.instancePanel = function(){ DcmgrGUI.List.prototype.getEmptyData = function(){ return [{ "id":'', "instance_id":'', "owner":'', "wmi_id":'', "state":'', "private_ip":'', "type":'' }] } DcmgrGUI.Detail.prototype.getEmptyData = function(){ return { "instance_id":'-', "wmi_id":'-', "zone":'-', "security_groups":'-', "type":'-', "status":'-', "owner":'-' } } var list_request = { "url":DcmgrGUI.Util.getPagePath('/instances/show/',1) }; var c_list = new DcmgrGUI.List({ element_id:'#display_instances', template_id:'#instancesListTemplate' }); c_list.setDetailTemplate({ template_id:'#instancesDetailTemplate', detail_path:'/instances/detail/' }); var c_pagenate = new DcmgrGUI.Pagenate({ row:10, total:30 //todo:get total from dcmgr }); var bt_refresh = new DcmgrGUI.Refresh(); var bt_instance_start = new DcmgrGUI.Dialog({ target:'.start_instances', width:400, height:200, title:'Start Instances', path:'/start_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Start": function() { c_list.changeStatus('starting'); $(this).dialog("close"); } } }); var bt_instance_stop = new DcmgrGUI.Dialog({ target:'.stop_instances', width:400, height:200, title:'Stop Instances', path:'/stop_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Stop": function() { c_list.changeStatus('stopping'); $(this).dialog("close"); } } }); var bt_instance_reboot = new DcmgrGUI.Dialog({ target:'.reboot_instances', width:400, height:200, title:'Reboot Instances', path:'/reboot_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Reboot": function() { c_list.changeStatus('rebooting'); $(this).dialog("close"); } } }); var bt_instance_terminate = new DcmgrGUI.Dialog({ target:'.terminate_instances', width:400, height:200, title:'Terminate Instances', path:'/terminate_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Terminate": function() { c_list.changeStatus('terminating'); $(this).dialog("close"); } } }); bt_instance_start.target.bind('click',function(){ bt_instance_start.open(c_list.getCheckedInstanceIds()); }); bt_instance_stop.target.bind('click',function(){ bt_instance_stop.open(c_list.getCheckedInstanceIds()); }); bt_instance_reboot.target.bind('click',function(){ bt_instance_reboot.open(c_list.getCheckedInstanceIds()); }); bt_instance_terminate.target.bind('click',function(){ bt_instance_terminate.open(c_list.getCheckedInstanceIds()); }); bt_refresh.element.bind('dcmgrGUI.refresh',function(){ list_request.url = DcmgrGUI.Util.getPagePath('/instances/show/',c_pagenate.current_page); c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) //update detail $.each(c_list.checked_list,function(check_id,obj){ //todo:remove trigger event for detail $($('#detail').find('#'+check_id)).remove(); //todo:update trigger event for detail c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/instances/detail/',check_id) },true); }); }); c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); }); //list c_list.setData(null); c_list.update(list_request,true);}
var terminate_instances = $('#terminate_instances').find('li');
var terminate_instances = $(this).find('#terminate_instances').find('li');
DcmgrGUI.prototype.instancePanel = function(){ var total = 0; var maxrow = 10; var page = 1; var list_request = { "url":DcmgrGUI.Util.getPagePath('/instances/list/',1), "data" : DcmgrGUI.Util.getPagenateData(page,maxrow) }; DcmgrGUI.List.prototype.getEmptyData = function(){ return [{ "id":'', "instance_id":'', "owner":'', "wmi_id":'', "state":'', "private_ip":'', "type":'' }] } DcmgrGUI.Detail.prototype.getEmptyData = function(){ return { "instance_id":'-', "wmi_id":'-', "zone":'-', "security_groups":'-', "type":'-', "status":'-', "owner":'-' } } var c_pagenate = new DcmgrGUI.Pagenate({ row:maxrow, total:total }); var c_list = new DcmgrGUI.List({ element_id:'#display_instances', template_id:'#instancesListTemplate' }); c_list.setDetailTemplate({ template_id:'#instancesDetailTemplate', detail_path:'/instances/show/' }); c_list.element.bind('dcmgrGUI.contentChange',function(event,params){ var instance = params.data.instance; c_pagenate.changeTotal(instance.owner_total); c_list.setData(instance.results); c_list.multiCheckList(c_list.detail_template); }); var bt_refresh = new DcmgrGUI.Refresh(); var bt_instance_start = new DcmgrGUI.Dialog({ target:'.start_instances', width:400, height:200, title:'Start Instances', path:'/start_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Start": function() { c_list.changeStatus('starting'); $(this).dialog("close"); } } }); var bt_instance_stop = new DcmgrGUI.Dialog({ target:'.stop_instances', width:400, height:200, title:'Stop Instances', path:'/stop_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Stop": function() { c_list.changeStatus('stopping'); $(this).dialog("close"); } } }); var bt_instance_reboot = new DcmgrGUI.Dialog({ target:'.reboot_instances', width:400, height:200, title:'Reboot Instances', path:'/reboot_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Reboot": function() { c_list.changeStatus('rebooting'); $(this).dialog("close"); } } }); var bt_instance_terminate = new DcmgrGUI.Dialog({ target:'.terminate_instances', width:400, height:200, title:'Terminate Instances', path:'/terminate_instances', button:{ "Close": function() { $(this).dialog("close"); }, "Yes, Terminate": function() { var terminate_instances = $('#terminate_instances').find('li'); var ids = [] $.each(terminate_instances,function(){ ids.push($(this).text()) }) var data = $.param({ids:ids}) $.ajax({ "type": "POST", "async": true, "url": '/instances/terminate', "dataType": "json", "data": data, success: function(json,status){ console.log(json); bt_refresh.element.trigger('dcmgrGUI.refresh'); } }); c_list.changeStatus('terminating'); $(this).dialog("close"); } } }); bt_instance_start.target.bind('click',function(){ bt_instance_start.open(c_list.getCheckedInstanceIds()); }); bt_instance_stop.target.bind('click',function(){ bt_instance_stop.open(c_list.getCheckedInstanceIds()); }); bt_instance_reboot.target.bind('click',function(){ bt_instance_reboot.open(c_list.getCheckedInstanceIds()); }); bt_instance_terminate.target.bind('click',function(){ bt_instance_terminate.open(c_list.getCheckedInstanceIds()); }); bt_refresh.element.bind('dcmgrGUI.refresh',function(){ list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_pagenate.current_page); c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) //update detail $.each(c_list.checked_list,function(check_id,obj){ //todo:remove trigger event for detail $($('#detail').find('#'+check_id)).remove(); //todo:update trigger event for detail c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/instances/show/',check_id) },true); }); }); c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); }); //list c_list.setData(null); c_list.update(list_request,true);}
interpolate: function(object, pattern) { return new Template(this, pattern).evaluate(object); }
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])*?\*\
interpolate: function(object, pattern) { return new Template(this, pattern).evaluate(object); }
interpret: function(value) { return value == null ? '' : String(value); },
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])*?\*\
interpret: function(value) { return value == null ? '' : String(value); },
intersects: function (range, r) r.compareBoundaryPoints(range.START_TO_END, range) >= 0 && r.compareBoundaryPoints(range.END_TO_START, range) <= 0,
intersects: function (range, r) { try { return r.compareBoundaryPoints(range.START_TO_END, range) >= 0 && r.compareBoundaryPoints(range.END_TO_START, range) <= 0; } catch (e) { dactyl.reportError(e, true); return false; } },
intersects: function (range, r) r.compareBoundaryPoints(range.START_TO_END, range) >= 0 && r.compareBoundaryPoints(range.END_TO_START, range) <= 0,
invalidate: function(start, range) { this._invalidIndexes.add(start, range);
invalidate: function(index) { var view = this._indexMap[index]; if(view) view._SCCFP_dirty = YES;
invalidate: function(start, range) { //console.log("invalidate: " + start + " " + range); this._invalidIndexes.add(start, range); },
invalidate: function(index) { var invalidIndexes = this._invalidIndexes; invalidIndexes.add(index);
invalidate: function(start, range) { this._invalidIndexes.add(start, range);
invalidate: function(index) { var invalidIndexes = this._invalidIndexes; invalidIndexes.add(index); },
if(!invalidIndexes) { this._invalidIndexes = SC.IndexSet.create(); } else if (invalidIndexes === YES) { return invalidIndexes; }
invalidate: function(index) { var invalidIndexes = this._invalidIndexes; if(!invalidIndexes) { this._invalidIndexes = SC.IndexSet.create(); } else if (invalidIndexes === YES) { return invalidIndexes; } invalidIndexes.add(index); },
var that = this, func = f ; f = function() { return func.apply(that, args.slice(1)); } ;
var func = f ; f = function() { return func.apply(this, args.slice(1)); } ;
invokeLater: function(target, interval) { if (interval === undefined) interval = 1 ; var f = this; if (arguments.length > 2) { var args = SC.$A(arguments).slice(2,arguments.length); args.unshift(target); // f = f.bind.apply(f, args) ; var that = this, func = f ; f = function() { return func.apply(that, args.slice(1)); } ; } return SC.Timer.schedule({ target: target, action: f, interval: interval }); }
bodyInputStreams.push(PAGESPEED.Utils.getResourceInputStream(url));
var inputStream; try { inputStream = PAGESPEED.Utils.getResourceInputStream(url); } catch (e) { PS_LOG('Could not get input stream for "' + url + '": ' + PAGESPEED.Utils.formatException(e)); continue; } bodyInputStreams.push(inputStream);
invokeNativeLibraryRules: function () { var pagespeedRules = PAGESPEED.Utils.CCIN( '@code.google.com/p/page-speed/PageSpeedRules;1', 'IPageSpeedRules'); if (!pagespeedRules) { return []; } var onloadTime = FirebugContext.window.onloadTime; var resources = []; var bodyInputStreams = []; var resourceURLs = PAGESPEED.Utils.getResources(); for (var i = 0; i < resourceURLs.length; ++i) { var url = resourceURLs[i]; var res_body_index = bodyInputStreams.length; bodyInputStreams.push(PAGESPEED.Utils.getResourceInputStream(url)); var requestTime = PAGESPEED.Utils.getResourceProperty(url, 'requestTime'); var javaScriptCalls = PAGESPEED.Utils.getResourceProperty(url, 'javaScriptCalls'); resources.push({ // TODO Add req_method and req_body. req_headers: translateHeaders(PAGESPEED.Utils.getRequestHeaders(url)), res_status: PAGESPEED.Utils.getResponseCode(url), res_headers: translateHeaders(PAGESPEED.Utils.getResponseHeaders(url)), res_body: res_body_index, req_url: url, req_cookies: PAGESPEED.Utils.getCookieString(url) || '', req_lazy_loaded: (requestTime > onloadTime), js_calls: javaScriptCalls, }); } var inputJSON = JSON.stringify(resources); var resultJSON = pagespeedRules.computeAndFormatResults( inputJSON, PAGESPEED.Utils.newNsIArray(bodyInputStreams), PAGESPEED.Utils.getDocumentUrl(), PAGESPEED.Utils.getElementsByType('doc')[0], filterChoice(), PAGESPEED.Utils.getOutputDir('page-speed')); var results = JSON.parse(resultJSON); return buildLintRuleResults(results); }
js_calls: javaScriptCalls,
js_calls: javaScriptCalls
invokeNativeLibraryRules: function () { var pagespeedRules = PAGESPEED.Utils.CCIN( '@code.google.com/p/page-speed/PageSpeedRules;1', 'IPageSpeedRules'); if (!pagespeedRules) { return []; } var onloadTime = FirebugContext.window.onloadTime; var resources = []; var bodyInputStreams = []; var resourceURLs = PAGESPEED.Utils.getResources(); for (var i = 0; i < resourceURLs.length; ++i) { var url = resourceURLs[i]; var res_body_index = bodyInputStreams.length; bodyInputStreams.push(PAGESPEED.Utils.getResourceInputStream(url)); var requestTime = PAGESPEED.Utils.getResourceProperty(url, 'requestTime'); var javaScriptCalls = PAGESPEED.Utils.getResourceProperty(url, 'javaScriptCalls'); resources.push({ // TODO Add req_method and req_body. req_headers: translateHeaders(PAGESPEED.Utils.getRequestHeaders(url)), res_status: PAGESPEED.Utils.getResponseCode(url), res_headers: translateHeaders(PAGESPEED.Utils.getResponseHeaders(url)), res_body: res_body_index, req_url: url, req_cookies: PAGESPEED.Utils.getCookieString(url) || '', req_lazy_loaded: (requestTime > onloadTime), js_calls: javaScriptCalls, }); } var inputJSON = JSON.stringify(resources); var resultJSON = pagespeedRules.computeAndFormatResults( inputJSON, PAGESPEED.Utils.newNsIArray(bodyInputStreams), PAGESPEED.Utils.getDocumentUrl(), PAGESPEED.Utils.getElementsByType('doc')[0], filterChoice(), PAGESPEED.Utils.getOutputDir('page-speed')); var results = JSON.parse(resultJSON); return buildLintRuleResults(results); }
(isFilteringOutContent() ? null : PAGESPEED.Utils.getElementsByType('doc')[0]),
PAGESPEED.Utils.getElementsByType('doc')[0],
invokeNativeLibraryRules: function () { var pagespeedRules = PAGESPEED.Utils.CCIN( '@code.google.com/p/page-speed/PageSpeedRules;1', 'IPageSpeedRules'); if (!pagespeedRules) { return []; } var onloadTime = FirebugContext.window.onloadTime; var resources = []; var bodyInputStreams = []; var resourceURLs = PAGESPEED.Utils.getResources(); for (var i = 0; i < resourceURLs.length; ++i) { var url = resourceURLs[i]; var res_body_index = bodyInputStreams.length; bodyInputStreams.push(PAGESPEED.Utils.getResourceInputStream(url)); var requestTime = PAGESPEED.Utils.getResourceProperty(url, 'requestTime'); resources.push({ // TODO Add req_method, req_protocol, req_body, and res_protocol. req_headers: translateHeaders(PAGESPEED.Utils.getRequestHeaders(url)), res_status: PAGESPEED.Utils.getResponseCode(url), res_headers: translateHeaders(PAGESPEED.Utils.getResponseHeaders(url)), res_body: res_body_index, req_url: url, req_cookies: PAGESPEED.Utils.getCookieString(url) || '', req_lazy_loaded: (requestTime > onloadTime) }); } var inputJSON = JSON.stringify(resources); var resultJSON = pagespeedRules.computeAndFormatResults( inputJSON, PAGESPEED.Utils.newNsIArray(bodyInputStreams), PAGESPEED.Utils.getDocumentUrl(), // Temporary measure: don't supply the DOM if the filter is excluding // content. We'll undo this once the library DOM rules have a better way // of handling filters. (isFilteringOutContent() ? null : PAGESPEED.Utils.getElementsByType('doc')[0]), filterChoice(), PAGESPEED.Utils.getOutputDir('library-output')); var results = JSON.parse(resultJSON); return buildLintRuleResults(results); }
req_cookies: PAGESPEED.Utils.getCookieString(url),
req_cookies: PAGESPEED.Utils.getCookieString(url) || '',
invokeNativeLibraryRules: function () { var pagespeedRules = PAGESPEED.Utils.CCIN( '@code.google.com/p/page-speed/PageSpeedRules;1', 'IPageSpeedRules'); if (!pagespeedRules) { return []; } var onloadTime = FirebugContext.window.onloadTime; var resources = []; var bodyInputStreams = []; var resourceURLs = PAGESPEED.Utils.getResources(); for (var i = 0; i < resourceURLs.length; ++i) { var url = resourceURLs[i]; var res_body_index = bodyInputStreams.length; bodyInputStreams.push(PAGESPEED.Utils.getResourceInputStream(url)); var requestTime = PAGESPEED.Utils.getResourceProperty(url, 'requestTime'); resources.push({ // TODO Add req_method, req_protocol, req_body, and res_protocol. req_headers: translateHeaders(PAGESPEED.Utils.getRequestHeaders(url)), res_status: PAGESPEED.Utils.getResponseCode(url), res_headers: translateHeaders(PAGESPEED.Utils.getResponseHeaders(url)), res_body: res_body_index, req_url: url, req_cookies: PAGESPEED.Utils.getCookieString(url), req_lazy_loaded: (requestTime > onloadTime) }); } var inputJSON = JSON.stringify(resources); var resultJSON = pagespeedRules.computeAndFormatResults( inputJSON, PAGESPEED.Utils.newNsIArray(bodyInputStreams), PAGESPEED.Utils.getElementsByType('doc')[0], filterChoice(), PAGESPEED.Utils.getOutputDir('library-output')); var results = JSON.parse(resultJSON); return buildLintRuleResults(results); }
c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Fa(this,a,false),"not",a)},filter:function(a){return this.pushStack(Fa(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i=
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Fa(this,a,false),"not",a)},filter:function(a){return this.pushStack(Fa(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i=
M);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&oa()}}},isFunction:function(a){return ca.call(a)==="[object Function]"},isArray:function(a){return ca.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ca.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!da.call(a,"constructor")&&!da.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||da.call(a,b)},
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
M);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&oa()}}},isFunction:function(a){return ca.call(a)==="[object Function]"},isArray:function(a){return ca.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ca.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!da.call(a,"constructor")&&!da.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||da.call(a,b)},
if (activity.JsEventFetcher.endsWith_(url, '.jsm') && url.indexOf('/modules/' != -1)) { return true; } if (activity.JsEventFetcher.endsWith_(url, '.js') && url.indexOf('/components/') != -1) { return true;
if (activity.JsEventFetcher.endsWith_(url, '.jsm') || activity.JsEventFetcher.endsWith_(url, '.js')) { if (url.indexOf('/modules/' != -1) || url.indexOf('/components/') != -1) { return true; }
activity.JsEventFetcher.isBrowserUrl_ = function(url) { if (activity.JsEventFetcher.startsWith_(url, 'chrome:')) { return true; } if (activity.JsEventFetcher.startsWith_(url, 'file:')) { if (activity.JsEventFetcher.endsWith_(url, '.jsm') && url.indexOf('/modules/' != -1)) { return true; } if (activity.JsEventFetcher.endsWith_(url, '.js') && url.indexOf('/components/') != -1) { return true; } } if (activity.JsEventFetcher.endsWith_(url, '.cpp')) { return true; } if (url == 'XStringBundle') { return true; } return false;};
return this._input.length == 0;
return this._input.length == 0 && this._keyword.length == 0;
isEmpty: function () { return this._input.length == 0; },
this.throwIfDisposed_();
activity.TimelineView.BarChart_.prototype.isEmpty = function() { this.throwIfDisposed_(); return this.lastEventEndTime_ <= this.startTime_;};
return !this.get('isValue') || !this.get('isVisible') || (!this.get("isEditing") && this.get("isValueEmpty") && this.get('_childrenAreEmpty')); }.property('isValueEmpty', 'isVisible', 'isEditing', '_childrenAreEmpty').cacheable(),
return !this.get('isValue') || !this.get('isVisible') || ((!this.get('isEditingAffectsIsEmpty') || !this.get('isEditing')) && this.get('isValueEmpty') && this.get('_SCCE_childrenAreEmpty')); }.property('isValueEmpty', 'isVisible', '_SCCE_childrenAreEmpty').cacheable(),
isEmpty: function() { // if it's not visible, it counts as empty // if it's editing, it can't be empty return !this.get('isValue') || !this.get('isVisible') || (!this.get("isEditing") && this.get("isValueEmpty") && this.get('_childrenAreEmpty')); }.property('isValueEmpty', 'isVisible', 'isEditing', '_childrenAreEmpty').cacheable(),
isEmptyObject:function(a){for(var b in a)return false;return true},noop:function(){},globalEval:function(a){if(a&&Qa.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===w||c.isFunction(a);
"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
isEmptyObject:function(a){for(var b in a)return false;return true},noop:function(){},globalEval:function(a){if(a&&Qa.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===w||c.isFunction(a);
if (url && url.hostname && url.pathname)
if (url)
MyanmarConverterExtension.isEnabledForUrl = function(url) { var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService) .getBranch("extensions.myanmarconverter."); this.enabled = (prefs)? prefs.getBoolPref("enabled") : true; try { if (url && url.hostname && url.pathname) { var patternsTime = (prefs)? prefs.getIntPref("urlPatternsUpdateTime") : 0; if (patternsTime != this.urlPatternsLoadTime) { this.urlPatternsLoadTime = patternsTime; this.urlPatterns = MyanmarConverterOptions.loadUrlPatterns(); } for (var i = 0; i < this.urlPatterns.length; i++) { var hostMatch = false; var pattern = this.urlPatterns[i]; if (pattern.hostnameExact) { if (url.hostname == pattern.hostname) hostMatch = true; } else { var pos = url.hostname.indexOf(pattern.hostname); if ((pos > -1) && (pos + pattern.hostname.length == url.hostname.length)) { hostMatch = true; } } if (hostMatch && (pattern.pathnameExact && url.pathname == pattern.pathname) || (url.pathname.indexOf(pattern.pathname) == 0)) { return pattern.enableConversion; } } } } catch (e) { this._fail(e); } return this.enabled;};
(pattern.pathnameExact && url.pathname == pattern.pathname) || (url.pathname.indexOf(pattern.pathname) == 0))
((pattern.pathnameExact && url.pathname == pattern.pathname) || (url.pathname.indexOf(pattern.pathname) == 0)))
MyanmarConverterExtension.isEnabledForUrl = function(url) { var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService) .getBranch("extensions.myanmarconverter."); this.enabled = (prefs)? prefs.getBoolPref("enabled") : true; try { if (url && url.hostname && url.pathname) { var patternsTime = (prefs)? prefs.getIntPref("urlPatternsUpdateTime") : 0; if (patternsTime != this.urlPatternsLoadTime) { this.urlPatternsLoadTime = patternsTime; this.urlPatterns = MyanmarConverterOptions.loadUrlPatterns(); } for (var i = 0; i < this.urlPatterns.length; i++) { var hostMatch = false; var pattern = this.urlPatterns[i]; if (pattern.hostnameExact) { if (url.hostname == pattern.hostname) hostMatch = true; } else { var pos = url.hostname.indexOf(pattern.hostname); if ((pos > -1) && (pos + pattern.hostname.length == url.hostname.length)) { hostMatch = true; } } if (hostMatch && (pattern.pathnameExact && url.pathname == pattern.pathname) || (url.pathname.indexOf(pattern.pathname) == 0)) { return pattern.enableConversion; } } } } catch (e) { this._fail(e); } return this.enabled;};
hostMatch = false;
hostMatch = true;
MyanmarConverterExtension.isEnabledForUrl = function(url) { var prefs = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService) .getBranch("extensions.myanmarconverter."); this.enabled = (prefs)? prefs.getBoolPref("enabled") : true; try { if (url && url.hostname && url.pathname) { var patternsTime = (prefs)? prefs.getIntPref("urlPatternsUpdateTime") : 0; if (patternsTime != this.urlPatternsLoadTime) { this.urlPatternsLoadTime = patternsTime; this.urlPatterns = MyanmarConverterOptions.loadUrlPatterns(); } for (var i = 0; i < this.urlPatterns.length; i++) { var hostMatch = false; var pattern = this.urlPatterns[i]; if (pattern.hostnameExact) { if (url.hostname == pattern.hostname) hostMatch = false; } else { var pos = url.hostname.find(pattern.hostname); if (pos > -1 && pos + pattern.hostname.length == url.hostname.length) { hostMatch = true; } } if (hostMatch && (pattern.pathnameExact && url.pathname == pattern.pathname) || (url.pathname.indexOf(pattern.pathname) == 0)) { return pattern.enableConversion; } } } } catch (e) { this._fail(e); } return this.enabled;};
if (typeof src[i] == "string") return Object.prototype.toString(targ) == "[object " + src[i] + "]";
function isinstance(targ, src) { const types = { boolean: Boolean, string: String, function: Function, number: Number } src = Array.concat(src); for (var i = 0; i < src.length; i++) { if (targ instanceof src[i]) return true; var type = types[typeof targ]; if (type && issubclass(src[i], type)) return true; } return false;}
return (invalidIndexes && invalidIndexes.isIndexSet && invalidIndexes.contains(index));
return invalidIndexes.contains(index);
isInvalid: function(index) { var invalidIndexes = this._invalidIndexes; return (invalidIndexes && invalidIndexes.isIndexSet && invalidIndexes.contains(index)); },
return channel.QueryInterface(Ci.nsIJARChannel);
return channel.URI.QueryInterface(Ci.nsIJARURI);
isJarURL: function (url) { try { let uri = util.newURI(url); let channel = services.io.newChannelFromURI(uri); channel.cancel(Cr.NS_BINDING_ABORTED); if (channel instanceof Ci.nsIJARChannel) return channel.QueryInterface(Ci.nsIJARChannel); } catch (e) {} return false; },
isJSON: function() { var str = this; if (str.blank()) return false; str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); },
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])*?\*\
isJSON: function() { var str = this; if (str.blank()) return false; str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); },
M);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&oa()}}},isFunction:function(a){return ca.call(a)==="[object Function]"},isArray:function(a){return ca.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ca.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!da.call(a,"constructor")&&!da.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||da.call(a,b)},
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype, "isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
M);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&oa()}}},isFunction:function(a){return ca.call(a)==="[object Function]"},isArray:function(a){return ca.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ca.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!da.call(a,"constructor")&&!da.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||da.call(a,b)},
d=function(){a();e.form.submit=b;e.form.submit();e.form.submit=d};e.form.submit=d}e.style.display="none";var f=new o(function(g){e.nextSibling?e.parentNode.insertBefore(g,e.nextSibling):e.parentNode.appendChild(g)},c);f.toTextArea=function(){a();e.parentNode.removeChild(f.wrapping);e.style.display="";if(e.form){e.form.submit=b;typeof e.form.removeEventListener=="function"?e.form.removeEventListener("submit",a,false):e.form.detachEvent("onsubmit",a)}};return f};o.isProbablySupported=function(){var e; return window.opera?Number(window.opera.version())>=9.52:/Apple Computers, Inc/.test(navigator.vendor)&&(e=navigator.userAgent.match(/Version\/(\d+(?:\.\d+)?)\./))?Number(e[1])>=3:document.selection&&window.ActiveXObject&&(e=navigator.userAgent.match(/MSIE (\d+(?:\.\d*)?)\b/))?Number(e[1])>=6:(e=navigator.userAgent.match(/gecko\/(\d{8})/i))?Number(e[1])>=20050901:(e=navigator.userAgent.match(/AppleWebKit\/(\d+)/))?Number(e[1])>=525:null};return o}();function method(i,p){return function(){i[p].apply(i,arguments)}}var StopIteration={toString:function(){return"StopIteration"}};function forEach(i,p){if(i.next)try{for(;;)p(i.next())}catch(k){if(k!=StopIteration)throw k;}else for(var n=0;n<i.length;n++)p(i[n])}function map(i,p){var k=[];forEach(i,function(n){k.push(p(n))});return k}function matcher(i){return function(p){return i.test(p)}}function hasClass(i,p){var k=i.className;return k&&RegExp("(^| )"+p+"($| )").test(k)}
g=function(){c();a.form.submit=e;a.form.submit();a.form.submit=g};a.form.submit=g}a.style.display="none";var d=new s(function(f){a.nextSibling?a.parentNode.insertBefore(f,a.nextSibling):a.parentNode.appendChild(f)},b);d.toTextArea=function(){c();a.parentNode.removeChild(d.wrapping);a.style.display="";if(a.form){a.form.submit=e;typeof a.form.removeEventListener=="function"?a.form.removeEventListener("submit",c,false):a.form.detachEvent("onsubmit",c)}};return d};s.isProbablySupported=function(){var a; return window.opera?Number(window.opera.version())>=9.52:/Apple Computer, Inc/.test(navigator.vendor)&&(a=navigator.userAgent.match(/Version\/(\d+(?:\.\d+)?)\./))?Number(a[1])>=3:document.selection&&window.ActiveXObject&&(a=navigator.userAgent.match(/MSIE (\d+(?:\.\d*)?)\b/))?Number(a[1])>=6:(a=navigator.userAgent.match(/gecko\/(\d{8})/i))?Number(a[1])>=20050901:(a=navigator.userAgent.match(/AppleWebKit\/(\d+)/))?Number(a[1])>=525:null};return s}();
d=function(){a();e.form.submit=b;e.form.submit();e.form.submit=d};e.form.submit=d}e.style.display="none";var f=new o(function(g){e.nextSibling?e.parentNode.insertBefore(g,e.nextSibling):e.parentNode.appendChild(g)},c);f.toTextArea=function(){a();e.parentNode.removeChild(f.wrapping);e.style.display="";if(e.form){e.form.submit=b;typeof e.form.removeEventListener=="function"?e.form.removeEventListener("submit",a,false):e.form.detachEvent("onsubmit",a)}};return f};o.isProbablySupported=function(){var e;return window.opera?Number(window.opera.version())>=9.52:/Apple Computers, Inc/.test(navigator.vendor)&&(e=navigator.userAgent.match(/Version\/(\d+(?:\.\d+)?)\./))?Number(e[1])>=3:document.selection&&window.ActiveXObject&&(e=navigator.userAgent.match(/MSIE (\d+(?:\.\d*)?)\b/))?Number(e[1])>=6:(e=navigator.userAgent.match(/gecko\/(\d{8})/i))?Number(e[1])>=20050901:(e=navigator.userAgent.match(/AppleWebKit\/(\d+)/))?Number(e[1])>=525:null};return o}();function method(i,p){return function(){i[p].apply(i,arguments)}}var StopIteration={toString:function(){return"StopIteration"}};function forEach(i,p){if(i.next)try{for(;;)p(i.next())}catch(k){if(k!=StopIteration)throw k;}else for(var n=0;n<i.length;n++)p(i[n])}function map(i,p){var k=[];forEach(i,function(n){k.push(p(n))});return k}function matcher(i){return function(p){return i.test(p)}}function hasClass(i,p){var k=i.className;return k&&RegExp("(^| )"+p+"($| )").test(k)}
return ((a.port == b.port ) && (a.host == b.host) && (a.protocol = b.protocol));
return ((a.port == b.port ) && (a.host == b.host) && (a.protocol == b.protocol));
exports.isSameDomain = function(urlA, urlB) { var a = exports.parse(urlA); var b = exports.parse(urlB); return ((a.port == b.port ) && (a.host == b.host) && (a.protocol = b.protocol));};
isSameOrigin: function() { var m = this.url.match(/^\s*https?:\/\/[^\/]*/); return !m || (m[0] == '#{protocol} protocol: location.protocol, domain: document.domain, port: location.port ? ':' + location.port : '' })); },
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])*?\*\
isSameOrigin: function() { var m = this.url.match(/^\s*https?:\/\/[^\/]*/); return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({ protocol: location.protocol, domain: document.domain, port: location.port ? ':' + location.port : '' })); },
this.throwIfDisposed_();
activity.TimelineView.Row_.prototype.isVisible = function() { this.throwIfDisposed_(); return this.row_.getAttribute('collapsed') != 'true';};
if (this.overflowIndex) this.overflowIndex = Infinity; this.invokeLast(function() { this.elementWidths = null; this.measureForOverflow(); }, this);
itemContentDidChange: function() { this.set('renderLikeFirstTime', YES); this.notifyPropertyChange('displayItems'); },
this.notifyPropertyChange('_displayItems');
this.notifyPropertyChange('displayItems');
itemContentDidChange: function() { // Force regeneration of buttons this._renderAsFirstTime = YES; this.notifyPropertyChange('_displayItems'); },
this._items.removeObserver('[]',this,this.itemContentDidChange) ;
for (var i = this._items.length - 1; i >= 0; i--){ if (this._items[i] instanceof SC.Object) { var item = this._items[i]; if (this.get('itemTitleKey')) item.removeObserver(this.get('itemTitleKey'), this, this.itemContentDidChange); if (this.get('itemWidthKey')) item.removeObserver(this.get('itemWidthKey'), this, this.itemContentDidChange); } }
itemsDidChange: function() { if (this._items) { this._items.removeObserver('[]',this,this.itemContentDidChange) ; } this._items = this.get('items') ; if (this._items) { this._items.addObserver('[]', this, this.itemContentDidChange) ; } this.itemContentDidChange(); }.observes('items'),
this._items.addObserver('[]', this, this.itemContentDidChange) ;
var value = this.get('value'); var isArray = SC.isArray(value); var newValue = []; var itemType, itemValue; for (i = this._items.length - 1; i >= 0; i--) { item = this._items[i]; itemType = SC.typeOf(item); if (itemType !== SC.T_STRING) { if (!(item instanceof SC.Object)) item = this._items[i] = SC.Object.create(item); if (this.get('itemTitleKey')) item.addObserver(this.get('itemTitleKey'), this, this.itemContentDidChange); if (this.get('itemWidthKey')) item.addObserver(this.get('itemWidthKey'), this, this.itemContentDidChange); itemValue = item.get(this.get('itemValueKey')); } else { itemValue = item; } if (!SC.empty(value)) { if (isArray ? value.indexOf(itemValue) >= 0 : value === itemValue) { newValue[newValue.length] = itemValue; } } } if (newValue.length === 0) newValue = null; this.set('value', newValue);
itemsDidChange: function() { if (this._items) { this._items.removeObserver('[]',this,this.itemContentDidChange) ; } this._items = this.get('items') ; if (this._items) { this._items.addObserver('[]', this, this.itemContentDidChange) ; } this.itemContentDidChange(); }.observes('items'),
}.observes('items'),
}.observes('*items.[]'),
itemsDidChange: function() { if (this._items) { this._items.removeObserver('[]',this,this.itemContentDidChange) ; } this._items = this.get('items') ; if (this._items) { this._items.addObserver('[]', this, this.itemContentDidChange) ; } this.itemContentDidChange(); }.observes('items'),
let saved = ["range", "lastRange", "lastString"].map(this.closure(function (s) [s, this[s]]));
let saved = ["range", "lastRange", "lastString"].map(function (s) [s, this[s]], this);
iter: function (word) { let saved = ["range", "lastRange", "lastString"].map(this.closure(function (s) [s, this[s]])); try { this.range = this.ranges[0]; this.lastRange = null; this.lastString = word; var res; while ((res = this.search(null, this.reverse, true))) yield res; } finally { saved.forEach(function ([k, v]) this[k] = v, this); } },
completion.file(context, true);
completion.file(context, args, true);
javascript: function () { JavaScript.setCompleter([File, File.expandPath], [function (context, obj, args) { context.quote[2] = ""; completion.file(context, true); }]); },
JavaScript.setCompleter(this.get, [function () ([c.name, c.description] for (c in commands))]);
JavaScript.setCompleter([this.get, this.removeUserCommand], [function () ([c.name, c.description] for (c in commands))]);
javascript: function () { JavaScript.setCompleter(this.get, [function () ([c.name, c.description] for (c in commands))]); },
if(delm===null) delm = ',';
if(!delm) delm = ',';
function joinText(txts, delm, trimTag){ if(!txts) return ''; if(delm===null) delm = ','; txts = [].concat(txts).filter(operator.truth).flatten(); return (trimTag? txts.map(methodcaller('trimTag')) : txts).join(delm);}
this.joy2StrobeState++; if (this.joy2StrobeState == 24) { this.joy2StrobeState = 0; }
joy2Read: function() { var ret; this.joy2StrobeState++; if (this.joy2StrobeState == 24) { this.joy2StrobeState = 0; } switch (this.joy2StrobeState) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: ret = this.nes.keyboard.state2[this.joy2StrobeState]; break; case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: ret = 0; break; case 18: ret = 1; break; default: ret = 0; } return ret; },
case 18:
case 19:
joy2Read: function() { var ret; this.joy2StrobeState++; if (this.joy2StrobeState == 24) { this.joy2StrobeState = 0; } switch (this.joy2StrobeState) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: ret = this.nes.keyboard.state2[this.joy2StrobeState]; break; case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: ret = 0; break; case 18: ret = 1; break; default: ret = 0; } return ret; },
resolutionUsec, activityProfiler, callbackWrapper) {
resolutionUsec, aggregateBrowserJS, activityProfiler, callbackWrapper) {
activity.JsEventFetcher = function(timelineModel, resolutionUsec, activityProfiler, callbackWrapper) { goog.Disposable.call(this); this.timelineModel_ = timelineModel; this.resolutionUsec_ = resolutionUsec; this.activityProfiler_ = activityProfiler; /** * @type {Function} */ var boundUpdateTimelineModel = goog.partial( callbackWrapper, goog.bind(this.updateTimelineModel_, this)); /** * The callback we pass into the IActivityProfiler instance. * @type {IActivityProfilerTimelineEventCallback} */ this.processTimelineEventsCallback_ = { processTimelineEvents: boundUpdateTimelineModel };};
this.aggregateBrowserJS_ = aggregateBrowserJS;
activity.JsEventFetcher = function(timelineModel, resolutionUsec, activityProfiler, callbackWrapper) { goog.Disposable.call(this); this.timelineModel_ = timelineModel; this.resolutionUsec_ = resolutionUsec; this.activityProfiler_ = activityProfiler; /** * @type {Function} */ var boundUpdateTimelineModel = goog.partial( callbackWrapper, goog.bind(this.updateTimelineModel_, this)); /** * The callback we pass into the IActivityProfiler instance. * @type {IActivityProfilerTimelineEventCallback} */ this.processTimelineEventsCallback_ = { processTimelineEvents: boundUpdateTimelineModel };};
lineContent:function(e){return this.editor.lineContent(e)},setLineContent:function(e,c){this.editor.setLineContent(e,c)},removeLine:function(e){this.editor.removeLine(e)},insertIntoLine:function(e,c,a){this.editor.insertIntoLine(e,c,a)},selectLines:function(e,c,a,b){this.win.focus();this.editor.selectLines(e,c,a,b)},nthLine:function(e){for(var c=this.firstLine();e>1&&c!==false;e--)c=this.nextLine(c);return c},lineNumber:function(e){for(var c=0;e!==false;){c++;e=this.prevLine(e)}return c},jumpToLine:function(e){if(typeof e== "number")e=this.nthLine(e);this.selectLines(e,0);this.win.focus()},currentLine:function(){return this.lineNumber(this.cursorLine())},cursorLine:function(){return this.cursorPosition().line},cursorCoords:function(e){return this.editor.cursorCoords(e)},activateLineNumbers:function(){function e(){if(f.offsetWidth!=0){for(var y=f;y.parentNode;y=y.parentNode);if(!l.parentNode||y!=document||!g.Editor){try{w()}catch(A){}clearInterval(x)}else if(l.offsetWidth!=u){u=l.offsetWidth;f.parentNode.style.paddingLeft=
lineContent:function(a){return this.editor.lineContent(a)},setLineContent:function(a,b){this.editor.setLineContent(a,b)},removeLine:function(a){this.editor.removeLine(a)},insertIntoLine:function(a,b,c){this.editor.insertIntoLine(a,b,c)},selectLines:function(a,b,c,e){this.win.focus();this.editor.selectLines(a,b,c,e)},nthLine:function(a){for(var b=this.firstLine();a>1&&b!==false;a--)b=this.nextLine(b);return b},lineNumber:function(a){for(var b=0;a!==false;){b++;a=this.prevLine(a)}return b},jumpToLine:function(a){if(typeof a== "number")a=this.nthLine(a);this.selectLines(a,0);this.win.focus()},currentLine:function(){return this.lineNumber(this.cursorLine())},cursorLine:function(){return this.cursorPosition().line},cursorCoords:function(a){return this.editor.cursorCoords(a)},activateLineNumbers:function(){function a(){if(d.offsetWidth!=0){for(var h=d;h.parentNode;h=h.parentNode);if(!i.parentNode||h!=document||!f.Editor){try{x()}catch(o){}clearInterval(I)}else if(i.offsetWidth!=y){y=i.offsetWidth;d.parentNode.style.paddingLeft=
lineContent:function(e){return this.editor.lineContent(e)},setLineContent:function(e,c){this.editor.setLineContent(e,c)},removeLine:function(e){this.editor.removeLine(e)},insertIntoLine:function(e,c,a){this.editor.insertIntoLine(e,c,a)},selectLines:function(e,c,a,b){this.win.focus();this.editor.selectLines(e,c,a,b)},nthLine:function(e){for(var c=this.firstLine();e>1&&c!==false;e--)c=this.nextLine(c);return c},lineNumber:function(e){for(var c=0;e!==false;){c++;e=this.prevLine(e)}return c},jumpToLine:function(e){if(typeof e=="number")e=this.nthLine(e);this.selectLines(e,0);this.win.focus()},currentLine:function(){return this.lineNumber(this.cursorLine())},cursorLine:function(){return this.cursorPosition().line},cursorCoords:function(e){return this.editor.cursorCoords(e)},activateLineNumbers:function(){function e(){if(f.offsetWidth!=0){for(var y=f;y.parentNode;y=y.parentNode);if(!l.parentNode||y!=document||!g.Editor){try{w()}catch(A){}clearInterval(x)}else if(l.offsetWidth!=u){u=l.offsetWidth;f.parentNode.style.paddingLeft=
K: function(x) { return x }
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])*?\*\
K: function(x) { return x }
e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget);
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget);
if( isArray ? (value.indexOf(item[1])>=0) : (item[1]===value)){
if( isArray ? (value.indexOf(item.value)>=0) : (item.value===value)){
keyDown: function(evt) { // handle tab key var i, item, items, len, value, isArray; if (evt.which === 9) { var view = evt.shiftKey ? this.get('previousValidKeyView') : this.get('nextValidKeyView'); if(view) view.becomeFirstResponder(); else evt.allowDefault(); return YES ; // handled } if (!this.get('allowsMultipleSelection') && !this.get('allowsEmptySelection')){ items = this.get('displayItems'); len = items.length; value = this.get('value'); isArray = SC.isArray(value); if (evt.which === 39 || evt.which === 40) { for(i=0; i< len-1; i++){ item=items[i]; if( isArray ? (value.indexOf(item[1])>=0) : (item[1]===value)){ this.triggerItemAtIndex(i+1); } } return YES ; // handled } else if (evt.which === 37 || evt.which === 38) { for(i=1; i< len; i++){ item=items[i]; if( isArray ? (value.indexOf(item[1])>=0) : (item[1]===value)){ this.triggerItemAtIndex(i-1); } } return YES ; // handled } } return YES; },
var i, item, items, len, value, isArray;
var i, item, items, overflowItems, len, value, isArray;
keyDown: function(evt) { // handle tab key var i, item, items, len, value, isArray; if (evt.which === 9 || evt.keyCode === 9) { var view = evt.shiftKey ? this.get('previousValidKeyView') : this.get('nextValidKeyView'); if(view) view.becomeFirstResponder(); else evt.allowDefault(); return YES ; // handled } if (!this.get('allowsMultipleSelection') && !this.get('allowsEmptySelection')){ items = this.get('displayItems'); len = items.length; value = this.get('value'); isArray = SC.isArray(value); if (evt.which === 39 || evt.which === 40) { for(i=0; i< len-1; i++){ item=items[i]; if( isArray ? (value.indexOf(item.value)>=0) : (item.value===value)){ this.triggerItemAtIndex(i+1); } } return YES ; // handled } else if (evt.which === 37 || evt.which === 38) { for(i=1; i< len; i++){ item=items[i]; if( isArray ? (value.indexOf(item.value)>=0) : (item.value===value)){ this.triggerItemAtIndex(i-1); } } return YES ; // handled } } return YES; },
items = this.get('displayItems');
items = this.get('displayItems').slice(0); if (this.overflowItems.length > 0) items.removeAt(items.length - 1).pushObjects(this.overflowItems);
keyDown: function(evt) { // handle tab key var i, item, items, len, value, isArray; if (evt.which === 9 || evt.keyCode === 9) { var view = evt.shiftKey ? this.get('previousValidKeyView') : this.get('nextValidKeyView'); if(view) view.becomeFirstResponder(); else evt.allowDefault(); return YES ; // handled } if (!this.get('allowsMultipleSelection') && !this.get('allowsEmptySelection')){ items = this.get('displayItems'); len = items.length; value = this.get('value'); isArray = SC.isArray(value); if (evt.which === 39 || evt.which === 40) { for(i=0; i< len-1; i++){ item=items[i]; if( isArray ? (value.indexOf(item.value)>=0) : (item.value===value)){ this.triggerItemAtIndex(i+1); } } return YES ; // handled } else if (evt.which === 37 || evt.which === 38) { for(i=1; i< len; i++){ item=items[i]; if( isArray ? (value.indexOf(item.value)>=0) : (item.value===value)){ this.triggerItemAtIndex(i-1); } } return YES ; // handled } } return YES; },
var val = this.get('value'); if(val && evt.which>47 && (val.length >= this.get('maxLength'))) {
var val = this.get('value'), code = evt.which; if(val && ((!SC.browser.mozilla && code>47) || (SC.browser.mozilla && ((code>32 && code<43) || code>47) && !(evt.keyCode>36 && evt.keyCode<41))) && (val.length >= this.get('maxLength'))) {
keyDown: function(evt) { var value, view; // Handle return and escape. this way they can be passed on to the // responder chain. // If the event is triggered by a return while entering IME input, // don't got through this path. var which = evt.which, maxLengthReached = false; if ((which === 13 && !evt.isIMEInput) && !this.get('isTextArea')) { // If we're not continuously updating 'value' as we type, force an update // if return is pressed. if (!this.get('continuouslyUpdatesValue')) { value = this.getValidatedValueFromFieldValue(NO); if ((SC.typeOf(value) !== SC.T_ERROR) || this.get('allowsErrorAsValue')) { this.setIfChanged('value', value); this.applyValueToField(value); // sync text in the text field } } return NO; } if (which === 27) return NO ; // handle tab key if ((which === 9 || evt.keyCode===9) && this.get('defaultTabbingEnabled')) { var view = evt.shiftKey ? this.get('previousValidKeyView') : this.get('nextValidKeyView'); if (view) view.becomeFirstResponder(); else evt.allowDefault(); return YES ; // handled } // maxlength for textareas if(!SC.browser.safari && this.get('isTextArea')){ var val = this.get('value'); if(val && evt.which>47 && (val.length >= this.get('maxLength'))) { maxLengthReached = true; } } // validate keyDown... // do not validate on touch, as it prevents return. if ((this.performValidateKeyDown(evt) || SC.platform.touch) && !maxLengthReached) { this._isKeyDown = YES ; evt.allowDefault(); } else { evt.stop(); } if (this.get('applyImmediately')) { // We need this invokeLater as we need to get the value of the field // once the event has been processed. I tried with invokeLast , but // I guess the field doesn't repaint until js execution finishes and // therefore the field value doesn't update if we don't give it a break. this.invokeLater(this.fieldValueDidChange,1); // notify change } return YES; },
i?f:1;return{fragment:f,cacheable:e}}function T(a){for(var b=0,d,f;(d=a[b])!=null;b++)if(!c.noData[d.nodeName.toLowerCase()]&&(f=d[H]))delete c.cache[f]}function L(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ma=A.jQuery,Na=A.$,s=A.document,U,Oa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Pa=/^.[^:#\[\.,]*$/,Qa=/\S/,
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
i?f:1;return{fragment:f,cacheable:e}}function T(a){for(var b=0,d,f;(d=a[b])!=null;b++)if(!c.noData[d.nodeName.toLowerCase()]&&(f=d[H]))delete c.cache[f]}function L(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ma=A.jQuery,Na=A.$,s=A.document,U,Oa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Pa=/^.[^:#\[\.,]*$/,Qa=/\S/,
last: function() { return this[this.length - 1]; },
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="
last: function() { return this[this.length - 1]; },
if (currentLayout.rotate) { if (!currentLayout.rotateX) {
if (!SC.none(currentLayout.rotate)) { if (SC.none(currentLayout.rotateX)) {
layoutDidChange: function() { // Did our layout change in a way that could cause us to be resized? If // not, then there's no need to invalidate the frames of our child views. var previousLayout = this._previousLayout, currentLayout = this.get('layout'), didResize = YES, previousWidth, previousHeight, currentWidth, currentHeight; // Handle old style rotation if (currentLayout.rotate) { if (!currentLayout.rotateX) { currentLayout.rotateX = currentLayout.rotate; console.warn('Please set rotateX instead of rotate'); } } if (currentLayout.rotateX) { currentLayout.rotate = currentLayout.rotateX; } else { delete currentLayout.rotate; } if (currentLayout.animateRotate) { if (!currentLayout.animateRotateX) { currentLayout.animateRotateX = currentLayout.animateRotate; console.warn('Please set animateRotateX instead of animateRotate'); } } if (currentLayout.animateRotateX) { currentLayout.animateRotate = currentLayout.animateRotateX; } else { delete currentLayout.animateRotate; } if (previousLayout && previousLayout !== currentLayout) { // This is a simple check to see whether we think the view may have // resized. We could look for a number of cases, but for now we'll // handle only one simple case: if the width and height are both // specified, and they have not changed. previousWidth = previousLayout.width; if (previousWidth !== undefined) { currentWidth = currentLayout.width; if (previousWidth === currentWidth) { previousHeight = previousLayout.height; if (previousLayout !== undefined) { currentHeight = currentLayout.height; if (previousHeight === currentHeight) didResize = NO; } } } } this.beginPropertyChanges() ; this.notifyPropertyChange('layoutStyle') ; if (didResize) { this.viewDidResize(); } else { // Even if we didn't resize, our frame might have changed. // viewDidResize() handles this in the other case. this._viewFrameDidChange(); } this.endPropertyChanges() ; // notify layoutView... var layoutView = this.get('layoutView'); if (layoutView) { layoutView.set('childViewsNeedLayout', YES); layoutView.layoutDidChangeFor(this) ; if (layoutView.get('childViewsNeedLayout')) { layoutView.invokeOnce(layoutView.layoutChildViewsIfNeeded); } } return this ; },
if (currentLayout.rotateX) {
if (!SC.none(currentLayout.rotateX)) {
layoutDidChange: function() { // Did our layout change in a way that could cause us to be resized? If // not, then there's no need to invalidate the frames of our child views. var previousLayout = this._previousLayout, currentLayout = this.get('layout'), didResize = YES, previousWidth, previousHeight, currentWidth, currentHeight; // Handle old style rotation if (currentLayout.rotate) { if (!currentLayout.rotateX) { currentLayout.rotateX = currentLayout.rotate; console.warn('Please set rotateX instead of rotate'); } } if (currentLayout.rotateX) { currentLayout.rotate = currentLayout.rotateX; } else { delete currentLayout.rotate; } if (currentLayout.animateRotate) { if (!currentLayout.animateRotateX) { currentLayout.animateRotateX = currentLayout.animateRotate; console.warn('Please set animateRotateX instead of animateRotate'); } } if (currentLayout.animateRotateX) { currentLayout.animateRotate = currentLayout.animateRotateX; } else { delete currentLayout.animateRotate; } if (previousLayout && previousLayout !== currentLayout) { // This is a simple check to see whether we think the view may have // resized. We could look for a number of cases, but for now we'll // handle only one simple case: if the width and height are both // specified, and they have not changed. previousWidth = previousLayout.width; if (previousWidth !== undefined) { currentWidth = currentLayout.width; if (previousWidth === currentWidth) { previousHeight = previousLayout.height; if (previousLayout !== undefined) { currentHeight = currentLayout.height; if (previousHeight === currentHeight) didResize = NO; } } } } this.beginPropertyChanges() ; this.notifyPropertyChange('layoutStyle') ; if (didResize) { this.viewDidResize(); } else { // Even if we didn't resize, our frame might have changed. // viewDidResize() handles this in the other case. this._viewFrameDidChange(); } this.endPropertyChanges() ; // notify layoutView... var layoutView = this.get('layoutView'); if (layoutView) { layoutView.set('childViewsNeedLayout', YES); layoutView.layoutDidChangeFor(this) ; if (layoutView.get('childViewsNeedLayout')) { layoutView.invokeOnce(layoutView.layoutChildViewsIfNeeded); } } return this ; },
if (currentLayout.animateRotate) { if (!currentLayout.animateRotateX) {
if (!SC.none(currentLayout.animateRotate)) { if (SC.none(currentLayout.animateRotateX)) {
layoutDidChange: function() { // Did our layout change in a way that could cause us to be resized? If // not, then there's no need to invalidate the frames of our child views. var previousLayout = this._previousLayout, currentLayout = this.get('layout'), didResize = YES, previousWidth, previousHeight, currentWidth, currentHeight; // Handle old style rotation if (currentLayout.rotate) { if (!currentLayout.rotateX) { currentLayout.rotateX = currentLayout.rotate; console.warn('Please set rotateX instead of rotate'); } } if (currentLayout.rotateX) { currentLayout.rotate = currentLayout.rotateX; } else { delete currentLayout.rotate; } if (currentLayout.animateRotate) { if (!currentLayout.animateRotateX) { currentLayout.animateRotateX = currentLayout.animateRotate; console.warn('Please set animateRotateX instead of animateRotate'); } } if (currentLayout.animateRotateX) { currentLayout.animateRotate = currentLayout.animateRotateX; } else { delete currentLayout.animateRotate; } if (previousLayout && previousLayout !== currentLayout) { // This is a simple check to see whether we think the view may have // resized. We could look for a number of cases, but for now we'll // handle only one simple case: if the width and height are both // specified, and they have not changed. previousWidth = previousLayout.width; if (previousWidth !== undefined) { currentWidth = currentLayout.width; if (previousWidth === currentWidth) { previousHeight = previousLayout.height; if (previousLayout !== undefined) { currentHeight = currentLayout.height; if (previousHeight === currentHeight) didResize = NO; } } } } this.beginPropertyChanges() ; this.notifyPropertyChange('layoutStyle') ; if (didResize) { this.viewDidResize(); } else { // Even if we didn't resize, our frame might have changed. // viewDidResize() handles this in the other case. this._viewFrameDidChange(); } this.endPropertyChanges() ; // notify layoutView... var layoutView = this.get('layoutView'); if (layoutView) { layoutView.set('childViewsNeedLayout', YES); layoutView.layoutDidChangeFor(this) ; if (layoutView.get('childViewsNeedLayout')) { layoutView.invokeOnce(layoutView.layoutChildViewsIfNeeded); } } return this ; },
if (currentLayout.animateRotateX) {
if (!SC.none(currentLayout.animateRotateX)) {
layoutDidChange: function() { // Did our layout change in a way that could cause us to be resized? If // not, then there's no need to invalidate the frames of our child views. var previousLayout = this._previousLayout, currentLayout = this.get('layout'), didResize = YES, previousWidth, previousHeight, currentWidth, currentHeight; // Handle old style rotation if (currentLayout.rotate) { if (!currentLayout.rotateX) { currentLayout.rotateX = currentLayout.rotate; console.warn('Please set rotateX instead of rotate'); } } if (currentLayout.rotateX) { currentLayout.rotate = currentLayout.rotateX; } else { delete currentLayout.rotate; } if (currentLayout.animateRotate) { if (!currentLayout.animateRotateX) { currentLayout.animateRotateX = currentLayout.animateRotate; console.warn('Please set animateRotateX instead of animateRotate'); } } if (currentLayout.animateRotateX) { currentLayout.animateRotate = currentLayout.animateRotateX; } else { delete currentLayout.animateRotate; } if (previousLayout && previousLayout !== currentLayout) { // This is a simple check to see whether we think the view may have // resized. We could look for a number of cases, but for now we'll // handle only one simple case: if the width and height are both // specified, and they have not changed. previousWidth = previousLayout.width; if (previousWidth !== undefined) { currentWidth = currentLayout.width; if (previousWidth === currentWidth) { previousHeight = previousLayout.height; if (previousLayout !== undefined) { currentHeight = currentLayout.height; if (previousHeight === currentHeight) didResize = NO; } } } } this.beginPropertyChanges() ; this.notifyPropertyChange('layoutStyle') ; if (didResize) { this.viewDidResize(); } else { // Even if we didn't resize, our frame might have changed. // viewDidResize() handles this in the other case. this._viewFrameDidChange(); } this.endPropertyChanges() ; // notify layoutView... var layoutView = this.get('layoutView'); if (layoutView) { layoutView.set('childViewsNeedLayout', YES); layoutView.layoutDidChangeFor(this) ; if (layoutView.get('childViewsNeedLayout')) { layoutView.invokeOnce(layoutView.layoutChildViewsIfNeeded); } } return this ; },
this.notifyPropertyChange('hasAcceleratedLayer');
layoutDidChange: function() { // Did our layout change in a way that could cause us to be resized? If // not, then there's no need to invalidate the frames of our child views. var previousLayout = this._previousLayout, currentLayout = this.get('layout'), didResize = YES, previousWidth, previousHeight, currentWidth, currentHeight; // Handle old style rotation if (!SC.none(currentLayout.rotate)) { if (SC.none(currentLayout.rotateX)) { currentLayout.rotateX = currentLayout.rotate; console.warn('Please set rotateX instead of rotate'); } } if (!SC.none(currentLayout.rotateX)) { currentLayout.rotate = currentLayout.rotateX; } else { delete currentLayout.rotate; } if (!SC.none(currentLayout.animateRotate)) { if (SC.none(currentLayout.animateRotateX)) { currentLayout.animateRotateX = currentLayout.animateRotate; console.warn('Please set animateRotateX instead of animateRotate'); } } if (!SC.none(currentLayout.animateRotateX)) { currentLayout.animateRotate = currentLayout.animateRotateX; } else { delete currentLayout.animateRotate; } if (previousLayout && previousLayout !== currentLayout) { // This is a simple check to see whether we think the view may have // resized. We could look for a number of cases, but for now we'll // handle only one simple case: if the width and height are both // specified, and they have not changed. previousWidth = previousLayout.width; if (previousWidth !== undefined) { currentWidth = currentLayout.width; if (previousWidth === currentWidth) { previousHeight = previousLayout.height; if (previousLayout !== undefined) { currentHeight = currentLayout.height; if (previousHeight === currentHeight) didResize = NO; } } } } this.beginPropertyChanges() ; this.notifyPropertyChange('layoutStyle') ; if (didResize) { this.viewDidResize(); } else { // Even if we didn't resize, our frame might have changed. // viewDidResize() handles this in the other case. this._viewFrameDidChange(); } this.endPropertyChanges() ; // notify layoutView... var layoutView = this.get('layoutView'); if (layoutView) { layoutView.set('childViewsNeedLayout', YES); layoutView.layoutDidChangeFor(this) ; if (layoutView.get('childViewsNeedLayout')) { layoutView.invokeOnce(layoutView.layoutChildViewsIfNeeded); } } this._previousLayout = currentLayout; return this ; },
this._previousLayout = currentLayout;
layoutDidChange: function() { // Did our layout change in a way that could cause us to be resized? If // not, then there's no need to invalidate the frames of our child views. var previousLayout = this._previousLayout, currentLayout = this.get('layout'), didResize = YES, previousWidth, previousHeight, currentWidth, currentHeight; // Handle old style rotation if (!SC.none(currentLayout.rotate)) { if (SC.none(currentLayout.rotateX)) { currentLayout.rotateX = currentLayout.rotate; console.warn('Please set rotateX instead of rotate'); } } if (!SC.none(currentLayout.rotateX)) { currentLayout.rotate = currentLayout.rotateX; } else { delete currentLayout.rotate; } if (!SC.none(currentLayout.animateRotate)) { if (SC.none(currentLayout.animateRotateX)) { currentLayout.animateRotateX = currentLayout.animateRotate; console.warn('Please set animateRotateX instead of animateRotate'); } } if (!SC.none(currentLayout.animateRotateX)) { currentLayout.animateRotate = currentLayout.animateRotateX; } else { delete currentLayout.animateRotate; } if (previousLayout && previousLayout !== currentLayout) { // This is a simple check to see whether we think the view may have // resized. We could look for a number of cases, but for now we'll // handle only one simple case: if the width and height are both // specified, and they have not changed. previousWidth = previousLayout.width; if (previousWidth !== undefined) { currentWidth = currentLayout.width; if (previousWidth === currentWidth) { previousHeight = previousLayout.height; if (previousLayout !== undefined) { currentHeight = currentLayout.height; if (previousHeight === currentHeight) didResize = NO; } } } } this.beginPropertyChanges() ; this.notifyPropertyChange('layoutStyle') ; if (didResize) { this.viewDidResize(); } else { // Even if we didn't resize, our frame might have changed. // viewDidResize() handles this in the other case. this._viewFrameDidChange(); } this.endPropertyChanges() ; // notify layoutView... var layoutView = this.get('layoutView'); if (layoutView) { layoutView.set('childViewsNeedLayout', YES); layoutView.layoutDidChangeFor(this) ; if (layoutView.get('childViewsNeedLayout')) { layoutView.invokeOnce(layoutView.layoutChildViewsIfNeeded); } } return this ; },
console.log('layoutDidChange');
layoutDidChange: function() { // Did our layout change in a way that could cause us to be resized? If // not, then there's no need to invalidate the frames of our child views. var previousLayout = this._previousLayout, currentLayout = this.get('layout'), didResize = YES, previousWidth, previousHeight, currentWidth, currentHeight; if (previousLayout && previousLayout !== currentLayout) { // This is a simple check to see whether we think the view may have // resized. We could look for a number of cases, but for now we'll // handle only one simple case: if the width and height are both // specified, and they have not changed. previousWidth = previousLayout.width; if (previousWidth !== undefined) { currentWidth = currentLayout.width; if (previousWidth === currentWidth) { previousHeight = previousLayout.height; if (previousLayout !== undefined) { currentHeight = currentLayout.height; if (previousHeight === currentHeight) didResize = NO; } } } } this.beginPropertyChanges() ; this.notifyPropertyChange('layoutStyle') ; if (didResize) { this.viewDidResize(); } else { // Even if we didn't resize, our frame might have changed. // viewDidResize() handles this in the other case. this._viewFrameDidChange(); } this.endPropertyChanges() ; // notify layoutView... var layoutView = this.get('layoutView'); if (layoutView) { layoutView.set('childViewsNeedLayout', YES); layoutView.layoutDidChangeFor(this) ; if (layoutView.get('childViewsNeedLayout')) { layoutView.invokeOnce(layoutView.layoutChildViewsIfNeeded); } } return this ; },
if (c.get("useAbsoluteLayout")) return sc_super();
layoutDidChangeFor: function(c) { // if it is absolute layout (no flowing) then we need to let SC.View handle it if (c.get("useAbsoluteLayout")) return sc_super(); // if we have not flowed yet, ignore as well if (!this._scfl_itemLayouts) return sc_super(); // now, check if anything has changed var l = this._scfl_itemLayouts[SC.guidFor(c)]; if (!l) return sc_super(); if (c.layout.width === l.width && c.layout.height === l.height) return sc_super(); // nothing has changed. This is where we do something this.invokeOnce("_scfl_tile"); sc_super(); },
var l = this._scfl_itemLayouts[SC.guidFor(c)];
var l = this._scfl_itemLayouts[SC.guidFor(c)], cl = c.get('layout'), f = c.get('frame');
layoutDidChangeFor: function(c) { // if it is absolute layout (no flowing) then we need to let SC.View handle it if (c.get("useAbsoluteLayout")) return sc_super(); // if we have not flowed yet, ignore as well if (!this._scfl_itemLayouts) return sc_super(); // now, check if anything has changed var l = this._scfl_itemLayouts[SC.guidFor(c)]; if (!l) return sc_super(); if (c.layout.width === l.width && c.layout.height === l.height) return sc_super(); // nothing has changed. This is where we do something this.invokeOnce("_scfl_tile"); sc_super(); },
if (c.layout.width === l.width && c.layout.height === l.height) return sc_super();
var same = YES; if (l.left && l.left !== cl.left) same = NO; else if (l.top && l.top !== cl.top) same = NO; else if (!c.get('fillWidth') && l.width && l.width !== cl.width) same = NO; else if (!l.width && !c.get('fillWidth') && f.width !== c._scfl_lastFrame.width) same = NO; else if (!c.get('fillHeight') && l.height && l.height !== cl.height) same = NO; else if (!l.height && !c.get('fillHeight') && f.height !== c._scfl_lastFrame.height) same = NO; if (same) { return sc_super(); }
layoutDidChangeFor: function(c) { // if it is absolute layout (no flowing) then we need to let SC.View handle it if (c.get("useAbsoluteLayout")) return sc_super(); // if we have not flowed yet, ignore as well if (!this._scfl_itemLayouts) return sc_super(); // now, check if anything has changed var l = this._scfl_itemLayouts[SC.guidFor(c)]; if (!l) return sc_super(); if (c.layout.width === l.width && c.layout.height === l.height) return sc_super(); // nothing has changed. This is where we do something this.invokeOnce("_scfl_tile"); sc_super(); },
if (c.layout.width !== l.width || c.layout.height !== l.height) return sc_super();
if (c.layout.width === l.width && c.layout.height === l.height) return sc_super(); this.invokeOnce("_scfl_tile"); sc_super();
layoutDidChangeFor: function(c) { if (c.get("useAbsoluteLayout")) return sc_super(); if (!this._scfl_itemLayouts) return sc_super(); var l = this._scfl_itemLayouts[SC.guidFor(c)]; if (!l) return sc_super(); if (c.layout.width !== l.width || c.layout.height !== l.height) return sc_super(); },
view: this,
layoutStyle: function() { var props = { view: this, layout: this.get('layout'), turbo: this.get('hasAcceleratedLayer'), static: this.get('useStaticLayout') } var calculator = this._layoutStyleCalculator ? this._layoutStyleCalculator.set(props) : SC.View.LayoutStyleCalculator.create(props); return calculator.calculate(); }.property().cacheable(),
var calculator = this._layoutStyleCalculator ? this._layoutStyleCalculator.set(props) : SC.View.LayoutStyleCalculator.create(props);
var calculator = this.get('layoutStyleCalculator'); calculator.set(props);
layoutStyle: function() { var props = { view: this, layout: this.get('layout'), turbo: this.get('hasAcceleratedLayer'), static: this.get('useStaticLayout') } var calculator = this._layoutStyleCalculator ? this._layoutStyleCalculator.set(props) : SC.View.LayoutStyleCalculator.create(props); return calculator.calculate(); }.property().cacheable(),
if(controlSize === SC.SMALL_CONTROL_SIZE) val = -14 ; if(controlSize === SC.REGULAR_CONTROL_SIZE) val = -16 ;
if(controlSize === SC.SMALL_CONTROL_SIZE) val = -12; if(controlSize === SC.REGULAR_CONTROL_SIZE) val = -15;
leftAlign: function() { var val = 0, controlSize = this.get('controlSize') ; // what. the. heck? // no, I don't want to shift the menu to the left. Yet. if(controlSize === SC.SMALL_CONTROL_SIZE) val = -14 ; if(controlSize === SC.REGULAR_CONTROL_SIZE) val = -16 ; return val; }.property('controlSize'),
var index = $(this).attr('name');
var index = $(this).attr('id');
leftToRight: function() { var self = this; $(this.left_select_id).find('option:selected').each(function(){ var index = $(this).attr('name'); self.leftSelectionsArray[index] = null; self.rightSelectionsArray[index] = this; $(this).remove(); }); this.refreshOptions(this.right_select_id,this.rightSelectionsArray); },
return completer.call(this, context, obj, args);
return completer.call(obj, context, obj, args);
func.liberatorCompleter = function (context, func, obj, args) { let completer = completers[args.length - 1]; if (!completer) return []; return completer.call(this, context, obj, args); };
isBR(a);)a=a.nextSibling;if(!a)return false;return Math.floor((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)/a.offsetHeight)},selectLines:function(a,b,d,f){this.checkLine(a);a={node:a,offset:b};b=null;if(f!==undefined){this.checkLine(d);b={node:d,offset:f}}select.setCursorPos(this.container,a,b);select.scrollToCursor(this.container)},lineContent:function(a){var b=[];for(a=a?a.nextSibling:this.container.firstChild;a&&!isBR(a);a=a.nextSibling)b.push(nodeText(a)); return cleanText(b.join(""))},setLineContent:function(a,b){this.history.commit();this.replaceRange({node:a,offset:0},{node:a,offset:this.history.textAfter(a).length},b);this.addDirtyNode(a);this.scheduleHighlight()},removeLine:function(a){for(var b=a?a.nextSibling:this.container.firstChild;b;){var d=b.nextSibling;removeElement(b);if(isBR(b))break;b=d}this.addDirtyNode(a);this.scheduleHighlight()},insertIntoLine:function(a,b,d){var f=null;if(b=="end")f=o(a,this.container);else for(var g=a?a.nextSibling:
lineContent:function(a){return this.editor.lineContent(a)},setLineContent:function(a,b){this.editor.setLineContent(a,b)},removeLine:function(a){this.editor.removeLine(a)},insertIntoLine:function(a,b,c){this.editor.insertIntoLine(a,b,c)},selectLines:function(a,b,c,e){this.win.focus();this.editor.selectLines(a,b,c,e)},nthLine:function(a){for(var b=this.firstLine();a>1&&b!==false;a--)b=this.nextLine(b);return b},lineNumber:function(a){for(var b=0;a!==false;){b++;a=this.prevLine(a)}return b},jumpToLine:function(a){if(typeof a==
isBR(a);)a=a.nextSibling;if(!a)return false;return Math.floor((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)/a.offsetHeight)},selectLines:function(a,b,d,f){this.checkLine(a);a={node:a,offset:b};b=null;if(f!==undefined){this.checkLine(d);b={node:d,offset:f}}select.setCursorPos(this.container,a,b);select.scrollToCursor(this.container)},lineContent:function(a){var b=[];for(a=a?a.nextSibling:this.container.firstChild;a&&!isBR(a);a=a.nextSibling)b.push(nodeText(a));return cleanText(b.join(""))},setLineContent:function(a,b){this.history.commit();this.replaceRange({node:a,offset:0},{node:a,offset:this.history.textAfter(a).length},b);this.addDirtyNode(a);this.scheduleHighlight()},removeLine:function(a){for(var b=a?a.nextSibling:this.container.firstChild;b;){var d=b.nextSibling;removeElement(b);if(isBR(b))break;b=d}this.addDirtyNode(a);this.scheduleHighlight()},insertIntoLine:function(a,b,d){var f=null;if(b=="end")f=o(a,this.container);else for(var g=a?a.nextSibling:
lineContent:function(e){return this.editor.lineContent(e)},setLineContent:function(e,c){this.editor.setLineContent(e,c)},removeLine:function(e){this.editor.removeLine(e)},insertIntoLine:function(e,c,a){this.editor.insertIntoLine(e,c,a)},selectLines:function(e,c,a,b){this.win.focus();this.editor.selectLines(e,c,a,b)},nthLine:function(e){for(var c=this.firstLine();e>1&&c!==false;e--)c=this.nextLine(c);return c},lineNumber:function(e){for(var c=0;e!==false;){c++;e=this.prevLine(e)}return c},jumpToLine:function(e){if(typeof e==
lineContent:function(a){return this.editor.lineContent(a)},setLineContent:function(a,b){this.editor.setLineContent(a,b)},removeLine:function(a){this.editor.removeLine(a)},insertIntoLine:function(a,b,c){this.editor.insertIntoLine(a,b,c)},selectLines:function(a,b,c,e){this.win.focus();this.editor.selectLines(a,b,c,e)},nthLine:function(a){for(var b=this.firstLine();a>1&&b!==false;a--)b=this.nextLine(b);return b},lineNumber:function(a){for(var b=0;a!==false;){b++;a=this.prevLine(a)}return b},jumpToLine:function(a){if(typeof a==
lineContent:function(e){return this.editor.lineContent(e)},setLineContent:function(e,c){this.editor.setLineContent(e,c)},removeLine:function(e){this.editor.removeLine(e)},insertIntoLine:function(e,c,a){this.editor.insertIntoLine(e,c,a)},selectLines:function(e,c,a,b){this.win.focus();this.editor.selectLines(e,c,a,b)},nthLine:function(e){for(var c=this.firstLine();e>1&&c!==false;e--)c=this.nextLine(c);return c},lineNumber:function(e){for(var c=0;e!==false;){c++;e=this.prevLine(e)}return c},jumpToLine:function(e){if(typeof e==
callLater(0.1, Form.resize);
callLater(0.5, Form.resize);
link: function(){ var ps = this.ps; var title = this.savers['item'] = this.title = new Title(ps); var link = this.savers['itemUrl'] = this.link = new Link(ps, true); var tags = this.savers['tags'] = this.tags = new Tags(ps); var desc = this.savers['description'] = this.desc = new Desc(ps); this.toggles = [title, link]; tags.focus(); // resize timingはそれぞれ異なる場合がある(photoなどは画像がloadされたとき) callLater(0.1, Form.resize); },
return maybeDeferred(Extractors.Link.extract(TBRL.createContext()))
maybeDeferred(Extractors.Link.extract(TBRL.createContext()))
link : function(ev){ return maybeDeferred(Extractors.Link.extract(TBRL.createContext())) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }); },
maybeDeferred(Extractors.check(ctx).filter(function(m){
var ext = Extractors.check(ctx).filter(function(m){
link : function(ev){ var ctx = TBRL.createContext(document.documentElement); maybeDeferred(Extractors.check(ctx).filter(function(m){ return /^Link/.test(m.name); })[0].extract(ctx)) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }); },
})[0].extract(ctx)) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); });
})[0]; return TBRL.share(ctx, ext, true);
link : function(ev){ var ctx = TBRL.createContext(document.documentElement); maybeDeferred(Extractors.check(ctx).filter(function(m){ return /^Link/.test(m.name); })[0].extract(ctx)) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }); },
list = template.tabular(["Mode", "Abbreviation", "Expanded text"], ["padding-left: 1ex",,"width: 100%"], list);
list = template.tabular(["Mode", "Abbreviation", "Expanded text"], ["padding-left: 1ex"], list);
list: function (modes, lhs) { let list = this.merged.filter(function (abbr) (abbr.inModes(modes) && abbr.lhs.indexOf(lhs) == 0)); if (!list.length) liberator.echomsg("No abbreviations found"); else if (list.length == 1) { let head = list[0]; liberator.echo(head.modeChar + " " + head.lhs + " " + head.rhs, commandline.FORCE_SINGLELINE); // 2 spaces, 3 spaces } else { list = list.map(function (abbr) [abbr.modeChar, abbr.lhs, abbr.rhs]); list = template.tabular(["Mode", "Abbreviation", "Expanded text"], ["padding-left: 1ex",,"width: 100%"], list); commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE); } },
["", "text-align: right", "text-align: right", "color: green; width: 100%"],
["", "text-align: right", "text-align: right", "color: green;"],
list: function (filter) { let marks = this.all; liberator.assert(marks.length > 0, "No marks set"); if (filter.length > 0) { marks = marks.filter(function (mark) filter.indexOf(mark[0]) >= 0); liberator.assert(marks.length > 0, "E283: No marks matching " + filter.quote()); } let list = template.tabular( ["Mark", "Line", "Column", "File"], ["", "text-align: right", "text-align: right", "color: green; width: 100%"], ([mark[0], Math.round(mark[1].position.x * 100) + "%", Math.round(mark[1].position.y * 100) + "%", mark[1].location] for ([, mark] in Iterator(marks)))); commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE); },