rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
if (!item[2]) return this;
if (!item.isEnabled) return this;
triggerItemAtIndex: function(idx) { var items = this.get('displayItems'), item = items.objectAt(idx), sel, value, val, empty, mult; if (!item[2]) return this; // nothing to do! empty = this.get('allowsEmptySelection'); mult = this.get('allowsMultipleSelection'); // get new value... bail if not enabled. Also save original for later. sel = item[1]; value = val = this.get('value') ; if (!SC.isArray(value)) value = [value]; // force to array // if we do not allow multiple selection, either replace the current // selection or deselect it if (!mult) { // if we allow empty selection and the current value is the same as // the selected value, then deselect it. if (empty && (value.get('length')===1) && (value.objectAt(0)===sel)){ value = []; // otherwise, simply replace the value. } else value = [sel] ; // if we do allow multiple selection, then add or remove item to the // array. } else { if (value.indexOf(sel) >= 0) { if (value.get('length')>1 || (value.objectAt(0)!==sel) || empty) { value = value.without(sel); } } else value = value.concat([sel]) ; } // normalize back to non-array form switch(value.get('length')) { case 0: value = null; break; case 1: value = value.objectAt(0); break; default: break; } // also, trigger target if needed. var actionKey = this.get('itemActionKey'), targetKey = this.get('itemTargetKey'), action, target = null, resp = this.getPath('pane.rootResponder'); if (actionKey && (item = this.get('items').objectAt(item[6]))) { // get the source item from the item array. use the index stored... action = item.get ? item.get(actionKey) : item[actionKey]; if (targetKey) { target = item.get ? item.get(targetKey) : item[targetKey]; } if (resp) resp.sendAction(action, target, this, this.get('pane')); } // Only set value if there is no action and a value is defined. if(!action && val !== undefined) { this.set('value', value); } // if an action/target is defined on self use that also action =this.get('action'); if (action && resp) { resp.sendAction(action, this.get('target'), this, this.get('pane')); } },
sel = item[1];
sel = item.value;
triggerItemAtIndex: function(idx) { var items = this.get('displayItems'), item = items.objectAt(idx), sel, value, val, empty, mult; if (!item[2]) return this; // nothing to do! empty = this.get('allowsEmptySelection'); mult = this.get('allowsMultipleSelection'); // get new value... bail if not enabled. Also save original for later. sel = item[1]; value = val = this.get('value') ; if (!SC.isArray(value)) value = [value]; // force to array // if we do not allow multiple selection, either replace the current // selection or deselect it if (!mult) { // if we allow empty selection and the current value is the same as // the selected value, then deselect it. if (empty && (value.get('length')===1) && (value.objectAt(0)===sel)){ value = []; // otherwise, simply replace the value. } else value = [sel] ; // if we do allow multiple selection, then add or remove item to the // array. } else { if (value.indexOf(sel) >= 0) { if (value.get('length')>1 || (value.objectAt(0)!==sel) || empty) { value = value.without(sel); } } else value = value.concat([sel]) ; } // normalize back to non-array form switch(value.get('length')) { case 0: value = null; break; case 1: value = value.objectAt(0); break; default: break; } // also, trigger target if needed. var actionKey = this.get('itemActionKey'), targetKey = this.get('itemTargetKey'), action, target = null, resp = this.getPath('pane.rootResponder'); if (actionKey && (item = this.get('items').objectAt(item[6]))) { // get the source item from the item array. use the index stored... action = item.get ? item.get(actionKey) : item[actionKey]; if (targetKey) { target = item.get ? item.get(targetKey) : item[targetKey]; } if (resp) resp.sendAction(action, target, this, this.get('pane')); } // Only set value if there is no action and a value is defined. if(!action && val !== undefined) { this.set('value', value); } // if an action/target is defined on self use that also action =this.get('action'); if (action && resp) { resp.sendAction(action, this.get('target'), this, this.get('pane')); } },
if (actionKey && (item = this.get('items').objectAt(item[6]))) {
if (actionKey && (item = this.get('items').objectAt(item.index))) {
triggerItemAtIndex: function(idx) { var items = this.get('displayItems'), item = items.objectAt(idx), sel, value, val, empty, mult; if (!item[2]) return this; // nothing to do! empty = this.get('allowsEmptySelection'); mult = this.get('allowsMultipleSelection'); // get new value... bail if not enabled. Also save original for later. sel = item[1]; value = val = this.get('value') ; if (!SC.isArray(value)) value = [value]; // force to array // if we do not allow multiple selection, either replace the current // selection or deselect it if (!mult) { // if we allow empty selection and the current value is the same as // the selected value, then deselect it. if (empty && (value.get('length')===1) && (value.objectAt(0)===sel)){ value = []; // otherwise, simply replace the value. } else value = [sel] ; // if we do allow multiple selection, then add or remove item to the // array. } else { if (value.indexOf(sel) >= 0) { if (value.get('length')>1 || (value.objectAt(0)!==sel) || empty) { value = value.without(sel); } } else value = value.concat([sel]) ; } // normalize back to non-array form switch(value.get('length')) { case 0: value = null; break; case 1: value = value.objectAt(0); break; default: break; } // also, trigger target if needed. var actionKey = this.get('itemActionKey'), targetKey = this.get('itemTargetKey'), action, target = null, resp = this.getPath('pane.rootResponder'); if (actionKey && (item = this.get('items').objectAt(item[6]))) { // get the source item from the item array. use the index stored... action = item.get ? item.get(actionKey) : item[actionKey]; if (targetKey) { target = item.get ? item.get(targetKey) : item[targetKey]; } if (resp) resp.sendAction(action, target, this, this.get('pane')); } // Only set value if there is no action and a value is defined. if(!action && val !== undefined) { this.set('value', value); } // if an action/target is defined on self use that also action =this.get('action'); if (action && resp) { resp.sendAction(action, this.get('target'), this, this.get('pane')); } },
item = items.objectAt(idx), sel, value, val, empty, mult;
overflowItems = this.get('overflowItems'), item, sel, value, val, empty, mult; if (overflowItems.length > 0 && idx >= items.length - 1) item = overflowItems.objectAt(idx - (items.length - 1)); else item = items.objectAt(idx);
triggerItemAtIndex: function(idx) { var items = this.get('displayItems'), item = items.objectAt(idx), sel, value, val, empty, mult; if (!item.isEnabled) return this; // nothing to do! empty = this.get('allowsEmptySelection'); mult = this.get('allowsMultipleSelection'); // get new value... bail if not enabled. Also save original for later. sel = item.value; value = val = this.get('value') ; if (!SC.isArray(value)) value = [value]; // force to array // if we do not allow multiple selection, either replace the current // selection or deselect it if (!mult) { // if we allow empty selection and the current value is the same as // the selected value, then deselect it. if (empty && (value.get('length')===1) && (value.objectAt(0)===sel)){ value = []; // otherwise, simply replace the value. } else value = [sel] ; // if we do allow multiple selection, then add or remove item to the // array. } else { if (value.indexOf(sel) >= 0) { if (value.get('length')>1 || (value.objectAt(0)!==sel) || empty) { value = value.without(sel); } } else value = value.concat([sel]) ; } // normalize back to non-array form switch(value.get('length')) { case 0: value = null; break; case 1: value = value.objectAt(0); break; default: break; } // also, trigger target if needed. var actionKey = this.get('itemActionKey'), targetKey = this.get('itemTargetKey'), action, target = null, resp = this.getPath('pane.rootResponder'); if (actionKey && (item = this.get('items').objectAt(item.index))) { // get the source item from the item array. use the index stored... action = item.get ? item.get(actionKey) : item[actionKey]; if (targetKey) { target = item.get ? item.get(targetKey) : item[targetKey]; } if (resp) resp.sendAction(action, target, this, this.get('pane')); } // Only set value if there is no action and a value is defined. if(!action && val !== undefined) { this.set('value', value); } // if an action/target is defined on self use that also action =this.get('action'); if (action && resp) { resp.sendAction(action, this.get('target'), this, this.get('pane')); } },
if (!SC.isArray(value)) value = [value];
if (SC.empty(value)) value = []; else if (!SC.isArray(value)) value = [value];
triggerItemAtIndex: function(idx) { var items = this.get('displayItems'), item = items.objectAt(idx), sel, value, val, empty, mult; if (!item.isEnabled) return this; // nothing to do! empty = this.get('allowsEmptySelection'); mult = this.get('allowsMultipleSelection'); // get new value... bail if not enabled. Also save original for later. sel = item.value; value = val = this.get('value') ; if (!SC.isArray(value)) value = [value]; // force to array // if we do not allow multiple selection, either replace the current // selection or deselect it if (!mult) { // if we allow empty selection and the current value is the same as // the selected value, then deselect it. if (empty && (value.get('length')===1) && (value.objectAt(0)===sel)){ value = []; // otherwise, simply replace the value. } else value = [sel] ; // if we do allow multiple selection, then add or remove item to the // array. } else { if (value.indexOf(sel) >= 0) { if (value.get('length')>1 || (value.objectAt(0)!==sel) || empty) { value = value.without(sel); } } else value = value.concat([sel]) ; } // normalize back to non-array form switch(value.get('length')) { case 0: value = null; break; case 1: value = value.objectAt(0); break; default: break; } // also, trigger target if needed. var actionKey = this.get('itemActionKey'), targetKey = this.get('itemTargetKey'), action, target = null, resp = this.getPath('pane.rootResponder'); if (actionKey && (item = this.get('items').objectAt(item.index))) { // get the source item from the item array. use the index stored... action = item.get ? item.get(actionKey) : item[actionKey]; if (targetKey) { target = item.get ? item.get(targetKey) : item[targetKey]; } if (resp) resp.sendAction(action, target, this, this.get('pane')); } // Only set value if there is no action and a value is defined. if(!action && val !== undefined) { this.set('value', value); } // if an action/target is defined on self use that also action =this.get('action'); if (action && resp) { resp.sendAction(action, this.get('target'), this, this.get('pane')); } },
return;
return null;
trimReblogInfo : function(form){ if(!TBRL.Config['entry']['trim_reblog_info']) return; function trimQuote(entry){ entry = entry.replace(/<p><\/p>/g, '').replace(/<p><a[^<]+<\/a>:<\/p>/g, ''); entry = (function(all, contents){ return contents.replace(/<blockquote>(([\n\r]|.)+)<\/blockquote>/gm, arguments.callee); })(null, entry); return entry.trim(); } switch(form['post[type]']){ case 'link': form['post[three]'] = trimQuote(form['post[three]']); break; case 'regular': case 'photo': case 'video': form['post[two]'] = trimQuote(form['post[two]']); break; case 'quote': form['post[two]'] = form['post[two]'].replace(/ \(via <a.*?<\/a>\)/g, '').trim(); break; } return form; },
truncate: function(length, truncation) { length = length || 30; truncation = Object.isUndefined(truncation) ? '...' : truncation; return this.length > length ? this.slice(0, length - truncation.length) + truncation : String(this); },
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])*?\*\
truncate: function(length, truncation) { length = length || 30; truncation = Object.isUndefined(truncation) ? '...' : truncation; return this.length > length ? this.slice(0, length - truncation.length) + truncation : String(this); },
"string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&& !/compatible/.test(a))b={browser:"mozilla",version:/rv:([\w.]+)/};b.version=(b.version&&b.version.exec(a)||[0,"0"])[1];return b},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(V)c.inArray=function(a,b){return V.call(b,a)};U=c(s);if(s.addEventListener)M=function(){s.removeEventListener("DOMContentLoaded",M,false);c.ready()};else if(s.attachEvent)M=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",
!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
"string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&&!/compatible/.test(a))b={browser:"mozilla",version:/rv:([\w.]+)/};b.version=(b.version&&b.version.exec(a)||[0,"0"])[1];return b},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(V)c.inArray=function(a,b){return V.call(b,a)};U=c(s);if(s.addEventListener)M=function(){s.removeEventListener("DOMContentLoaded",M,false);c.ready()};else if(s.attachEvent)M=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",
} else { alert('Please select bibliographic data to upload!'); return;
var ucsUpload = function(strUploadHandler, strData) { var confUpload = false; if (strData.strip()) { confUpload = confirm('Are you sure to upload selected data to Union Catalog Server?'); } if (!confUpload) { return; } var ajaxJSON = new Ajax.Request(strUploadHandler, { method: 'post', parameters: strData, onSuccess: function(ajaxTransport) { // get AJAX response text var respText = ajaxTransport.responseText.strip(); // debugging purpose only // alert(respText); // evaluate json var jsonObj = respText.evalJSON(); // alert(jsonObj.status + ': ' + jsonObj.message); alert(jsonObj.message); }, onFailure: function() { alert('UCS Upload error!'); } });}
f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,
underscore: function() { return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); },
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])*?\*\
underscore: function() { return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); },
UndoHistory.prototype={scheduleCommit:function(){var i=this;this.parent.clearTimeout(this.commitTimeout);this.commitTimeout=this.parent.setTimeout(function(){i.tryCommit()},this.commitDelay)},touch:function(i){this.setTouched(i);this.scheduleCommit()},undo:function(){this.commit();if(this.history.length){var i=this.history.pop();this.redoHistory.push(this.updateTo(i,"applyChain"));this.notifyEnvironment();return this.chainNode(i)}},redo:function(){this.commit();if(this.redoHistory.length){var i=this.redoHistory.pop();
b,c){this.editor.replaceChars(a,b,c)},getSearchCursor:function(a,b,c){return this.editor.getSearchCursor(a,b,c)},undo:function(){this.editor.history.undo()},redo:function(){this.editor.history.redo()},historySize:function(){return this.editor.history.historySize()},clearHistory:function(){this.editor.history.clear()},grabKeys:function(a,b){this.editor.grabKeys(a,b)},ungrabKeys:function(){this.editor.ungrabKeys()},setParser:function(a,b){this.editor.setParser(a,b)},setSpellcheck:function(a){this.win.document.body.spellcheck=
UndoHistory.prototype={scheduleCommit:function(){var i=this;this.parent.clearTimeout(this.commitTimeout);this.commitTimeout=this.parent.setTimeout(function(){i.tryCommit()},this.commitDelay)},touch:function(i){this.setTouched(i);this.scheduleCommit()},undo:function(){this.commit();if(this.history.length){var i=this.history.pop();this.redoHistory.push(this.updateTo(i,"applyChain"));this.notifyEnvironment();return this.chainNode(i)}},redo:function(){this.commit();if(this.redoHistory.length){var i=this.redoHistory.pop();
undoClipping: function(element) { element = $(element); if (!element._overflow) return element; element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; element._overflow = null; 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])*?\*\
undoClipping: function(element) { element = $(element); if (!element._overflow) return element; element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; element._overflow = null; return element; },
undoPositioned: function(element) { element = $(element); if (element._madePositioned) { element._madePositioned = undefined; element.style.position = element.style.top = element.style.left = element.style.bottom = element.style.right = ''; } 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])*?\*\
undoPositioned: function(element) { element = $(element); if (element._madePositioned) { element._madePositioned = undefined; element.style.position = element.style.top = element.style.left = element.style.bottom = element.style.right = ''; } return element; },
unescapeHTML: function() { return this.stripTags().replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>'); }
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])*?\*\
unescapeHTML: function() { return this.stripTags().replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>'); }
unfilterJSON: function(filter) { return this.sub(filter || Prototype.JSONFilter, '#{1}'); },
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
unfilterJSON: function(filter) { return this.sub(filter || Prototype.JSONFilter, '#{1}'); },
function uninstall(data, reason) { dump("dactyl: bootstrap: uninstall " + reasonToString(reason) + "\n") }
function uninstall(data, reason) { dump("dactyl: bootstrap: uninstall " + reasonToString(reason) + "\n"); }
function uninstall(data, reason) { dump("dactyl: bootstrap: uninstall " + reasonToString(reason) + "\n") }
!TBRL.config['post']['keyconfig'] && document.removeEventListener('unload', TBRL.unload, false); document.removeEventListener('keydown', TBRL.handler, false);
document.removeEventListener('unload', TBRL.unload, false); !TBRL.config['post']['keyconfig'] && document.removeEventListener('keydown', TBRL.keyhandler, false);
unload : function(){ !TBRL.config['post']['keyconfig'] && document.removeEventListener('unload', TBRL.unload, false); document.removeEventListener('keydown', TBRL.handler, false); document.removeEventListener('mousemove', TBRL.mousehandler, false); window.removeEventListener('Taberareloo.link', TBRL.link, false); window.removeEventListener('Taberareloo.quote', TBRL.quote, false); window.removeEventListener('Taberareloo.general', TBRL.general, false); TBRL.field_shown && TBRL.field.removeEventListener('click', TBRL.field_clicked, false); TBRL.userscripts.forEach(function(script){ script.unload(); }); },
document.removeEventListener('mousedown', TBRL.clickhandler, false);
unload : function(){ document.removeEventListener('unload', TBRL.unload, false); !TBRL.config['post']['keyconfig'] && document.removeEventListener('keydown', TBRL.keyhandler, false); document.removeEventListener('mousemove', TBRL.mousehandler, false); window.removeEventListener('Taberareloo.link', TBRL.link, false); window.removeEventListener('Taberareloo.quote', TBRL.quote, false); window.removeEventListener('Taberareloo.general', TBRL.general, false); TBRL.field_shown && TBRL.field.removeEventListener('click', TBRL.field_clicked, false); TBRL.userscripts.forEach(function(script){ script.unload(); }); },
if(!views) debugger;
if(!views) "no view to unmap";
unmapFromItem: function(view) { var item = view.content, views = this._viewsForItem[SC.guidFor(item)]; if(!views) debugger; views.remove(view); return view; },
item = this.get('content').objectAt(view.contentIndex), views = viewsForItem[SC.guidFor(item)];
item = view.content;
unmapView: function(view) { // TODO: fix this var viewsForItem = this._viewsForItem, item = this.get('content').objectAt(view.contentIndex), views = viewsForItem[SC.guidFor(item)]; views.remove(view); this._indexMap[view.contentIndex] = null; return view; },
views.remove(view);
if(item) { var views = viewsForItem[SC.guidFor(item)]; if(!views) debugger; views.remove(view); }
unmapView: function(view) { // TODO: fix this var viewsForItem = this._viewsForItem, item = this.get('content').objectAt(view.contentIndex), views = viewsForItem[SC.guidFor(item)]; views.remove(view); this._indexMap[view.contentIndex] = null; return view; },
c.removeObserver('isHidden', this, '_scfl_layoutPropertyDidChange');
c.removeObserver('useAbsoluteLayout', this, '_scfl_layoutPropertyDidChange');
unobserveChildLayout: function(c) { c._scfl_isBeingObserved = NO; c.removeObserver('isVisible', this, '_scfl_layoutPropertyDidChange'); c.removeObserver('isHidden', this, '_scfl_layoutPropertyDidChange'); c.removeObserver('calculatedWidth', this, '_scfl_layoutPropertyDidChange'); c.removeObserver('calculatedHeight', this, '_scfl_layoutPropertyDidChange'); },
return view;
unpool: function(view) { var pool = this.domPoolForExampleView(view.createdFromExampleView); // if we are going to steal the front of the background queue we need to fix it after we're done if(view === pool._lastRendered) { // if it's the head we need to null it, otherwise just use the next one back pool._lastRendered = (view._SCCFP_prev === view ? null : view._SCCFP_prev); } pool.remove(view); },
unregister: function(responder) { this.responders = this.responders.without(responder); },
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])*?\*\
unregister: function(responder) { this.responders = this.responders.without(responder); },
let elem = dactyl.focus;
unselectText: function (toEnd) { let elem = dactyl.focus; // A error occurs if the element has been removed when "elem.selectionStart" is executed. try { if (elem && elem.selectionEnd) if (toEnd) elem.selectionStart = elem.selectionEnd; else elem.selectionEnd = elem.selectionStart; } catch (e) {} },
if (elem && elem.selectionEnd) if (toEnd) elem.selectionStart = elem.selectionEnd; else elem.selectionEnd = elem.selectionStart;
Editor.getEditor(null).selection[toEnd ? "collapseToEnd" : "collapseToStart"]();
unselectText: function (toEnd) { let elem = dactyl.focus; // A error occurs if the element has been removed when "elem.selectionStart" is executed. try { if (elem && elem.selectionEnd) if (toEnd) elem.selectionStart = elem.selectionEnd; else elem.selectionEnd = elem.selectionStart; } catch (e) {} },
catch (e) {}
catch (e) {};
unselectText: function (toEnd) { let elem = dactyl.focus; // A error occurs if the element has been removed when "elem.selectionStart" is executed. try { if (elem && elem.selectionEnd) if (toEnd) elem.selectionStart = elem.selectionEnd; else elem.selectionEnd = elem.selectionStart; } catch (e) {} },
subs[i].splice(i--, 1);
subs.splice(i--, 1);
this.unsubscribe = function(signal, ctx, method) { var subs = this._subscribers[signal]; for (var i = 0, c; c = subs[i]; ++i) { if (c._ctx == ctx && (!method || c._method == method)) { subs[i].splice(i--, 1); } } return this; }
if (!this._subscribers || !this._subscribers[signal]) { return; }
this.unsubscribe = function(signal, ctx, method) { var subs = this._subscribers[signal]; for (var i = 0, c; c = subs[i]; ++i) { if (c._ctx == ctx && (!method || c._method == method)) { subs.splice(i--, 1); } } return this; }
FirebugContext.getPanel('html');
var unusedCssLint = function() { if (PAGESPEED.Utils.isUsingFilter()) { this.score = 'disabled'; this.warnings = ''; this.information = ['This rule is not currently able to filter results ', 'and is not included in the analysis.'].join(''); return; } if (!domUtils) { this.information = ('This rule requires the DOM Inspector extension to ' + 'be installed and enabled.'); this.warnings = ''; this.score = 'error'; return; } var totalCssSize = 0; var totalUnusedCssSize = 0; var usedWindowRuleIds = PAGESPEED.UnusedCss.getUsedCssRuleIds( FirebugContext.window); // Iterate through all stylesheets on this page. var inlineBlockNum = 1; var cssPanel = FirebugContext.getPanel('css'); var styleSheets = cssPanel.getLocationList(); if (styleSheets.length == 0) { this.score = 'n/a'; return; } var warnings = []; for (var i = 0, iLen = styleSheets.length; i < iLen; ++i) { var sheet = styleSheets[i]; if (!sheet) continue; var sheetRules = cssPanel.getStyleSheetRules(cssPanel.context, sheet); var sheetSize = PAGESPEED.UnusedCss.getStyleSheetSize(sheet); var unusedSheetRules = PAGESPEED.UnusedCss.getUnusedCssRules( sheetRules, usedWindowRuleIds); var unusedSheetSize = PAGESPEED.UnusedCss.getUnusedStyleSheetSize( sheetSize, sheetRules, unusedSheetRules); // Format the warnings for this stylesheet. var ruleWarnings = []; for (var j = 0, jLen = unusedSheetRules.length; j < jLen; ++j) { // The ruleId format is 'selector/linenum', so we split it here and // do not display the line number if it is 0 or 1. var m = selectorLineNumberRegexp.exec(unusedSheetRules[j].id); var selector = '<code>' + m[1] + '</code>'; var lineNum = (m[2] == '0' || m[2] == '1') ? '' : ' <font color=grey>line ' + m[2] + '</font>'; ruleWarnings.push(selector + lineNum); } if (ruleWarnings.length > 0) { if (PAGESPEED.UnusedCss.isInlineBlock(sheet)) { var javascriptNote = ''; if (PAGESPEED.UnusedCss.isInlineBlockJavaScriptCreated(sheet)) { javascriptNote = ' (JavaScript generated)'; } warnings.push(PAGESPEED.Utils.linkify(sheet.ownerNode.baseURI) + ' inline block #' + (inlineBlockNum++) + javascriptNote); } else { warnings.push(PAGESPEED.Utils.linkify(sheet.href)); } warnings = warnings.concat( ': ', PAGESPEED.Utils.formatBytes(unusedSheetSize), ' of ', PAGESPEED.Utils.formatBytes(sheetSize), ' is not used by the current page.', PAGESPEED.Utils.formatWarnings(ruleWarnings, true)); } totalCssSize += sheetSize; totalUnusedCssSize += unusedSheetSize; } if (totalUnusedCssSize > 0) { var totalUnusedPercent = totalUnusedCssSize / totalCssSize; // Adjust the unused percent. Smaller unused sizes adjust the percent down // by a multiplier between 0.1 and 1. Larger unused sizes (greater than 75k) // adjust the percent up by a multiplier greater than 1. A chart of the log // function: http://tinyurl.com/c4kynu var percentMultiplier = Math.log(Math.max(200, totalUnusedCssSize - 800)) / 7 - 0.6; this.score = (1 - totalUnusedPercent * percentMultiplier) * 100; if (this.score < 100) { this.warnings = [ PAGESPEED.Utils.formatPercent(totalUnusedPercent), ' of CSS (estimated ', PAGESPEED.Utils.formatBytes(totalUnusedCssSize), ' of ', PAGESPEED.Utils.formatBytes(totalCssSize), ') is not used by the current page.<br><br>' ].concat(warnings).join(''); } }};
this.throwIfDisposed_();
activity.TimelineView.BarChart_.prototype.unwindToEndTime = function(endTime) { this.throwIfDisposed_(); var amountToUnwind = this.endTime_ - endTime; if (amountToUnwind < 0) { throw new Error(['Current BarChart end time', this.endTime_, 'preceeds requested end time', endTime].join(' ')); } while (amountToUnwind > 0) { var spacer = this.bar_.lastChild; if (!spacer) { throw new Error('Ran out of spacers!'); } var duration = spacer.getAttribute('flex'); if (!duration) { throw new Error('unwindToEndTime encountered zero-width child.'); } if (duration <= amountToUnwind) { // The duration of this spacer is less than the amount to unwind, // so we can safely remove the entire spacer. this.bar_.removeChild(spacer); amountToUnwind -= duration; } else { // The spacer's duration exceeds that of the amount to unwind, // so we need to reduce the spacer's duration by the amount to // unwind. spacer.setAttribute('flex', duration - amountToUnwind); amountToUnwind = 0; } } this.endTime_ = endTime;};
var f = mappings[signature(argumentTypes)], i = 1;
var f = mappings[signature(argumentTypes)];
wrapper.unwrap = function(argumentTypes) { argumentTypes = argumentTypes || []; var f = mappings[signature(argumentTypes)], i = 1; if (typeof f == "undefined") throw new Error("Cannot find function '" + id + "' with signature " + signature(argumentTypes)); return mappings[signature(argumentTypes || [])].fn; };
up: function(element, expression, index) { element = $(element); if (arguments.length == 1) return $(element.parentNode); var ancestors = element.ancestors(); return Object.isNumber(expression) ? ancestors[expression] : Selector.findElement(ancestors, expression, index); },
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])*?\*\
up: function(element, expression, index) { element = $(element); if (arguments.length == 1) return $(element.parentNode); var ancestors = element.ancestors(); return Object.isNumber(expression) ? ancestors[expression] : Selector.findElement(ancestors, expression, index); },
context.update();
update: function(dataSource, jquery) { var theme = dataSource.get('theme'), name = SC.guidFor(this), items = dataSource.get('items'), idx, len = items.length, item; jquery.addClass(dataSource.get('layoutDirection')); if (dataSource.get('renderState').radioCount !== len) { // just regenerate if the count has changed. It would be better // to be intelligent, but that would also be rather complex // for such a rare case. var context = SC.RenderContext(jquery[0]); this.render(dataSource, context); return; } for (idx = 0; idx < len; idx++) { item = items[idx]; theme.radioRenderDelegate.update(item, jquery.find('.radio-' + idx)); } },
success: function(json,status){ console.log(json)
success: function(json,status,xhr){
update:function(request,async){ this.request = request; this.async = async; var self = this; self.element.trigger('dcmgrGUI.beforeUpdate'); $.ajax({ async: async||true, url: request.url, dataType: "json", data: request.data, success: function(json,status){ console.log(json) self.element.trigger('dcmgrGUI.contentChange',[{"data":json,"self":self}]); self.element.trigger('dcmgrGUI.afterUpdate',[{"data":json,"self":self}]); } }); },
$("#list_load_mask").unmask(); }, error: function(xhr, status, error){ $("#list_load_mask").unmask();
update:function(request,async){ this.request = request; this.async = async; var self = this; self.element.trigger('dcmgrGUI.beforeUpdate'); $.ajax({ async: async||true, url: request.url, dataType: "json", data: request.data, success: function(json,status){ console.log(json) self.element.trigger('dcmgrGUI.contentChange',[{"data":json,"self":self}]); self.element.trigger('dcmgrGUI.afterUpdate',[{"data":json,"self":self}]); } }); },
this.$().setClass(this.calculateClasses()).addClass(this.controlSize);
if (this._last_control_size != this.controlSize) this.$().setClass(this._last_control_size, NO); if (this.controlSize) this.$().setClass(this.controlSize, YES); this.$().setClass(this.calculateClasses());
update: function() { this.$().setClass(this.calculateClasses()).addClass(this.controlSize); }
if (this.contentProvider) this.contentProvider.updateContent();
update: function() { if (this.contentProvider) this.contentProvider.updateContent(); }
var panelRenderDelegate = dataSource.getPath('theme').panelRenderDelegate;
var panelRenderDelegate = dataSource.get('theme').panelRenderDelegate;
update: function(dataSource, $) { var panelRenderDelegate = dataSource.getPath('theme').panelRenderDelegate; panelRenderDelegate.update(dataSource, $); var displayProperties = dataSource.getChangedDisplayProperties(); var preferType = displayProperties.preferType; var pointerPosition = displayProperties.pointerPos; var pointerPositionY = displayProperties.pointerPosY; if (preferType == SC.PICKER_POINTER || preferType == SC.PICKER_MENU_POINTER) { var el = $.find('.sc-pointer'); el.attr('class', "sc-pointer "+pointerPosition); el.attr('style', "margin-top: "+pointerPositionY+"px"); $.addClass(pointerPosition); } }
var displayProperties = dataSource.getChangedDisplayProperties(); var preferType = displayProperties.preferType; var pointerPosition = displayProperties.pointerPos; var pointerPositionY = displayProperties.pointerPosY;
var preferType = dataSource.get('preferType'); var pointerPosition = dataSource.get('pointerPos'); var pointerPositionY = dataSource.get('pointerPosY');
update: function(dataSource, $) { var panelRenderDelegate = dataSource.getPath('theme').panelRenderDelegate; panelRenderDelegate.update(dataSource, $); var displayProperties = dataSource.getChangedDisplayProperties(); var preferType = displayProperties.preferType; var pointerPosition = displayProperties.pointerPos; var pointerPositionY = displayProperties.pointerPosY; if (preferType == SC.PICKER_POINTER || preferType == SC.PICKER_MENU_POINTER) { var el = $.find('.sc-pointer'); el.attr('class', "sc-pointer "+pointerPosition); el.attr('style', "margin-top: "+pointerPositionY+"px"); $.addClass(pointerPosition); } }
var img = this.$('img'), src = this.icon;
var img = this.$('.img'), src = this.icon;
update: function() { var img = this.$('img'), src = this.icon; if (src) { img.attr('class', "img "+src); } else { img.attr('class', "img"); } }
update: function() { }
update: function(dataSource, elem) { equals(dataSource, view.get('renderDelegateProxy'), "passes view's render delegate proxy as data source"); ok(elem.jquery, "passes a jQuery object as first parameter"); updateCallCount++; }
update: function() { // no op }
var classes = [];
var classes = {};
update: function() { var classes = []; this._controlRenderer.attr({ isEnabled: this.isEnabled, isActive: this.isActive, isSelected: this.isSelected, controlSize: this.controlSize }); this._controlRenderer.update(); classes.push((this.contentIndex % 2 === 0) ? 'even' : 'odd'); if (!this.isEnabled) classes.push('disabled'); if (this.disclosureState) classes.push('has-disclosure'); if (this.checkbox) classes.push('has-checkbox'); if (this.icon) classes.push('has-icon'); if (this.rightIcon) classes.push('has-right-icon'); if (this.count) { classes.push('has-count'); var digits = ['zero', 'one', 'two', 'three', 'four', 'five']; var valueLength = this.count.toString().length; var digitsLength = digits.length; var digit = (valueLength < digitsLength) ? digits[valueLength] : digits[digitsLength-1]; classes.push(digit + '-digit'); } /* TODO For some reason, these classes aren't applying to the element */ this.$().setClass(classes); this.updateDisclosure(); this.updateCheckbox(); this.updateIcon(); this.updateLabel(); this.updateRightIcon(); this.updateCount(); this.updateBranch(); },
classes.push((this.contentIndex % 2 === 0) ? 'even' : 'odd'); if (!this.isEnabled) classes.push('disabled'); if (this.disclosureState) classes.push('has-disclosure'); if (this.checkbox) classes.push('has-checkbox'); if (this.icon) classes.push('has-icon'); if (this.rightIcon) classes.push('has-right-icon');
classes[(this.contentIndex % 2 === 0) ? 'even' : 'odd'] = YES; if (!this.isEnabled) classes['disabled'] = YES; if (this.disclosureState) classes['has-disclosure']; if (this.checkbox) classes['has-checkbox'] = YES; if (this.icon) classes['has-icon'] = YES; if (this.rightIcon) classes['has-right-icon'] = YES;
update: function() { var classes = []; this._controlRenderer.attr({ isEnabled: this.isEnabled, isActive: this.isActive, isSelected: this.isSelected, controlSize: this.controlSize }); this._controlRenderer.update(); classes.push((this.contentIndex % 2 === 0) ? 'even' : 'odd'); if (!this.isEnabled) classes.push('disabled'); if (this.disclosureState) classes.push('has-disclosure'); if (this.checkbox) classes.push('has-checkbox'); if (this.icon) classes.push('has-icon'); if (this.rightIcon) classes.push('has-right-icon'); if (this.count) { classes.push('has-count'); var digits = ['zero', 'one', 'two', 'three', 'four', 'five']; var valueLength = this.count.toString().length; var digitsLength = digits.length; var digit = (valueLength < digitsLength) ? digits[valueLength] : digits[digitsLength-1]; classes.push(digit + '-digit'); } /* TODO For some reason, these classes aren't applying to the element */ this.$().setClass(classes); this.updateDisclosure(); this.updateCheckbox(); this.updateIcon(); this.updateLabel(); this.updateRightIcon(); this.updateCount(); this.updateBranch(); },
classes.push('has-count');
classes['has-count'] = YES;
update: function() { var classes = []; this._controlRenderer.attr({ isEnabled: this.isEnabled, isActive: this.isActive, isSelected: this.isSelected, controlSize: this.controlSize }); this._controlRenderer.update(); classes.push((this.contentIndex % 2 === 0) ? 'even' : 'odd'); if (!this.isEnabled) classes.push('disabled'); if (this.disclosureState) classes.push('has-disclosure'); if (this.checkbox) classes.push('has-checkbox'); if (this.icon) classes.push('has-icon'); if (this.rightIcon) classes.push('has-right-icon'); if (this.count) { classes.push('has-count'); var digits = ['zero', 'one', 'two', 'three', 'four', 'five']; var valueLength = this.count.toString().length; var digitsLength = digits.length; var digit = (valueLength < digitsLength) ? digits[valueLength] : digits[digitsLength-1]; classes.push(digit + '-digit'); } /* TODO For some reason, these classes aren't applying to the element */ this.$().setClass(classes); this.updateDisclosure(); this.updateCheckbox(); this.updateIcon(); this.updateLabel(); this.updateRightIcon(); this.updateCount(); this.updateBranch(); },
classes.push(digit + '-digit');
classes[digit + '-digit'] = YES;
update: function() { var classes = []; this._controlRenderer.attr({ isEnabled: this.isEnabled, isActive: this.isActive, isSelected: this.isSelected, controlSize: this.controlSize }); this._controlRenderer.update(); classes.push((this.contentIndex % 2 === 0) ? 'even' : 'odd'); if (!this.isEnabled) classes.push('disabled'); if (this.disclosureState) classes.push('has-disclosure'); if (this.checkbox) classes.push('has-checkbox'); if (this.icon) classes.push('has-icon'); if (this.rightIcon) classes.push('has-right-icon'); if (this.count) { classes.push('has-count'); var digits = ['zero', 'one', 'two', 'three', 'four', 'five']; var valueLength = this.count.toString().length; var digitsLength = digits.length; var digit = (valueLength < digitsLength) ? digits[valueLength] : digits[digitsLength-1]; classes.push(digit + '-digit'); } /* TODO For some reason, these classes aren't applying to the element */ this.$().setClass(classes); this.updateDisclosure(); this.updateCheckbox(); this.updateIcon(); this.updateLabel(); this.updateRightIcon(); this.updateCount(); this.updateBranch(); },
renderer.attr('isOverflowSegment', !!segment.isOverflowSegment);
update: function() { // this is actually performance-oriented. If we are completely changing the list of segments... // it may be faster to just re-render them all in one go. Plus it's easy. // Otherwise, we'd have to try to append or something crazy like that, which wouldn't be so good; // or who knows what. if (this._segments.length !== this.segments.length) { var layer = this.layer(); if (!layer) return; // re-render var context = SC.RenderContext(layer); this.render(context); context.update(); // and done! return; } // otherwise, just update each renderer var segments = this.segments, idx, len = segments.length, renderers = this._segments, segment, renderer; this._controlRenderer.attr({ isEnabled: this.isEnabled, isActive: this.isActive, isSelected: this.isSelected, controlSize: this.controlSize }); this._controlRenderer.update(); // loop through renderers+segments, and update them all for (idx = 0; idx < len; idx ++) { segment = segments[idx]; renderer = renderers[idx]; renderer.attr(segment); renderer.attr('layoutDirection', this.layoutDirection); renderer.attr('controlSize', this.controlSize); renderer.update(); } },
var cq = this.$(); var src = this.src, toolTip = this.toolTip || '', image = ''; if ((this.isSprite !== YES && src.indexOf('/') >= 0) || this.isSprite === NO) { cq.attr('src', src); this._last_sprite_class = NO;
var cq = this.$(), src = this.icon; if (src) { cq.attr('class', "img "+src);
update: function() { var cq = this.$(); var src = this.src, toolTip = this.toolTip || '', image = ''; if ((this.isSprite !== YES && src.indexOf('/') >= 0) || this.isSprite === NO) { cq.attr('src', src); this._last_sprite_class = NO; } else { if (this._last_sprite_class) context.setClass(this._last_sprite_class, NO); cq.attr('src', SC.BLANK_IMAGE_URL); cq.setClass(src, YES); this._last_sprite_class = src; } cq.attr('title', toolTip); cq.attr('alt', toolTip); }
if (this._last_sprite_class) context.setClass(this._last_sprite_class, NO); cq.attr('src', SC.BLANK_IMAGE_URL); cq.setClass(src, YES); this._last_sprite_class = src; } cq.attr('title', toolTip); cq.attr('alt', toolTip);
cq.attr('class', "img"); }
update: function() { var cq = this.$(); var src = this.src, toolTip = this.toolTip || '', image = ''; if ((this.isSprite !== YES && src.indexOf('/') >= 0) || this.isSprite === NO) { cq.attr('src', src); this._last_sprite_class = NO; } else { if (this._last_sprite_class) context.setClass(this._last_sprite_class, NO); cq.attr('src', SC.BLANK_IMAGE_URL); cq.setClass(src, YES); this._last_sprite_class = src; } cq.attr('title', toolTip); cq.attr('alt', toolTip); }
console.log(json)
update:function(request,async){ this.request = request; this.async = async; var self = this; self.element.trigger('dcmgrGUI.beforeUpdate'); $.ajax({ async: async||true, url: request.url, dataType: "json", data: request.data, success: function(json,status){ self.element.trigger('dcmgrGUI.contentChange',[{"data":json,"self":self}]); self.element.trigger('dcmgrGUI.afterUpdate',[{"data":json,"self":self}]); } }); },
this._titleRenderer.attr({ title: this.title, icon: this.icon, needsEllipsis: this.needsEllipsis, escapeHTML: this.escapeHTML });
update: function(cq) { this.updateClassNames(cq); cq.attr("aria-checked", this.classNames.contains('sel').toString()); }
cq.css({'text-align': this.align})
update: function(cq) { this.updateClassNames(cq); cq.addClass(this.themeName); // this is actually performance-oriented. If we are completely changing the list of segments... // it may be faster to just re-render them all in one go. Plus it's simple. // Otherwise, we'd have to try to append or something like that, // which could end up tricky, ugly, and buggy. if (this._segments.length !== this.segments.length) { var layer = cq[0]; if (!layer) return; var context = SC.RenderContext(layer); this.render(context); context.update(); return; } // otherwise, just update each renderer var segments = this.segments, idx, len = segments.length, renderers = this._segments, segment, renderer; // loop through renderers+segments, and update them all for (idx = 0; idx < len; idx ++) { segment = segments[idx]; renderer = renderers[idx]; renderer.attr(segment); renderer.attr('layoutDirection', this.layoutDirection); renderer.update(cq.find('.segment-' + idx)); } },
theme = this.oldButtonTheme; if (theme) q.addClass(theme);
update: function() { this._controlRenderer.attr({ isEnabled: this.isEnabled, isActive: this.isActive, isSelected: this.isSelected, controlSize: this.controlSize }); this._titleRenderer.attr({ title: this.title, icon: this.icon, needsEllipsis: this.needsEllipsis, escapeHTML: this.escapeHTML }); // do actual updating this._controlRenderer.update(); var classes, theme, q = this.$(); classes = this._TEMPORARY_CLASS_HASH ? this._TEMPORARY_CLASS_HASH : this._TEMPORARY_CLASS_HASH = {}; classes.def = this.isDefault; classes.cancel = this.isCancel; classes.icon = !!this.icon; q.setClass(classes); theme = this.oldButtonTheme; if (theme) q.addClass(theme); // update title this.updateContents(); },
else { htmlNode.innerHTML = ''; }
else { this._ImageTitleCached = imgTitle; htmlNode.innerHTML = ''; }
update: function() { var icon = this.icon, image = '' , title = this.title , hint = this.hint, needsTitle = (!SC.none(title) && title.length>0), imgTitle, elem, htmlNode; if(this.escapeHTML) title = SC.RenderContext.escapeHTML(title); if (icon) { var blank = SC.BLANK_IMAGE_URL; if (icon.indexOf('/') >= 0) { image = '<img src="'+icon+'" alt="" class="icon" />'; } else { image = '<img src="'+blank+'" alt="" class="'+icon+'" />'; } needsTitle = YES ; } if (hint && (!title || title === '')) { if (this.escapeHTML) hint = SC.RenderContext.escapeHTML(hint); title = "<span class='sc-hint'>" + hint + "</span>"; } imgTitle = image + title; elem = this.$(); if ( (htmlNode = elem[0])){ if(needsTitle) { if(this.needsEllipsis){ elem.addClass('ellipsis'); if(this._ImageTitleCached !== imgTitle) { this._ImageTitleCached = imgTitle; // Update the cache htmlNode.innerHTML = imgTitle; } }else{ elem.removeClass('ellipsis'); if(this._ImageTitleCached !== imgTitle) { this._ImageTitleCached = imgTitle; // Update the cache htmlNode.innerHTML = imgTitle; } } } else { htmlNode.innerHTML = ''; } } }
var names = [], n = this.calculateClassNames(); for (var i in n) { if (n[i]) names.push(i); } elem.attr("class", names.join(" "));
elem.clearClassNames().setClass(this.calculateClassNames());
update: function() { var elem = this.$(); // and to maintain compatibility, we have to blow away the class names // SC2.0: consider breaking this compatibility for SC 2.0 var names = [], n = this.calculateClassNames(); for (var i in n) { if (n[i]) names.push(i); } elem.attr("class", names.join(" ")); if (this.didChange('backgroundColor')) { elem.css('backgroundColor', this.backgroundColor); } this.resetChanges(); },
this._buttonRenderer.update(cq);
update: function(cq) { this.updateClassNames(cq); // well, if we haven't changed, why not be a bit lazy if (!this.hasChanges()) return; this.updateButtonRenderer(); //this._buttonRenderer.update(cq); // update OUR stuff if (this.didChange("width")) cq.css('width', this.width ? this.width+'px' : ''); if (this.didChange('layoutDirection')) cq.css('display', this.layoutDirection == SC.LAYOUT_HORIZONTAL ? 'inline-block' : ''); this.resetChanges(); },
if (ps.type == 'photo') {
if (ps.type === 'photo') {
update : function(status, ps) { var self = this; return maybeDeferred( (status.length < 117 && !TBRL.Config['post']['always_shorten_url']) ? status : shortenUrls(status, Models[this.SHORTEN_SERVICE]) ).addCallback(function(status) { var typeCode = 'U'; var media = {}; if (ps.type == 'photo') { typeCode = 'I'; media.mediaUrl = ps.pageUrl; media.mediaThumbnailUrl = ps.itemUrl; } else { media.mediaUrl = ps.itemUrl; } return request(self.POST_URL, { method : 'PUT', headers : { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json' }, sendContent : JSON.stringify({ serviceTypeCode: 'P', refererTypeCode: 'W', typeCode : typeCode, postText : status, urlTitle : ps.item, media : media }) }); }) }
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json'
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json', 'Api-Token': self.apiToken
update : function(status, ps) { var self = this; return maybeDeferred( (status.length < 117 && !TBRL.Config['post']['always_shorten_url']) ? status : shortenUrls(status, Models[this.SHORTEN_SERVICE]) ).addCallback(function(status) { var typeCode = 'U'; var media = {}; if (ps.type == 'photo') { typeCode = 'I'; media.mediaUrl = ps.pageUrl; media.mediaThumbnailUrl = ps.itemUrl; } else { media.mediaUrl = ps.itemUrl; } return request(self.POST_URL, { method : 'PUT', headers : { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8, application/json' }, sendContent : JSON.stringify({ serviceTypeCode: 'P', refererTypeCode: 'W', typeCode : typeCode, postText : status, urlTitle : ps.item, media : media }) }); }) }
var state = this.state === SC.BRANCH_OPEN ? "open" : "closed", elem = this.$();
this.updateControlRenderer();
update: function(context) { var state = this.state === SC.BRANCH_OPEN ? "open" : "closed", elem = this.$(); elem.setClass("open", state === "open"); elem.setClass("closed", state !== "closed"); }
elem.setClass("open", state === "open"); elem.setClass("closed", state !== "closed"); }
var state = this.state, elem = this.$("img"); elem.setClass("open", state); elem.setClass("closed", !state); },
update: function(context) { var state = this.state === SC.BRANCH_OPEN ? "open" : "closed", elem = this.$(); elem.setClass("open", state === "open"); elem.setClass("closed", state !== "closed"); }
if (this.didChange('text-align')) { cq.css('text-align', this.textAlign); } if (this.didChange('font-weight')) { cq.css('font-weight', this.fontWeight); } if (this.didChange('opacity')) { cq.css('opacity', this.isEditing ? 0 : 1); } if (this.didChange('icon')) { cq.setClass("icon", !!this.icon); } this.resetChanges();
cq.css({ 'text-align': this.textAlign, 'font-weight': this.fontWeight, 'opacity': this.isEditing ? 0 : 1 }) .setClass('icon', !!this.icon);
update: function(cq) { this.updateClassNames(cq); this.updateTitleRenderer(cq); this.updateTitle(cq); if (this.didChange('text-align')) { cq.css('text-align', this.textAlign); } if (this.didChange('font-weight')) { cq.css('font-weight', this.fontWeight); } if (this.didChange('opacity')) { cq.css('opacity', this.isEditing ? 0 : 1); } if (this.didChange('icon')) { cq.setClass("icon", !!this.icon); } this.resetChanges(); },
if (this._last_sprite_class) context.setClass(this._last_sprite_class, NO);
if (this._last_sprite_class) cq.setClass(this._last_sprite_class, NO);
update: function() { var cq = this.$(); var src = this.src, toolTip = this.toolTip || '', image = ''; if ((this.isSprite !== YES && src.indexOf('/') >= 0) || this.isSprite === NO) { cq.attr('src', src); this._last_sprite_class = NO; } else { if (this._last_sprite_class) context.setClass(this._last_sprite_class, NO); cq.attr('src', SC.BLANK_IMAGE_URL); cq.setClass(src, YES); this._last_sprite_class = src; } cq.attr('title', toolTip); cq.attr('alt', toolTip); }
var changedDisplayProperties = dataSource.getChangedDisplayProperties(); if (changedDisplayProperties.contains('align')) { jquery.css('text-align', changedDisplayProperties.align); }
jquery.css('text-align', dataSource.get('align'));
update: function(dataSource, jquery) { var changedDisplayProperties = dataSource.getChangedDisplayProperties(); if (changedDisplayProperties.contains('align')) { jquery.css('text-align', changedDisplayProperties.align); } },
if (this.didChange('text-align')) {
if (this.didChange('textAlign')) {
update: function() { var cq = this.$(); this.updateTitleRenderer(); if (this.didChange('text-align')) { cq.css('text-align', this.textAlign); } if (this.didChange('font-weight')) { cq.css('font-weight', this.fontWeight); } if (this.didChange('opacity')) { cq.css('opacity', this.isEditing ? 0 : 1); } if (this.didChange('icon')) { cq.setClass("icon", !!this.icon); } this.resetChanges(); this.updateTitle(); this.controlRenderer.update(); },
if (this.didChange('font-weight')) {
if (this.didChange('fontWeight')) {
update: function() { var cq = this.$(); this.updateTitleRenderer(); if (this.didChange('text-align')) { cq.css('text-align', this.textAlign); } if (this.didChange('font-weight')) { cq.css('font-weight', this.fontWeight); } if (this.didChange('opacity')) { cq.css('opacity', this.isEditing ? 0 : 1); } if (this.didChange('icon')) { cq.setClass("icon", !!this.icon); } this.resetChanges(); this.updateTitle(); this.controlRenderer.update(); },
var displayProperties = dataSource.getChangedDisplayProperties(), allDisplayProperties = dataSource.getDisplayProperties(); if (allDisplayProperties.isActive) {
if (dataSource.get('isActive')) {
update: function(dataSource, jquery) { var displayProperties = dataSource.getChangedDisplayProperties(), allDisplayProperties = dataSource.getDisplayProperties(); if (allDisplayProperties.isActive) { jquery.addClass('active'); } jquery.setClass('def', allDisplayProperties.isDefault); jquery.setClass('cancel', allDisplayProperties.isCancel); if (displayProperties.contains('title', 'isActive')) { jquery.find('label').html(this._htmlForTitleAndIcon(allDisplayProperties)); } },
jquery.setClass('def', allDisplayProperties.isDefault); jquery.setClass('cancel', allDisplayProperties.isCancel);
jquery.setClass('def', dataSource.get('isDefault')); jquery.setClass('cancel', dataSource.get('isCancel'));
update: function(dataSource, jquery) { var displayProperties = dataSource.getChangedDisplayProperties(), allDisplayProperties = dataSource.getDisplayProperties(); if (allDisplayProperties.isActive) { jquery.addClass('active'); } jquery.setClass('def', allDisplayProperties.isDefault); jquery.setClass('cancel', allDisplayProperties.isCancel); if (displayProperties.contains('title', 'isActive')) { jquery.find('label').html(this._htmlForTitleAndIcon(allDisplayProperties)); } },
if (displayProperties.contains('title', 'isActive')) { jquery.find('label').html(this._htmlForTitleAndIcon(allDisplayProperties));
if (dataSource.didChangeFor('buttonRenderDelegate', 'title', 'isActive')) { jquery.find('label').html(this._htmlForTitleAndIcon(dataSource));
update: function(dataSource, jquery) { var displayProperties = dataSource.getChangedDisplayProperties(), allDisplayProperties = dataSource.getDisplayProperties(); if (allDisplayProperties.isActive) { jquery.addClass('active'); } jquery.setClass('def', allDisplayProperties.isDefault); jquery.setClass('cancel', allDisplayProperties.isCancel); if (displayProperties.contains('title', 'isActive')) { jquery.find('label').html(this._htmlForTitleAndIcon(allDisplayProperties)); } },
jquery.setClass('def', dataSource.get('isDefault')); jquery.setClass('cancel', dataSource.get('isCancel'));
jquery.setClass('def', dataSource.get('isDefault') || NO); jquery.setClass('cancel', dataSource.get('isCancel') || NO);
update: function(dataSource, jquery) { if (dataSource.get('isActive')) { jquery.addClass('active'); } jquery.setClass('def', dataSource.get('isDefault')); jquery.setClass('cancel', dataSource.get('isCancel')); dataSource.get('theme').labelRenderDelegate.update(dataSource, jquery.find('label')); }
var cq = this.$(), src = this.icon;
var img = this.$('img'), src = this.icon;
update: function() { var cq = this.$(), src = this.icon; if (src) { cq.attr('class', "img "+src); } else { cq.attr('class', "img"); } }
cq.attr('class', "img "+src);
img.attr('class', "img "+src);
update: function() { var cq = this.$(), src = this.icon; if (src) { cq.attr('class', "img "+src); } else { cq.attr('class', "img"); } }
cq.attr('class', "img");
img.attr('class', "img");
update: function() { var cq = this.$(), src = this.icon; if (src) { cq.attr('class', "img "+src); } else { cq.attr('class', "img"); } }
this._titleRenderer.attr({ title: this.title, icon: this.icon, needsEllipsis: this.needsEllipsis, escapeHTML: this.escapeHTML }); this._titleRenderer.update();
this.updateContents();
update: function() { this._controlRenderer.attr({ isEnabled: this.isEnabled, isActive: this.isActive, isSelected: this.isSelected, controlSize: this.controlSize }); this._controlRenderer.update(); var classes, theme, q = this.$(); classes = this._TEMPORARY_CLASS_HASH ? this._TEMPORARY_CLASS_HASH : this._TEMPORARY_CLASS_HASH = {}; classes.def = this.isDefault; classes.cancel = this.isCancel; classes.icon = !!this.icon; q.setClass(classes); theme = this.oldButtonTheme; if (theme) q.addClass(theme); // update title this._titleRenderer.attr({ title: this.title, icon: this.icon, needsEllipsis: this.needsEllipsis, escapeHTML: this.escapeHTML }); this._titleRenderer.update(); },
$("#list_load_mask").unmask();
alert('Dcmgr connection '+status);
update:function(request,async){ this.request = request; this.async = async; var self = this; $("#list_load_mask").mask("Loading..."); self.element.trigger('dcmgrGUI.beforeUpdate'); $.ajax({ async: async||true, url: request.url, dataType: "json", data: request.data, success: function(json,status,xhr){ self.element.trigger('dcmgrGUI.contentChange',[{"data":json,"self":self}]); self.element.trigger('dcmgrGUI.afterUpdate',[{"data":json,"self":self}]); $("#list_load_mask").unmask(); }, error: function(xhr, status, error){ $("#list_load_mask").unmask(); } }); },
this.updateClassNames();
this.updateClassNames(cq);
update: function(cq) { this.updateClassNames(); }
this.updateControlRenderer();
update: function() { var cq = this.$(); this.updateTitleRenderer(); if (this.didChange('textAlign')) { cq.css('text-align', this.textAlign); } if (this.didChange('fontWeight')) { cq.css('font-weight', this.fontWeight); } if (this.didChange('opacity')) { cq.css('opacity', this.isEditing ? 0 : 1); } if (this.didChange('icon')) { cq.setClass("icon", !!this.icon); } this.resetChanges(); this.updateTitle(); this.controlRenderer.update(); },
var displayProperties = dataSource.getDisplayProperties(), changedDisplayProperties = dataSource.getChangedDisplayProperties(), theme = dataSource.get('theme'),
var theme = dataSource.get('theme'),
update: function(dataSource, jquery) { var displayProperties = dataSource.getDisplayProperties(), changedDisplayProperties = dataSource.getChangedDisplayProperties(), theme = dataSource.get('theme'), buttonDelegate, titleMinWidth, classes = {}; // Segment specific additions // 1. This should be the proper way to do it, only update the classes if necessary, but SC.View will reset all the classes that we added in render! // if (displayProperties.contains('index', 'isFirstSegment', 'isMiddleSegment', 'isLastSegment', 'isOverflowSegment')) { // // if (displayProperties.index) classes['sc-segment-' + displayProperties.index] = YES; // if (displayProperties.isFirstSegment) classes['sc-first-segment'] = displayProperties.isFirstSegment; // if (displayProperties.isMiddleSegment) classes['sc-middle-segment'] = displayProperties.isMiddleSegment; // if (displayProperties.isLastSegment) classes['sc-last-segment'] = displayProperties.isLastSegment; // if (displayProperties.isOverflowSegment) classes['sc-overflow-segment'] = displayProperties.isOverflowSegment; // // jquery.setClass(classes); // } // 2. So just re-assign them (even if unchanged) classes = { 'sc-segment': YES, 'sc-first-segment': displayProperties.isFirstSegment, 'sc-middle-segment': displayProperties.isMiddleSegment, 'sc-last-segment': displayProperties.isLastSegment, 'sc-overflow-segment': displayProperties.isOverflowSegment }; classes['sc-segment-' + displayProperties.index] = YES; jquery.setClass(classes); // Use the SC.ButtonView render delegate for the current theme to update the segment as a button buttonDelegate = theme['buttonRenderDelegate']; // 1. This should be the proper way to do it, but getChangedDisplayProperties() when called in the button delegate will show no changes // buttonDelegate.update(originalDataSource, jquery); // 2. So do it ourselves if (changedDisplayProperties.contains('titleMinWidth')) { titleMinWidth = (displayProperties.titleMinWidth ? displayProperties.titleMinWidth + "px" : null); jquery.find('.sc-button-inner').css('min-width', titleMinWidth); } if (changedDisplayProperties.contains('title', 'isActive')) { jquery.find('label').html(buttonDelegate._htmlForTitleAndIcon(displayProperties)); } }
'sc-first-segment': displayProperties.isFirstSegment, 'sc-middle-segment': displayProperties.isMiddleSegment, 'sc-last-segment': displayProperties.isLastSegment, 'sc-overflow-segment': displayProperties.isOverflowSegment
'sc-first-segment': dataSource.get('isFirstSegment'), 'sc-middle-segment': dataSource.get('isMiddleSegment'), 'sc-last-segment': dataSource.get('isLastSegment'), 'sc-overflow-segment': dataSource.get('isOverflowSegment') || NO
update: function(dataSource, jquery) { var displayProperties = dataSource.getDisplayProperties(), changedDisplayProperties = dataSource.getChangedDisplayProperties(), theme = dataSource.get('theme'), buttonDelegate, titleMinWidth, classes = {}; // Segment specific additions // 1. This should be the proper way to do it, only update the classes if necessary, but SC.View will reset all the classes that we added in render! // if (displayProperties.contains('index', 'isFirstSegment', 'isMiddleSegment', 'isLastSegment', 'isOverflowSegment')) { // // if (displayProperties.index) classes['sc-segment-' + displayProperties.index] = YES; // if (displayProperties.isFirstSegment) classes['sc-first-segment'] = displayProperties.isFirstSegment; // if (displayProperties.isMiddleSegment) classes['sc-middle-segment'] = displayProperties.isMiddleSegment; // if (displayProperties.isLastSegment) classes['sc-last-segment'] = displayProperties.isLastSegment; // if (displayProperties.isOverflowSegment) classes['sc-overflow-segment'] = displayProperties.isOverflowSegment; // // jquery.setClass(classes); // } // 2. So just re-assign them (even if unchanged) classes = { 'sc-segment': YES, 'sc-first-segment': displayProperties.isFirstSegment, 'sc-middle-segment': displayProperties.isMiddleSegment, 'sc-last-segment': displayProperties.isLastSegment, 'sc-overflow-segment': displayProperties.isOverflowSegment }; classes['sc-segment-' + displayProperties.index] = YES; jquery.setClass(classes); // Use the SC.ButtonView render delegate for the current theme to update the segment as a button buttonDelegate = theme['buttonRenderDelegate']; // 1. This should be the proper way to do it, but getChangedDisplayProperties() when called in the button delegate will show no changes // buttonDelegate.update(originalDataSource, jquery); // 2. So do it ourselves if (changedDisplayProperties.contains('titleMinWidth')) { titleMinWidth = (displayProperties.titleMinWidth ? displayProperties.titleMinWidth + "px" : null); jquery.find('.sc-button-inner').css('min-width', titleMinWidth); } if (changedDisplayProperties.contains('title', 'isActive')) { jquery.find('label').html(buttonDelegate._htmlForTitleAndIcon(displayProperties)); } }
classes['sc-segment-' + displayProperties.index] = YES;
classes['sc-segment-' + dataSource.get('index')] = YES;
update: function(dataSource, jquery) { var displayProperties = dataSource.getDisplayProperties(), changedDisplayProperties = dataSource.getChangedDisplayProperties(), theme = dataSource.get('theme'), buttonDelegate, titleMinWidth, classes = {}; // Segment specific additions // 1. This should be the proper way to do it, only update the classes if necessary, but SC.View will reset all the classes that we added in render! // if (displayProperties.contains('index', 'isFirstSegment', 'isMiddleSegment', 'isLastSegment', 'isOverflowSegment')) { // // if (displayProperties.index) classes['sc-segment-' + displayProperties.index] = YES; // if (displayProperties.isFirstSegment) classes['sc-first-segment'] = displayProperties.isFirstSegment; // if (displayProperties.isMiddleSegment) classes['sc-middle-segment'] = displayProperties.isMiddleSegment; // if (displayProperties.isLastSegment) classes['sc-last-segment'] = displayProperties.isLastSegment; // if (displayProperties.isOverflowSegment) classes['sc-overflow-segment'] = displayProperties.isOverflowSegment; // // jquery.setClass(classes); // } // 2. So just re-assign them (even if unchanged) classes = { 'sc-segment': YES, 'sc-first-segment': displayProperties.isFirstSegment, 'sc-middle-segment': displayProperties.isMiddleSegment, 'sc-last-segment': displayProperties.isLastSegment, 'sc-overflow-segment': displayProperties.isOverflowSegment }; classes['sc-segment-' + displayProperties.index] = YES; jquery.setClass(classes); // Use the SC.ButtonView render delegate for the current theme to update the segment as a button buttonDelegate = theme['buttonRenderDelegate']; // 1. This should be the proper way to do it, but getChangedDisplayProperties() when called in the button delegate will show no changes // buttonDelegate.update(originalDataSource, jquery); // 2. So do it ourselves if (changedDisplayProperties.contains('titleMinWidth')) { titleMinWidth = (displayProperties.titleMinWidth ? displayProperties.titleMinWidth + "px" : null); jquery.find('.sc-button-inner').css('min-width', titleMinWidth); } if (changedDisplayProperties.contains('title', 'isActive')) { jquery.find('label').html(buttonDelegate._htmlForTitleAndIcon(displayProperties)); } }
if (changedDisplayProperties.contains('titleMinWidth')) { titleMinWidth = (displayProperties.titleMinWidth ? displayProperties.titleMinWidth + "px" : null); jquery.find('.sc-button-inner').css('min-width', titleMinWidth); } if (changedDisplayProperties.contains('title', 'isActive')) { jquery.find('label').html(buttonDelegate._htmlForTitleAndIcon(displayProperties)); }
buttonDelegate.update(dataSource, jquery);
update: function(dataSource, jquery) { var displayProperties = dataSource.getDisplayProperties(), changedDisplayProperties = dataSource.getChangedDisplayProperties(), theme = dataSource.get('theme'), buttonDelegate, titleMinWidth, classes = {}; // Segment specific additions // 1. This should be the proper way to do it, only update the classes if necessary, but SC.View will reset all the classes that we added in render! // if (displayProperties.contains('index', 'isFirstSegment', 'isMiddleSegment', 'isLastSegment', 'isOverflowSegment')) { // // if (displayProperties.index) classes['sc-segment-' + displayProperties.index] = YES; // if (displayProperties.isFirstSegment) classes['sc-first-segment'] = displayProperties.isFirstSegment; // if (displayProperties.isMiddleSegment) classes['sc-middle-segment'] = displayProperties.isMiddleSegment; // if (displayProperties.isLastSegment) classes['sc-last-segment'] = displayProperties.isLastSegment; // if (displayProperties.isOverflowSegment) classes['sc-overflow-segment'] = displayProperties.isOverflowSegment; // // jquery.setClass(classes); // } // 2. So just re-assign them (even if unchanged) classes = { 'sc-segment': YES, 'sc-first-segment': displayProperties.isFirstSegment, 'sc-middle-segment': displayProperties.isMiddleSegment, 'sc-last-segment': displayProperties.isLastSegment, 'sc-overflow-segment': displayProperties.isOverflowSegment }; classes['sc-segment-' + displayProperties.index] = YES; jquery.setClass(classes); // Use the SC.ButtonView render delegate for the current theme to update the segment as a button buttonDelegate = theme['buttonRenderDelegate']; // 1. This should be the proper way to do it, but getChangedDisplayProperties() when called in the button delegate will show no changes // buttonDelegate.update(originalDataSource, jquery); // 2. So do it ourselves if (changedDisplayProperties.contains('titleMinWidth')) { titleMinWidth = (displayProperties.titleMinWidth ? displayProperties.titleMinWidth + "px" : null); jquery.find('.sc-button-inner').css('min-width', titleMinWidth); } if (changedDisplayProperties.contains('title', 'isActive')) { jquery.find('label').html(buttonDelegate._htmlForTitleAndIcon(displayProperties)); } }
editor.selection.addRange(RangeFind.nodeRange(editor.rootNode)); editor.selection.deleteFromDocument(); editor.insertText(val);
while (editor.rootElement.firstChild) editor.rootElement.removeChild(editor.rootElement.firstChild); editor.rootElement.innerHTML = val;
function update(force) { if (force !== true && tmpfile.lastModifiedTime <= lastUpdate) return; lastUpdate = Date.now(); let val = tmpfile.read(); if (textBox) textBox.value = val; else { editor.selection.addRange(RangeFind.nodeRange(editor.rootNode)); editor.selection.deleteFromDocument(); editor.insertText(val); } }
}
updateButtonRenderer: function() { this._buttonRenderer.attr({ title: this.title, icon: this.icon, toolTip: this.toolTip, isEnabled: this.isEnabled, isSelected: this.isSelected, isActive: this.isActive, controlSize: this.controlSize }); },
this.index = 0;
this.index = -1;
updateChoices: function(choices) { if(!this.changed && this.hasFocus) { this.update.innerHTML = choices; Element.cleanWhitespace(this.update); Element.cleanWhitespace(this.update.down()); if(this.update.firstChild && this.update.down().childNodes) { this.entryCount = this.update.down().childNodes.length; for (var i = 0; i < this.entryCount; i++) { var entry = this.getEntry(i); entry.autocompleteIndex = i; this.addObservers(entry); } } else { this.entryCount = 0; } this.stopIndicator(); this.index = 0; if(this.entryCount==1 && this.options.autoSelect) { this.selectEntry(); this.hide(); } else { this.render(); } } },
var cn = {}, size = this.calculateSize();
this.renderClassNames(query);
updateClassNames: function(query) { var cn = {}, size = this.calculateSize(); // do diffing by setting all of last to NO, then // setting all of this time to YES var last = this._LAST_CLASS_NAMES, current = this.classNames, len, idx; if (last) { len = last.length; for (idx = 0; idx < len; idx++) cn[last[idx]] = NO; } else { // we don't need one for diffing, but we'll need _LAST_CLASS_NAMES // to store the current class names for later. last = this._LAST_CLASS_NAMES = SC.CoreSet.create(); } // we don't need any of the old entries anymore. last.clear(); // NOTE: we don't need to diff name, because it should stay the same. len = current.length; for (idx = 0; idx < len; idx++) { cn[current[idx]] = YES; last.add(cn[current[idx]]); } if (size) { cn[size] = YES; last.add(size); } query.setClass(cn); return cn; },
var last = this._LAST_CLASS_NAMES, current = this.classNames, len, idx; if (last) { len = last.length; for (idx = 0; idx < len; idx++) cn[last[idx]] = NO; } else { last = this._LAST_CLASS_NAMES = SC.CoreSet.create(); } last.clear(); len = current.length; for (idx = 0; idx < len; idx++) { cn[current[idx]] = YES; last.add(cn[current[idx]]); } if (size) { cn[size] = YES; last.add(size); } query.setClass(cn); return cn;
updateClassNames: function(query) { var cn = {}, size = this.calculateSize(); // do diffing by setting all of last to NO, then // setting all of this time to YES var last = this._LAST_CLASS_NAMES, current = this.classNames, len, idx; if (last) { len = last.length; for (idx = 0; idx < len; idx++) cn[last[idx]] = NO; } else { // we don't need one for diffing, but we'll need _LAST_CLASS_NAMES // to store the current class names for later. last = this._LAST_CLASS_NAMES = SC.CoreSet.create(); } // we don't need any of the old entries anymore. last.clear(); // NOTE: we don't need to diff name, because it should stay the same. len = current.length; for (idx = 0; idx < len; idx++) { cn[current[idx]] = YES; last.add(cn[current[idx]]); } if (size) { cn[size] = YES; last.add(size); } query.setClass(cn); return cn; },
updateComplete: function(response) { if (this.options.decay) { this.decay = (response.responseText == this.lastText ? this.decay * this.options.decay : 1); this.lastText = response.responseText; } this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); },
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])*?\*\
updateComplete: function(response) { if (this.options.decay) { this.decay = (response.responseText == this.lastText ? this.decay * this.options.decay : 1); this.lastText = response.responseText; } this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); },
updateContent: function(responseText) { var receiver = this.container[this.success() ? 'success' : 'failure'], options = this.options; if (!options.evalScripts) responseText = responseText.stripScripts(); if (receiver = $(receiver)) { if (options.insertion) { if (Object.isString(options.insertion)) { var insertion = { }; insertion[options.insertion] = responseText; receiver.insert(insertion); } else options.insertion(receiver, responseText); } else receiver.update(responseText); } }
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])*?\*\
updateContent: function(responseText) { var receiver = this.container[this.success() ? 'success' : 'failure'], options = this.options; if (!options.evalScripts) responseText = responseText.stripScripts(); if (receiver = $(receiver)) { if (options.insertion) { if (Object.isString(options.insertion)) { var insertion = { }; insertion[options.insertion] = responseText; receiver.insert(insertion); } else options.insertion(receiver, responseText); } else receiver.update(responseText); } }
var alldone = 0;
function updateFirmware(transport){ var data = transport.responseJSON; var percents = new Hash(); // Loop through the returned boards data.boards.each(function(board) { var slot = board.slot; // Loop through the returned chips board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); }); // Now update the submit buttons percents.each(function(it) { if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = false; } else { $(it.key + "_upload").update(it.value + "%").disabled = true; } });}
if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = false;
if (uploading && it.value == 100) { $(it.key + "_upload").update("Uploading...").disabled = true; } else if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = disable;
function updateFirmware(transport){ var data = transport.responseJSON; var percents = new Hash(); // Loop through the returned boards data.boards.each(function(board) { var slot = board.slot; // Loop through the returned chips board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); }); // Now update the submit buttons percents.each(function(it) { if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = false; } else { $(it.key + "_upload").update(it.value + "%").disabled = true; } });}
$(it.key + "_upload").update(it.value + "%").disabled = true;
$(it.key + "_upload").update("Installing " + it.value + "%").disabled = true; uploading = false;
function updateFirmware(transport){ var data = transport.responseJSON; var percents = new Hash(); // Loop through the returned boards data.boards.each(function(board) { var slot = board.slot; // Loop through the returned chips board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } }); }); // Now update the submit buttons percents.each(function(it) { if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = false; } else { $(it.key + "_upload").update(it.value + "%").disabled = true; } });}
var disable = (alldone != percents.size());
var disable = (alldone != percents.size() * data.boards.size());
function updateFirmware(transport){ var data = transport.responseJSON; var percents = new Hash(); var alldone = 0; // Loop through the returned boards data.boards.each(function(board) { var slot = board.slot; // Loop through the returned chips board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } if (chip.percent == 100) alldone++; }); }); // Only allow more uploads if this is 100% of everybody. var disable = (alldone != percents.size()); // Now update the submit buttons percents.each(function(it) { if (uploading && it.value == 100) { $(it.key + "_upload").update("Uploading...").disabled = true; } else if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = disable; } else { $(it.key + "_upload").update("Installing " + it.value + "%").disabled = true; uploading = false; } });}
if (uploading && it.value == 100) { $(it.key + "_upload").update("Uploading...").disabled = true; } else if (it.value == 100) {
if (it.value != 100) { $(it.key + "_upload").update("Installing " + it.value + "%").disabled = true; } else {
function updateFirmware(transport){ var data = transport.responseJSON; var percents = new Hash(); var alldone = 0; // Loop through the returned boards data.boards.each(function(board) { var slot = board.slot; // Loop through the returned chips board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } if (chip.percent == 100) alldone++; }); }); // Only allow more uploads if this is 100% of everybody. var disable = (alldone != percents.size()); // Now update the submit buttons percents.each(function(it) { if (uploading && it.value == 100) { $(it.key + "_upload").update("Uploading...").disabled = true; } else if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = disable; } else { $(it.key + "_upload").update("Installing " + it.value + "%").disabled = true; uploading = false; } });}
} else { $(it.key + "_upload").update("Installing " + it.value + "%").disabled = true; uploading = false;
function updateFirmware(transport){ var data = transport.responseJSON; var percents = new Hash(); var alldone = 0; // Loop through the returned boards data.boards.each(function(board) { var slot = board.slot; // Loop through the returned chips board.chips.each(function(chip) { // Update the text in the table $(chip.name + "_label_" + slot).update(chip.text); // Check to see if this is the smallest % done for all chips of this type if (!percents.get(chip.name) || chip.percent < percents.get(chip)) { percents.set(chip.name, chip.percent); } if (chip.percent == 100) alldone++; }); }); // Only allow more uploads if this is 100% of everybody. var disable = (alldone != percents.size()); // Now update the submit buttons percents.each(function(it) { if (uploading && it.value == 100) { $(it.key + "_upload").update("Uploading...").disabled = true; } else if (it.value == 100) { $(it.key + "_upload").update("Upload and install").disabled = disable; } else { $(it.key + "_upload").update("Installing " + it.value + "%").disabled = true; uploading = false; } });}
function UpdateHiddenField(field) { var f=""; for (p=0;p<TreeID[field].length;p++) { if (TreeChecked[field][p]==1) { f+="," + TreeNames[field][p]; } } document.getElementById(field + "_category").value=f;
function UpdateHiddenField( field ) { var f = ""; for( var p = 0; p < TreeID[field].length; p++ ) { if ( TreeChecked[field][p] == 1 ) { f += "," + TreeNames[field][p]; } } document.getElementById( field + "_category" ).value = f;
function UpdateHiddenField(field) { var f=""; for (p=0;p<TreeID[field].length;p++) { if (TreeChecked[field][p]==1) { f+="," + TreeNames[field][p]; } } document.getElementById(field + "_category").value=f; // Update the result counter, if the function is available (e.g. on Advanced Search). if (typeof UpdateResultCount == 'function') {UpdateResultCount();} }
if (typeof UpdateResultCount == 'function') {UpdateResultCount();}
if( typeof UpdateResultCount == 'function' ) { UpdateResultCount();
function UpdateHiddenField(field) { var f=""; for (p=0;p<TreeID[field].length;p++) { if (TreeChecked[field][p]==1) { f+="," + TreeNames[field][p]; } } document.getElementById(field + "_category").value=f; // Update the result counter, if the function is available (e.g. on Advanced Search). if (typeof UpdateResultCount == 'function') {UpdateResultCount();} }
}
function UpdateHiddenField(field) { var f=""; for (p=0;p<TreeID[field].length;p++) { if (TreeChecked[field][p]==1) { f+="," + TreeNames[field][p]; } } document.getElementById(field + "_category").value=f; // Update the result counter, if the function is available (e.g. on Advanced Search). if (typeof UpdateResultCount == 'function') {UpdateResultCount();} }
if( UpdateResultCount != null && typeof UpdateResultCount == 'function' ) {
if( typeof( UpdateResultCount ) != 'undefinied' && typeof( UpdateResultCount ) == 'function' ) {
function UpdateHiddenField( field ){ var f = ""; for( var p = 0; p < TreeID[field].length; p++ ) { if ( TreeChecked[field][p] == 1 ) { f += "," + TreeNames[field][p]; } } document.getElementById( field + "_category" ).value = f; // Update the result counter, if the function is available (e.g. on Advanced Search). if( UpdateResultCount != null && typeof UpdateResultCount == 'function' ) { UpdateResultCount(); }}
if( typeof UpdateResultCount == 'function' ) {
if( UpdateResultCount != null && typeof UpdateResultCount == 'function' ) {
function UpdateHiddenField( field ){ var f = ""; for( var p = 0; p < TreeID[field].length; p++ ) { if ( TreeChecked[field][p] == 1 ) { f += "," + TreeNames[field][p]; } } document.getElementById( field + "_category" ).value = f; // Update the result counter, if the function is available (e.g. on Advanced Search). if( typeof UpdateResultCount == 'function' ) { UpdateResultCount(); }}
updateLayer: function() {
updateLayer: function(optionalContext) {
updateLayer: function() { var mixins, idx, len, renderer; this.updateViewSettings(); if (renderer = this.renderer) { this.updateRenderer(renderer); // renderers always update. if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, renderer); } } // Now, update using renderer if possible; render() otherwise if (!this._useRenderFirst && this.createRenderer) { if (renderer) renderer.update(); } else { var context = this.renderContext(this.get('layer')) ; this.render(context, NO) ; if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, NO) ; } context.update() ; if (context._innerHTMLReplaced) { var pane = this.get('pane'); if(pane && pane.get('isPaneAttached')) { this._notifyDidAppendToDocument(); } } } // If this view uses static layout, then notify that the frame (likely) // changed. if (this.useStaticLayout) this.viewDidResize(); if (this.didUpdateLayer) this.didUpdateLayer(); // call to update DOM if(this.designer && this.designer.viewDidUpdateLayer) { this.designer.viewDidUpdateLayer(); //let the designer know } return this ; },