rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
Element._returnOffset = function(l, t) { var result = [l, t]; result.left = l; result.top = t; return result; };
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
Element._returnOffset = function(l, t) { var result = [l, t]; result.left = l; result.top = t; return result;};
let args = this._args(cmd, arguments);
let args = ex._args(cmd, arguments);
_run: function (name) { let cmd = commands.get(name); dactyl.assert(cmd, "No such command"); return update(function exCommand(options) { let args = this._args(cmd, arguments); args.verify(); return cmd.execute(args); }, { dactylCompleter: this._complete(cmd) }); },
dactylCompleter: this._complete(cmd)
dactylCompleter: ex._complete(cmd)
_run: function (name) { let cmd = commands.get(name); dactyl.assert(cmd, "No such command"); return update(function exCommand(options) { let args = this._args(cmd, arguments); args.verify(); return cmd.execute(args); }, { dactylCompleter: this._complete(cmd) }); },
var timer = setTimeout(function(){
var timeoutFunction = function(){
doh._runRegFixture = function(/*String*/groupName, /*Object*/fixture){ // summary: // Function to run a generic doh test. These are not // specialized tests, like performance groups and such. // // groupName: // The groupName of the test. // fixture: // The test fixture to execute. var tg = this._groups[groupName]; fixture.startTime = new Date(); var ret = fixture.runTest(this); fixture.endTime = new Date(); // if we get a deferred back from the test runner, we know we're // gonna wait for an async result. It's up to the test code to trap // errors and give us an errback or callback. if(ret instanceof doh.Deferred){ tg.inFlight++; ret.groupName = groupName; ret.fixture = fixture; ret.addErrback(function(err){ doh._handleFailure(groupName, fixture, err); }); var retEnd = function(){ if(fixture["tearDown"]){ fixture.tearDown(doh); } tg.inFlight--; if((!tg.inFlight)&&(tg.iterated)){ doh._groupFinished(groupName, !tg.failures); } doh._testFinished(groupName, fixture, ret.results[0]); if(doh._paused){ doh.run(); } } var timer = setTimeout(function(){ fixture.endTime = new Date(); ret.errback(new Error("test timeout in "+fixture.name.toString())); }, fixture["timeout"]||1000); ret.addBoth(function(arg){ clearTimeout(timer); fixture.endTime = new Date(); retEnd(); }); if(ret.fired < 0){ doh.pause(); } return ret; }};
}, fixture["timeout"]||1000);
}; var timer = setTimeout(function(){ timeoutFunction(); }, fixture["timeout"]||1000);
doh._runRegFixture = function(/*String*/groupName, /*Object*/fixture){ // summary: // Function to run a generic doh test. These are not // specialized tests, like performance groups and such. // // groupName: // The groupName of the test. // fixture: // The test fixture to execute. var tg = this._groups[groupName]; fixture.startTime = new Date(); var ret = fixture.runTest(this); fixture.endTime = new Date(); // if we get a deferred back from the test runner, we know we're // gonna wait for an async result. It's up to the test code to trap // errors and give us an errback or callback. if(ret instanceof doh.Deferred){ tg.inFlight++; ret.groupName = groupName; ret.fixture = fixture; ret.addErrback(function(err){ doh._handleFailure(groupName, fixture, err); }); var retEnd = function(){ if(fixture["tearDown"]){ fixture.tearDown(doh); } tg.inFlight--; if((!tg.inFlight)&&(tg.iterated)){ doh._groupFinished(groupName, !tg.failures); } doh._testFinished(groupName, fixture, ret.results[0]); if(doh._paused){ doh.run(); } } var timer = setTimeout(function(){ fixture.endTime = new Date(); ret.errback(new Error("test timeout in "+fixture.name.toString())); }, fixture["timeout"]||1000); ret.addBoth(function(arg){ clearTimeout(timer); fixture.endTime = new Date(); retEnd(); }); if(ret.fired < 0){ doh.pause(); } return ret; }};
timeoutFunction = function(){};
doh._runRegFixture = function(/*String*/groupName, /*Object*/fixture){ // summary: // Function to run a generic doh test. These are not // specialized tests, like performance groups and such. // // groupName: // The groupName of the test. // fixture: // The test fixture to execute. var tg = this._groups[groupName]; fixture.startTime = new Date(); var ret = fixture.runTest(this); fixture.endTime = new Date(); // if we get a deferred back from the test runner, we know we're // gonna wait for an async result. It's up to the test code to trap // errors and give us an errback or callback. if(ret instanceof doh.Deferred){ tg.inFlight++; ret.groupName = groupName; ret.fixture = fixture; ret.addErrback(function(err){ doh._handleFailure(groupName, fixture, err); }); var retEnd = function(){ if(fixture["tearDown"]){ fixture.tearDown(doh); } tg.inFlight--; if((!tg.inFlight)&&(tg.iterated)){ doh._groupFinished(groupName, !tg.failures); } doh._testFinished(groupName, fixture, ret.results[0]); if(doh._paused){ doh.run(); } } var timer = setTimeout(function(){ fixture.endTime = new Date(); ret.errback(new Error("test timeout in "+fixture.name.toString())); }, fixture["timeout"]||1000); ret.addBoth(function(arg){ clearTimeout(timer); fixture.endTime = new Date(); retEnd(); }); if(ret.fired < 0){ doh.pause(); } return ret; }};
if (!cv.hasStaticLayout) {
if (!cv.useStaticLayout) {
_sc_view_clippingFrameDidChange: function() { var cvs = this.get('childViews'), len = cvs.length, idx, cv ; for (idx=0; idx<len; ++idx) { cv = cvs[idx] ; // In SC 1.0 views with static layout did not receive notifications // of frame changes because they didn't support frames. In SC 1.1 they // do support frames, so they should receive notifications. Also in // SC 1.1 SC.StaticLayout is merged into SC.View. The mixin is only // for compatibility. This property is defined on the mixin. // // frame changes should be sent all the time unless this property is // present to indicate that we want the old 1.0 API behavior instead. // if (!cv.hasStaticLayout) { cv.notifyPropertyChange('clippingFrame') ; cv._sc_view_clippingFrameDidChange(); } } },
this.$().css('minWidth', this.get('calculatedWidth')); this.$().css('minHeight', this.get('calculatedHeight'));
var elem = this.$(), cw = this.get('calculatedWidth'), ch = this.get('calculatedHeight'); if(cw) elem.css('minWidth', this.get('calculatedWidth')); if(ch) elem.css('minHeight', this.get('calculatedHeight'));
_scfl_calculatedSizeDidChange: function() { this.$().css('minWidth', this.get('calculatedWidth')); this.$().css('minHeight', this.get('calculatedHeight')); }.observes('calculatedWidth', 'calculatedHeight'),
}.observes("childViews"),
},
_scfl_childViewsDidChange: function(c) { this._scfl_tile(); }.observes("childViews"),
}.observes("childViews"),
}.observes("*childViews.[]"),
_scfl_childViewsDidChange: function(c) { this.invokeOnce("_scfl_tile"); }.observes("childViews"),
if (!this.get("canWrap")) return;
_scfl_frameDidChange: function() { // if the frame changes but we can't wrap, our results will not update. if (!this.get("canWrap")) return; var frame = this.get("frame"), lf = this._scfl_lastFrameSize; this._scfl_lastFrameSize = frame; if (lf && lf.width == frame.width && lf.height == frame.height) return; this.invokeOnce("_scfl_tile"); }.observes("frame"),
if (!this.get("canWrap")) return;
_scfl_frameDidChange: function() { var frame = this.get("frame"), lf = this._scfl_lastFrameSize; this._scfl_lastFrameSize = frame; if (lf && lf.width == frame.width && lf.height == frame.height) return; this.invokeOnce("_scfl_tile"); }.observes("frame"),
childSize, childSpacing, align = this.get("align");
childSize, childSpacing, align = this.get("align"), longestRow = 0;
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || SC.CoreSet.create(), nowObserving = SC.CoreSet.create(); var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("_scfl_validFlowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists isObserving.remove(SC.guidFor(child)); nowObserving.add(child); // skip positioning of items with isVisible===false if (!this.shouldIncludeChild(child)) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); // size is now calculated the same whether canWrap is on or not if (this.get("autoResize")) { if(itemOffset) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } if(rowOffset + rowSize) { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } } // cleanup on aisle 7 len = isObserving.length; for (idx = 0; idx < len; idx++) { this.unobserveChildLayout(isObserving[idx]); } len = nowObserving.length; for (idx = 0; idx < len; idx++) { this.observeChildLayout(nowObserving[idx]); } this._scfl_isObserving = nowObserving; },
if (canWrap && row.length > 0) {
if (newRow || canWrap && row.length > 0) {
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || SC.CoreSet.create(), nowObserving = SC.CoreSet.create(); var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("_scfl_validFlowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists isObserving.remove(SC.guidFor(child)); nowObserving.add(child); // skip positioning of items with isVisible===false if (!this.shouldIncludeChild(child)) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); // size is now calculated the same whether canWrap is on or not if (this.get("autoResize")) { if(itemOffset) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } if(rowOffset + rowSize) { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } } // cleanup on aisle 7 len = isObserving.length; for (idx = 0; idx < len; idx++) { this.unobserveChildLayout(isObserving[idx]); } len = nowObserving.length; for (idx = 0; idx < len; idx++) { this.observeChildLayout(nowObserving[idx]); } this._scfl_isObserving = nowObserving; },
if (itemOffset + childSize[primary_d] >= primaryContainerSize) {
if (newRow || itemOffset + childSize[primary_d] >= primaryContainerSize) {
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || SC.CoreSet.create(), nowObserving = SC.CoreSet.create(); var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("_scfl_validFlowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists isObserving.remove(SC.guidFor(child)); nowObserving.add(child); // skip positioning of items with isVisible===false if (!this.shouldIncludeChild(child)) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); // size is now calculated the same whether canWrap is on or not if (this.get("autoResize")) { if(itemOffset) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } if(rowOffset + rowSize) { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } } // cleanup on aisle 7 len = isObserving.length; for (idx = 0; idx < len; idx++) { this.unobserveChildLayout(isObserving[idx]); } len = nowObserving.length; for (idx = 0; idx < len; idx++) { this.observeChildLayout(nowObserving[idx]); } this._scfl_isObserving = nowObserving; },
itemOffset += childSize[primary_d];
itemOffset += childSize[primary_d]; longestRow = Math.max(longestRow, itemOffset);
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || SC.CoreSet.create(), nowObserving = SC.CoreSet.create(); var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("_scfl_validFlowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists isObserving.remove(SC.guidFor(child)); nowObserving.add(child); // skip positioning of items with isVisible===false if (!this.shouldIncludeChild(child)) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); // size is now calculated the same whether canWrap is on or not if (this.get("autoResize")) { if(itemOffset) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } if(rowOffset + rowSize) { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } } // cleanup on aisle 7 len = isObserving.length; for (idx = 0; idx < len; idx++) { this.unobserveChildLayout(isObserving[idx]); } len = nowObserving.length; for (idx = 0; idx < len; idx++) { this.observeChildLayout(nowObserving[idx]); } this._scfl_isObserving = nowObserving; },
if(itemOffset) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]);
if(longestRow) { this._scfl_lastFrameSize[primary_d] = longestRow + padding[primary] + padding[primary_os]; this.adjust(primary_d, longestRow + padding[primary] + padding[primary_os]);
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || SC.CoreSet.create(), nowObserving = SC.CoreSet.create(); var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("_scfl_validFlowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists isObserving.remove(SC.guidFor(child)); nowObserving.add(child); // skip positioning of items with isVisible===false if (!this.shouldIncludeChild(child)) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); // size is now calculated the same whether canWrap is on or not if (this.get("autoResize")) { if(itemOffset) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } if(rowOffset + rowSize) { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } } // cleanup on aisle 7 len = isObserving.length; for (idx = 0; idx < len; idx++) { this.unobserveChildLayout(isObserving[idx]); } len = nowObserving.length; for (idx = 0; idx < len; idx++) { this.observeChildLayout(nowObserving[idx]); } this._scfl_isObserving = nowObserving; },
if (child.get("isSpacer")) { childSize[primary_d] = 0; }
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || SC.CoreSet.create(), nowObserving = SC.CoreSet.create(); var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("flowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists isObserving.remove(child); nowObserving.add(child); // skip positioning of items with isVisible===false if (!child.get("isVisible")) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); if (!canWrap) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } else { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } // cleanup on aisle 7 isObserving.forEach(function(item) { this._scfl_unobserveChild(item); }, this); nowObserving.forEach(function(item) { this._scfl_observeChild(item); }, this); this._scfl_isObserving = nowObserving; },
var isObserving = this._scfl_isObserving || {}, nowObserving = {};
var isObserving = this._scfl_isObserving || SC.CoreSet.create(), nowObserving = SC.CoreSet.create();
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || {}, nowObserving = {}; var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("flowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists delete isObserving[SC.guidFor(child)]; nowObserving[SC.guidFor(child)] = child; // skip positioning of items with isVisible===false if (!child.get("isVisible")) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); // adjust for spacer if (child.get("isSpacer")) { childSize[primary_d] = 0; } child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); if (!canWrap && this.get("autoResize")) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } else if (this.get("autoResize")) { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } // cleanup on aisle 7 for (idx in isObserving) { this._scfl_unobserveChild(isObserving[idx]); } for (idx in nowObserving) { this._scfl_observeChild(nowObserving[idx]); } this._scfl_isObserving = nowObserving; },
delete isObserving[SC.guidFor(child)]; nowObserving[SC.guidFor(child)] = child;
isObserving.remove(SC.guidFor(child)); nowObserving.add(child);
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || {}, nowObserving = {}; var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("flowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists delete isObserving[SC.guidFor(child)]; nowObserving[SC.guidFor(child)] = child; // skip positioning of items with isVisible===false if (!child.get("isVisible")) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); // adjust for spacer if (child.get("isSpacer")) { childSize[primary_d] = 0; } child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); if (!canWrap && this.get("autoResize")) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } else if (this.get("autoResize")) { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } // cleanup on aisle 7 for (idx in isObserving) { this._scfl_unobserveChild(isObserving[idx]); } for (idx in nowObserving) { this._scfl_observeChild(nowObserving[idx]); } this._scfl_isObserving = nowObserving; },
if (!child.get("isVisible")) continue;
if (!this.shouldIncludeChild(child)) continue;
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || {}, nowObserving = {}; var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("flowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists delete isObserving[SC.guidFor(child)]; nowObserving[SC.guidFor(child)] = child; // skip positioning of items with isVisible===false if (!child.get("isVisible")) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); // adjust for spacer if (child.get("isSpacer")) { childSize[primary_d] = 0; } child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); if (!canWrap && this.get("autoResize")) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } else if (this.get("autoResize")) { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } // cleanup on aisle 7 for (idx in isObserving) { this._scfl_unobserveChild(isObserving[idx]); } for (idx in nowObserving) { this._scfl_observeChild(nowObserving[idx]); } this._scfl_isObserving = nowObserving; },
for (idx in isObserving) { this._scfl_unobserveChild(isObserving[idx]);
len = isObserving.length; for (idx = 0; idx < len; idx++) { this.unobserveChildLayout(isObserving[idx]);
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || {}, nowObserving = {}; var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("flowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists delete isObserving[SC.guidFor(child)]; nowObserving[SC.guidFor(child)] = child; // skip positioning of items with isVisible===false if (!child.get("isVisible")) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); // adjust for spacer if (child.get("isSpacer")) { childSize[primary_d] = 0; } child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); if (!canWrap && this.get("autoResize")) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } else if (this.get("autoResize")) { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } // cleanup on aisle 7 for (idx in isObserving) { this._scfl_unobserveChild(isObserving[idx]); } for (idx in nowObserving) { this._scfl_observeChild(nowObserving[idx]); } this._scfl_isObserving = nowObserving; },
for (idx in nowObserving) { this._scfl_observeChild(nowObserving[idx]);
len = nowObserving.length; for (idx = 0; idx < len; idx++) { this.observeChildLayout(nowObserving[idx]);
_scfl_tile: function() { if (!this._scfl_itemLayouts) this._scfl_itemLayouts = {}; var isObserving = this._scfl_isObserving || {}, nowObserving = {}; var children = this.get("childViews"), child, idx, len = children.length, rows = [], row = [], rowSize = 0, rowOffset = 0, itemOffset = 0, width = this.get('frame').width, height = this.get('frame').height, canWrap = this.get("canWrap"), layoutDirection = this.get("layoutDirection"), padding = this.get("flowPadding"), childSize, childSpacing, align = this.get("align"); var primary, primary_os, primary_d, secondary, secondary_os, secondary_d, primaryContainerSize; if (layoutDirection === SC.LAYOUT_HORIZONTAL) { primaryContainerSize = width - padding["right"] - padding["left"]; primary = "left"; secondary = "top"; primary_os = "right"; secondary_os = "bottom"; primary_d = "width"; secondary_d = "height"; } else { primaryContainerSize = height - padding["bottom"] - padding["top"]; primary = "top"; secondary = "left"; primary_os = "bottom"; secondary_os = "right"; primary_d = "height"; secondary_d = "width"; } // now, loop through all child views and group them into rows. // note that we are NOT positioning. // when we are done with a row, we call flowRow to finish it. for (idx = 0; idx < len; idx++) { // get a child. child = children[idx]; if (child.get("useAbsoluteLayout")) continue; // update observing lists delete isObserving[SC.guidFor(child)]; nowObserving[SC.guidFor(child)] = child; // skip positioning of items with isVisible===false if (!child.get("isVisible")) continue; // get spacing, size, and cache childSize = this.flowSizeForView(idx, child); // adjust for spacer if (child.get("isSpacer")) { childSize[primary_d] = 0; } child._scfl_cachedFlowSize = { width: childSize.width, height: childSize.height }; // supply a clone, since we are about to modify childSpacing = this.flowSpacingForView(idx, child); childSize.width += childSpacing.left + childSpacing.right; childSize.height += childSpacing.top + childSpacing.bottom; // flowRow will use this child._scfl_cachedFlowSpacing = childSpacing; child._scfl_cachedSpacedSize = childSize; // determine if the item can fit in the row if (canWrap && row.length > 0) { // test, including the collapsed right margin+padding if (itemOffset + childSize[primary_d] >= primaryContainerSize) { // first, flow this row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // We need another row. row = []; rows.push(row); rowOffset += rowSize; rowSize = 0; itemOffset = 0; } } // add too row and update row size+item offset row.push(child); rowSize = Math.max(childSize[secondary_d], rowSize); itemOffset += childSize[primary_d]; } // flow last row this.flowRow(row, primaryContainerSize, padding, rowOffset, rowSize, primary, secondary, align); // update calculated width/height this._scfl_lastFrameSize = this.get("frame"); if (!canWrap && this.get("autoResize")) { this._scfl_lastFrameSize[primary_d] = itemOffset + padding[primary] + padding[primary_os]; this.adjust(primary_d, itemOffset + padding[primary] + padding[primary_os]); } else if (this.get("autoResize")) { this._scfl_lastFrameSize[secondary_d] = rowOffset + rowSize + padding[secondary] + padding[secondary_os]; this.adjust(secondary_d, rowOffset + rowSize + padding[secondary] + padding[secondary_os]); } // cleanup on aisle 7 for (idx in isObserving) { this._scfl_unobserveChild(isObserving[idx]); } for (idx in nowObserving) { this._scfl_observeChild(nowObserving[idx]); } this._scfl_isObserving = nowObserving; },
console.error("SC.loadModule(): Failted to lazily instatiate entry for '%@'".fmt(moduleName));
console.error("SC.loadModule(): Failed to lazily instatiate entry for '%@'".fmt(moduleName));
_scm_moduleDidLoad: function(moduleName, target, method, args) { var m = method, t = target ; if(SC.typeOf(target) === SC.T_STRING) { t = SC.objectForPropertyPath(target); } if(SC.typeOf(method) === SC.T_STRING) { m = SC.objectForPropertyPath(method, t); } if(!m) { if(SC.LAZY_INSTANTIATION[moduleName]) { var lazyInfo = SC.LAZY_INSTANTIATION[moduleName]; if (SC.LOG_MODULE_LOADING) console.log("SC.loadModule(): Module '%@' is marked for lazy instantiation, instantiating it now…".fmt(moduleName)); for(var i=0, iLen = lazyInfo.length; i<iLen; i++) { try { lazyInfo[i](); }catch(e) { console.error("SC.loadModule(): Failted to lazily instatiate entry for '%@'".fmt(moduleName)); } } delete SC.LAZY_INSTANTIATION[moduleName]; if(SC.typeOf(target) === SC.T_STRING) { t = SC.objectForPropertyPath(target); } if(SC.typeOf(method) === SC.T_STRING) { m = SC.objectForPropertyPath(method, t); } if(!method) { throw "SC.loadModule(): could not find callback for lazily instantiated module '%@'".fmt(moduleName); } } else { throw "SC.loadModule(): could not find callback for '%@'".fmt(moduleName); } } if(!args) { args = []; } args.push(moduleName); var needsRunLoop = !!SC.RunLoop.currentRunLoop; if (needsRunLoop) { SC.run(function() { m.apply(t, args) ; }); } else { m.apply(t, args) ; } },
if (this._picker) this._picker.set('contentView', null);
_scmd_tile: function() { // first, determine what is and is not visible. var masterIsVisible = !this.get("masterIsHidden"); // now, tile var masterWidth = this.get("masterWidth"), master = this.get("masterView"), detail = this.get("detailView"); if (masterIsVisible) { // hide picker if needed this.hideMasterPicker(); // draw master if needed if (!this._masterIsDrawn) { this.appendChild(master); this._masterIsDrawn = YES; } // set master layout master.set("layout", { left: 0, top: 0, bottom: 0, width: masterWidth }); // and child, naturally var extra = this.getThemedProperty('dividerWidth', 'MASTER_DETAIL_DIVIDER_WIDTH'); detail.set("layout", { left: masterWidth + extra, right: 0, top: 0, bottom: 0 }); } else { // remove master if needed if (this._masterIsDrawn) { this.removeChild(master); this._masterIsDrawn = NO; } // and child, naturally detail.set("layout", { left: 0, right: 0, top: 0, bottom: 0 }); } }
context.record.notifyPropertyChange(context.key);
_SCRA_childObserver: function(obj, key, deprecated, context, rev) { this.call(context.record, context.key, obj); },
SC.RunLoop.begin();
_scv_animationEnd: function(evt){ // WARNING: Sometimes this will get called more than once for a property. Not sure why. // FIXME: Why do I have a RunLoop here? Do I need it? SC.RunLoop.begin(); var propertyName = evt.originalEvent.propertyName, layout = this.get('layout'), layoutProperty, animation; // FIXME: Implement this. if (propertyName === SC.platform.domCSSPrefix+'Transform') { throw "Not implemented"; } else { layoutProperty = propertyName; } animation = this._activeAnimations ? this._activeAnimations[propertyName] : null; if(animation) { var layer = this.get('layer'), styleKey = SC.platform.domCSSPrefix+"Transition", currentCSS = layer.style[styleKey]; if (animation.callback) { if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this._scv_runAnimationCallback(animation.callback, evt, this._animatedTransforms[idx], NO); } } else { this._scv_runAnimationCallback(animation.callback, evt, propertyName, NO); } } // FIXME: Not really sure this is the right way to do it, but we don't want to trigger a layout update layer.style[styleKey] = currentCSS.split(/\s*,\s*/).removeObject(animation.css).join(', '); if (this._animatedTransforms && this._animatedTransforms.length > 0) { for(idx=0; idx < this._animatedTransforms.length; idx++) { delete layout['animate'+this._animatedTransforms[idx].capitalize()]; } this._animatedTransforms = null; } else { delete layout['animate'+layoutProperty.capitalize()]; } delete this._activeAnimations[propertyName]; } SC.RunLoop.end(); },
SC.RunLoop.end();
_scv_animationEnd: function(evt){ // WARNING: Sometimes this will get called more than once for a property. Not sure why. // FIXME: Why do I have a RunLoop here? Do I need it? SC.RunLoop.begin(); var propertyName = evt.originalEvent.propertyName, layout = this.get('layout'), layoutProperty, animation; // FIXME: Implement this. if (propertyName === SC.platform.domCSSPrefix+'Transform') { throw "Not implemented"; } else { layoutProperty = propertyName; } animation = this._activeAnimations ? this._activeAnimations[propertyName] : null; if(animation) { var layer = this.get('layer'), styleKey = SC.platform.domCSSPrefix+"Transition", currentCSS = layer.style[styleKey]; if (animation.callback) { if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this._scv_runAnimationCallback(animation.callback, evt, this._animatedTransforms[idx], NO); } } else { this._scv_runAnimationCallback(animation.callback, evt, propertyName, NO); } } // FIXME: Not really sure this is the right way to do it, but we don't want to trigger a layout update layer.style[styleKey] = currentCSS.split(/\s*,\s*/).removeObject(animation.css).join(', '); if (this._animatedTransforms && this._animatedTransforms.length > 0) { for(idx=0; idx < this._animatedTransforms.length; idx++) { delete layout['animate'+this._animatedTransforms[idx].capitalize()]; } this._animatedTransforms = null; } else { delete layout['animate'+layoutProperty.capitalize()]; } delete this._activeAnimations[propertyName]; } SC.RunLoop.end(); },
layoutProperty, animation; if (propertyName === SC.platform.domCSSPrefix+'Transform') { throw "Not implemented"; } else { layoutProperty = propertyName; }
animation;
_scv_animationEnd: function(evt){ // WARNING: Sometimes this will get called more than once for a property. Not sure why. var propertyName = evt.originalEvent.propertyName, layout = this.get('layout'), layoutProperty, animation; // FIXME: Implement this. if (propertyName === SC.platform.domCSSPrefix+'Transform') { throw "Not implemented"; } else { layoutProperty = propertyName; } animation = this._activeAnimations ? this._activeAnimations[propertyName] : null; if(animation) { var layer = this.get('layer'), styleKey = SC.platform.domCSSPrefix+"Transition", currentCSS = layer.style[styleKey]; if (animation.callback) { if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this._scv_runAnimationCallback(animation.callback, evt, this._animatedTransforms[idx], NO); } } else { this._scv_runAnimationCallback(animation.callback, evt, propertyName, NO); } } // FIXME: Not really sure this is the right way to do it, but we don't want to trigger a layout update layer.style[styleKey] = currentCSS.split(/\s*,\s*/).removeObject(animation.css).join(', '); if (this._animatedTransforms && this._animatedTransforms.length > 0) { for(idx=0; idx < this._animatedTransforms.length; idx++) { delete layout['animate'+this._animatedTransforms[idx].capitalize()]; } this._animatedTransforms = null; } else { delete layout['animate'+layoutProperty.capitalize()]; } delete this._activeAnimations[propertyName]; } },
var layer = this.get('layer'), styleKey = SC.platform.domCSSPrefix+"Transition", currentCSS = layer.style[styleKey];
_scv_animationEnd: function(evt){ // WARNING: Sometimes this will get called more than once for a property. Not sure why. var propertyName = evt.originalEvent.propertyName, layout = this.get('layout'), layoutProperty, animation; // FIXME: Implement this. if (propertyName === SC.platform.domCSSPrefix+'Transform') { throw "Not implemented"; } else { layoutProperty = propertyName; } animation = this._activeAnimations ? this._activeAnimations[propertyName] : null; if(animation) { var layer = this.get('layer'), styleKey = SC.platform.domCSSPrefix+"Transition", currentCSS = layer.style[styleKey]; if (animation.callback) { if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this._scv_runAnimationCallback(animation.callback, evt, this._animatedTransforms[idx], NO); } } else { this._scv_runAnimationCallback(animation.callback, evt, propertyName, NO); } } // FIXME: Not really sure this is the right way to do it, but we don't want to trigger a layout update layer.style[styleKey] = currentCSS.split(/\s*,\s*/).removeObject(animation.css).join(', '); if (this._animatedTransforms && this._animatedTransforms.length > 0) { for(idx=0; idx < this._animatedTransforms.length; idx++) { delete layout['animate'+this._animatedTransforms[idx].capitalize()]; } this._animatedTransforms = null; } else { delete layout['animate'+layoutProperty.capitalize()]; } delete this._activeAnimations[propertyName]; } },
layer.style[styleKey] = currentCSS.split(/\s*,\s*/).removeObject(animation.css).join(', '); if (this._animatedTransforms && this._animatedTransforms.length > 0) { for(idx=0; idx < this._animatedTransforms.length; idx++) { delete layout['animate'+this._animatedTransforms[idx].capitalize()]; } this._animatedTransforms = null; } else { delete layout['animate'+layoutProperty.capitalize()]; } delete this._activeAnimations[propertyName]; }
this._scv_removeAnimationFromLayout(propertyName, YES); }
_scv_animationEnd: function(evt){ // WARNING: Sometimes this will get called more than once for a property. Not sure why. var propertyName = evt.originalEvent.propertyName, layout = this.get('layout'), layoutProperty, animation; // FIXME: Implement this. if (propertyName === SC.platform.domCSSPrefix+'Transform') { throw "Not implemented"; } else { layoutProperty = propertyName; } animation = this._activeAnimations ? this._activeAnimations[propertyName] : null; if(animation) { var layer = this.get('layer'), styleKey = SC.platform.domCSSPrefix+"Transition", currentCSS = layer.style[styleKey]; if (animation.callback) { if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this._scv_runAnimationCallback(animation.callback, evt, this._animatedTransforms[idx], NO); } } else { this._scv_runAnimationCallback(animation.callback, evt, propertyName, NO); } } // FIXME: Not really sure this is the right way to do it, but we don't want to trigger a layout update layer.style[styleKey] = currentCSS.split(/\s*,\s*/).removeObject(animation.css).join(', '); if (this._animatedTransforms && this._animatedTransforms.length > 0) { for(idx=0; idx < this._animatedTransforms.length; idx++) { delete layout['animate'+this._animatedTransforms[idx].capitalize()]; } this._animatedTransforms = null; } else { delete layout['animate'+layoutProperty.capitalize()]; } delete this._activeAnimations[propertyName]; } },
animation;
animation, idx;
_scv_animationEnd: function(evt){ // WARNING: Sometimes this will get called more than once for a property. Not sure why. var propertyName = evt.originalEvent.propertyName, layout = this.get('layout'), animation; animation = this._activeAnimations ? this._activeAnimations[propertyName] : null; if(animation) { if (animation.callback) { // Charles says this is a good idea SC.RunLoop.begin(); // We're using invokeLater so we don't trigger any layout changes from the callbacks until the animations are done if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this.invokeLater('_scv_runAnimationCallback', 1, animation.callback, evt, this._animatedTransforms[idx], NO); } } else { this.invokeLater('_scv_runAnimationCallback', 1, animation.callback, evt, propertyName, NO); } SC.RunLoop.end(); } this._scv_removeAnimationFromLayout(propertyName, YES); } },
var layout = this.get('layout');
var layout = this.get('layout'), idx;
_scv_removeAnimationFromLayout: function(propertyName, updateStyle, isPending) { if (updateStyle) { var layer = this.get('layer'), updatedCSS = [], key; for(key in this._activeAnimations) { if (key !== propertyName) updatedCSS.push(this._activeAnimations[key].css); } // FIXME: Not really sure this is the right way to do it, but we don't want to trigger a layout update if (layer) layer.style[SC.platform.domCSSPrefix+"Transition"] = updatedCSS.join(', '); } var layout = this.get('layout'); if (propertyName === '-'+SC.platform.cssPrefix+'-transform' && this._animatedTransforms && this._animatedTransforms.length > 0) { for(idx=0; idx < this._animatedTransforms.length; idx++) { delete layout['animate'+this._animatedTransforms[idx].capitalize()]; } this._animatedTransforms = null; } delete layout['animate'+propertyName.capitalize()]; if (!isPending) delete this._activeAnimations[propertyName]; },
_scv_removeAnimationFromLayout: function(propertyName, updateStyle) {
_scv_removeAnimationFromLayout: function(propertyName, updateStyle, isPending) {
_scv_removeAnimationFromLayout: function(propertyName, updateStyle) { if (updateStyle) { var layer = this.get('layer'), updatedCSS = [], key; for(key in this._activeAnimations) { if (key !== propertyName) updatedCSS.push(this._activeAnimations[key].css); } // FIXME: Not really sure this is the right way to do it, but we don't want to trigger a layout update layer.style[SC.platform.domCSSPrefix+"Transition"] = updatedCSS.join(', '); } var layout = this.get('layout'); if (propertyName === '-'+SC.platform.cssPrefix+'-transform' && this._animatedTransforms && this._animatedTransforms.length > 0) { for(idx=0; idx < this._animatedTransforms.length; idx++) { delete layout['animate'+this._animatedTransforms[idx].capitalize()]; } this._animatedTransforms = null; } delete layout['animate'+propertyName.capitalize()]; delete this._activeAnimations[propertyName]; },
delete this._activeAnimations[propertyName];
if (!isPending) delete this._activeAnimations[propertyName];
_scv_removeAnimationFromLayout: function(propertyName, updateStyle) { if (updateStyle) { var layer = this.get('layer'), updatedCSS = [], key; for(key in this._activeAnimations) { if (key !== propertyName) updatedCSS.push(this._activeAnimations[key].css); } // FIXME: Not really sure this is the right way to do it, but we don't want to trigger a layout update layer.style[SC.platform.domCSSPrefix+"Transition"] = updatedCSS.join(', '); } var layout = this.get('layout'); if (propertyName === '-'+SC.platform.cssPrefix+'-transform' && this._animatedTransforms && this._animatedTransforms.length > 0) { for(idx=0; idx < this._animatedTransforms.length; idx++) { delete layout['animate'+this._animatedTransforms[idx].capitalize()]; } this._animatedTransforms = null; } delete layout['animate'+propertyName.capitalize()]; delete this._activeAnimations[propertyName]; },
var key, callback;
_scv_willRenderAnimations: function(){ var key, callback; if (SC.platform.supportsCSSTransitions) { var layer = this.get('layer'), currentStyle = layer ? layer.style : null, newStyle = this.get('layoutStyle'), transitionStyle = newStyle[SC.platform.domCSSPrefix+"Transition"], layout = this.get('layout'), idx; // Handle existing animations if (this._activeAnimations) { for(key in this._activeAnimations){ // TODO: Check for more than duration if ( newStyle[key] !== (currentStyle ? currentStyle[key] : null) || !this._pendingAnimations || !this._pendingAnimations[key] || this._activeAnimations[key].duration !== this._pendingAnimations[key].duration ) { callback = this._activeAnimations[key].callback; if (callback) { if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this._scv_runAnimationCallback(callback, null, this._animatedTransforms[idx], YES); } this._animatedTransforms = null; } else { this._scv_runAnimationCallback(callback, null, key, YES); } } this._scv_removeAnimationFromLayout(key, YES); } } } this._activeAnimations = this._pendingAnimations; this._pendingAnimations = null; } else { // Transitions not supported for (key in this._pendingAnimations) { callback = this._pendingAnimations[key].callback; if (callback) this._scv_runAnimationCallback(callback, null, key, NO); this._scv_removeAnimationFromLayout(key, NO, YES); } this._activeAnimations = this._pendingAnimations = null; } },
idx;
key, callback, idx;
_scv_willRenderAnimations: function(){ var key, callback; if (SC.platform.supportsCSSTransitions) { var layer = this.get('layer'), currentStyle = layer ? layer.style : null, newStyle = this.get('layoutStyle'), transitionStyle = newStyle[SC.platform.domCSSPrefix+"Transition"], layout = this.get('layout'), idx; // Handle existing animations if (this._activeAnimations) { for(key in this._activeAnimations){ // TODO: Check for more than duration if ( newStyle[key] !== (currentStyle ? currentStyle[key] : null) || !this._pendingAnimations || !this._pendingAnimations[key] || this._activeAnimations[key].duration !== this._pendingAnimations[key].duration ) { callback = this._activeAnimations[key].callback; if (callback) { if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this._scv_runAnimationCallback(callback, null, this._animatedTransforms[idx], YES); } this._animatedTransforms = null; } else { this._scv_runAnimationCallback(callback, null, key, YES); } } this._scv_removeAnimationFromLayout(key, YES); } } } this._activeAnimations = this._pendingAnimations; this._pendingAnimations = null; } else { // Transitions not supported for (key in this._pendingAnimations) { callback = this._pendingAnimations[key].callback; if (callback) this._scv_runAnimationCallback(callback, null, key, NO); this._scv_removeAnimationFromLayout(key, NO, YES); } this._activeAnimations = this._pendingAnimations = null; } },
} else { for (key in this._pendingAnimations) { callback = this._pendingAnimations[key].callback; if (callback) this._scv_runAnimationCallback(callback, null, key, NO); this._scv_removeAnimationFromLayout(key, NO, YES); } this._activeAnimations = this._pendingAnimations = null;
_scv_willRenderAnimations: function(){ var key, callback; if (SC.platform.supportsCSSTransitions) { var layer = this.get('layer'), currentStyle = layer ? layer.style : null, newStyle = this.get('layoutStyle'), transitionStyle = newStyle[SC.platform.domCSSPrefix+"Transition"], layout = this.get('layout'), idx; // Handle existing animations if (this._activeAnimations) { for(key in this._activeAnimations){ // TODO: Check for more than duration if ( newStyle[key] !== (currentStyle ? currentStyle[key] : null) || !this._pendingAnimations || !this._pendingAnimations[key] || this._activeAnimations[key].duration !== this._pendingAnimations[key].duration ) { callback = this._activeAnimations[key].callback; if (callback) { if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this._scv_runAnimationCallback(callback, null, this._animatedTransforms[idx], YES); } this._animatedTransforms = null; } else { this._scv_runAnimationCallback(callback, null, key, YES); } } this._scv_removeAnimationFromLayout(key, YES); } } } this._activeAnimations = this._pendingAnimations; this._pendingAnimations = null; } else { // Transitions not supported for (key in this._pendingAnimations) { callback = this._pendingAnimations[key].callback; if (callback) this._scv_runAnimationCallback(callback, null, key, NO); this._scv_removeAnimationFromLayout(key, NO, YES); } this._activeAnimations = this._pendingAnimations = null; } },
layout = this.get('layout');
layout = this.get('layout'), idx;
_scv_willRenderAnimations: function(){ var key, callback; if (SC.platform.supportsCSSTransitions) { var layer = this.get('layer'), currentStyle = layer ? layer.style : null, newStyle = this.get('layoutStyle'), transitionStyle = newStyle[SC.platform.domCSSPrefix+"Transition"], layout = this.get('layout'); // Handle existing animations if (this._activeAnimations) { for(key in this._activeAnimations){ // TODO: Check for more than duration if ( (currentStyle && newStyle[key] !== currentStyle[key]) || !this._pendingAnimations || !this._pendingAnimations[key] || this._activeAnimations[key].duration !== this._pendingAnimations[key].duration ) { callback = this._activeAnimations[key].callback; if (callback) { if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this._scv_runAnimationCallback(callback, null, this._animatedTransforms[idx], YES); } this._animatedTransforms = null; } else { this._scv_runAnimationCallback(callback, null, key, YES); } } this._scv_removeAnimationFromLayout(key, YES); } } } this._activeAnimations = this._pendingAnimations; this._pendingAnimations = null; } else { // Transitions not supported for (key in this._pendingAnimations) { callback = this._pendingAnimations[key].callback; if (callback) this._scv_runAnimationCallback(callback, null, key, NO); this._scv_removeAnimationFromLayout(key, NO, YES); } this._activeAnimations = this._pendingAnimations = null; } },
this._scv_removeAnimationFromLayout(key);
this._scv_removeAnimationFromLayout(key, NO, YES);
_scv_willRenderAnimations: function(){ if (SC.platform.supportsCSSTransitions) { var layer = this.get('layer'), currentStyle = layer ? layer.style : null, newStyle = this.get('layoutStyle'), transitionStyle = newStyle[SC.platform.domCSSPrefix+"Transition"], layout = this.get('layout'), key; // Handle existing animations if (this._activeAnimations) { for(key in this._activeAnimations){ // TODO: Check for more than duration if ( newStyle[key] !== currentStyle[key] || !this._pendingAnimations || !this._pendingAnimations[key] || this._activeAnimations[key].duration !== this._pendingAnimations[key].duration ) { var callback = this._activeAnimations[key].callback; if (callback) { if (this._animatedTransforms && this._animatedTransforms.length > 0) { for (idx=0; idx < this._animatedTransforms.length; idx++) { this._scv_runAnimationCallback(callback, null, this._animatedTransforms[idx], YES); } this._animatedTransforms = null; } else { this._scv_runAnimationCallback(callback, null, key, YES); } } this._scv_removeAnimationFromLayout(key, YES); } } } this._activeAnimations = this._pendingAnimations; this._pendingAnimations = null; } else { // Transitions not supported var key; for (key in this._pendingAnimations) { var callback = this._pendingAnimations[key].callback; if (callback) this._scv_runAnimationCallback(callback, null, key, NO); this._scv_removeAnimationFromLayout(key); } this._activeAnimations = this._pendingAnimations = null; } },
let prefix = (elem.getAttributeNS(NS.uri, "class") || "") + " ";
let prefix = (elem.getAttributeNS(NS, "class") || "") + " ";
_setClass: function (elem, active) { let prefix = (elem.getAttributeNS(NS.uri, "class") || "") + " "; if (active) elem.setAttributeNS(NS.uri, "highlight", prefix + "HintActive"); else elem.setAttributeNS(NS.uri, "highlight", prefix + "HintElem"); },
elem.setAttributeNS(NS.uri, "highlight", prefix + "HintActive");
elem.setAttributeNS(NS, "highlight", prefix + "HintActive");
_setClass: function (elem, active) { let prefix = (elem.getAttributeNS(NS.uri, "class") || "") + " "; if (active) elem.setAttributeNS(NS.uri, "highlight", prefix + "HintActive"); else elem.setAttributeNS(NS.uri, "highlight", prefix + "HintElem"); },
elem.setAttributeNS(NS.uri, "highlight", prefix + "HintElem");
elem.setAttributeNS(NS, "highlight", prefix + "HintElem");
_setClass: function (elem, active) { let prefix = (elem.getAttributeNS(NS.uri, "class") || "") + " "; if (active) elem.setAttributeNS(NS.uri, "highlight", prefix + "HintActive"); else elem.setAttributeNS(NS.uri, "highlight", prefix + "HintElem"); },
document.getElementById('liberator-statusline').setAttributeNS(NS.uri, "highlight", group);
_setHighlightGroup: function (group) { this._messageBox.setAttributeNS(NS.uri, "highlight", group); },
this._promptWidget.size = val.length;
_setPrompt: function (val, highlightGroup) { this._promptWidget.value = val; this._promptWidget.size = val.length; this._promptWidget.collapsed = (val == ""); this._promptWidget.setAttributeNS(NS.uri, "highlight", highlightGroup || commandline.HL_NORMAL); },
this._promptWidget.setAttributeNS(NS.uri, "highlight", highlightGroup || commandline.HL_NORMAL);
_setPrompt: function (val, highlightGroup) { this._promptWidget.value = val; this._promptWidget.size = val.length; this._promptWidget.collapsed = (val == ""); this._promptWidget.setAttributeNS(NS.uri, "highlight", highlightGroup || commandline.HL_NORMAL); },
setTimeout( function(){ self._idleEntry(); },
setTimeout(this._doIdleEntry,
_setupIdle: function() { if (this.get('runWhenIdle') && !this._idleIsScheduled && this.get('taskCount') > 0) { var self = this; setTimeout( function(){ self._idleEntry(); }, this.get('interval') ); this._idleIsScheduled = YES; } },
var cloc = location.hash ; cloc = (cloc && cloc.length > 0) ? cloc.slice(1,cloc.length) : '' ; if (cloc != loc) { location.hash = (loc && loc.length > 0) ? encodeURI(loc) : '#' ; } this.gotoRoute(loc) ; },
var cloc = this._cloc ; if (cloc != loc) { this._backStack.push(this._cloc) ; this._forwardStack.length = 0 ; this._cloc = loc ; location.hash = (loc && loc.length > 0) ? loc : '' ; this._locationDidChange = true ; } }
_setWindowLocation: function(loc) { //console.log('_setWindowLocation('+loc+')') ; var cloc = location.hash ; cloc = (cloc && cloc.length > 0) ? cloc.slice(1,cloc.length) : '' ; if (cloc != loc) { location.hash = (loc && loc.length > 0) ? encodeURI(loc) : '#' ; } this.gotoRoute(loc) ; },
body.css('overflow', 'visible');
if(SC.PICKERS_OPEN > 0) { SC.PICKERS_OPEN--; } if(SC.PICKERS_OPEN === 0) body.css('overflow', 'visible');
_showOverflow: function(){ var body = SC.$(document.body); body.css('overflow', 'visible'); }
for (let [command, args] in this.parseCommands(command)) { if (command) { yield [command, args]; if (command.subCommand && args[command.subCommand]) commands.push(args[command.subCommand]);
try { for (let [command, args] in this.parseCommands(command)) { if (command) { yield [command, args]; if (command.subCommand && args[command.subCommand]) commands.push(args[command.subCommand]); }
_subCommands: function (command) { let commands = [command]; while (command = commands.shift()) for (let [command, args] in this.parseCommands(command)) { if (command) { yield [command, args]; if (command.subCommand && args[command.subCommand]) commands.push(args[command.subCommand]); } } },
catch (e) {}
_subCommands: function (command) { let commands = [command]; while (command = commands.shift()) for (let [command, args] in this.parseCommands(command)) { if (command) { yield [command, args]; if (command.subCommand && args[command.subCommand]) commands.push(args[command.subCommand]); } } },
if(attributes["color"]){style+='color:'+attributes["color"]+';';}
if(attributes["color"]&&attributes["color"].match(/^#[0-9a-fA-F]{6}$/)){style+='color:'+attributes["color"]+';';}
rep(/<br\s?\/?[^>]*>/gi,"\n\n");rep(/&nbsp;/gi," ");rep(/&quot;/gi,"\"");rep(/&lt;/gi,"<");rep(/&gt;/gi,">");rep(/&amp;/gi,"&");return s;},_textToPreview:function(s){s=tinymce.trim(s);var rule=/&lt;op:(b|u|s|i|font|large|small|color)(\s+(.*?)|)&gt;(.*?)&lt;\/op:\1&gt;/i;function rep(re,str){s=s.replace(re,str);};function getAttributes(str){var result={};if(!str){return result;}var reg=new RegExp(/([^\s]*?)=(?:&quot;|")(.*?)(?:&quote;|")/gi);while((att=reg.exec(str))!=null){result[att[1]]=att[2];}return result;};rep(/</gi,"&lt;");rep(/>/gi,"&gt;");rep(/\n/gi,"<br />");rep(/&lt;(\/|)op:(b|u|s|i|font|large|small|color)(?:\s+(.*?)|)&gt;/gi,function(str,isEndTag,org_tagname,attributes_str){var opt="";var style="";var tagname=org_tagname;var attributes=getAttributes(attributes_str);var fontSizeMap=["xx-small","x-small","small","medium","large","x-large","xx-large"];var fontsize=fontSizeMap[3];if(tagname=="font"||tagname=="color"||tagname=="large"||tagname=="small"){tagname="span";}if(isEndTag){return"</"+tagname+">";}if(org_tagname=="font"){if(attributes["size"]){if(fontSizeMap[attributes["size"]-1]){fontsize=fontSizeMap[attributes["size"]-1];}style+='font-size:'+fontsize+';';}if(attributes["color"]){style+='color:'+attributes["color"]+';';}opt=' style="'+style+'"';}if(org_tagname=="color"&&attributes["code"]){opt=' style="color:'+attributes["code"]+';"';}if(org_tagname=="large"){opt=' style="font-size:large"';}if(org_tagname=="small"){opt=' style="font-size:xx-small"';}return"<"+tagname+opt+">";});return s;}});tinymce.PluginManager.add('openpne',tinymce.plugins.OpenPNEPlugin);})();
if(org_tagname=="color"&&attributes["code"]){opt=' style="color:'+attributes["code"]+';"';}
if(org_tagname=="color"&&attributes["code"]&&attributes["code"].match(/^#[0-9a-fA-F]{6}$/)){opt=' style="color:'+attributes["code"]+';"';}
rep(/<br\s?\/?[^>]*>/gi,"\n\n");rep(/&nbsp;/gi," ");rep(/&quot;/gi,"\"");rep(/&lt;/gi,"<");rep(/&gt;/gi,">");rep(/&amp;/gi,"&");return s;},_textToPreview:function(s){s=tinymce.trim(s);var rule=/&lt;op:(b|u|s|i|font|large|small|color)(\s+(.*?)|)&gt;(.*?)&lt;\/op:\1&gt;/i;function rep(re,str){s=s.replace(re,str);};function getAttributes(str){var result={};if(!str){return result;}var reg=new RegExp(/([^\s]*?)=(?:&quot;|")(.*?)(?:&quote;|")/gi);while((att=reg.exec(str))!=null){result[att[1]]=att[2];}return result;};rep(/</gi,"&lt;");rep(/>/gi,"&gt;");rep(/\n/gi,"<br />");rep(/&lt;(\/|)op:(b|u|s|i|font|large|small|color)(?:\s+(.*?)|)&gt;/gi,function(str,isEndTag,org_tagname,attributes_str){var opt="";var style="";var tagname=org_tagname;var attributes=getAttributes(attributes_str);var fontSizeMap=["xx-small","x-small","small","medium","large","x-large","xx-large"];var fontsize=fontSizeMap[3];if(tagname=="font"||tagname=="color"||tagname=="large"||tagname=="small"){tagname="span";}if(isEndTag){return"</"+tagname+">";}if(org_tagname=="font"){if(attributes["size"]){if(fontSizeMap[attributes["size"]-1]){fontsize=fontSizeMap[attributes["size"]-1];}style+='font-size:'+fontsize+';';}if(attributes["color"]){style+='color:'+attributes["color"]+';';}opt=' style="'+style+'"';}if(org_tagname=="color"&&attributes["code"]){opt=' style="color:'+attributes["code"]+';"';}if(org_tagname=="large"){opt=' style="font-size:large"';}if(org_tagname=="small"){opt=' style="font-size:xx-small"';}return"<"+tagname+opt+">";});return s;}});tinymce.PluginManager.add('openpne',tinymce.plugins.OpenPNEPlugin);})();
}.property("baseTheme").cacheable(),
}.property().cacheable(),
_themeProperty: function(key, value) { // if it is a string, set theme name if (SC.typeOf(value) === SC.T_STRING) { this.set("_themeName", value); } // get the base theme var base = this.get("baseTheme"); // find theme, if possible if (this.get("_themeName")) { // Note: theme instance "find" function will search every parent // _except_ global (which is not a parent) var theme; if (base) { theme = base.find(this.get("_themeName")); if (theme) return theme; } theme = SC.Theme.find(this.get("_themeName")); if (theme) return theme; } // can't find anything, return base. return base; }.property("baseTheme").cacheable(),
loc = loc + this._offset;
loc = Math.max(0, Math.min(loc + this._offset, 1));
_triggerHandle: function(evt, firstEvent) { var width = this.get('frame').width, min = this.get('minimum'), max=this.get('maximum'), step = this.get('step'), v=this.get('value'), loc; if(firstEvent){ loc = this.convertFrameFromView({ x: evt.pageX }).x; this._evtDiff = evt.pageX - loc; }else{ loc = evt.pageX-this._evtDiff; } // convert to percentage loc = Math.max(0, Math.min(loc / width, 1)); // if the location is NOT in the general vicinity of the slider, we assume // that the mouse pointer or touch is in the center of where the knob should be. // otherwise, if we are starting, we need to do extra to add an offset if (firstEvent) { var value = this.get("value"); value = (value - min) / (max - min); // if the value and the loc are within 16px if (Math.abs(value * width - loc * width) < 16) this._offset = value - loc; else this._offset = 0; } // add offset loc = loc + this._offset; // convert to value using minimum/maximum then constrain to steps loc = min + ((max-min)*loc); if (step !== 0) loc = Math.round(loc / step) * step ; // if changes by more than a rounding amount, set v. if (Math.abs(v-loc)>=0.01) { this.set('value', loc); // adjust } return YES ; },
this._error = {start: i, end: j};
this.error = {start: i, end: j};
_updateCandidates: function (i, j) { //Logger.debug("_updateCandidates: " + i + ", " + j); if (!j) { j = this._segmentation.m; } var result = []; var c = this.phrase[i]; if (c) { for (var k = j; k > i; --k) { if (c[k]) { result = result.concat(c[k]); } } } if (result.length > 0) { result.currentPage = 0; this._candidateList = result; this._current = result[0]; } else { this._candidateList = null; this._current = null; this._error = {start: i, end: j}; } this._updateUI(); },
var tp=parseInt(p*10000)/100;
var tp = parseInt(parseInt(p*10000)/100);
doh._updateGlobalProgressBar = function(p,success,group){ var outerContainer=byId("progressOuter"); var gdiv=outerContainer.childNodes[doh._runedSuite-1]; if(!gdiv){ gdiv=document.createElement('div'); outerContainer.appendChild(gdiv); gdiv.className='success'; gdiv.setAttribute('_target',group); } if(!success && !gdiv._failure){ gdiv._failure=true; gdiv.className='failure'; if(group){ gdiv.setAttribute('title','failed group '+group); } } var tp=parseInt(p*10000)/100; gdiv.style.width = (tp-doh._currentGlobalProgressBarWidth)+"%"; return gdiv._failure; }
statusline.updateInputBuffer((hints.escNumbers ? mappings.mapLeader : "") +
statusline.updateInputBuffer((hints.escNumbers ? options["mapleader"] : "") +
_updateStatusline: function () { statusline.updateInputBuffer((hints.escNumbers ? mappings.mapLeader : "") + (this._hintNumber ? this.getHintString(this._hintNumber) : "")); },
statusline.updateInputBuffer((hints.escNumbers ? mappings.getMapLeader() : "") + (this._hintNumber || ""));
statusline.updateInputBuffer((hints.escNumbers ? mappings.getMapLeader() : "") + (this._hintNumber ? this.getHintString(this._hintNumber) : ""));
_updateStatusline: function () { statusline.updateInputBuffer((hints.escNumbers ? mappings.getMapLeader() : "") + (this._hintNumber || "")); },
for (let tab in values(this.allTabs)) {
for (let [i, tab] in Iterator(this.visibleTabs)) {
_updateTabCount: function () { for (let tab in values(this.allTabs)) { function node(clas) document.getAnonymousElementByAttribute(tab, "class", clas); if (!node("dactyl-tab-number")) { let dom = util.xmlToDom(<xul xmlns:xul={XUL} xmlns:html={XHTML} ><xul:hbox highlight="TabIconNumber" class="dactyl-tab-number" /><xul:hbox highlight="TabNumber" /></xul>.*, document); let img = node("tab-icon-image"); img.parentNode.appendChild(dom); } } statusline.updateTabCount(true); }, _onTabSelect: function () { // TODO: is all of that necessary? // I vote no. --Kris modes.reset(); statusline.updateTabCount(true); this.updateSelectionHistory(); },
><xul:hbox highlight="TabIconNumber" class="dactyl-tab-number" /><xul:hbox highlight="TabNumber" /></xul>.*, document);
><xul:hbox highlight="tab-number"><xul:label key="icon" align="center" highlight="TabIconNumber" class="dactyl-tab-number"/></xul:hbox ><xul:hbox highlight="tab-number"><html:div key="label" highlight="TabNumber"/></xul:hbox ></xul>.*, document, nodes);
_updateTabCount: function () { for (let tab in values(this.allTabs)) { function node(clas) document.getAnonymousElementByAttribute(tab, "class", clas); if (!node("dactyl-tab-number")) { let dom = util.xmlToDom(<xul xmlns:xul={XUL} xmlns:html={XHTML} ><xul:hbox highlight="TabIconNumber" class="dactyl-tab-number" /><xul:hbox highlight="TabNumber" /></xul>.*, document); let img = node("tab-icon-image"); img.parentNode.appendChild(dom); } } statusline.updateTabCount(true); }, _onTabSelect: function () { // TODO: is all of that necessary? // I vote no. --Kris modes.reset(); statusline.updateTabCount(true); this.updateSelectionHistory(); },
tab.ordinal = i + 1;
_updateTabCount: function () { for (let tab in values(this.allTabs)) { function node(clas) document.getAnonymousElementByAttribute(tab, "class", clas); if (!node("dactyl-tab-number")) { let dom = util.xmlToDom(<xul xmlns:xul={XUL} xmlns:html={XHTML} ><xul:hbox highlight="TabIconNumber" class="dactyl-tab-number" /><xul:hbox highlight="TabNumber" /></xul>.*, document); let img = node("tab-icon-image"); img.parentNode.appendChild(dom); } } statusline.updateTabCount(true); }, _onTabSelect: function () { // TODO: is all of that necessary? // I vote no. --Kris modes.reset(); statusline.updateTabCount(true); this.updateSelectionHistory(); },
cursor: this.get('cursor'),
cursor: cursor,
_updateViewRenderer: function() { if (!this._viewRenderer) return; var classNames = this.get('classNames'); if (this.get('theme')) { classNames = classNames.concat(this.get("theme").classNames); } if (this._themeName && classNames.indexOf(this._themeName) < 0) classNames.push(this._themeName); this._viewRenderer.attr({ layerId: this.layerId ? this.get('layerId') : SC.guidFor(this), classNames: classNames, backgroundColor: this.get('backgroundColor'), cursor: this.get('cursor'), isTextSelectable: this.get('isTextSelectable'), isEnabled: this.get('isEnabled'), isVisible: this.get('isVisible'), isFirstResponder: this.get('isFirstResponder'), hasStaticLayout: this.get('hasStaticLayout') && this.get('useStaticLayout') }); },
if (this._themeName && classNames.indexOf(this._themeName) < 0) classNames.push(this._themeName);
var themeName = this.get('themeName'); if (themeName && classNames.indexOf(themeName) < 0) classNames.push(themeName);
_updateViewRenderer: function() { if (!this._viewRenderer) return; var classNames = this.get('classNames'); if (this.get('theme')) { classNames = classNames.concat(this.get("theme").classNames); } // for backwards compatibility, make sure we push the theme name if it is not there already. This // is extremely questionable, but necessary at least for buttons. We maybe want to move this just // to such at some point. // TODO: consider // SC2.0: this should go away. if (this._themeName && classNames.indexOf(this._themeName) < 0) classNames.push(this._themeName); // get cursor: var cursor = this.get("cursor"); if (!cursor && this.get('shouldInheritCursor')) { // If this view has no cursor and should inherit it from the parent, // then it sets its own cursor view. This sets the cursor rather than // simply using the parent's cursor object so that its cursorless // childViews can also inherit it. cursor = this.getPath('parentView.cursor'); } this._viewRenderer.attr({ layerId: this.layerId ? this.get('layerId') : SC.guidFor(this), classNames: classNames, backgroundColor: this.get('backgroundColor'), role: this.get('ariaRole'), cursor: cursor, isTextSelectable: this.get('isTextSelectable'), isEnabled: this.get('isEnabled'), isVisible: this.get('isVisible'), isFirstResponder: this.get('isFirstResponder'), hasStaticLayout: this.get('useStaticLayout') }); },
hasStaticLayout: this.get('hasStaticLayout') && this.get('useStaticLayout')
hasStaticLayout: this.get('useStaticLayout')
_updateViewRenderer: function() { if (!this._viewRenderer) return; var classNames = this.get('classNames'); if (this.get('theme')) { classNames = classNames.concat(this.get("theme").classNames); } // for backwards compatibility, make sure we push the theme name if it is not there already. This // is extremely questionable, but necessary at least for buttons. We maybe want to move this just // to such at some point. // TODO: consider // SC2.0: this should go away. if (this._themeName && classNames.indexOf(this._themeName) < 0) classNames.push(this._themeName); // get cursor: var cursor = this.get("cursor"); if (!cursor && this.get('shouldInheritCursor')) { // If this view has no cursor and should inherit it from the parent, // then it sets its own cursor view. This sets the cursor rather than // simply using the parent's cursor object so that its cursorless // childViews can also inherit it. cursor = this.getPath('parentView.cursor'); } this._viewRenderer.attr({ layerId: this.layerId ? this.get('layerId') : SC.guidFor(this), classNames: classNames, backgroundColor: this.get('backgroundColor'), role: this.get('ariaRole'), cursor: cursor, isTextSelectable: this.get('isTextSelectable'), isEnabled: this.get('isEnabled'), isVisible: this.get('isVisible'), isFirstResponder: this.get('isFirstResponder'), hasStaticLayout: this.get('hasStaticLayout') && this.get('useStaticLayout') }); },
this._scv_willRenderAnimations();
_updateViewRenderer: function() { if (!this._viewRenderer) return; var classNames = this.get('classNames'); if (this.get('theme')) { classNames = classNames.concat(this.get("theme").classNames); } // for backwards compatibility, make sure we push the theme name if it is not there already. This // is extremely questionable, but necessary at least for buttons. We maybe want to move this just // to such at some point. // TODO: consider // SC2.0: this should go away. if (this._themeName && classNames.indexOf(this._themeName) < 0) classNames.push(this._themeName); // get cursor: var cursor = this.get("cursor"); if (!cursor && this.get('shouldInheritCursor')) { // If this view has no cursor and should inherit it from the parent, // then it sets its own cursor view. This sets the cursor rather than // simply using the parent's cursor object so that its cursorless // childViews can also inherit it. cursor = this.getPath('parentView.cursor'); } this._scv_willRenderAnimations(); this._viewRenderer.attr({ layerId: this.layerId ? this.get('layerId') : SC.guidFor(this), classNames: classNames, backgroundColor: this.get('backgroundColor'), role: this.get('ariaRole'), cursor: cursor, isTextSelectable: this.get('isTextSelectable'), isEnabled: this.get('isEnabled'), isVisible: this.get('isVisible'), isFirstResponder: this.get('isFirstResponder'), hasStaticLayout: this.get('useStaticLayout') }); },
this._scv_didRenderAnimations();
this._scv_willRenderAnimations();
_updateViewRenderer: function() { if (!this._viewRenderer) return; var classNames = this.get('classNames'); if (this.get('theme')) { classNames = classNames.concat(this.get("theme").classNames); } // for backwards compatibility, make sure we push the theme name if it is not there already. This // is extremely questionable, but necessary at least for buttons. We maybe want to move this just // to such at some point. // TODO: consider // SC2.0: this should go away. if (this._themeName && classNames.indexOf(this._themeName) < 0) classNames.push(this._themeName); // get cursor: var cursor = this.get("cursor"); if (!cursor && this.get('shouldInheritCursor')) { // If this view has no cursor and should inherit it from the parent, // then it sets its own cursor view. This sets the cursor rather than // simply using the parent's cursor object so that its cursorless // childViews can also inherit it. cursor = this.getPath('parentView.cursor'); } this._scv_didRenderAnimations(); this._viewRenderer.attr({ layerId: this.layerId ? this.get('layerId') : SC.guidFor(this), classNames: classNames, backgroundColor: this.get('backgroundColor'), role: this.get('ariaRole'), cursor: cursor, isTextSelectable: this.get('isTextSelectable'), isEnabled: this.get('isEnabled'), isVisible: this.get('isVisible'), isFirstResponder: this.get('isFirstResponder'), hasStaticLayout: this.get('useStaticLayout') }); },
b.equals(">")){b.next();d(q);return"xml-punctuation"}else if(f=="=")return"xml-punctuation";else if(/[\'\"]/.test(f)){d(c(f));return null}else{b.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/);return"xml-name"}}function c(b){return function(d,f){for(;!d.endOfLine();)if(d.next()==b){f(e);break}return"xml-attribute"}}function a(b,d){return function(f,g){for(;!f.endOfLine();){if(f.lookAhead(d,true)){g(q);break}f.next()}return b}}return function(b,d){return tokenizer(b,d||q)}}();return{make:function(q){function e(B){for(var D=
true),K=f.addEventHandler(f,"resize",w,true);x=function(){u&&clearTimeout(u);if(k.updateNumbers==w)k.updateNumbers=null;J();K()}}var d=this.frame,f=d.contentWindow,m=f.document,p=m.body,i=this.lineNumbers,j=i.firstChild,k=this,y=null,x=function(){};a();var I=setInterval(a,500);(this.options.textWrapping||this.options.styleNumbers?g:e)()},setDynamicHeight:function(){function a(){for(var p=0,i=g.lastChild,j;i&&e.isBR(i);){i.hackBR||p++;i=i.previousSibling}if(i){d=i.offsetHeight;j=i.offsetTop+(1+p)* d}else if(d)j=p*d;if(j)b.wrapping.style.height=Math.max(m+j,b.options.minHeight)+"px"}var b=this,c=b.options.cursorActivity,e=b.win,g=e.document.body,d=null,f=null,m=2*b.frame.offsetTop;g.style.overflowY="hidden";e.document.documentElement.style.overflowY="hidden";this.frame.scrolling="no";setTimeout(a,300);b.options.cursorActivity=function(p){c&&c(p);clearTimeout(f);f=setTimeout(a,100)}}};s.InvalidLineHandle={toString:function(){return"CodeMirror.InvalidLineHandle"}};s.replace=function(a){if(typeof a==
b.equals(">")){b.next();d(q);return"xml-punctuation"}else if(f=="=")return"xml-punctuation";else if(/[\'\"]/.test(f)){d(c(f));return null}else{b.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/);return"xml-name"}}function c(b){return function(d,f){for(;!d.endOfLine();)if(d.next()==b){f(e);break}return"xml-attribute"}}function a(b,d){return function(f,g){for(;!f.endOfLine();){if(f.lookAhead(d,true)){g(q);break}f.next()}return b}}return function(b,d){return tokenizer(b,d||q)}}();return{make:function(q){function e(B){for(var D=
let abbrevs = abbreviations.merged.filter(function (abbr) abbr.inModes(modes)); context.completions = [[abbr.lhs, abbr.rhs] for ([, abbr] in Iterator(abbrevs))];
let fn = modes ? function (abbr) abbr.inModes(modes) : util.identity; context.keys = { text: "lhs" , description: "rhs" }; context.completions = abbreviations.merged.filter(fn);
completion.abbreviation = function abbreviation(context, modes) { let abbrevs = abbreviations.merged.filter(function (abbr) abbr.inModes(modes)); context.completions = [[abbr.lhs, abbr.rhs] for ([, abbr] in Iterator(abbrevs))]; };
null}};try{var h=x.abort;x.abort=function(){if(x){h.call(x);if(x)x.readyState=0}g()}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){x&&!F&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||A,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol===
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
null}};try{var h=x.abort;x.abort=function(){if(x){h.call(x);if(x)x.readyState=0}g()}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){x&&!F&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||A,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol===
xhr.onload = xhr.onerror = null;
xhr.onload = xhr.onerror = xhr.ontimeout = null;
var abortXHR = function(xhr) { logger.debug('aborting XHR'); try { if('onload' in xhr) { xhr.onload = xhr.onerror = null; } else if('onreadystatechange' in xhr) { xhr.onreadystatechange = null; } if(xhr.abort) { xhr.abort(); } } catch(e) { logger.debug('error aborting xhr', e); } };
absolutize: function(element) { Position.prepare(); return Element.absolutize(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])*?\*\
absolutize: function(element) { Position.prepare(); return Element.absolutize(element); },
function action(e) { services.get("extensionManager")[command.action](e.id); };
action: function (addon) addon.userDisabled = true,
function action(e) { services.get("extensionManager")[command.action](e.id); };
action = function action() commands.execute(action.macro, makeParams.apply(this, arguments),
action = function action() commands.execute(action.macro, makeParams(this, arguments),
action = function action() commands.execute(action.macro, makeParams.apply(this, arguments), false, null, action.sourcing);
action = function action() commands.execute(macro, makeParams.apply(this, arguments),
action = function action() commands.execute(action.macro, makeParams.apply(this, arguments),
action = function action() commands.execute(macro, makeParams.apply(this, arguments), false, null, action.sourcing);
window.content.scrollTo(0, window.content.scrollY + elem.getBoundingClientRect().top - 10);
content.scrollTo(0, content.scrollY + elem.getBoundingClientRect().top - 10);
function action() { window.content.scrollTo(0, window.content.scrollY + elem.getBoundingClientRect().top - 10); // 10px context }
activate: function(element) { element = $(element); try { element.focus(); if (element.select && (element.tagName.toLowerCase() != 'input' || !['button', 'reset', 'submit'].include(element.type))) element.select(); } catch (e) { } 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])*?\*\
activate: function(element) { element = $(element); try { element.focus(); if (element.select && (element.tagName.toLowerCase() != 'input' || !['button', 'reset', 'submit'].include(element.type))) element.select(); } catch (e) { } return element; },
"number")e=this.nthLine(e);this.selectLines(e,0);this.win.focus()},currentLine:function(){return this.lineNumber(this.cursorLine())},cursorLine:function(){return this.cursorPosition().line},cursorCoords:function(e){return this.editor.cursorCoords(e)},activateLineNumbers:function(){function e(){if(f.offsetWidth!=0){for(var y=f;y.parentNode;y=y.parentNode);if(!l.parentNode||y!=document||!g.Editor){try{w()}catch(A){}clearInterval(x)}else if(l.offsetWidth!=u){u=l.offsetWidth;f.parentNode.style.paddingLeft= u+"px"}}}function c(){l.scrollTop=j.scrollTop||h.documentElement.scrollTop||0}function a(y){var A=m.firstChild.offsetHeight;if(A!=0){A=Math.ceil((50+Math.max(j.offsetHeight,Math.max(f.offsetHeight,j.scrollHeight||0)))/A);for(var v=m.childNodes.length;v<=A;v++){var z=document.createElement("DIV");z.appendChild(document.createTextNode(y?String(v+r.options.firstLineNumber):"\u00a0"));m.appendChild(z)}}}function b(){function y(){a(true);c()}r.updateNumbers=y;var A=g.addEventHandler(g,"scroll",c,true), v=g.addEventHandler(g,"resize",y,true);w=function(){A();v();if(r.updateNumbers==y)r.updateNumbers=null};y()}function d(){function y(J,K){E||(E=m.appendChild(document.createElement("DIV")));D&&D(E,K,J);B.push(E);B.push(J);N=E.offsetHeight+E.offsetTop;E=E.nextSibling}function A(){for(var J=0;J<B.length;J+=2)B[J].innerHTML=B[J+1];B=[]}function v(){if(!(!m.parentNode||m.parentNode!=r.lineNumbers)){for(var J=(new Date).getTime()+r.options.lineNumberTime;H;){for(y(O++,H.previousSibling);H&&!g.isBR(H);H= H.nextSibling)for(var K=H.offsetTop+H.offsetHeight;m.offsetHeight&&K-3>N;)y("&nbsp;");if(H)H=H.nextSibling;if((new Date).getTime()>J){A();G=setTimeout(v,r.options.lineNumberDelay);return}}for(;E;)y(O++);A();c()}}function z(J){c();a(J);H=j.firstChild;E=m.firstChild;N=0;O=r.options.firstLineNumber;v()}function L(){G&&clearTimeout(G);if(r.editor.allClean())z();else G=setTimeout(L,200)}var H,E,O,N,B=[],D=r.options.styleNumbers;z(true);var G=null;r.updateNumbers=L;var F=g.addEventHandler(g,"scroll",c, true),M=g.addEventHandler(g,"resize",L,true);w=function(){G&&clearTimeout(G);if(r.updateNumbers==L)r.updateNumbers=null;F();M()}}var f=this.frame,g=f.contentWindow,h=g.document,j=h.body,l=this.lineNumbers,m=l.firstChild,r=this,u=null,w=function(){};e();var x=setInterval(e,500);(this.options.textWrapping||this.options.styleNumbers?d:b)()},setDynamicHeight:function(){function e(){for(var j=0,l=d.lastChild,m;l&&b.isBR(l);){l.hackBR||j++;l=l.previousSibling}if(l){f=l.offsetHeight;m=l.offsetTop+(1+j)*
"number")a=this.nthLine(a);this.selectLines(a,0);this.win.focus()},currentLine:function(){return this.lineNumber(this.cursorLine())},cursorLine:function(){return this.cursorPosition().line},cursorCoords:function(a){return this.editor.cursorCoords(a)},activateLineNumbers:function(){function a(){if(d.offsetWidth!=0){for(var h=d;h.parentNode;h=h.parentNode);if(!i.parentNode||h!=document||!f.Editor){try{x()}catch(o){}clearInterval(I)}else if(i.offsetWidth!=y){y=i.offsetWidth;d.parentNode.style.paddingLeft= y+"px"}}}function b(){i.scrollTop=p.scrollTop||m.documentElement.scrollTop||0}function c(h){var o=j.firstChild.offsetHeight;if(o!=0){o=Math.ceil((50+Math.max(p.offsetHeight,Math.max(d.offsetHeight,p.scrollHeight||0)))/o);for(var r=j.childNodes.length;r<=o;r++){var v=document.createElement("DIV");v.appendChild(document.createTextNode(h?String(r+k.options.firstLineNumber):"\u00a0"));j.appendChild(v)}}}function e(){function h(){c(true);b()}k.updateNumbers=h;var o=f.addEventHandler(f,"scroll",b,true), r=f.addEventHandler(f,"resize",h,true);x=function(){o();r();if(k.updateNumbers==h)k.updateNumbers=null};h()}function g(){function h(n,z){q||(q=j.appendChild(document.createElement("DIV")));H&&H(q,z,n);t.push(q);t.push(n);A=q.offsetHeight+q.offsetTop;q=q.nextSibling}function o(){for(var n=0;n<t.length;n+=2)t[n].innerHTML=t[n+1];t=[]}function r(){if(!(!j.parentNode||j.parentNode!=k.lineNumbers)){for(var n=(new Date).getTime()+k.options.lineNumberTime;l;){for(h(B++,l.previousSibling);l&&!f.isBR(l);l= l.nextSibling)for(var z=l.offsetTop+l.offsetHeight;j.offsetHeight&&z-3>A;)h("&nbsp;");if(l)l=l.nextSibling;if((new Date).getTime()>n){o();u=setTimeout(r,k.options.lineNumberDelay);return}}for(;q;)h(B++);o();b()}}function v(n){b();c(n);l=p.firstChild;q=j.firstChild;A=0;B=k.options.firstLineNumber;r()}function w(){u&&clearTimeout(u);if(k.editor.allClean())v();else u=setTimeout(w,200)}var l,q,B,A,t=[],H=k.options.styleNumbers;v(true);var u=null;k.updateNumbers=w;var J=f.addEventHandler(f,"scroll",b, true),K=f.addEventHandler(f,"resize",w,true);x=function(){u&&clearTimeout(u);if(k.updateNumbers==w)k.updateNumbers=null;J();K()}}var d=this.frame,f=d.contentWindow,m=f.document,p=m.body,i=this.lineNumbers,j=i.firstChild,k=this,y=null,x=function(){};a();var I=setInterval(a,500);(this.options.textWrapping||this.options.styleNumbers?g:e)()},setDynamicHeight:function(){function a(){for(var p=0,i=g.lastChild,j;i&&e.isBR(i);){i.hackBR||p++;i=i.previousSibling}if(i){d=i.offsetHeight;j=i.offsetTop+(1+p)*
"number")e=this.nthLine(e);this.selectLines(e,0);this.win.focus()},currentLine:function(){return this.lineNumber(this.cursorLine())},cursorLine:function(){return this.cursorPosition().line},cursorCoords:function(e){return this.editor.cursorCoords(e)},activateLineNumbers:function(){function e(){if(f.offsetWidth!=0){for(var y=f;y.parentNode;y=y.parentNode);if(!l.parentNode||y!=document||!g.Editor){try{w()}catch(A){}clearInterval(x)}else if(l.offsetWidth!=u){u=l.offsetWidth;f.parentNode.style.paddingLeft=u+"px"}}}function c(){l.scrollTop=j.scrollTop||h.documentElement.scrollTop||0}function a(y){var A=m.firstChild.offsetHeight;if(A!=0){A=Math.ceil((50+Math.max(j.offsetHeight,Math.max(f.offsetHeight,j.scrollHeight||0)))/A);for(var v=m.childNodes.length;v<=A;v++){var z=document.createElement("DIV");z.appendChild(document.createTextNode(y?String(v+r.options.firstLineNumber):"\u00a0"));m.appendChild(z)}}}function b(){function y(){a(true);c()}r.updateNumbers=y;var A=g.addEventHandler(g,"scroll",c,true),v=g.addEventHandler(g,"resize",y,true);w=function(){A();v();if(r.updateNumbers==y)r.updateNumbers=null};y()}function d(){function y(J,K){E||(E=m.appendChild(document.createElement("DIV")));D&&D(E,K,J);B.push(E);B.push(J);N=E.offsetHeight+E.offsetTop;E=E.nextSibling}function A(){for(var J=0;J<B.length;J+=2)B[J].innerHTML=B[J+1];B=[]}function v(){if(!(!m.parentNode||m.parentNode!=r.lineNumbers)){for(var J=(new Date).getTime()+r.options.lineNumberTime;H;){for(y(O++,H.previousSibling);H&&!g.isBR(H);H=H.nextSibling)for(var K=H.offsetTop+H.offsetHeight;m.offsetHeight&&K-3>N;)y("&nbsp;");if(H)H=H.nextSibling;if((new Date).getTime()>J){A();G=setTimeout(v,r.options.lineNumberDelay);return}}for(;E;)y(O++);A();c()}}function z(J){c();a(J);H=j.firstChild;E=m.firstChild;N=0;O=r.options.firstLineNumber;v()}function L(){G&&clearTimeout(G);if(r.editor.allClean())z();else G=setTimeout(L,200)}var H,E,O,N,B=[],D=r.options.styleNumbers;z(true);var G=null;r.updateNumbers=L;var F=g.addEventHandler(g,"scroll",c,true),M=g.addEventHandler(g,"resize",L,true);w=function(){G&&clearTimeout(G);if(r.updateNumbers==L)r.updateNumbers=null;F();M()}}var f=this.frame,g=f.contentWindow,h=g.document,j=h.body,l=this.lineNumbers,m=l.firstChild,r=this,u=null,w=function(){};e();var x=setInterval(e,500);(this.options.textWrapping||this.options.styleNumbers?d:b)()},setDynamicHeight:function(){function e(){for(var j=0,l=d.lastChild,m;l&&b.isBR(l);){l.hackBR||j++;l=l.previousSibling}if(l){f=l.offsetHeight;m=l.offsetTop+(1+j)*
let x = win.scrollMaxX ? win.pageXOffset / win.scrollMaxX : 0; let y = win.scrollMaxY ? win.pageYOffset / win.scrollMaxY : 0; let position = { x: x, y: y };
let position = { x: buffer.scrollXPercent / 100, y: buffer.scrollYPercent / 100 };
add: function (mark, silent) { let win = buffer.focusedFrame; let doc = win.document; let x = win.scrollMaxX ? win.pageXOffset / win.scrollMaxX : 0; let y = win.scrollMaxY ? win.pageYOffset / win.scrollMaxY : 0; let position = { x: x, y: y }; if (Marks.isURLMark(mark)) { let res = this._urlMarks.set(mark, { location: doc.URL, position: position, tab: Cu.getWeakReference(tabs.getTab()), timestamp: Date.now()*1000 }); if (!silent) dactyl.log("Adding URL mark: " + Marks.markToString(mark, res), 5); } else if (Marks.isLocalMark(mark)) { let marks = this._localMarks.get(doc.documentURI, {}); marks[mark] = { location: doc.documentURI, position: position, timestamp: Date.now()*1000 }; this._localMarks.changed(); if (!silent) dactyl.log("Adding local mark: " + Marks.markToString(mark, marks[mark]), 5); } },
let res = this._urlMarks.set(mark, { location: doc.URL, position: position, tab: Cu.getWeakReference(tabs.getTab()), timestamp: Date.now()*1000 });
let res = this._urlMarks.set(mark, { location: doc.documentURI, position: position, tab: Cu.getWeakReference(tabs.getTab()), timestamp: Date.now()*1000 });
add: function (mark, silent) { let win = buffer.focusedFrame; let doc = win.document; let x = win.scrollMaxX ? win.pageXOffset / win.scrollMaxX : 0; let y = win.scrollMaxY ? win.pageYOffset / win.scrollMaxY : 0; let position = { x: x, y: y }; if (Marks.isURLMark(mark)) { let res = this._urlMarks.set(mark, { location: doc.URL, position: position, tab: Cu.getWeakReference(tabs.getTab()), timestamp: Date.now()*1000 }); if (!silent) dactyl.log("Adding URL mark: " + Marks.markToString(mark, res), 5); } else if (Marks.isLocalMark(mark)) { let marks = this._localMarks.get(doc.documentURI, {}); marks[mark] = { location: doc.documentURI, position: position, timestamp: Date.now()*1000 }; this._localMarks.changed(); if (!silent) dactyl.log("Adding local mark: " + Marks.markToString(mark, marks[mark]), 5); } },
add: function(classNameToAdd) { if (this.include(classNameToAdd)) return; this.set($A(this).concat(classNameToAdd).join(' ')); },
value=value.call(elem,i);return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)) elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)
add: function(classNameToAdd) { if (this.include(classNameToAdd)) return; this.set($A(this).concat(classNameToAdd).join(' ')); },
set.add = function (set, key) { set[key] = true; }
set.add = function (set, key) { let res = this.has(set, key); set[key] = true; return res; }
set.add = function (set, key) { set[key] = true; }
add: function(route, target, method) { if (method===undefined && SC.typeOf(target) === SC.T_FUNCTION) { method = target; target = null ; } else if (SC.typeOf(method) === SC.T_STRING) { method = target[method] ; } var parts = route.split('/') ; if (!this._routes) this._routes = SC.routes._Route.create() ; this._routes.addRoute(parts, target, method) ; return this; },
add: function(parts, target, method) { var part, nextRoute; parts = SC.clone(parts); if (!parts || parts.length === 0) { this.target = target; this.method = method; } else { part = parts.shift(); switch (part.slice(0, 1)) { case ':': part = part.slice(1, part.length); if (!this.dynamicRoutes) this.dynamicRoutes = {}; if (!this.dynamicRoutes[part]) this.dynamicRoutes[part] = this.constructor.create(); nextRoute = this.dynamicRoutes[part]; break; case '*': part = part.slice(1, part.length); if (!this.wildcardRoutes) this.wildcardRoutes = {}; nextRoute = this.wildcardRoutes[part] = this.constructor.create(); break; default: if (!this.staticRoutes) this.staticRoutes = {}; if (!this.staticRoutes[part]) this.staticRoutes[part] = this.constructor.create(); nextRoute = this.staticRoutes[part]; } if (nextRoute) nextRoute.add(parts, target, method); } },
add: function(route, target, method) { // normalize the target/method if (method===undefined && SC.typeOf(target) === SC.T_FUNCTION) { method = target; target = null ; } else if (SC.typeOf(method) === SC.T_STRING) { method = target[method] ; } var parts = route.split('/') ; if (!this._routes) this._routes = SC.routes._Route.create() ; this._routes.addRoute(parts, target, method) ; return this; },
this._membersCacheIsValid = NO ; },
add: function(target, method, context) { var targetGuid = (target) ? SC.guidFor(target) : "__this__"; // get the set of methods var methods = this[targetGuid] ; if (!methods) { methods = this[targetGuid] = SC.CoreSet.create() ; methods.target = target ; methods.isTargetSet = YES ; // used for getMembers(). this.targets++ ; } methods.add(method) ; // context is really useful sometimes but not used that often so this // implementation is intentionally lazy. if (context !== undefined) { if (!methods.contexts) context = methods.contexts = {} ; methods.contexts[SC.guidFor(method)] = context ; } this._membersCacheIsValid = NO ; },
if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType=== 3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;if(!d.guid)d.guid=c.guid++;if(f!==w){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):w};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var o,p=0;o=b[p++];){var n=o.split(".");o=n.shift();d.type=n.slice(0).sort().join(".");var t=e[o],z=this.special[o]||{};if(!t){t=e[o]={}; if(!z.setup||z.setup.call(a,f,n,d)===false)if(a.addEventListener)a.addEventListener(o,i,false);else a.attachEvent&&a.attachEvent("on"+o,i)}if(z.add)if((n=z.add.call(a,d,f,n,t))&&c.isFunction(n)){n.guid=n.guid||d.guid;d=n}t[d.guid]=d;this.global[o]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===w||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;if(!d.guid)d.guid=c.guid++;if(f!==w){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):w};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var o,p=0;o=b[p++];){var n=o.split(".");o=n.shift();d.type=n.slice(0).sort().join(".");var t=e[o],z=this.special[o]||{};if(!t){t=e[o]={};if(!z.setup||z.setup.call(a,f,n,d)===false)if(a.addEventListener)a.addEventListener(o,i,false);else a.attachEvent&&a.attachEvent("on"+o,i)}if(z.add)if((n=z.add.call(a,d,f,n,t))&&c.isFunction(n)){n.guid=n.guid||d.guid;d=n}t[d.guid]=d;this.global[o]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===w||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);
if (obj == null) return this;
if (SC.none(obj)) return this;
add: function(obj) { if (this.isFrozen) throw SC.FROZEN_ERROR; // cannot add null to a set. if (obj == null) return this; // Implementation note: SC.hashFor() is inlined because sets are // fundamental in SproutCore, and the inlined code is ~ 25% faster than // calling SC.hashFor() in IE8. var hashFunc, guid = ((hashFunc = obj.hash) && (typeof hashFunc === "function")) ? hashFunc.call(obj) : SC.guidFor(obj), idx = this[guid], len = this.length; if ((idx >= len) || (this[idx] !== obj)) { this[len] = obj; this[guid] = len; this.length = len + 1; if (this.setObservers) this.didAddItem(obj); } if (this.isObservable) this.enumerableContentDidChange(); return this ; },
if (!methods.contexts) methods.contexts = {} ; methods.contexts[SC.guidFor(method)] = context ;
var contexts = methods.contexts || (methods.contexts = {}) ; contexts[SC.guidFor(method)] = context ;
SC.ObserverSet.add = function(target, method, context, originatingTarget, originatingMethod, originatingStack) { var targetGuid = (target) ? SC.guidFor(target) : "__this__"; // get the set of methods var methods = this[targetGuid] ; if (!methods) { methods = this[targetGuid] = SC.CoreSet.create() ; methods.target = target ; methods.isTargetSet = YES ; // used for getMembers(). this.targets++ ; } methods.add(method) ; // context is really useful sometimes but not used that often so this // implementation is intentionally lazy. if (context !== undefined) { if (!methods.contexts) methods.contexts = {} ; methods.contexts[SC.guidFor(method)] = context ; } this._membersCacheIsValid = NO ; // THIS IS THE PORTION THAT DIFFERS FROM THE STANDARD IMPLEMENTATION // Recording the calling object/function can be a useful debugging tool. // Since multiple object/functions can schedule the same target/method, // this value could either be a single value or an array. (We won't // always use an array because that adds a certain debugging burden to the // "only one scheduled it" case.) if (originatingMethod !== undefined) { var originatingTargets = methods.originatingTargets; var originatingMethods = methods.originatingMethods; var originatingStacks = methods.originatingStacks; if (!originatingTargets) originatingTargets = methods.originatingTargets = {}; if (!originatingMethods) originatingMethods = methods.originatingMethods = {}; if (!originatingStacks) originatingStacks = methods.originatingStacks = {}; var key = SC.guidFor(method); var existingMethod = originatingMethods[key]; if (existingMethod && SC.typeOf(existingMethod) !== SC.T_ARRAY) { // We previously had one entry and now we have two. We need to // convert to an array! var existingTarget = originatingTargets[key]; var existingStack = originatingStacks[key]; originatingTargets[key] = [existingTarget, originatingTarget]; originatingMethods[key] = [existingMethod, originatingMethod]; originatingStacks[key] = [existingStack, originatingStack]; } else { // We didn't previously have a value? Then no need to use an // enclosing array. originatingTargets[key] = originatingTarget; originatingMethods[key] = originatingMethod; originatingStacks[key] = originatingStack; } } };
this._membersCacheIsValid = NO ;
SC.ObserverSet.add = function(target, method, context, originatingTarget, originatingMethod, originatingStack) { var targetGuid = (target) ? SC.guidFor(target) : "__this__"; // get the set of methods var methods = this[targetGuid] ; if (!methods) { methods = this[targetGuid] = SC.CoreSet.create() ; methods.target = target ; methods.isTargetSet = YES ; // used for getMembers(). this.targets++ ; } methods.add(method) ; // context is really useful sometimes but not used that often so this // implementation is intentionally lazy. if (context !== undefined) { if (!methods.contexts) methods.contexts = {} ; methods.contexts[SC.guidFor(method)] = context ; } this._membersCacheIsValid = NO ; // THIS IS THE PORTION THAT DIFFERS FROM THE STANDARD IMPLEMENTATION // Recording the calling object/function can be a useful debugging tool. // Since multiple object/functions can schedule the same target/method, // this value could either be a single value or an array. (We won't // always use an array because that adds a certain debugging burden to the // "only one scheduled it" case.) if (originatingMethod !== undefined) { var originatingTargets = methods.originatingTargets; var originatingMethods = methods.originatingMethods; var originatingStacks = methods.originatingStacks; if (!originatingTargets) originatingTargets = methods.originatingTargets = {}; if (!originatingMethods) originatingMethods = methods.originatingMethods = {}; if (!originatingStacks) originatingStacks = methods.originatingStacks = {}; var key = SC.guidFor(method); var existingMethod = originatingMethods[key]; if (existingMethod && SC.typeOf(existingMethod) !== SC.T_ARRAY) { // We previously had one entry and now we have two. We need to // convert to an array! var existingTarget = originatingTargets[key]; var existingStack = originatingStacks[key]; originatingTargets[key] = [existingTarget, originatingTarget]; originatingMethods[key] = [existingMethod, originatingMethod]; originatingStacks[key] = [existingStack, originatingStack]; } else { // We didn't previously have a value? Then no need to use an // enclosing array. originatingTargets[key] = originatingTarget; originatingMethods[key] = originatingMethod; originatingStacks[key] = originatingStack; } } };
refresh();
store.reload();
AddAccountWindow = function(){ var form = new Ext.form.FormPanel({ labelWidth: 120, width: 400, baseCls: 'x-plain', items: [ { fieldLabel: 'Account-Name', xtype: 'textfield', id: 'nm', anchor: '100%' } ,{ fieldLabel: 'Useful', xtype: 'radiogroup', defaultType: "radio", anchor: '100%', items: [{ name: "en", inputValue: "true", boxLabel: "enable", checked: true }, { name: "en", inputValue: "false", boxLabel: "disable" }] } ,{ fieldLabel: 'Contract-Date', xtype: 'datefield', format: 'Y/m/d', id: 'cn', anchor: '100%' } ,{ fieldLabel: 'Memo', xtype: 'textarea', id: 'mm', anchor: '100%' }] }); AddAccountWindow.superclass.constructor.call(this, { iconCls: 'icon-panel', collapsible:true, titleCollapse:true, width: 500, height: 250, layout:'fit', closeAction:'hide', title: 'Add Account', modal: true, plain: true, defaults:{bodyStyle:'padding:15px'}, items: [form], buttons: [{ text:'Create', handler: function(){ form.getForm().submit({ url: '/account-create', waitMsg: 'Adding...', method: 'POST', scope: this, success: function(form, action) { refresh(); this.close(); }, failure: function(form, action) { alert('Add account failure.'); this.close(); } }); }, scope:this },{ text: 'Close', handler: function(){ this.close(); }, scope:this }] }); }
return this.getToken().addCallback(function(token){
return this.getToken().addCallback(function(data){
addBookmark : function(url, title, tags, description){ return this.getToken().addCallback(function(token){ return request('http://b.hatena.ne.jp/bookmarklet.edit', { //denyRedirection: true, method: 'POST', sendContent : { rks : token, url : url.replace(/%[0-9a-f]{2}/g, function(s){ return s.toUpperCase(); }), title : title, comment : Models.Hatena.reprTags(tags) + description.replace(/[\n\r]+/g, ' ') } }); }); },
rks : token,
rks : data['rks'],
addBookmark : function(url, title, tags, description){ return this.getToken().addCallback(function(token){ return request('http://b.hatena.ne.jp/bookmarklet.edit', { //denyRedirection: true, method: 'POST', sendContent : { rks : token, url : url.replace(/%[0-9a-f]{2}/g, function(s){ return s.toUpperCase(); }), title : title, comment : Models.Hatena.reprTags(tags) + description.replace(/[\n\r]+/g, ' ') } }); }); },
return;
return this;
addClass: function(classNames) { var idx, len; if (arguments.length > 1) { len = arguments.length; for (idx = 0; idx < len; idx++) { this.addClass(arguments[idx]); } return; } if (typeof classNames === "string") classNames = classNames.split(' '); len = classNames.length; for (idx = 0; idx < len; idx++) { this.classNames[classNames[idx]] = YES; } },
len = classNames.length; for (idx = 0; idx < len; idx++) { this.classNames[classNames[idx]] = YES; }
this.classNames.addEach(classNames); return this;
addClass: function(classNames) { var idx, len; if (arguments.length > 1) { len = arguments.length; for (idx = 0; idx < len; idx++) { this.addClass(arguments[idx]); } return; } if (typeof classNames === "string") classNames = classNames.split(' '); len = classNames.length; for (idx = 0; idx < len; idx++) { this.classNames[classNames[idx]] = YES; } },
b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,o=b.length;j<o;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+= " "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ", i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,o=b.length;j<o;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,
var el = $.id(el); if(typeof classNames == "string") { classNames = classNames.split(' ');
var el = $.id(el); if(typeof classNames == "string") { classNames = classNames.split(' '); } var current = ' ' + el.className + ' '; for(var i = 0, len = classNames.length, c; (c = classNames[i]) || i < len; ++i) { if(current.indexOf(' '+c+' ') == -1) { current += c + ' '; } } el.className = current; return $;
$.addClass = function(el, classNames) { var el = $.id(el); if(typeof classNames == "string") { classNames = classNames.split(' '); } var current = ' ' + el.className + ' '; for(var i = 0, len = classNames.length, c; (c = classNames[i]) || i < len; ++i) { if(current.indexOf(' '+c+' ') == -1) { current += c + ' '; } } el.className = current; return $;}
var current = ' ' + el.className + ' '; for(var i = 0, len = classNames.length, c; (c = classNames[i]) || i < len; ++i) { if(current.indexOf(' '+c+' ') == -1) { current += c + ' '; } } el.className = current; return $; }
$.addClass = function(el, classNames) { var el = $.id(el); if(typeof classNames == "string") { classNames = classNames.split(' '); } var current = ' ' + el.className + ' '; for(var i = 0, len = classNames.length, c; (c = classNames[i]) || i < len; ++i) { if(current.indexOf(' '+c+' ') == -1) { current += c + ' '; } } el.className = current; return $;}
addClassName: function(element, className) { if (!(element = $(element))) return; if (!element.hasClassName(className)) element.className += (element.className ? ' ' : '') + className; 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])*?\*\
addClassName: function(element, className) { if (!(element = $(element))) return; if (!element.hasClassName(className)) element.className += (element.className ? ' ' : '') + className; return element; },
async:false,
function addColumn(){ //get parameter from interface var cn = $("#columnName").val(); if (cn==''){ cn ='noName' }; var te = 'Deprecated';//$("#typeExtraction").val(); var pf = pathString;//$("#finalPath").val(); //Verification of the existance of the column name if (verifyColumnLabel(cn)==true ){ alert (__("Name exists")); }else{ // add the column on the server side, and preview the table after succes $.ajax({ type: "POST", url: "../classes/class.TReg_VirtualTable.php", data: { op:"addColumn", columnName:cn, typeExtraction:te, finalPath:pf }, dataType :"json", success: function(msg){ actualUTR = msg; previewTable(msg); //close the window utrIntro(); }//succes }); }//else }
alert ('Name existes, can you modify the label of the colum...')
alert ('Name exists, you should change it...')
function addColumn(){ //get parameter from interface var cn = $("#columnName").val(); var te = $("#typeExtraction").val(); var pf = $("#finalPath").val(); //Verification of the existance of the column name if (verifyColumnLabel(cn)==true ){ alert ('Name existes, can you modify the label of the colum...') }else{ // add the column on the server side, and preview the table after succes $.ajax({ type: "POST", url: "../classes/class.TReg_VirtualTable.php", data: { op:"addColumn", columnName:cn, typeExtraction:te, finalPath:pf }, dataType :"json", success: function(msg){ actualUTR = msg; previewTable(msg); //close the window //$("#propertyBinding").hide(); utrIntro(); }//succes }); }//else }
}).init(obj.name));
}).init(obj.name)); else if (obj.defaultGroup) [this.commandbar, this.statusbar].forEach(function (nodeSet) { let elem = nodeSet[obj.name]; if (elem) highlight.highlightNode(elem, obj.defaultGroup.split(/\s/) .map(function (g) g + " " + nodeSet.group + g).join(" ")); });
addElem: function (obj) { const self = this; this.elements[obj.name] = obj; function get(id) obj.getElement ? obj.getElement(id) : document.getElementById(id); this.active.__defineGetter__(obj.name, function () self.activeGroup[obj.name][obj.name]); this.activeGroup.__defineGetter__(obj.name, function () self.getGroup(obj.name)); memoize(this.statusbar, obj.name, function () get("dactyl-statusline-field-" + (obj.id || obj.name))); memoize(this.commandbar, obj.name, function () get("dactyl-" + (obj.id || obj.name))); if (!(obj.noValue || obj.getValue)) Object.defineProperty(this, obj.name, Modes.boundProperty({ get: function () { let elem = self.getGroup(obj.name, obj.value)[obj.name]; if (obj.value != null) return [obj.value[0], obj.get ? obj.get.call(this, elem) : elem.value] return null; }, set: function (val) { if (val != null && !isArray(val)) val = [obj.defaultGroup || "", val]; obj.value = val; [this.commandbar, this.statusbar].forEach(function (nodeSet) { let elem = nodeSet[obj.name]; if (val != null) { highlight.highlightNode(elem, (val[0] != null ? val[0] : obj.defaultGroup) .split(/\s/).filter(util.identity) .map(function (g) g + " " + nodeSet.group + g) .join(" ")); elem.value = val[1]; if (obj.onChange) obj.onChange.call(this, elem); } }, this); this.updateVisibility(); return val; } }).init(obj.name)); },