rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
hoststring = host ? host : 'localhost';
this.listen = function (port, host) { var server = http.createServer(bind(this, this._handleRequest)); server.listen(port, host); hoststring = host ? host : 'localhost'; };
if (!transportName) { throw logger.error('No transport provided for net.listen'); }
exports.listen = function(server, transportName, opts) { var listenerClass = net.env.getListener(transportName); var listener = new listenerClass(server, opts); listener.listen(); return listener;}
wb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}c.ajax({url:a,type:f,dataType:"html",data:b,context:this,complete:function(i,j){if(j==="success"||j==="notmodified")this.html(e?c("<div />").append(i.responseText.replace(rb, "")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== "string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
wb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}c.ajax({url:a,type:f,dataType:"html",data:b,context:this,complete:function(i,j){if(j==="success"||j==="notmodified")this.html(e?c("<div />").append(i.responseText.replace(rb,"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
if (e !== "Error opening input stream (invalid filename?)") { dump("dactyl: Trying: " + (base + script + ".js") + ": " + e + "\n" + e.stack);
if (typeof e !== "string") { dump("dactyl: Trying: " + (base + script + ".js") + ": " + e + "\n" + e.stack + "\n");
modules.load = function load(script) { for (let [i, base] in Iterator(prefix)) { try { loader.loadSubScript(base + script + ".js", modules); return; } catch (e) { if (e !== "Error opening input stream (invalid filename?)") { dump("dactyl: Trying: " + (base + script + ".js") + ": " + e + "\n" + e.stack); Components.utils.reportError(e); } } } try { Components.utils.import("resource://dactyl/" + script + ".jsm", modules); } catch (e) { dump("dactyl: Loading script " + script + ": " + e.result + " " + e + "\n"); dump(Error().stack + "\n"); Components.utils.reportError(e); } };
form.alias.value = col["alias"]; form.iata.value = col["iata"]; form.icao.value = col["icao"]; form.callsign.value = col["callsign"];
if(col["alias"] != "null") form.alias.value = col["alias"]; if(col["iata"] != "null") form.iata.value = col["iata"]; if(col["icao"] != "null") form.icao.value = col["icao"]; if(col["callsign"] != "null") form.callsign.value = col["callsign"];
function loadAirline(data) { var col = jsonParse(unescape(data)); var b_back = document.getElementById("b_back"); var b_fwd = document.getElementById("b_fwd"); if(b_back) b_back.disabled = true; if(b_fwd) b_fwd.disabled = true; var form = document.forms['searchform']; form.name.value = col["name"]; form.alias.value = col["alias"]; form.iata.value = col["iata"]; form.icao.value = col["icao"]; form.callsign.value = col["callsign"]; form.mode.value = col["mode"]; country = col["country"]; var country_select = form.country; for(index = 0; index < country_select.length; index++) { if(country_select[index].value == country || country_select[index].text == country) { country_select.selectedIndex = index; } } var active_select = form.active; for(index = 0; index < active_select.length; index++) { if(active_select[index].value == col["active"]) { active_select.selectedIndex = index; } } if(col["alid"]) { form.alid.value = col["alid"]; document.getElementById('b_add').style.display = "none"; document.getElementById('b_edit').style.display = "inline"; } else { form.alid.value = ""; document.getElementById('b_add').style.display = "inline"; document.getElementById('b_edit').style.display = "none"; }}
var b_back = document.getElementById("b_back"); var b_fwd = document.getElementById("b_fwd"); if(b_back) b_back.disabled = true; if(b_fwd) b_fwd.disabled = true;
function loadAirport(data) { var col = jsonParse(unescape(data)); var b_back = document.getElementById("b_back"); var b_fwd = document.getElementById("b_fwd"); if(b_back) b_back.disabled = true; if(b_fwd) b_fwd.disabled = true; var form = document.forms['searchform']; form.airport.value = col["name"]; form.city.value = col["city"]; form.iata.value = col["iata"]; form.icao.value = col["icao"]; form.x.value = col["x"]; form.y.value = col["y"]; form.elevation.value = col["elevation"]; if(col["timezone"]) { form.tz.value = col["timezone"]; } country = col["country"]; var country_select = form.country; for(index = 0; index < country_select.length; index++) { if(country_select[index].value == country || country_select[index].text == country) { country_select.selectedIndex = index; } } var dst_select = form.dst; for(index = 0; index < dst_select.length; index++) { //alert(dst_select[index].value + "/" + col["dst"]); if(dst_select[index].value == col["dst"]) { dst_select.selectedIndex = index; } } if(col["apid"]) { form.apid.value = col["apid"]; document.getElementById('b_add').style.display = "none"; document.getElementById('b_edit').style.display = "inline"; } else { form.apid.value = ""; document.getElementById('b_add').style.display = "inline"; document.getElementById('b_edit').style.display = "none"; }}
shrinksafe.tests.module.loader = function(path, stripConsole){
shrinksafe.tests.module.loader = function(path, stripConsole, escapeUnicode){
shrinksafe.tests.module.loader = function(path, stripConsole){ // summary: Simple function to load and compress some file. Returns and object // with 'original' and 'compressed' members, respectively. var s = shrinksafe.tests.module.getContents(path); return { original: s, compressed: shrinksafe.tests.module.compress(s, stripConsole) };}
compressed: shrinksafe.tests.module.compress(s, stripConsole)
compressed: shrinksafe.tests.module.compress(s, stripConsole, escapeUnicode || false)
shrinksafe.tests.module.loader = function(path, stripConsole){ // summary: Simple function to load and compress some file. Returns and object // with 'original' and 'compressed' members, respectively. var s = shrinksafe.tests.module.getContents(path); return { original: s, compressed: shrinksafe.tests.module.compress(s, stripConsole) };}
document.previewimage.src = '../gfx/images/ajax-loader.png';}
document.previewimage.src = '../gfx/images/ajax-loader-on-sheet.gif';}
function loadIt() { document.previewimage.src = '../gfx/images/ajax-loader.png';}
throw new Error("Module not found: " + modulePath + " (looked in " + paths.join(', ') + ")");
throw new Error('Error in ' + path + ": requested import (" + modulePath + ") not found.\n\tlooked in:\n\t\t" + paths.join('\n\t\t'));
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath), moduleDef = findModule(possibilities), match; if (!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { paths.push(p.filePath); } throw new Error("Module not found: " + modulePath + " (looked in " + paths.join(', ') + ")"); } moduleDef.path = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } // the order here is somewhat arbitrary and might be overly restrictive (... or overly powerful) while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(path, moduleDef, match[1].split(','), opts); } if (opts.preprocessors) { applyPreprocessors(path, moduleDef, opts.preprocessors, opts); } // required for jsjsiocompile if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; } return moduleDef; }
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath);
function loadModule(fromDir, fromFile, modulePath, opts) { var possibilities = util.resolveModulePath(modulePath, fromDir); for (var i = 0, p; p = possibilities[i]; ++i) { var path = possibilities[i].path; if (path in jsio.__modules) { return possibilities[i]; } if (path in failedFetch) { possibilities.splice(i--, 1); } }
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath); for (var i = possibilities.length - 1; i >= 0; --i) { var p = possibilities[i]; if (p.filePath in failed) { possibilities.splice(i, 1); } if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e; } } var moduleDef = findModule(possibilities), match; if (!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { failed[p.filePath] = true; paths.push(p.filePath); } throw new Error('Error in ' + path + ": requested import (" + modulePath + ") not found.\n\tlooked in:\n\t\t" + paths.join('\n\t\t')); } moduleDef.path = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } // the order here is somewhat arbitrary and might be overly restrictive (... or overly powerful) while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(path, moduleDef, match[1].split(','), opts); } if (opts.preprocessors) { applyPreprocessors(path, moduleDef, opts.preprocessors, opts); } // required for jsjsiocompile if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; } return moduleDef; }
for (var i = possibilities.length - 1; i >= 0; --i) { var p = possibilities[i]; if (p.filePath in failed) { possibilities.splice(i, 1); } if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e; }
if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e;
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath); for (var i = possibilities.length - 1; i >= 0; --i) { var p = possibilities[i]; if (p.filePath in failed) { possibilities.splice(i, 1); } if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e; } } var moduleDef = findModule(possibilities), match; if (!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { failed[p.filePath] = true; paths.push(p.filePath); } throw new Error('Error in ' + path + ": requested import (" + modulePath + ") not found.\n\tlooked in:\n\t\t" + paths.join('\n\t\t')); } moduleDef.path = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } // the order here is somewhat arbitrary and might be overly restrictive (... or overly powerful) while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(path, moduleDef, match[1].split(','), opts); } if (opts.preprocessors) { applyPreprocessors(path, moduleDef, opts.preprocessors, opts); } // required for jsjsiocompile if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; } return moduleDef; }
var moduleDef = findModule(possibilities),
var moduleDef = findModule(possibilities, opts),
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath); for (var i = possibilities.length - 1; i >= 0; --i) { var p = possibilities[i]; if (p.filePath in failed) { possibilities.splice(i, 1); } if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e; } } var moduleDef = findModule(possibilities), match; if (!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { failed[p.filePath] = true; paths.push(p.filePath); } throw new Error('Error in ' + path + ": requested import (" + modulePath + ") not found.\n\tlooked in:\n\t\t" + paths.join('\n\t\t')); } moduleDef.path = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } // the order here is somewhat arbitrary and might be overly restrictive (... or overly powerful) while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(path, moduleDef, match[1].split(','), opts); } if (opts.preprocessors) { applyPreprocessors(path, moduleDef, opts.preprocessors, opts); } // required for jsjsiocompile if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; } return moduleDef; }
for (var i = 0, p; p = possibilities[i]; ++i) { failed[p.filePath] = true; paths.push(p.filePath); } throw new Error('Error in ' + path + ": requested import (" + modulePath + ") not found.\n\tlooked in:\n\t\t" + paths.join('\n\t\t'));
for (var i = 0, p; p = possibilities[i]; ++i) { paths.push(p.path); } throw new Error('Error in ' + fromDir + fromFile + ": requested import (" + modulePath + ") not found.\n\tcurrent directory: " + ENV.getCwd() + "\n\tlooked in:\n\t\t" + paths.join('\n\t\t'));
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath); for (var i = possibilities.length - 1; i >= 0; --i) { var p = possibilities[i]; if (p.filePath in failed) { possibilities.splice(i, 1); } if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e; } } var moduleDef = findModule(possibilities), match; if (!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { failed[p.filePath] = true; paths.push(p.filePath); } throw new Error('Error in ' + path + ": requested import (" + modulePath + ") not found.\n\tlooked in:\n\t\t" + paths.join('\n\t\t')); } moduleDef.path = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } // the order here is somewhat arbitrary and might be overly restrictive (... or overly powerful) while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(path, moduleDef, match[1].split(','), opts); } if (opts.preprocessors) { applyPreprocessors(path, moduleDef, opts.preprocessors, opts); } // required for jsjsiocompile if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; } return moduleDef; }
moduleDef.path = modulePath;
moduleDef.friendlyPath = modulePath;
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath); for (var i = possibilities.length - 1; i >= 0; --i) { var p = possibilities[i]; if (p.filePath in failed) { possibilities.splice(i, 1); } if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e; } } var moduleDef = findModule(possibilities), match; if (!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { failed[p.filePath] = true; paths.push(p.filePath); } throw new Error('Error in ' + path + ": requested import (" + modulePath + ") not found.\n\tlooked in:\n\t\t" + paths.join('\n\t\t')); } moduleDef.path = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } // the order here is somewhat arbitrary and might be overly restrictive (... or overly powerful) while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(path, moduleDef, match[1].split(','), opts); } if (opts.preprocessors) { applyPreprocessors(path, moduleDef, opts.preprocessors, opts); } // required for jsjsiocompile if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; } return moduleDef; }
applyPreprocessors(path, moduleDef, match[1].split(','), opts);
applyPreprocessors(fromDir, moduleDef, match[1].split(','), opts);
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath); for (var i = possibilities.length - 1; i >= 0; --i) { var p = possibilities[i]; if (p.filePath in failed) { possibilities.splice(i, 1); } if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e; } } var moduleDef = findModule(possibilities), match; if (!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { failed[p.filePath] = true; paths.push(p.filePath); } throw new Error('Error in ' + path + ": requested import (" + modulePath + ") not found.\n\tlooked in:\n\t\t" + paths.join('\n\t\t')); } moduleDef.path = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } // the order here is somewhat arbitrary and might be overly restrictive (... or overly powerful) while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(path, moduleDef, match[1].split(','), opts); } if (opts.preprocessors) { applyPreprocessors(path, moduleDef, opts.preprocessors, opts); } // required for jsjsiocompile if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; } return moduleDef; }
applyPreprocessors(path, moduleDef, opts.preprocessors, opts);
applyPreprocessors(fromDir, moduleDef, opts.preprocessors, opts);
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath); for (var i = possibilities.length - 1; i >= 0; --i) { var p = possibilities[i]; if (p.filePath in failed) { possibilities.splice(i, 1); } if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e; } } var moduleDef = findModule(possibilities), match; if (!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { failed[p.filePath] = true; paths.push(p.filePath); } throw new Error('Error in ' + path + ": requested import (" + modulePath + ") not found.\n\tlooked in:\n\t\t" + paths.join('\n\t\t')); } moduleDef.path = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } // the order here is somewhat arbitrary and might be overly restrictive (... or overly powerful) while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(path, moduleDef, match[1].split(','), opts); } if (opts.preprocessors) { applyPreprocessors(path, moduleDef, opts.preprocessors, opts); } // required for jsjsiocompile if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; } return moduleDef; }
if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; }
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath); for (var i = possibilities.length - 1; i >= 0; --i) { var p = possibilities[i]; if (p.filePath in failed) { possibilities.splice(i, 1); } if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e; } } var moduleDef = findModule(possibilities), match; if (!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { failed[p.filePath] = true; paths.push(p.filePath); } throw new Error('Error in ' + path + ": requested import (" + modulePath + ") not found.\n\tlooked in:\n\t\t" + paths.join('\n\t\t')); } moduleDef.path = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } // the order here is somewhat arbitrary and might be overly restrictive (... or overly powerful) while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(path, moduleDef, match[1].split(','), opts); } if (opts.preprocessors) { applyPreprocessors(path, moduleDef, opts.preprocessors, opts); } // required for jsjsiocompile if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; } return moduleDef; }
if (path in jsio.__modules) {
if (!opts.reload && (path in jsio.__modules)) {
function loadModule(fromDir, fromFile, modulePath, opts) { var possibilities = util.resolveModulePath(modulePath, fromDir); for (var i = 0, p; p = possibilities[i]; ++i) { var path = possibilities[i].path; if (path in jsio.__modules) { return possibilities[i]; } if (path in failedFetch) { possibilities.splice(i--, 1); } } if (!possibilities.length) { var e = new Error('Module failed to load (again)'); e.jsioLogged = true; throw e; } var moduleDef = findModule(possibilities, opts), match; if (!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { paths.push(p.path); } throw new Error('Error in ' + fromDir + fromFile + ": requested import (" + modulePath + ") not found.\n\tcurrent directory: " + ENV.getCwd() + "\n\tlooked in:\n\t\t" + paths.join('\n\t\t')); } moduleDef.friendlyPath = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } // the order here is somewhat arbitrary and might be overly restrictive (... or overly powerful) while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(fromDir, moduleDef, match[1].split(','), opts); } if (opts.preprocessors) { applyPreprocessors(fromDir, moduleDef, opts.preprocessors, opts); } return moduleDef; }
function loadModule(pathString, opts) { var possibilities = guessModulePath(pathString),
function loadModule(path, modulePath, opts) { var possibilities = guessModulePath(modulePath),
function loadModule(pathString, opts) { var possibilities = guessModulePath(pathString), moduleDef = findModule(possibilities), match; if(!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { paths.push(p.filePath); } throw new Error("Module not found: " + pathString + " (looked in " + paths.join(', ') + ")"); } if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } if (opts.preprocessors) { applyPreprocessors(moduleDef, opts.preprocessors, opts); } while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(moduleDef, match[1].split(','), opts); } return moduleDef; }
throw new Error("Module not found: " + pathString + " (looked in " + paths.join(', ') + ")");
throw new Error("Module not found: " + modulePath + " (looked in " + paths.join(', ') + ")");
function loadModule(pathString, opts) { var possibilities = guessModulePath(pathString), moduleDef = findModule(possibilities), match; if(!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { paths.push(p.filePath); } throw new Error("Module not found: " + pathString + " (looked in " + paths.join(', ') + ")"); } if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } if (opts.preprocessors) { applyPreprocessors(moduleDef, opts.preprocessors, opts); } while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(moduleDef, match[1].split(','), opts); } return moduleDef; }
if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.path)) {
moduleDef.path = modulePath; if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.__path)) {
function loadModule(pathString, opts) { var possibilities = guessModulePath(pathString), moduleDef = findModule(possibilities), match; if(!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { paths.push(p.filePath); } throw new Error("Module not found: " + pathString + " (looked in " + paths.join(', ') + ")"); } if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } if (opts.preprocessors) { applyPreprocessors(moduleDef, opts.preprocessors, opts); } while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(moduleDef, match[1].split(','), opts); } return moduleDef; }
if (opts.preprocessors) { applyPreprocessors(moduleDef, opts.preprocessors, opts);
while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(path, moduleDef, match[1].split(','), opts);
function loadModule(pathString, opts) { var possibilities = guessModulePath(pathString), moduleDef = findModule(possibilities), match; if(!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { paths.push(p.filePath); } throw new Error("Module not found: " + pathString + " (looked in " + paths.join(', ') + ")"); } if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } if (opts.preprocessors) { applyPreprocessors(moduleDef, opts.preprocessors, opts); } while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(moduleDef, match[1].split(','), opts); } return moduleDef; }
while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(moduleDef, match[1].split(','), opts);
if (opts.preprocessors) { applyPreprocessors(path, moduleDef, opts.preprocessors, opts);
function loadModule(pathString, opts) { var possibilities = guessModulePath(pathString), moduleDef = findModule(possibilities), match; if(!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { paths.push(p.filePath); } throw new Error("Module not found: " + pathString + " (looked in " + paths.join(', ') + ")"); } if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } if (opts.preprocessors) { applyPreprocessors(moduleDef, opts.preprocessors, opts); } while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(moduleDef, match[1].split(','), opts); } return moduleDef; }
if (modulePath == 'base') { jsio.__baseFile = moduleDef.filePath; }
function loadModule(pathString, opts) { var possibilities = guessModulePath(pathString), moduleDef = findModule(possibilities), match; if(!moduleDef) { var paths = []; for (var i = 0, p; p = possibilities[i]; ++i) { paths.push(p.filePath); } throw new Error("Module not found: " + pathString + " (looked in " + paths.join(', ') + ")"); } if (moduleDef.baseMod && !(moduleDef.baseMod in jsio.path)) { jsio.addPath(moduleDef.basePath, moduleDef.baseMod); } if (opts.preprocessors) { applyPreprocessors(moduleDef, opts.preprocessors, opts); } while (moduleDef.src.charAt(0) == '"' && (match = moduleDef.src.match(preprocessorCheck))) { moduleDef.src = moduleDef.src.substring(match[0].length - 1); applyPreprocessors(moduleDef, match[1].split(','), opts); } return moduleDef; }
dactyl.echomsg('Searching for "plugin/**/*.{js,vimp}" in "' + [dir.path.replace(/.plugin$/, "") for ([, dir] in Iterator(dirs))].join(",") + '"', 2);
dactyl.echomsg('Searching for "plugin/**/*.{js,vimp}" in ' + [dir.path.replace(/.plugin$/, "") for ([, dir] in Iterator(dirs))] .join(",").quote(), 2);
loadPlugins: function () { function sourceDirectory(dir) { dactyl.assert(dir.isReadable(), "E484: Can't open file " + dir.path); dactyl.log("Sourcing plugin directory: " + dir.path + "...", 3); dir.readDirectory(true).forEach(function (file) { if (file.isFile() && /\.(js|vimp)$/i.test(file.path) && !(file.path in dactyl.pluginFiles)) { try { io.source(file.path, false); dactyl.pluginFiles[file.path] = true; } catch (e) { dactyl.reportError(e); } } else if (file.isDirectory()) sourceDirectory(file); }); } let dirs = io.getRuntimeDirectories("plugin"); if (dirs.length == 0) { dactyl.log("No user plugin directory found", 3); return; } dactyl.echomsg('Searching for "plugin/**/*.{js,vimp}" in "' + [dir.path.replace(/.plugin$/, "") for ([, dir] in Iterator(dirs))].join(",") + '"', 2); dirs.forEach(function (dir) { dactyl.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3); sourceDirectory(dir); }); },
dactyl.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3);
dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js,vimp}").quote(), 3);
loadPlugins: function () { function sourceDirectory(dir) { dactyl.assert(dir.isReadable(), "E484: Can't open file " + dir.path); dactyl.log("Sourcing plugin directory: " + dir.path + "...", 3); dir.readDirectory(true).forEach(function (file) { if (file.isFile() && /\.(js|vimp)$/i.test(file.path) && !(file.path in dactyl.pluginFiles)) { try { io.source(file.path, false); dactyl.pluginFiles[file.path] = true; } catch (e) { dactyl.reportError(e); } } else if (file.isDirectory()) sourceDirectory(file); }); } let dirs = io.getRuntimeDirectories("plugin"); if (dirs.length == 0) { dactyl.log("No user plugin directory found", 3); return; } dactyl.echomsg('Searching for "plugin/**/*.{js,vimp}" in "' + [dir.path.replace(/.plugin$/, "") for ([, dir] in Iterator(dirs))].join(",") + '"', 2); dirs.forEach(function (dir) { dactyl.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3); sourceDirectory(dir); }); },
loadSchema: function (schemaName) { Logger.debug("JSFrontend.loadSchema: " + schemaName);
loadSchema: function (schemaName, callback, _sync) {
loadSchema: function (schemaName) { Logger.debug("JSFrontend.loadSchema: " + schemaName); var me = this; this._backend.loadConfig(schemaName, function (config) { schema = new Schema (schemaName, config); me._backend.loadDict(schema); me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); }); },
this._backend.loadConfig(schemaName, function (config) {
this._loadConfig(schemaName, function (config) {
loadSchema: function (schemaName) { Logger.debug("JSFrontend.loadSchema: " + schemaName); var me = this; this._backend.loadConfig(schemaName, function (config) { schema = new Schema (schemaName, config); me._backend.loadDict(schema); me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); }); },
me._backend.loadDict(schema); me.engine = new Engine(schema, me, me._backend); me.onSchemaReady();
me._loadDict(schema, _sync ? callback : null); if (!_sync) { callback(schema); }
loadSchema: function (schemaName) { Logger.debug("JSFrontend.loadSchema: " + schemaName); var me = this; this._backend.loadConfig(schemaName, function (config) { schema = new Schema (schemaName, config); me._backend.loadDict(schema); me.engine = new Engine(schema, me, me._backend); me.onSchemaReady(); }); },
this._backend.loadConfig(schemaName, function (config) { schema = new Schema (schemaName, config);
this._backend.loadSchema(schemaName, function (schema) {
loadSchema: function (schemaName) { Logger.debug("TestFrontend.loadSchema: " + schemaName); var me = this; this._backend.loadConfig(schemaName, function (config) { schema = new Schema (schemaName, config); me.engine = new Engine(schema, me, me._backend); testAll(me); }); }
});
}, "_sync");
loadSchema: function (schemaName) { Logger.debug("TestFrontend.loadSchema: " + schemaName); var me = this; this._backend.loadConfig(schemaName, function (config) { schema = new Schema (schemaName, config); me.engine = new Engine(schema, me, me._backend); testAll(me); }); }
console.log('LOADING VIEW: ' + ajax_target_id); console.log(html);
function loadView( ajax_target_id, html ){ console.log('LOADING VIEW: ' + ajax_target_id); console.log(html); $(ajax_target_id).html( html ); hideLoaderGraphic(); }
context.keys.icon = 2; context.incomplete = true; context.hasItems = context.completions.length > 0; context.filterFunc = null; context.cancel = function () { if (searchRunning) { services.get("autoCompleteSearch").stopSearch(); searchRunning = false; } }; context.compare = CompletionContext.Sort.unsorted;
context.cancel = function () { if (searchRunning) { services.get("autoCompleteSearch").stopSearch(); searchRunning = false; } }; if (searchRunning) services.get("autoCompleteSearch").stopSearch();
completion.location = function location(context) { if (!services.get("autoCompleteSearch")) return; context.anchored = false; context.title = ["Smart Completions"]; context.keys.icon = 2; context.incomplete = true; context.hasItems = context.completions.length > 0; // XXX context.filterFunc = null; context.cancel = function () { if (searchRunning) { services.get("autoCompleteSearch").stopSearch(); searchRunning = false; } }; context.compare = CompletionContext.Sort.unsorted; let timer = new Timer(50, 100, function (result) { context.incomplete = result.searchResult >= result.RESULT_NOMATCH_ONGOING; context.completions = [ [result.getValueAt(i), result.getCommentAt(i), result.getImageAt(i)] for (i in util.range(0, result.matchCount)) ]; }); if (searchRunning) services.get("autoCompleteSearch").stopSearch(); searchRunning = true; services.get("autoCompleteSearch").startSearch(context.filter, "", context.result, { onSearchResult: function onSearchResult(search, result) { timer.tell(result); if (result.searchResult <= result.RESULT_SUCCESS) { searchRunning = false; timer.flush(); } } }); };
if (searchRunning) services.get("autoCompleteSearch").stopSearch(); searchRunning = true;
completion.location = function location(context) { if (!services.get("autoCompleteSearch")) return; context.anchored = false; context.title = ["Smart Completions"]; context.keys.icon = 2; context.incomplete = true; context.hasItems = context.completions.length > 0; // XXX context.filterFunc = null; context.cancel = function () { if (searchRunning) { services.get("autoCompleteSearch").stopSearch(); searchRunning = false; } }; context.compare = CompletionContext.Sort.unsorted; let timer = new Timer(50, 100, function (result) { context.incomplete = result.searchResult >= result.RESULT_NOMATCH_ONGOING; context.completions = [ [result.getValueAt(i), result.getCommentAt(i), result.getImageAt(i)] for (i in util.range(0, result.matchCount)) ]; }); if (searchRunning) services.get("autoCompleteSearch").stopSearch(); searchRunning = true; services.get("autoCompleteSearch").startSearch(context.filter, "", context.result, { onSearchResult: function onSearchResult(search, result) { timer.tell(result); if (result.searchResult <= result.RESULT_SUCCESS) { searchRunning = false; timer.flush(); } } }); };
searchRunning = true;
completion.location = function location(context) { if (!services.get("autoCompleteSearch")) return; context.anchored = false; context.title = ["Smart Completions"]; context.keys.icon = 2; context.incomplete = true; context.hasItems = context.completions.length > 0; // XXX context.filterFunc = null; context.cancel = function () { if (searchRunning) { services.get("autoCompleteSearch").stopSearch(); searchRunning = false; } }; context.compare = CompletionContext.Sort.unsorted; let timer = new Timer(50, 100, function (result) { context.incomplete = result.searchResult >= result.RESULT_NOMATCH_ONGOING; context.completions = [ [result.getValueAt(i), result.getCommentAt(i), result.getImageAt(i)] for (i in util.range(0, result.matchCount)) ]; }); if (searchRunning) services.get("autoCompleteSearch").stopSearch(); searchRunning = true; services.get("autoCompleteSearch").startSearch(context.filter, "", context.result, { onSearchResult: function onSearchResult(search, result) { timer.tell(result); if (result.searchResult <= result.RESULT_SUCCESS) { searchRunning = false; timer.flush(); } } }); };
context.cancel = function () { if (searchRunning) { services.get("autoCompleteSearch").stopSearch(); searchRunning = false; } };
context.cancel = function () { services.get("autoCompleteSearch").stopSearch(); context.completions = []; };
completion.location = function location(context) { if (!services.get("autoCompleteSearch")) return; context.anchored = false; context.title = ["Smart Completions"]; context.keys.icon = 2; context.incomplete = true; context.hasItems = context.completions.length > 0; // XXX context.filterFunc = null; context.cancel = function () { if (searchRunning) { services.get("autoCompleteSearch").stopSearch(); searchRunning = false; } }; context.compare = CompletionContext.Sort.unsorted; let timer = new Timer(50, 100, function (result) { context.incomplete = result.searchResult >= result.RESULT_NOMATCH_ONGOING; context.completions = [ [result.getValueAt(i), result.getCommentAt(i), result.getImageAt(i)] for (i in util.range(0, result.matchCount)) ]; }); if (searchRunning) services.get("autoCompleteSearch").stopSearch(); searchRunning = true; services.get("autoCompleteSearch").startSearch(context.filter, "", context.result, { onSearchResult: function onSearchResult(search, result) { timer.tell(result); if (result.searchResult <= result.RESULT_SUCCESS) { searchRunning = false; timer.flush(); } } }); };
searchRunning = false;
completion.location = function location(context) { if (!services.get("autoCompleteSearch")) return; context.anchored = false; context.title = ["Smart Completions"]; context.keys.icon = 2; context.incomplete = true; context.hasItems = context.completions.length > 0; // XXX context.filterFunc = null; context.cancel = function () { if (searchRunning) { services.get("autoCompleteSearch").stopSearch(); searchRunning = false; } }; context.compare = CompletionContext.Sort.unsorted; let timer = new Timer(50, 100, function (result) { context.incomplete = result.searchResult >= result.RESULT_NOMATCH_ONGOING; context.completions = [ [result.getValueAt(i), result.getCommentAt(i), result.getImageAt(i)] for (i in util.range(0, result.matchCount)) ]; }); if (searchRunning) services.get("autoCompleteSearch").stopSearch(); searchRunning = true; services.get("autoCompleteSearch").startSearch(context.filter, "", context.result, { onSearchResult: function onSearchResult(search, result) { timer.tell(result); if (result.searchResult <= result.RESULT_SUCCESS) { searchRunning = false; timer.flush(); } } }); };
this.log = function() { process.stdio.writeError(Array.prototype.join.call(arguments, ' ') + '\n'); }
this.log = function() { try { process.stdio.writeError(Array.prototype.map.call(arguments, JSON.stringify).join(' ') + '\n'); } catch(e) { process.stdio.writeError(Array.prototype.join.call(arguments, ' ') + '\n'); } }
this.log = function() { process.stdio.writeError(Array.prototype.join.call(arguments, ' ') + '\n'); }
skipFrames = skipFrames || 0; if (typeof e == 'undefined' || !e) { var caughtErr = null; try { (null).foo; } catch (caughtErr) { e = caughtErr; } skipFrames++;
var tracebackLines = doctest.formatTraceback(e, skipFrames); if (! tracebackLines) { return;
doctest.logTraceback = function (e, skipFrames) { skipFrames = skipFrames || 0; if (typeof e == 'undefined' || !e) { var caughtErr = null; try { (null).foo; } catch (caughtErr) { e = caughtErr; } skipFrames++; } if (e.stack) { var stack = e.stack.split('\n'); for (var i=skipFrames; i<stack.length; i++) { if (stack[i] == '@:0' || ! stack[i]) { continue; } var parts = stack[i].split('@'); var context = parts[0]; parts = parts[1].split(':'); var filename = parts[parts.length-2].split('/'); filename = filename[filename.length-1]; var lineno = parts[parts.length-1]; context = context.replace('\\n', '\n'); if (context != '' && filename != 'doctest.js') { logDebug(' ' + context + ' -> ' + filename + ':' + lineno); } } }};
if (e.stack) { var stack = e.stack.split('\n'); for (var i=skipFrames; i<stack.length; i++) { if (stack[i] == '@:0' || ! stack[i]) { continue; } var parts = stack[i].split('@'); var context = parts[0]; parts = parts[1].split(':'); var filename = parts[parts.length-2].split('/'); filename = filename[filename.length-1]; var lineno = parts[parts.length-1]; context = context.replace('\\n', '\n'); if (context != '' && filename != 'doctest.js') { logDebug(' ' + context + ' -> ' + filename + ':' + lineno); } }
for (var i=0; i<tracebackLines.length; i++) { logDebug(tracebackLines[i]);
doctest.logTraceback = function (e, skipFrames) { skipFrames = skipFrames || 0; if (typeof e == 'undefined' || !e) { var caughtErr = null; try { (null).foo; } catch (caughtErr) { e = caughtErr; } skipFrames++; } if (e.stack) { var stack = e.stack.split('\n'); for (var i=skipFrames; i<stack.length; i++) { if (stack[i] == '@:0' || ! stack[i]) { continue; } var parts = stack[i].split('@'); var context = parts[0]; parts = parts[1].split(':'); var filename = parts[parts.length-2].split('/'); filename = filename[filename.length-1]; var lineno = parts[parts.length-1]; context = context.replace('\\n', '\n'); if (context != '' && filename != 'doctest.js') { logDebug(' ' + context + ' -> ' + filename + ':' + lineno); } } }};
if(parent === doc){
if(parent === doc || !parent){
lookupBG: function(elm, doc){ if(elm !== doc){ return (function(target){ var bg = getComputedStyle(elm, '').backgroundImage; if(bg){ return bg; } else { var parent = elm.parentNode; if(parent === doc){ return null; } else { return arguments.callee(parent); } } })(elm); } else { return null; } },
xhtml: "http:
xul: XUL.uri, xhtml: XHTML.uri,
function lookupNamespaceURI(prefix) { return { xhtml: "http://www.w3.org/1999/xhtml", xhtml2: "http://www.w3.org/2002/06/xhtml2", dactyl: NS.uri }[prefix] || null; },
var centerPanel = new WakameGUI.Selector(); this.getCardPanel = function(){ return cardPanel; } this.setUpPanel = function(obj){ cardPanel.setUpPanel(obj) } this.refreshInstance = function(){ centerPanel.refresh(); }
WakameGUI.Main = function(){ var accountPanel = new WakameGUI.Account(); var userPanel = new WakameGUI.User(); var resourceViewerPanel = new WakameGUI.ResourceViewer(); var resourceEditorPanel = new WakameGUI.ResourceEditor(); var locationMapPanel = new WakameGUI.LocationMap(); var logViewerPanel = new WakameGUI.LogViewer(); WakameGUI.Main.superclass.constructor.call(this, { region:'center', layout:'card', activeItem: 0, defaults: {border:false}, items: [accountPanel,userPanel,resourceViewerPanel,resourceEditorPanel,locationMapPanel,logViewerPanel] });}
paragraphe.setAttribute('class', 'm-texte');
function make_admin(){ var smallbox = document.forms['smallbox']; if( smallbox ) { DOM_Events.addListener('change', jump, false, smallbox.getElementsByTagName('select')[0]); } var aList = document.getElementsByTagName('a'); for( var i = 0, m = aList.length; i < m; i++ ) { if( aList[i].rel && aList[i].rel == 'show' ) { DOM_Events.addListener('click', show, false, aList[i]); } } if( typeof(document.forms['logs']) != 'undefined' || typeof(document.forms['abo']) != 'undefined' ) { var bottomAdmin = document.getElementById('nav-bottom'); if( typeof(bottomAdmin) != 'undefined' ) { var divList = bottomAdmin.getElementsByTagName('div'); if( divList[1] != null && divList[1].className.toLowerCase() == 'right' ) { var secondDiv = divList[1]; var paragraphe = document.createElement('p'); var switchLink = document.createElement('a'); var texte = document.createTextNode('switch'); switchLink.appendChild(texte); switchLink.setAttribute('href', './switch/checkbox'); DOM_Events.addListener('click', switch_checkbox, false, switchLink); paragraphe.appendChild(switchLink); secondDiv.insertBefore(paragraphe, secondDiv.getElementsByTagName('input')[0]); secondDiv.insertBefore(document.createTextNode(' '), secondDiv.getElementsByTagName('input')[0]); } } }}
bouton.setAttribute('type', 'button');
function make_button(bloc){ var format = bloc.id.substr((bloc.id.length - 1), 1); var conteneur = document.createElement('div'); conteneur.setAttribute('class', 'bottom'); var bouton = document.createElement('input'); bouton.setAttribute('id', 'preview' + format); bouton.setAttribute('type', 'button'); bouton.setAttribute('value', lang['preview']); bouton.setAttribute('class', 'button'); DOM_Events.addListener('click', preview, false, bouton); conteneur.appendChild(bouton); conteneur.appendChild(document.createTextNode('\u00A0')); bouton = bouton.cloneNode(false); bouton.listeners = [];// sinon, bug de IE bouton.setAttribute('id', 'addLinks' + format); bouton.setAttribute('type', 'button'); bouton.setAttribute('value', lang['addlink']); bouton.setAttribute('class', 'button'); DOM_Events.addListener('click', addLinks, false, bouton); conteneur.appendChild(bouton); bloc.appendChild(conteneur);}
bouton.setAttribute('class', 'button');
function make_button(bloc){ var format = bloc.id.substr((bloc.id.length - 1), 1); var conteneur = document.createElement('div'); conteneur.setAttribute('class', 'bottom'); var bouton = document.createElement('input'); bouton.setAttribute('id', 'preview' + format); bouton.setAttribute('type', 'button'); bouton.setAttribute('value', lang['preview']); bouton.setAttribute('class', 'button'); DOM_Events.addListener('click', preview, false, bouton); conteneur.appendChild(bouton); conteneur.appendChild(document.createTextNode('\u00A0')); bouton = bouton.cloneNode(false); bouton.listeners = [];// sinon, bug de IE bouton.setAttribute('id', 'addLinks' + format); bouton.setAttribute('type', 'button'); bouton.setAttribute('value', lang['addlink']); bouton.setAttribute('class', 'button'); DOM_Events.addListener('click', addLinks, false, bouton); conteneur.appendChild(bouton); bloc.appendChild(conteneur);}
if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Ra,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ea.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=
d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Ra,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ea.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=
if(kwArgs.htmlFile){ var html = fileUtil.readFile(kwArgs.htmlFile); var layers = [], htmlPrefix = "", prefixes = {dijit: true, dojox: true};
function processHtmlFile(htmlFile){ var priorLayers = []; var html = fileUtil.readFile(htmlFile);
buildUtil.makeBuildOptions = function(/*Array*/scriptArgs){ //summary: constructs the build options by combining the scriptArgs with //default build options and anything specified in a profile file. var kwArgs = {}, param, profileProperties; //Parse the command line arguments kwArgs = buildUtil.convertArrayToObject(scriptArgs); if(!kwArgs["profileFile"] && kwArgs["profile"]){ kwArgs.profileFile = "profiles/" + kwArgs.profile + ".profile.js"; } if(kwArgs.htmlFile){ // we are processing an HTML file, first read it var html = fileUtil.readFile(kwArgs.htmlFile); var layers = [], htmlPrefix = "", prefixes = {dijit: true, dojox: true}; html.replace(/<script [^>]*src=["']([^'"]+)["']/gi, function(t, scriptName){ // for each script tag if(scriptName.indexOf("dojo/dojo.js") > -1){ // use dojo.js to determine the prefix for our namespaces prefix = scriptName.substring(0, scriptName.indexOf("dojo/dojo.js")); }else{ // non-dojo.js script files, add it to our list of layers layers.push(scriptName = scriptName.substring(prefix.length, scriptName.length - 3)); if(scriptName.indexOf('/') > -1){ prefixes[scriptName.substring(scriptName, scriptName.indexOf('/'))] = true; } } }); html.replace(/dojo\.require\(["']([^'"]+)["']\)/g, function(t, scriptName){ // for each dojo.require call add it to the layers as well layers.push(scriptName); }); var prefixPaths = []; // normalize the prefixes into the arrays that the build expects for(var prefix in prefixes){ prefixPaths.push([prefix, "../" + prefix]); } // now create the profile object profileProperties = kwArgs.profileProperties = buildUtil.processProfile({ layers: layers.map(function(name, i){ // for each layer, create a layer object return { name: "../" + name.replace(/\./g,'/') + ".js", // use filename dependencies: [ name.replace(/\//g,'.') // use module name ], //use all previous layers as layer dependencies layerDependencies: layers.slice(0, i).map(function(name){ return "../" + name.replace(/\./g,'/') + ".js" }) }; }), prefixes: prefixPaths }); dependencies = profileProperties.dependencies; } //Load dependencies object from profile file, if there is one. var dependencies = {}; if(kwArgs["profileFile"]){ profileProperties = buildUtil.evalProfile(kwArgs.profileFile); logger.info(profileProperties.toSource()); if(profileProperties){ kwArgs.profileProperties = profileProperties; dependencies = kwArgs.profileProperties.dependencies; //Allow setting build options from on the profile's dependencies object. //Do not override existing values from the command line though. for(param in dependencies){ if(!(param in kwArgs) && param != "layers" && param != "prefixes"){ kwArgs[param] = dependencies[param]; } } } } //Set up default options for(param in buildUtil.DojoBuildOptions){ //Only use default if there is no value so far. if(typeof kwArgs[param] == "undefined"){ kwArgs[param] = buildUtil.DojoBuildOptions[param].defaultValue; }else if(kwArgs[param] === "false"){ //Make sure "false" strings get translated to proper false value. kwArgs[param] = false; } } //Make sure releaseDir uses / since rest of build assumes / paths. kwArgs.releaseDir = kwArgs.releaseDir.replace(/\\/g, "/"); //Set up some compound values if(kwArgs["releaseName"]){ ///Make sure releaseDir ends in a / so releaseName concat works. if(!kwArgs.releaseDir.match(/\/$/)){ kwArgs.releaseDir += "/"; } kwArgs.releaseDir += kwArgs["releaseName"]; }else{ //No releaseName, so strip off trailing slash kwArgs.releaseDir = kwArgs.releaseDir.replace(/\/$/, ""); } kwArgs.action = kwArgs.action.split(","); kwArgs.localeList = kwArgs.localeList.split(","); //Attach the final loader type to the dependencies dependencies.loader = kwArgs.loader; //Fix args for bugs if(kwArgs.expandProvide && kwArgs.loader == "xdomain"){ logger.info("NOTE: expandProvide not compatible with xdomain builds. Ignoring expandProvide option."); kwArgs.expandProvide = false; } //Notify on incompatible options. if(kwArgs.optimize && kwArgs.optimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("NOTE: stripConsole is only supported for an optimize=shrinksafe value."); } if(kwArgs.layerOptimize && kwArgs.layerOptimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("layerOPtimize: [" + kwArgs.layerOptimize + "]"); logger.info("NOTE: stripConsole is only supported for an layerOptimize=shrinksafe value."); } //Validate some values. if(typeof kwArgs.scopeDjConfig != "string") { throw "Due to deficiencies in the build system, scopeDjConfig needs to be a string."; } //Do some hackery for closure compiler. if(kwArgs.optimize.indexOf("closure") == 0 || kwArgs.layerOptimize.indexOf("closure") == 0){ //directly call JSSourceFile.fromCode will actually invoke SourceFile.fromCode, //which will lead to error: "Cannot convert com.google.javascript.jscomp.SourceFile$Preloaded@26afa68a to com.google.javascript.jscomp.JSSourceFile" //don't know whether it's a bug in closure or rhino - liucougar var JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]); buildUtil.closurefromCode = function(filename,content){ return JSSourceFilefromCode.invoke(null,[filename,content]) } } return kwArgs;}
layers.push(scriptName = scriptName.substring(prefix.length, scriptName.length - 3)); if(scriptName.indexOf('/') > -1){ prefixes[scriptName.substring(scriptName, scriptName.indexOf('/'))] = true; }
addLayer(scriptName = scriptName.substring(prefix.length, scriptName.length - 3).replace(/\
buildUtil.makeBuildOptions = function(/*Array*/scriptArgs){ //summary: constructs the build options by combining the scriptArgs with //default build options and anything specified in a profile file. var kwArgs = {}, param, profileProperties; //Parse the command line arguments kwArgs = buildUtil.convertArrayToObject(scriptArgs); if(!kwArgs["profileFile"] && kwArgs["profile"]){ kwArgs.profileFile = "profiles/" + kwArgs.profile + ".profile.js"; } if(kwArgs.htmlFile){ // we are processing an HTML file, first read it var html = fileUtil.readFile(kwArgs.htmlFile); var layers = [], htmlPrefix = "", prefixes = {dijit: true, dojox: true}; html.replace(/<script [^>]*src=["']([^'"]+)["']/gi, function(t, scriptName){ // for each script tag if(scriptName.indexOf("dojo/dojo.js") > -1){ // use dojo.js to determine the prefix for our namespaces prefix = scriptName.substring(0, scriptName.indexOf("dojo/dojo.js")); }else{ // non-dojo.js script files, add it to our list of layers layers.push(scriptName = scriptName.substring(prefix.length, scriptName.length - 3)); if(scriptName.indexOf('/') > -1){ prefixes[scriptName.substring(scriptName, scriptName.indexOf('/'))] = true; } } }); html.replace(/dojo\.require\(["']([^'"]+)["']\)/g, function(t, scriptName){ // for each dojo.require call add it to the layers as well layers.push(scriptName); }); var prefixPaths = []; // normalize the prefixes into the arrays that the build expects for(var prefix in prefixes){ prefixPaths.push([prefix, "../" + prefix]); } // now create the profile object profileProperties = kwArgs.profileProperties = buildUtil.processProfile({ layers: layers.map(function(name, i){ // for each layer, create a layer object return { name: "../" + name.replace(/\./g,'/') + ".js", // use filename dependencies: [ name.replace(/\//g,'.') // use module name ], //use all previous layers as layer dependencies layerDependencies: layers.slice(0, i).map(function(name){ return "../" + name.replace(/\./g,'/') + ".js" }) }; }), prefixes: prefixPaths }); dependencies = profileProperties.dependencies; } //Load dependencies object from profile file, if there is one. var dependencies = {}; if(kwArgs["profileFile"]){ profileProperties = buildUtil.evalProfile(kwArgs.profileFile); logger.info(profileProperties.toSource()); if(profileProperties){ kwArgs.profileProperties = profileProperties; dependencies = kwArgs.profileProperties.dependencies; //Allow setting build options from on the profile's dependencies object. //Do not override existing values from the command line though. for(param in dependencies){ if(!(param in kwArgs) && param != "layers" && param != "prefixes"){ kwArgs[param] = dependencies[param]; } } } } //Set up default options for(param in buildUtil.DojoBuildOptions){ //Only use default if there is no value so far. if(typeof kwArgs[param] == "undefined"){ kwArgs[param] = buildUtil.DojoBuildOptions[param].defaultValue; }else if(kwArgs[param] === "false"){ //Make sure "false" strings get translated to proper false value. kwArgs[param] = false; } } //Make sure releaseDir uses / since rest of build assumes / paths. kwArgs.releaseDir = kwArgs.releaseDir.replace(/\\/g, "/"); //Set up some compound values if(kwArgs["releaseName"]){ ///Make sure releaseDir ends in a / so releaseName concat works. if(!kwArgs.releaseDir.match(/\/$/)){ kwArgs.releaseDir += "/"; } kwArgs.releaseDir += kwArgs["releaseName"]; }else{ //No releaseName, so strip off trailing slash kwArgs.releaseDir = kwArgs.releaseDir.replace(/\/$/, ""); } kwArgs.action = kwArgs.action.split(","); kwArgs.localeList = kwArgs.localeList.split(","); //Attach the final loader type to the dependencies dependencies.loader = kwArgs.loader; //Fix args for bugs if(kwArgs.expandProvide && kwArgs.loader == "xdomain"){ logger.info("NOTE: expandProvide not compatible with xdomain builds. Ignoring expandProvide option."); kwArgs.expandProvide = false; } //Notify on incompatible options. if(kwArgs.optimize && kwArgs.optimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("NOTE: stripConsole is only supported for an optimize=shrinksafe value."); } if(kwArgs.layerOptimize && kwArgs.layerOptimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("layerOPtimize: [" + kwArgs.layerOptimize + "]"); logger.info("NOTE: stripConsole is only supported for an layerOptimize=shrinksafe value."); } //Validate some values. if(typeof kwArgs.scopeDjConfig != "string") { throw "Due to deficiencies in the build system, scopeDjConfig needs to be a string."; } //Do some hackery for closure compiler. if(kwArgs.optimize.indexOf("closure") == 0 || kwArgs.layerOptimize.indexOf("closure") == 0){ //directly call JSSourceFile.fromCode will actually invoke SourceFile.fromCode, //which will lead to error: "Cannot convert com.google.javascript.jscomp.SourceFile$Preloaded@26afa68a to com.google.javascript.jscomp.JSSourceFile" //don't know whether it's a bug in closure or rhino - liucougar var JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]); buildUtil.closurefromCode = function(filename,content){ return JSSourceFilefromCode.invoke(null,[filename,content]) } } return kwArgs;}
layers.push(scriptName);
addLayer(scriptName);
buildUtil.makeBuildOptions = function(/*Array*/scriptArgs){ //summary: constructs the build options by combining the scriptArgs with //default build options and anything specified in a profile file. var kwArgs = {}, param, profileProperties; //Parse the command line arguments kwArgs = buildUtil.convertArrayToObject(scriptArgs); if(!kwArgs["profileFile"] && kwArgs["profile"]){ kwArgs.profileFile = "profiles/" + kwArgs.profile + ".profile.js"; } if(kwArgs.htmlFile){ // we are processing an HTML file, first read it var html = fileUtil.readFile(kwArgs.htmlFile); var layers = [], htmlPrefix = "", prefixes = {dijit: true, dojox: true}; html.replace(/<script [^>]*src=["']([^'"]+)["']/gi, function(t, scriptName){ // for each script tag if(scriptName.indexOf("dojo/dojo.js") > -1){ // use dojo.js to determine the prefix for our namespaces prefix = scriptName.substring(0, scriptName.indexOf("dojo/dojo.js")); }else{ // non-dojo.js script files, add it to our list of layers layers.push(scriptName = scriptName.substring(prefix.length, scriptName.length - 3)); if(scriptName.indexOf('/') > -1){ prefixes[scriptName.substring(scriptName, scriptName.indexOf('/'))] = true; } } }); html.replace(/dojo\.require\(["']([^'"]+)["']\)/g, function(t, scriptName){ // for each dojo.require call add it to the layers as well layers.push(scriptName); }); var prefixPaths = []; // normalize the prefixes into the arrays that the build expects for(var prefix in prefixes){ prefixPaths.push([prefix, "../" + prefix]); } // now create the profile object profileProperties = kwArgs.profileProperties = buildUtil.processProfile({ layers: layers.map(function(name, i){ // for each layer, create a layer object return { name: "../" + name.replace(/\./g,'/') + ".js", // use filename dependencies: [ name.replace(/\//g,'.') // use module name ], //use all previous layers as layer dependencies layerDependencies: layers.slice(0, i).map(function(name){ return "../" + name.replace(/\./g,'/') + ".js" }) }; }), prefixes: prefixPaths }); dependencies = profileProperties.dependencies; } //Load dependencies object from profile file, if there is one. var dependencies = {}; if(kwArgs["profileFile"]){ profileProperties = buildUtil.evalProfile(kwArgs.profileFile); logger.info(profileProperties.toSource()); if(profileProperties){ kwArgs.profileProperties = profileProperties; dependencies = kwArgs.profileProperties.dependencies; //Allow setting build options from on the profile's dependencies object. //Do not override existing values from the command line though. for(param in dependencies){ if(!(param in kwArgs) && param != "layers" && param != "prefixes"){ kwArgs[param] = dependencies[param]; } } } } //Set up default options for(param in buildUtil.DojoBuildOptions){ //Only use default if there is no value so far. if(typeof kwArgs[param] == "undefined"){ kwArgs[param] = buildUtil.DojoBuildOptions[param].defaultValue; }else if(kwArgs[param] === "false"){ //Make sure "false" strings get translated to proper false value. kwArgs[param] = false; } } //Make sure releaseDir uses / since rest of build assumes / paths. kwArgs.releaseDir = kwArgs.releaseDir.replace(/\\/g, "/"); //Set up some compound values if(kwArgs["releaseName"]){ ///Make sure releaseDir ends in a / so releaseName concat works. if(!kwArgs.releaseDir.match(/\/$/)){ kwArgs.releaseDir += "/"; } kwArgs.releaseDir += kwArgs["releaseName"]; }else{ //No releaseName, so strip off trailing slash kwArgs.releaseDir = kwArgs.releaseDir.replace(/\/$/, ""); } kwArgs.action = kwArgs.action.split(","); kwArgs.localeList = kwArgs.localeList.split(","); //Attach the final loader type to the dependencies dependencies.loader = kwArgs.loader; //Fix args for bugs if(kwArgs.expandProvide && kwArgs.loader == "xdomain"){ logger.info("NOTE: expandProvide not compatible with xdomain builds. Ignoring expandProvide option."); kwArgs.expandProvide = false; } //Notify on incompatible options. if(kwArgs.optimize && kwArgs.optimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("NOTE: stripConsole is only supported for an optimize=shrinksafe value."); } if(kwArgs.layerOptimize && kwArgs.layerOptimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("layerOPtimize: [" + kwArgs.layerOptimize + "]"); logger.info("NOTE: stripConsole is only supported for an layerOptimize=shrinksafe value."); } //Validate some values. if(typeof kwArgs.scopeDjConfig != "string") { throw "Due to deficiencies in the build system, scopeDjConfig needs to be a string."; } //Do some hackery for closure compiler. if(kwArgs.optimize.indexOf("closure") == 0 || kwArgs.layerOptimize.indexOf("closure") == 0){ //directly call JSSourceFile.fromCode will actually invoke SourceFile.fromCode, //which will lead to error: "Cannot convert com.google.javascript.jscomp.SourceFile$Preloaded@26afa68a to com.google.javascript.jscomp.JSSourceFile" //don't know whether it's a bug in closure or rhino - liucougar var JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]); buildUtil.closurefromCode = function(filename,content){ return JSSourceFilefromCode.invoke(null,[filename,content]) } } return kwArgs;}
for(var prefix in prefixes){
for(prefix in prefixes){
buildUtil.makeBuildOptions = function(/*Array*/scriptArgs){ //summary: constructs the build options by combining the scriptArgs with //default build options and anything specified in a profile file. var kwArgs = {}, param, profileProperties; //Parse the command line arguments kwArgs = buildUtil.convertArrayToObject(scriptArgs); if(!kwArgs["profileFile"] && kwArgs["profile"]){ kwArgs.profileFile = "profiles/" + kwArgs.profile + ".profile.js"; } if(kwArgs.htmlFile){ // we are processing an HTML file, first read it var html = fileUtil.readFile(kwArgs.htmlFile); var layers = [], htmlPrefix = "", prefixes = {dijit: true, dojox: true}; html.replace(/<script [^>]*src=["']([^'"]+)["']/gi, function(t, scriptName){ // for each script tag if(scriptName.indexOf("dojo/dojo.js") > -1){ // use dojo.js to determine the prefix for our namespaces prefix = scriptName.substring(0, scriptName.indexOf("dojo/dojo.js")); }else{ // non-dojo.js script files, add it to our list of layers layers.push(scriptName = scriptName.substring(prefix.length, scriptName.length - 3)); if(scriptName.indexOf('/') > -1){ prefixes[scriptName.substring(scriptName, scriptName.indexOf('/'))] = true; } } }); html.replace(/dojo\.require\(["']([^'"]+)["']\)/g, function(t, scriptName){ // for each dojo.require call add it to the layers as well layers.push(scriptName); }); var prefixPaths = []; // normalize the prefixes into the arrays that the build expects for(var prefix in prefixes){ prefixPaths.push([prefix, "../" + prefix]); } // now create the profile object profileProperties = kwArgs.profileProperties = buildUtil.processProfile({ layers: layers.map(function(name, i){ // for each layer, create a layer object return { name: "../" + name.replace(/\./g,'/') + ".js", // use filename dependencies: [ name.replace(/\//g,'.') // use module name ], //use all previous layers as layer dependencies layerDependencies: layers.slice(0, i).map(function(name){ return "../" + name.replace(/\./g,'/') + ".js" }) }; }), prefixes: prefixPaths }); dependencies = profileProperties.dependencies; } //Load dependencies object from profile file, if there is one. var dependencies = {}; if(kwArgs["profileFile"]){ profileProperties = buildUtil.evalProfile(kwArgs.profileFile); logger.info(profileProperties.toSource()); if(profileProperties){ kwArgs.profileProperties = profileProperties; dependencies = kwArgs.profileProperties.dependencies; //Allow setting build options from on the profile's dependencies object. //Do not override existing values from the command line though. for(param in dependencies){ if(!(param in kwArgs) && param != "layers" && param != "prefixes"){ kwArgs[param] = dependencies[param]; } } } } //Set up default options for(param in buildUtil.DojoBuildOptions){ //Only use default if there is no value so far. if(typeof kwArgs[param] == "undefined"){ kwArgs[param] = buildUtil.DojoBuildOptions[param].defaultValue; }else if(kwArgs[param] === "false"){ //Make sure "false" strings get translated to proper false value. kwArgs[param] = false; } } //Make sure releaseDir uses / since rest of build assumes / paths. kwArgs.releaseDir = kwArgs.releaseDir.replace(/\\/g, "/"); //Set up some compound values if(kwArgs["releaseName"]){ ///Make sure releaseDir ends in a / so releaseName concat works. if(!kwArgs.releaseDir.match(/\/$/)){ kwArgs.releaseDir += "/"; } kwArgs.releaseDir += kwArgs["releaseName"]; }else{ //No releaseName, so strip off trailing slash kwArgs.releaseDir = kwArgs.releaseDir.replace(/\/$/, ""); } kwArgs.action = kwArgs.action.split(","); kwArgs.localeList = kwArgs.localeList.split(","); //Attach the final loader type to the dependencies dependencies.loader = kwArgs.loader; //Fix args for bugs if(kwArgs.expandProvide && kwArgs.loader == "xdomain"){ logger.info("NOTE: expandProvide not compatible with xdomain builds. Ignoring expandProvide option."); kwArgs.expandProvide = false; } //Notify on incompatible options. if(kwArgs.optimize && kwArgs.optimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("NOTE: stripConsole is only supported for an optimize=shrinksafe value."); } if(kwArgs.layerOptimize && kwArgs.layerOptimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("layerOPtimize: [" + kwArgs.layerOptimize + "]"); logger.info("NOTE: stripConsole is only supported for an layerOptimize=shrinksafe value."); } //Validate some values. if(typeof kwArgs.scopeDjConfig != "string") { throw "Due to deficiencies in the build system, scopeDjConfig needs to be a string."; } //Do some hackery for closure compiler. if(kwArgs.optimize.indexOf("closure") == 0 || kwArgs.layerOptimize.indexOf("closure") == 0){ //directly call JSSourceFile.fromCode will actually invoke SourceFile.fromCode, //which will lead to error: "Cannot convert com.google.javascript.jscomp.SourceFile$Preloaded@26afa68a to com.google.javascript.jscomp.JSSourceFile" //don't know whether it's a bug in closure or rhino - liucougar var JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]); buildUtil.closurefromCode = function(filename,content){ return JSSourceFilefromCode.invoke(null,[filename,content]) } } return kwArgs;}
profileProperties = kwArgs.profileProperties = buildUtil.processProfile({ layers: layers.map(function(name, i){ return {
var layersArray = []; for(var name in layers){ layersArray.push({
buildUtil.makeBuildOptions = function(/*Array*/scriptArgs){ //summary: constructs the build options by combining the scriptArgs with //default build options and anything specified in a profile file. var kwArgs = {}, param, profileProperties; //Parse the command line arguments kwArgs = buildUtil.convertArrayToObject(scriptArgs); if(!kwArgs["profileFile"] && kwArgs["profile"]){ kwArgs.profileFile = "profiles/" + kwArgs.profile + ".profile.js"; } if(kwArgs.htmlFile){ // we are processing an HTML file, first read it var html = fileUtil.readFile(kwArgs.htmlFile); var layers = [], htmlPrefix = "", prefixes = {dijit: true, dojox: true}; html.replace(/<script [^>]*src=["']([^'"]+)["']/gi, function(t, scriptName){ // for each script tag if(scriptName.indexOf("dojo/dojo.js") > -1){ // use dojo.js to determine the prefix for our namespaces prefix = scriptName.substring(0, scriptName.indexOf("dojo/dojo.js")); }else{ // non-dojo.js script files, add it to our list of layers layers.push(scriptName = scriptName.substring(prefix.length, scriptName.length - 3)); if(scriptName.indexOf('/') > -1){ prefixes[scriptName.substring(scriptName, scriptName.indexOf('/'))] = true; } } }); html.replace(/dojo\.require\(["']([^'"]+)["']\)/g, function(t, scriptName){ // for each dojo.require call add it to the layers as well layers.push(scriptName); }); var prefixPaths = []; // normalize the prefixes into the arrays that the build expects for(var prefix in prefixes){ prefixPaths.push([prefix, "../" + prefix]); } // now create the profile object profileProperties = kwArgs.profileProperties = buildUtil.processProfile({ layers: layers.map(function(name, i){ // for each layer, create a layer object return { name: "../" + name.replace(/\./g,'/') + ".js", // use filename dependencies: [ name.replace(/\//g,'.') // use module name ], //use all previous layers as layer dependencies layerDependencies: layers.slice(0, i).map(function(name){ return "../" + name.replace(/\./g,'/') + ".js" }) }; }), prefixes: prefixPaths }); dependencies = profileProperties.dependencies; } //Load dependencies object from profile file, if there is one. var dependencies = {}; if(kwArgs["profileFile"]){ profileProperties = buildUtil.evalProfile(kwArgs.profileFile); logger.info(profileProperties.toSource()); if(profileProperties){ kwArgs.profileProperties = profileProperties; dependencies = kwArgs.profileProperties.dependencies; //Allow setting build options from on the profile's dependencies object. //Do not override existing values from the command line though. for(param in dependencies){ if(!(param in kwArgs) && param != "layers" && param != "prefixes"){ kwArgs[param] = dependencies[param]; } } } } //Set up default options for(param in buildUtil.DojoBuildOptions){ //Only use default if there is no value so far. if(typeof kwArgs[param] == "undefined"){ kwArgs[param] = buildUtil.DojoBuildOptions[param].defaultValue; }else if(kwArgs[param] === "false"){ //Make sure "false" strings get translated to proper false value. kwArgs[param] = false; } } //Make sure releaseDir uses / since rest of build assumes / paths. kwArgs.releaseDir = kwArgs.releaseDir.replace(/\\/g, "/"); //Set up some compound values if(kwArgs["releaseName"]){ ///Make sure releaseDir ends in a / so releaseName concat works. if(!kwArgs.releaseDir.match(/\/$/)){ kwArgs.releaseDir += "/"; } kwArgs.releaseDir += kwArgs["releaseName"]; }else{ //No releaseName, so strip off trailing slash kwArgs.releaseDir = kwArgs.releaseDir.replace(/\/$/, ""); } kwArgs.action = kwArgs.action.split(","); kwArgs.localeList = kwArgs.localeList.split(","); //Attach the final loader type to the dependencies dependencies.loader = kwArgs.loader; //Fix args for bugs if(kwArgs.expandProvide && kwArgs.loader == "xdomain"){ logger.info("NOTE: expandProvide not compatible with xdomain builds. Ignoring expandProvide option."); kwArgs.expandProvide = false; } //Notify on incompatible options. if(kwArgs.optimize && kwArgs.optimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("NOTE: stripConsole is only supported for an optimize=shrinksafe value."); } if(kwArgs.layerOptimize && kwArgs.layerOptimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("layerOPtimize: [" + kwArgs.layerOptimize + "]"); logger.info("NOTE: stripConsole is only supported for an layerOptimize=shrinksafe value."); } //Validate some values. if(typeof kwArgs.scopeDjConfig != "string") { throw "Due to deficiencies in the build system, scopeDjConfig needs to be a string."; } //Do some hackery for closure compiler. if(kwArgs.optimize.indexOf("closure") == 0 || kwArgs.layerOptimize.indexOf("closure") == 0){ //directly call JSSourceFile.fromCode will actually invoke SourceFile.fromCode, //which will lead to error: "Cannot convert com.google.javascript.jscomp.SourceFile$Preloaded@26afa68a to com.google.javascript.jscomp.JSSourceFile" //don't know whether it's a bug in closure or rhino - liucougar var JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]); buildUtil.closurefromCode = function(filename,content){ return JSSourceFilefromCode.invoke(null,[filename,content]) } } return kwArgs;}
layerDependencies: layers.slice(0, i).map(function(name){
layerDependencies: layers[name].map(function(name){
buildUtil.makeBuildOptions = function(/*Array*/scriptArgs){ //summary: constructs the build options by combining the scriptArgs with //default build options and anything specified in a profile file. var kwArgs = {}, param, profileProperties; //Parse the command line arguments kwArgs = buildUtil.convertArrayToObject(scriptArgs); if(!kwArgs["profileFile"] && kwArgs["profile"]){ kwArgs.profileFile = "profiles/" + kwArgs.profile + ".profile.js"; } if(kwArgs.htmlFile){ // we are processing an HTML file, first read it var html = fileUtil.readFile(kwArgs.htmlFile); var layers = [], htmlPrefix = "", prefixes = {dijit: true, dojox: true}; html.replace(/<script [^>]*src=["']([^'"]+)["']/gi, function(t, scriptName){ // for each script tag if(scriptName.indexOf("dojo/dojo.js") > -1){ // use dojo.js to determine the prefix for our namespaces prefix = scriptName.substring(0, scriptName.indexOf("dojo/dojo.js")); }else{ // non-dojo.js script files, add it to our list of layers layers.push(scriptName = scriptName.substring(prefix.length, scriptName.length - 3)); if(scriptName.indexOf('/') > -1){ prefixes[scriptName.substring(scriptName, scriptName.indexOf('/'))] = true; } } }); html.replace(/dojo\.require\(["']([^'"]+)["']\)/g, function(t, scriptName){ // for each dojo.require call add it to the layers as well layers.push(scriptName); }); var prefixPaths = []; // normalize the prefixes into the arrays that the build expects for(var prefix in prefixes){ prefixPaths.push([prefix, "../" + prefix]); } // now create the profile object profileProperties = kwArgs.profileProperties = buildUtil.processProfile({ layers: layers.map(function(name, i){ // for each layer, create a layer object return { name: "../" + name.replace(/\./g,'/') + ".js", // use filename dependencies: [ name.replace(/\//g,'.') // use module name ], //use all previous layers as layer dependencies layerDependencies: layers.slice(0, i).map(function(name){ return "../" + name.replace(/\./g,'/') + ".js" }) }; }), prefixes: prefixPaths }); dependencies = profileProperties.dependencies; } //Load dependencies object from profile file, if there is one. var dependencies = {}; if(kwArgs["profileFile"]){ profileProperties = buildUtil.evalProfile(kwArgs.profileFile); logger.info(profileProperties.toSource()); if(profileProperties){ kwArgs.profileProperties = profileProperties; dependencies = kwArgs.profileProperties.dependencies; //Allow setting build options from on the profile's dependencies object. //Do not override existing values from the command line though. for(param in dependencies){ if(!(param in kwArgs) && param != "layers" && param != "prefixes"){ kwArgs[param] = dependencies[param]; } } } } //Set up default options for(param in buildUtil.DojoBuildOptions){ //Only use default if there is no value so far. if(typeof kwArgs[param] == "undefined"){ kwArgs[param] = buildUtil.DojoBuildOptions[param].defaultValue; }else if(kwArgs[param] === "false"){ //Make sure "false" strings get translated to proper false value. kwArgs[param] = false; } } //Make sure releaseDir uses / since rest of build assumes / paths. kwArgs.releaseDir = kwArgs.releaseDir.replace(/\\/g, "/"); //Set up some compound values if(kwArgs["releaseName"]){ ///Make sure releaseDir ends in a / so releaseName concat works. if(!kwArgs.releaseDir.match(/\/$/)){ kwArgs.releaseDir += "/"; } kwArgs.releaseDir += kwArgs["releaseName"]; }else{ //No releaseName, so strip off trailing slash kwArgs.releaseDir = kwArgs.releaseDir.replace(/\/$/, ""); } kwArgs.action = kwArgs.action.split(","); kwArgs.localeList = kwArgs.localeList.split(","); //Attach the final loader type to the dependencies dependencies.loader = kwArgs.loader; //Fix args for bugs if(kwArgs.expandProvide && kwArgs.loader == "xdomain"){ logger.info("NOTE: expandProvide not compatible with xdomain builds. Ignoring expandProvide option."); kwArgs.expandProvide = false; } //Notify on incompatible options. if(kwArgs.optimize && kwArgs.optimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("NOTE: stripConsole is only supported for an optimize=shrinksafe value."); } if(kwArgs.layerOptimize && kwArgs.layerOptimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("layerOPtimize: [" + kwArgs.layerOptimize + "]"); logger.info("NOTE: stripConsole is only supported for an layerOptimize=shrinksafe value."); } //Validate some values. if(typeof kwArgs.scopeDjConfig != "string") { throw "Due to deficiencies in the build system, scopeDjConfig needs to be a string."; } //Do some hackery for closure compiler. if(kwArgs.optimize.indexOf("closure") == 0 || kwArgs.layerOptimize.indexOf("closure") == 0){ //directly call JSSourceFile.fromCode will actually invoke SourceFile.fromCode, //which will lead to error: "Cannot convert com.google.javascript.jscomp.SourceFile$Preloaded@26afa68a to com.google.javascript.jscomp.JSSourceFile" //don't know whether it's a bug in closure or rhino - liucougar var JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]); buildUtil.closurefromCode = function(filename,content){ return JSSourceFilefromCode.invoke(null,[filename,content]) } } return kwArgs;}
}; }),
}); } profileProperties = { layers: layersArray,
buildUtil.makeBuildOptions = function(/*Array*/scriptArgs){ //summary: constructs the build options by combining the scriptArgs with //default build options and anything specified in a profile file. var kwArgs = {}, param, profileProperties; //Parse the command line arguments kwArgs = buildUtil.convertArrayToObject(scriptArgs); if(!kwArgs["profileFile"] && kwArgs["profile"]){ kwArgs.profileFile = "profiles/" + kwArgs.profile + ".profile.js"; } if(kwArgs.htmlFile){ // we are processing an HTML file, first read it var html = fileUtil.readFile(kwArgs.htmlFile); var layers = [], htmlPrefix = "", prefixes = {dijit: true, dojox: true}; html.replace(/<script [^>]*src=["']([^'"]+)["']/gi, function(t, scriptName){ // for each script tag if(scriptName.indexOf("dojo/dojo.js") > -1){ // use dojo.js to determine the prefix for our namespaces prefix = scriptName.substring(0, scriptName.indexOf("dojo/dojo.js")); }else{ // non-dojo.js script files, add it to our list of layers layers.push(scriptName = scriptName.substring(prefix.length, scriptName.length - 3)); if(scriptName.indexOf('/') > -1){ prefixes[scriptName.substring(scriptName, scriptName.indexOf('/'))] = true; } } }); html.replace(/dojo\.require\(["']([^'"]+)["']\)/g, function(t, scriptName){ // for each dojo.require call add it to the layers as well layers.push(scriptName); }); var prefixPaths = []; // normalize the prefixes into the arrays that the build expects for(var prefix in prefixes){ prefixPaths.push([prefix, "../" + prefix]); } // now create the profile object profileProperties = kwArgs.profileProperties = buildUtil.processProfile({ layers: layers.map(function(name, i){ // for each layer, create a layer object return { name: "../" + name.replace(/\./g,'/') + ".js", // use filename dependencies: [ name.replace(/\//g,'.') // use module name ], //use all previous layers as layer dependencies layerDependencies: layers.slice(0, i).map(function(name){ return "../" + name.replace(/\./g,'/') + ".js" }) }; }), prefixes: prefixPaths }); dependencies = profileProperties.dependencies; } //Load dependencies object from profile file, if there is one. var dependencies = {}; if(kwArgs["profileFile"]){ profileProperties = buildUtil.evalProfile(kwArgs.profileFile); logger.info(profileProperties.toSource()); if(profileProperties){ kwArgs.profileProperties = profileProperties; dependencies = kwArgs.profileProperties.dependencies; //Allow setting build options from on the profile's dependencies object. //Do not override existing values from the command line though. for(param in dependencies){ if(!(param in kwArgs) && param != "layers" && param != "prefixes"){ kwArgs[param] = dependencies[param]; } } } } //Set up default options for(param in buildUtil.DojoBuildOptions){ //Only use default if there is no value so far. if(typeof kwArgs[param] == "undefined"){ kwArgs[param] = buildUtil.DojoBuildOptions[param].defaultValue; }else if(kwArgs[param] === "false"){ //Make sure "false" strings get translated to proper false value. kwArgs[param] = false; } } //Make sure releaseDir uses / since rest of build assumes / paths. kwArgs.releaseDir = kwArgs.releaseDir.replace(/\\/g, "/"); //Set up some compound values if(kwArgs["releaseName"]){ ///Make sure releaseDir ends in a / so releaseName concat works. if(!kwArgs.releaseDir.match(/\/$/)){ kwArgs.releaseDir += "/"; } kwArgs.releaseDir += kwArgs["releaseName"]; }else{ //No releaseName, so strip off trailing slash kwArgs.releaseDir = kwArgs.releaseDir.replace(/\/$/, ""); } kwArgs.action = kwArgs.action.split(","); kwArgs.localeList = kwArgs.localeList.split(","); //Attach the final loader type to the dependencies dependencies.loader = kwArgs.loader; //Fix args for bugs if(kwArgs.expandProvide && kwArgs.loader == "xdomain"){ logger.info("NOTE: expandProvide not compatible with xdomain builds. Ignoring expandProvide option."); kwArgs.expandProvide = false; } //Notify on incompatible options. if(kwArgs.optimize && kwArgs.optimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("NOTE: stripConsole is only supported for an optimize=shrinksafe value."); } if(kwArgs.layerOptimize && kwArgs.layerOptimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("layerOPtimize: [" + kwArgs.layerOptimize + "]"); logger.info("NOTE: stripConsole is only supported for an layerOptimize=shrinksafe value."); } //Validate some values. if(typeof kwArgs.scopeDjConfig != "string") { throw "Due to deficiencies in the build system, scopeDjConfig needs to be a string."; } //Do some hackery for closure compiler. if(kwArgs.optimize.indexOf("closure") == 0 || kwArgs.layerOptimize.indexOf("closure") == 0){ //directly call JSSourceFile.fromCode will actually invoke SourceFile.fromCode, //which will lead to error: "Cannot convert com.google.javascript.jscomp.SourceFile$Preloaded@26afa68a to com.google.javascript.jscomp.JSSourceFile" //don't know whether it's a bug in closure or rhino - liucougar var JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]); buildUtil.closurefromCode = function(filename,content){ return JSSourceFilefromCode.invoke(null,[filename,content]) } } return kwArgs;}
});
}; if(kwArgs.profileFile){ fileUtil.saveFile(kwArgs.profileFile, "dependencies = " + profileProperties.toSource()); } profileProperties = kwArgs.profileProperties = buildUtil.processProfile(profileProperties);
buildUtil.makeBuildOptions = function(/*Array*/scriptArgs){ //summary: constructs the build options by combining the scriptArgs with //default build options and anything specified in a profile file. var kwArgs = {}, param, profileProperties; //Parse the command line arguments kwArgs = buildUtil.convertArrayToObject(scriptArgs); if(!kwArgs["profileFile"] && kwArgs["profile"]){ kwArgs.profileFile = "profiles/" + kwArgs.profile + ".profile.js"; } if(kwArgs.htmlFile){ // we are processing an HTML file, first read it var html = fileUtil.readFile(kwArgs.htmlFile); var layers = [], htmlPrefix = "", prefixes = {dijit: true, dojox: true}; html.replace(/<script [^>]*src=["']([^'"]+)["']/gi, function(t, scriptName){ // for each script tag if(scriptName.indexOf("dojo/dojo.js") > -1){ // use dojo.js to determine the prefix for our namespaces prefix = scriptName.substring(0, scriptName.indexOf("dojo/dojo.js")); }else{ // non-dojo.js script files, add it to our list of layers layers.push(scriptName = scriptName.substring(prefix.length, scriptName.length - 3)); if(scriptName.indexOf('/') > -1){ prefixes[scriptName.substring(scriptName, scriptName.indexOf('/'))] = true; } } }); html.replace(/dojo\.require\(["']([^'"]+)["']\)/g, function(t, scriptName){ // for each dojo.require call add it to the layers as well layers.push(scriptName); }); var prefixPaths = []; // normalize the prefixes into the arrays that the build expects for(var prefix in prefixes){ prefixPaths.push([prefix, "../" + prefix]); } // now create the profile object profileProperties = kwArgs.profileProperties = buildUtil.processProfile({ layers: layers.map(function(name, i){ // for each layer, create a layer object return { name: "../" + name.replace(/\./g,'/') + ".js", // use filename dependencies: [ name.replace(/\//g,'.') // use module name ], //use all previous layers as layer dependencies layerDependencies: layers.slice(0, i).map(function(name){ return "../" + name.replace(/\./g,'/') + ".js" }) }; }), prefixes: prefixPaths }); dependencies = profileProperties.dependencies; } //Load dependencies object from profile file, if there is one. var dependencies = {}; if(kwArgs["profileFile"]){ profileProperties = buildUtil.evalProfile(kwArgs.profileFile); logger.info(profileProperties.toSource()); if(profileProperties){ kwArgs.profileProperties = profileProperties; dependencies = kwArgs.profileProperties.dependencies; //Allow setting build options from on the profile's dependencies object. //Do not override existing values from the command line though. for(param in dependencies){ if(!(param in kwArgs) && param != "layers" && param != "prefixes"){ kwArgs[param] = dependencies[param]; } } } } //Set up default options for(param in buildUtil.DojoBuildOptions){ //Only use default if there is no value so far. if(typeof kwArgs[param] == "undefined"){ kwArgs[param] = buildUtil.DojoBuildOptions[param].defaultValue; }else if(kwArgs[param] === "false"){ //Make sure "false" strings get translated to proper false value. kwArgs[param] = false; } } //Make sure releaseDir uses / since rest of build assumes / paths. kwArgs.releaseDir = kwArgs.releaseDir.replace(/\\/g, "/"); //Set up some compound values if(kwArgs["releaseName"]){ ///Make sure releaseDir ends in a / so releaseName concat works. if(!kwArgs.releaseDir.match(/\/$/)){ kwArgs.releaseDir += "/"; } kwArgs.releaseDir += kwArgs["releaseName"]; }else{ //No releaseName, so strip off trailing slash kwArgs.releaseDir = kwArgs.releaseDir.replace(/\/$/, ""); } kwArgs.action = kwArgs.action.split(","); kwArgs.localeList = kwArgs.localeList.split(","); //Attach the final loader type to the dependencies dependencies.loader = kwArgs.loader; //Fix args for bugs if(kwArgs.expandProvide && kwArgs.loader == "xdomain"){ logger.info("NOTE: expandProvide not compatible with xdomain builds. Ignoring expandProvide option."); kwArgs.expandProvide = false; } //Notify on incompatible options. if(kwArgs.optimize && kwArgs.optimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("NOTE: stripConsole is only supported for an optimize=shrinksafe value."); } if(kwArgs.layerOptimize && kwArgs.layerOptimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("layerOPtimize: [" + kwArgs.layerOptimize + "]"); logger.info("NOTE: stripConsole is only supported for an layerOptimize=shrinksafe value."); } //Validate some values. if(typeof kwArgs.scopeDjConfig != "string") { throw "Due to deficiencies in the build system, scopeDjConfig needs to be a string."; } //Do some hackery for closure compiler. if(kwArgs.optimize.indexOf("closure") == 0 || kwArgs.layerOptimize.indexOf("closure") == 0){ //directly call JSSourceFile.fromCode will actually invoke SourceFile.fromCode, //which will lead to error: "Cannot convert com.google.javascript.jscomp.SourceFile$Preloaded@26afa68a to com.google.javascript.jscomp.JSSourceFile" //don't know whether it's a bug in closure or rhino - liucougar var JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]); buildUtil.closurefromCode = function(filename,content){ return JSSourceFilefromCode.invoke(null,[filename,content]) } } return kwArgs;}
var dependencies = {}; if(kwArgs["profileFile"]){
else if(kwArgs["profileFile"]){
buildUtil.makeBuildOptions = function(/*Array*/scriptArgs){ //summary: constructs the build options by combining the scriptArgs with //default build options and anything specified in a profile file. var kwArgs = {}, param, profileProperties; //Parse the command line arguments kwArgs = buildUtil.convertArrayToObject(scriptArgs); if(!kwArgs["profileFile"] && kwArgs["profile"]){ kwArgs.profileFile = "profiles/" + kwArgs.profile + ".profile.js"; } if(kwArgs.htmlFile){ // we are processing an HTML file, first read it var html = fileUtil.readFile(kwArgs.htmlFile); var layers = [], htmlPrefix = "", prefixes = {dijit: true, dojox: true}; html.replace(/<script [^>]*src=["']([^'"]+)["']/gi, function(t, scriptName){ // for each script tag if(scriptName.indexOf("dojo/dojo.js") > -1){ // use dojo.js to determine the prefix for our namespaces prefix = scriptName.substring(0, scriptName.indexOf("dojo/dojo.js")); }else{ // non-dojo.js script files, add it to our list of layers layers.push(scriptName = scriptName.substring(prefix.length, scriptName.length - 3)); if(scriptName.indexOf('/') > -1){ prefixes[scriptName.substring(scriptName, scriptName.indexOf('/'))] = true; } } }); html.replace(/dojo\.require\(["']([^'"]+)["']\)/g, function(t, scriptName){ // for each dojo.require call add it to the layers as well layers.push(scriptName); }); var prefixPaths = []; // normalize the prefixes into the arrays that the build expects for(var prefix in prefixes){ prefixPaths.push([prefix, "../" + prefix]); } // now create the profile object profileProperties = kwArgs.profileProperties = buildUtil.processProfile({ layers: layers.map(function(name, i){ // for each layer, create a layer object return { name: "../" + name.replace(/\./g,'/') + ".js", // use filename dependencies: [ name.replace(/\//g,'.') // use module name ], //use all previous layers as layer dependencies layerDependencies: layers.slice(0, i).map(function(name){ return "../" + name.replace(/\./g,'/') + ".js" }) }; }), prefixes: prefixPaths }); dependencies = profileProperties.dependencies; } //Load dependencies object from profile file, if there is one. var dependencies = {}; if(kwArgs["profileFile"]){ profileProperties = buildUtil.evalProfile(kwArgs.profileFile); logger.info(profileProperties.toSource()); if(profileProperties){ kwArgs.profileProperties = profileProperties; dependencies = kwArgs.profileProperties.dependencies; //Allow setting build options from on the profile's dependencies object. //Do not override existing values from the command line though. for(param in dependencies){ if(!(param in kwArgs) && param != "layers" && param != "prefixes"){ kwArgs[param] = dependencies[param]; } } } } //Set up default options for(param in buildUtil.DojoBuildOptions){ //Only use default if there is no value so far. if(typeof kwArgs[param] == "undefined"){ kwArgs[param] = buildUtil.DojoBuildOptions[param].defaultValue; }else if(kwArgs[param] === "false"){ //Make sure "false" strings get translated to proper false value. kwArgs[param] = false; } } //Make sure releaseDir uses / since rest of build assumes / paths. kwArgs.releaseDir = kwArgs.releaseDir.replace(/\\/g, "/"); //Set up some compound values if(kwArgs["releaseName"]){ ///Make sure releaseDir ends in a / so releaseName concat works. if(!kwArgs.releaseDir.match(/\/$/)){ kwArgs.releaseDir += "/"; } kwArgs.releaseDir += kwArgs["releaseName"]; }else{ //No releaseName, so strip off trailing slash kwArgs.releaseDir = kwArgs.releaseDir.replace(/\/$/, ""); } kwArgs.action = kwArgs.action.split(","); kwArgs.localeList = kwArgs.localeList.split(","); //Attach the final loader type to the dependencies dependencies.loader = kwArgs.loader; //Fix args for bugs if(kwArgs.expandProvide && kwArgs.loader == "xdomain"){ logger.info("NOTE: expandProvide not compatible with xdomain builds. Ignoring expandProvide option."); kwArgs.expandProvide = false; } //Notify on incompatible options. if(kwArgs.optimize && kwArgs.optimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("NOTE: stripConsole is only supported for an optimize=shrinksafe value."); } if(kwArgs.layerOptimize && kwArgs.layerOptimize != "shrinksafe" && kwArgs.stripConsole){ logger.info("layerOPtimize: [" + kwArgs.layerOptimize + "]"); logger.info("NOTE: stripConsole is only supported for an layerOptimize=shrinksafe value."); } //Validate some values. if(typeof kwArgs.scopeDjConfig != "string") { throw "Due to deficiencies in the build system, scopeDjConfig needs to be a string."; } //Do some hackery for closure compiler. if(kwArgs.optimize.indexOf("closure") == 0 || kwArgs.layerOptimize.indexOf("closure") == 0){ //directly call JSSourceFile.fromCode will actually invoke SourceFile.fromCode, //which will lead to error: "Cannot convert com.google.javascript.jscomp.SourceFile$Preloaded@26afa68a to com.google.javascript.jscomp.JSSourceFile" //don't know whether it's a bug in closure or rhino - liucougar var JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]); buildUtil.closurefromCode = function(filename,content){ return JSSourceFilefromCode.invoke(null,[filename,content]) } } return kwArgs;}
return fakeChannel();
return fakeChannel(orig);
function makeChannel(url, orig) { try { if (url == null) return fakeChannel(); if (typeof url === "function") url = dataURL.apply(null, url()); let uri = ioService.newURI(url, null, null); let channel = ioService.newChannelFromURI(uri); channel.contentCharset = "UTF-8"; channel.owner = systemPrincipal; channel.originalURI = orig; return channel; } catch (e) { Components.utils.reportError(e); throw e; }}
Components.utils.reportError(e);
util.reportError(e);
function makeChannel(url, orig) { try { if (url == null) return fakeChannel(); if (typeof url === "function") url = dataURL.apply(null, url()); let uri = ioService.newURI(url, null, null); let channel = ioService.newChannelFromURI(uri); channel.contentCharset = "UTF-8"; channel.owner = systemPrincipal; channel.originalURI = orig; return channel; } catch (e) { Components.utils.reportError(e); throw e; }}
if (typeof url == "function")
if (typeof url === "function")
function makeChannel(url, orig) { if (url == null) return fakeChannel(); if (typeof url == "function") url = dataURL.apply(null, url()); let uri = ioService.newURI(url, null, null); let channel = ioService.newChannelFromURI(uri); channel.contentCharset = "UTF-8"; channel.owner = systemPrincipal; channel.originalURI = orig; return channel;}
makeClipping: function(element) { element = $(element); if (element._overflow) return element; element._overflow = Element.getStyle(element, 'overflow') || 'auto'; if (element._overflow !== 'hidden') element.style.overflow = 'hidden'; 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])*?\*\
makeClipping: function(element) { element = $(element); if (element._overflow) return element; element._overflow = Element.getStyle(element, 'overflow') || 'auto'; if (element._overflow !== 'hidden') element.style.overflow = 'hidden'; return element; },
function makeContext(modulePath, filePath, dontAddBase) {
function makeContext(modulePath, moduleDef, dontAddBase) {
function makeContext(modulePath, filePath, dontAddBase) { var ctx = {exports: {}}, cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0; ctx.jsio = bind(this, importer, ctx, modulePath); if (!ENV.hasCommonJS) { ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; } ctx.module = {id: modulePath}; if (!dontAddBase && modulePath != 'base') { ctx.jsio('from base import *'); ctx.logging.__create(modulePath, ctx); } // TODO: FIX for "trailing ." case ctx.jsio.__jsio = jsio; ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath; ctx.jsio.__path = modulePath; return ctx; };
cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0;
cwd = ENV.getCwd();
function makeContext(modulePath, filePath, dontAddBase) { var ctx = {exports: {}}, cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0; ctx.jsio = bind(this, importer, ctx, modulePath); if (!ENV.hasCommonJS) { ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; } ctx.module = {id: modulePath}; if (!dontAddBase && modulePath != 'base') { ctx.jsio('from base import *'); ctx.logging.__create(modulePath, ctx); } // TODO: FIX for "trailing ." case ctx.jsio.__jsio = jsio; ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath; ctx.jsio.__path = modulePath; return ctx; };
ctx.jsio = bind(this, importer, ctx, modulePath);
ctx.jsio = util.bind(this, importer, ctx, moduleDef.directory, moduleDef.filename);
function makeContext(modulePath, filePath, dontAddBase) { var ctx = {exports: {}}, cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0; ctx.jsio = bind(this, importer, ctx, modulePath); if (!ENV.hasCommonJS) { ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; } ctx.module = {id: modulePath}; if (!dontAddBase && modulePath != 'base') { ctx.jsio('from base import *'); ctx.logging.__create(modulePath, ctx); } // TODO: FIX for "trailing ." case ctx.jsio.__jsio = jsio; ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath; ctx.jsio.__path = modulePath; return ctx; };
ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath;
ctx.jsio.__dir = moduleDef.directory; ctx.jsio.__filename = moduleDef.filename;
function makeContext(modulePath, filePath, dontAddBase) { var ctx = {exports: {}}, cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0; ctx.jsio = bind(this, importer, ctx, modulePath); if (!ENV.hasCommonJS) { ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; } ctx.module = {id: modulePath}; if (!dontAddBase && modulePath != 'base') { ctx.jsio('from base import *'); ctx.logging.__create(modulePath, ctx); } // TODO: FIX for "trailing ." case ctx.jsio.__jsio = jsio; ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath; ctx.jsio.__path = modulePath; return ctx; };
if (!ENV.hasCommonJS) { ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; }
ctx.require = ENV.require ? ENV.require : function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); };
function makeContext(modulePath, moduleDef, dontAddBase) { var ctx = {exports: {}}, cwd = ENV.getCwd(); ctx.jsio = util.bind(this, importer, ctx, moduleDef.directory, moduleDef.filename); if (!ENV.hasCommonJS) { ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; } ctx.module = {id: modulePath}; if (!dontAddBase && modulePath != 'base') { ctx.jsio('from base import *'); ctx.logging.__create(modulePath, ctx); } // TODO: FIX for "trailing ." case ctx.jsio.__jsio = jsio; ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = moduleDef.directory; ctx.jsio.__filename = moduleDef.filename; ctx.jsio.__path = modulePath; return ctx; };
exports: {}, global: ENV.global };
exports: {}, global: ENV.global }, cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0;
function makeContext(pkgPath, filePath) { var ctx = { exports: {}, global: ENV.global }; ctx.jsio = bind(this, importer, ctx, pkgPath); if(pkgPath != 'base') { ctx.jsio('from base import *'); ctx.logging.__create(pkgPath, ctx); } // TODO: FIX for "trailing ." case var cwd = ENV.getCwd(); var i = filePath.lastIndexOf('/'); ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = i > 0 ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = i > 0 ? filePath.substring(i) : filePath; ctx.jsio.__path = pkgPath; return ctx; };
ctx.jsio = bind(this, importer, ctx, pkgPath); if(pkgPath != 'base') {
ctx.require = ctx.jsio = bind(this, importer, ctx, pkgPath); ctx.module = {id: pkgPath}; if (pkgPath != 'base') {
function makeContext(pkgPath, filePath) { var ctx = { exports: {}, global: ENV.global }; ctx.jsio = bind(this, importer, ctx, pkgPath); if(pkgPath != 'base') { ctx.jsio('from base import *'); ctx.logging.__create(pkgPath, ctx); } // TODO: FIX for "trailing ." case var cwd = ENV.getCwd(); var i = filePath.lastIndexOf('/'); ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = i > 0 ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = i > 0 ? filePath.substring(i) : filePath; ctx.jsio.__path = pkgPath; return ctx; };
var cwd = ENV.getCwd(); var i = filePath.lastIndexOf('/');
ctx.jsio.__jsio = jsio;
function makeContext(pkgPath, filePath) { var ctx = { exports: {}, global: ENV.global }; ctx.jsio = bind(this, importer, ctx, pkgPath); if(pkgPath != 'base') { ctx.jsio('from base import *'); ctx.logging.__create(pkgPath, ctx); } // TODO: FIX for "trailing ." case var cwd = ENV.getCwd(); var i = filePath.lastIndexOf('/'); ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = i > 0 ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = i > 0 ? filePath.substring(i) : filePath; ctx.jsio.__path = pkgPath; return ctx; };
ctx.jsio.__dir = i > 0 ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = i > 0 ? filePath.substring(i) : filePath;
ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath;
function makeContext(pkgPath, filePath) { var ctx = { exports: {}, global: ENV.global }; ctx.jsio = bind(this, importer, ctx, pkgPath); if(pkgPath != 'base') { ctx.jsio('from base import *'); ctx.logging.__create(pkgPath, ctx); } // TODO: FIX for "trailing ." case var cwd = ENV.getCwd(); var i = filePath.lastIndexOf('/'); ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = i > 0 ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = i > 0 ? filePath.substring(i) : filePath; ctx.jsio.__path = pkgPath; return ctx; };
function makeContext(pkgPath, filePath, dontAddBase) {
function makeContext(modulePath, filePath, dontAddBase) {
function makeContext(pkgPath, filePath, dontAddBase) { var ctx = {exports: {}}, cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0; ctx.jsio = bind(this, importer, ctx, pkgPath); ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; ctx.module = {id: pkgPath}; if (!dontAddBase && pkgPath != 'base') { ctx.jsio('from base import *'); //importer(ctx, pkgPath, {from:}) ctx.logging.__create(pkgPath, ctx); } // TODO: FIX for "trailing ." case ctx.jsio.__jsio = jsio; ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath; ctx.jsio.__path = pkgPath; return ctx; };
ctx.jsio = bind(this, importer, ctx, pkgPath); ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); };
ctx.jsio = bind(this, importer, ctx, modulePath); if (!ENV.hasCommonJS) { ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; }
function makeContext(pkgPath, filePath, dontAddBase) { var ctx = {exports: {}}, cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0; ctx.jsio = bind(this, importer, ctx, pkgPath); ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; ctx.module = {id: pkgPath}; if (!dontAddBase && pkgPath != 'base') { ctx.jsio('from base import *'); //importer(ctx, pkgPath, {from:}) ctx.logging.__create(pkgPath, ctx); } // TODO: FIX for "trailing ." case ctx.jsio.__jsio = jsio; ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath; ctx.jsio.__path = pkgPath; return ctx; };
ctx.module = {id: pkgPath}; if (!dontAddBase && pkgPath != 'base') {
ctx.module = {id: modulePath}; if (!dontAddBase && modulePath != 'base') {
function makeContext(pkgPath, filePath, dontAddBase) { var ctx = {exports: {}}, cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0; ctx.jsio = bind(this, importer, ctx, pkgPath); ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; ctx.module = {id: pkgPath}; if (!dontAddBase && pkgPath != 'base') { ctx.jsio('from base import *'); //importer(ctx, pkgPath, {from:}) ctx.logging.__create(pkgPath, ctx); } // TODO: FIX for "trailing ." case ctx.jsio.__jsio = jsio; ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath; ctx.jsio.__path = pkgPath; return ctx; };
ctx.logging.__create(pkgPath, ctx);
ctx.logging.__create(modulePath, ctx);
function makeContext(pkgPath, filePath, dontAddBase) { var ctx = {exports: {}}, cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0; ctx.jsio = bind(this, importer, ctx, pkgPath); ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; ctx.module = {id: pkgPath}; if (!dontAddBase && pkgPath != 'base') { ctx.jsio('from base import *'); //importer(ctx, pkgPath, {from:}) ctx.logging.__create(pkgPath, ctx); } // TODO: FIX for "trailing ." case ctx.jsio.__jsio = jsio; ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath; ctx.jsio.__path = pkgPath; return ctx; };
ctx.jsio.__path = pkgPath;
ctx.jsio.__path = modulePath;
function makeContext(pkgPath, filePath, dontAddBase) { var ctx = {exports: {}}, cwd = ENV.getCwd(), i = filePath.lastIndexOf('/'), isRelative = i > 0; ctx.jsio = bind(this, importer, ctx, pkgPath); ctx.require = function(request, opts) { opts.dontExport = true; return ctx.jsio(request, opts); }; ctx.module = {id: pkgPath}; if (!dontAddBase && pkgPath != 'base') { ctx.jsio('from base import *'); //importer(ctx, pkgPath, {from:}) ctx.logging.__create(pkgPath, ctx); } // TODO: FIX for "trailing ." case ctx.jsio.__jsio = jsio; ctx.jsio.__env = jsio.__env; ctx.jsio.__dir = isRelative ? makeRelativePath(filePath.substring(0, i), cwd) : ''; ctx.jsio.__filename = isRelative ? filePath.substring(i) : filePath; ctx.jsio.__path = pkgPath; return ctx; };
r = RangeFind.Range(r, frames.length); if (r)
if (r = RangeFind.Range(r, frames.length))
makeFrameList: function (win) { const self = this; win = win.top; let frames = []; let backup = null; function pushRange(start, end) { function push(r) { r = RangeFind.Range(r, frames.length); if (r) frames.push(r); } let range = start.startContainer.ownerDocument.createRange(); range.setStart(start.startContainer, start.startOffset); range.setEnd(end.startContainer, end.startOffset); if (!self.elementPath) push(range); else for (let r in self.findSubRanges(range)) push(r); } function rec(win) { let doc = win.document; let pageRange = doc.createRange(); pageRange.selectNode(doc.body || doc.documentElement.lastChild); backup = backup || pageRange; let pageStart = RangeFind.endpoint(pageRange, true); let pageEnd = RangeFind.endpoint(pageRange, false); for (let frame in util.Array.itervalues(win.frames)) { let range = doc.createRange(); range.selectNode(frame.frameElement); pushRange(pageStart, RangeFind.endpoint(range, true)); pageStart = RangeFind.endpoint(range, false); rec(frame); } pushRange(pageStart, pageEnd); } rec(win); if (frames.length == 0) frames[0] = RangeFind.Range(RangeFind.endpoint(backup, true), 0); return frames; },
let pageRange = doc.createRange(); pageRange.selectNode(doc.body || doc.documentElement.lastChild);
let pageRange = RangeFind.nodeRange(doc.body || doc.documentElement.lastChild);
makeFrameList: function (win) { const self = this; win = win.top; let frames = []; let backup = null; function pushRange(start, end) { function push(r) { r = RangeFind.Range(r, frames.length); if (r) frames.push(r); } let range = start.startContainer.ownerDocument.createRange(); range.setStart(start.startContainer, start.startOffset); range.setEnd(end.startContainer, end.startOffset); if (!self.elementPath) push(range); else for (let r in self.findSubRanges(range)) push(r); } function rec(win) { let doc = win.document; let pageRange = doc.createRange(); pageRange.selectNode(doc.body || doc.documentElement.lastChild); backup = backup || pageRange; let pageStart = RangeFind.endpoint(pageRange, true); let pageEnd = RangeFind.endpoint(pageRange, false); for (let frame in util.Array.itervalues(win.frames)) { let range = doc.createRange(); range.selectNode(frame.frameElement); pushRange(pageStart, RangeFind.endpoint(range, true)); pageStart = RangeFind.endpoint(range, false); rec(frame); } pushRange(pageStart, pageEnd); } rec(win); if (frames.length == 0) frames[0] = RangeFind.Range(RangeFind.endpoint(backup, true), 0); return frames; },
range.selectNode(frame.frameElement); pushRange(pageStart, RangeFind.endpoint(range, true)); pageStart = RangeFind.endpoint(range, false); rec(frame);
if (util.computedStyle(frame.frameElement).visibility == "visible") { range.selectNode(frame.frameElement); pushRange(pageStart, RangeFind.endpoint(range, true)); pageStart = RangeFind.endpoint(range, false); rec(frame); }
makeFrameList: function (win) { const self = this; win = win.top; let frames = []; let backup = null; function pushRange(start, end) { function push(r) { r = RangeFind.Range(r, frames.length); if (r) frames.push(r); } let range = start.startContainer.ownerDocument.createRange(); range.setStart(start.startContainer, start.startOffset); range.setEnd(end.startContainer, end.startOffset); if (!self.elementPath) push(range); else for (let r in self.findSubRanges(range)) push(r); } function rec(win) { let doc = win.document; let pageRange = doc.createRange(); pageRange.selectNode(doc.body || doc.documentElement.lastChild); backup = backup || pageRange; let pageStart = RangeFind.endpoint(pageRange, true); let pageEnd = RangeFind.endpoint(pageRange, false); for (let frame in util.Array.itervalues(win.frames)) { let range = doc.createRange(); range.selectNode(frame.frameElement); pushRange(pageStart, RangeFind.endpoint(range, true)); pageStart = RangeFind.endpoint(range, false); rec(frame); } pushRange(pageStart, pageEnd); } rec(win); if (frames.length == 0) frames[0] = RangeFind.Range(RangeFind.endpoint(backup, true), 0); return frames; },
link.href = href;
link.href = 'javascript:null'; var openUrl = function () { chrome.extension.sendRequest({kind: 'openUrl', url: href}); }; link.addEventListener('click', pagespeed.withErrorHandler(openUrl), false);
makeLink: function (href, label) { var link = pagespeed.makeElement('a', null, label); link.href = href; // TODO (mdsteele): Clicking on a link opens the page in the Page Speed // devtools pane, which is not at all what we want. We need to figure out // how to make the link open in a new Chrome tab. return link; },
log.apply(log, [type, this._name].concat(slice.call(arguments, 0)));
return log.apply(log, [type, this._name].concat(slice.call(arguments, 0)));
function makeLogFunction(level, type) { return function() { if (!production && level >= this._level) { log.apply(log, [type, this._name].concat(slice.call(arguments, 0))); } return arguments[0]; } }
if (level < this.level || production) return; log.apply(log, [type, this.name].concat(Array.prototype.slice.call(arguments, 0)));
if (!production && level >= this.level) { log.apply(log, [type, this.name].concat(Array.prototype.slice.call(arguments, 0))); } return arguments[0];
function makeLogFunction(level, type) { return function() { if (level < this.level || production) return; log.apply(log, [type, this.name].concat(Array.prototype.slice.call(arguments, 0))); } }
makeParams = function makeParams(args) array(Iterator(params.apply(this, arguments))).map(function ([k, v]) [k, process(v)]).toObject();
function makeParams(self, args) array.toObject([[name, process(args[i])] for ([i, name] in Iterator(params))]);
makeParams = function makeParams(args) array(Iterator(params.apply(this, arguments))).map(function ([k, v]) [k, process(v)]).toObject();
makePositioned: function(element) { element = $(element); var pos = Element.getStyle(element, 'position'); if (pos == 'static' || !pos) { element._madePositioned = true; element.style.position = 'relative'; if (Prototype.Browser.Opera) { element.style.top = 0; element.style.left = 0; } } 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])*?\*\
makePositioned: function(element) { element = $(element); var pos = Element.getStyle(element, 'position'); if (pos == 'static' || !pos) { element._madePositioned = true; element.style.position = 'relative'; // Opera returns the offset relative to the positioning context, when an // element is position relative but top and left have not been defined if (Prototype.Browser.Opera) { element.style.top = 0; element.style.left = 0; } } return element; },
offset = path[len] == '/' ? 1 : 0
offset = path[len] == '/' ? 1 : 0;
makeRelativePath: function(path, relativeTo) { var i = path.match('^' + relativeTo); if (i && i[0] == relativeTo) { var len = relativeTo.length, offset = path[len] == '/' ? 1 : 0 return path.slice(len + offset); } var sA = util.removeEndSlash(path).split('/'), sB = util.removeEndSlash(relativeTo).split('/'), i = 0; while(sA[i] == sB[i]) { ++i; } if (i) { path = sA.slice(i).join('/'); for (var j = sB.length - i; j > 0; --j) { path = '../' + path; } } return path; },
sB = util.removeEndSlash(relativeTo).split('/'), i = 0;
sB = util.removeEndSlash(relativeTo).split('/'); i = 0;
makeRelativePath: function(path, relativeTo) { var i = path.match('^' + relativeTo); if (i && i[0] == relativeTo) { var len = relativeTo.length, offset = path[len] == '/' ? 1 : 0 return path.slice(len + offset); } var sA = util.removeEndSlash(path).split('/'), sB = util.removeEndSlash(relativeTo).split('/'), i = 0; while(sA[i] == sB[i]) { ++i; } if (i) { path = sA.slice(i).join('/'); for (var j = sB.length - i; j > 0; --j) { path = '../' + path; } } return path; },
function makeRelativePath(path, relativeTo) { var i = path.match('^' + relativeTo); if (i && i[0] == relativeTo) { var offset = path[relativeTo.length] == '/' ? 1 : 0 return path.slice(relativeTo.length + offset); } var sA = removeEndSlash(path).split('/'), sB = removeEndSlash(relativeTo).split('/'), i = 0; while(sA[i] == sB[i]) { ++i; } if (i) { path = sA.slice(i).join('/'); for (var j = sB.length - i; j > 0; --j) { path = '../' + path; } } return path; };
makeRelativePath: function(path, relativeTo) { var i = path.match('^' + relativeTo); if (i && i[0] == relativeTo) { var len = relativeTo.length, offset = path[len] == '/' ? 1 : 0 return path.slice(len + offset); } var sA = util.removeEndSlash(path).split('/'), sB = util.removeEndSlash(relativeTo).split('/'), i = 0; while(sA[i] == sB[i]) { ++i; } if (i) { path = sA.slice(i).join('/'); for (var j = sB.length - i; j > 0; --j) { path = '../' + path; } } return path; },
function makeRelativePath(path, relativeTo) { var i = path.match('^' + relativeTo); if (i && i[0] == relativeTo) { var offset = path[relativeTo.length] == '/' ? 1 : 0 return path.slice(relativeTo.length + offset); } var sA = removeEndSlash(path).split('/'), sB = removeEndSlash(relativeTo).split('/'), i = 0; while(sA[i] == sB[i]) { ++i; } if (i) { path = sA.slice(i).join('/'); for (var j = sB.length - i; j > 0; --j) { path = '../' + path; } } return path; };
var sA = removeEndSlash(path).split('/'), sB = removeEndSlash(relativeTo).split('/'), i = 0; while(sA[i] == sB[i]) { ++i; } if (i) { path = sA.slice(i).join('/'); for (var j = sB.length - i; j > 0; --j) { path = '../' + path; } }
function makeRelativePath(path, relativeTo) { var i = path.match('^' + relativeTo); if (i && i[0] == relativeTo) { var offset = path[relativeTo.length] == '/' ? 1 : 0 return path.slice(relativeTo.length + offset); } return path; };
var option = $('<option/>').attr('label', type);
var option = $('<option/>').val(type).text(type);
function makeSelector(kind) { var li = $("<li/>").addClass(kind.name); var select = $("<select/>"); for(type in kind.types) { var option = $('<option/>').attr('label', type); select.append(option); select.change(function(event) { var value = $(this).val(); $(this).next('.args').replaceWith(makeArgs(kind,value)); }); } li.append(select); li.append($('<div/>').addClass('args')); select.change(); return li;}
$("input[class = 'utrTemplate']").live('click',getUtrTemplate);
function manageEvents(){ //alert ("manage"); $("#closePathBuilder").click(function (){ $("#divPathWizard").slideUp(speed); }); $("#getInitialInstances").click(getInitialInstances); $("#getRootClasses").click(getRootClassesOfInstances); //get class infos and create path $("input[class *='classInfos']").live('click',getClassInfos); $("input[name *='propertyInfos']").live('click', getPropertyBinding); $("#remove").click(removeSession); //hide the statistic info //add column event $("#addColumn").click(addColumn); $("#exitAddColumn").click(function(){ $("#propertyBinding").fadeOut(speed*2); //delete the last property in the path pathProperties.pop(); }); //delete column $(".deleteColumnClass").live('click',function(){ //get parameter var colId = $(this).attr("id"); //alert ("delete "+ colId); deleteColumn(colId); }); $("#columnBuilder").click(function(){ //reset patth and history of actions historyAction = new Array();//Reset history of actions pathProperties = new Array(); //show the path bulder div $("#divPathWizard").show(speed*2); getRootClassesOfInstances(); }); $("#backClass").click(backContext); // $("#hidePieStat").click(function (){ $("#pieStat").slideUp(speed); }); //show column detail $(".infoColumnClass").live('click', function(){ //get class id var colId = $(this).attr("id"); showColumnInfo(colId); }); //Manage delete row $("#deleteListRows").click(deleteListRows);}
$("#saveUtrBtn").click(saveUtr); $("#loadUtrBtn").click(loadUtr); $("#manageUtr").click(function(){ getUtrModels(); });
function manageEvents(){ //alert ("manage"); $("#closePathBuilder").click(function (){ $("#divPathWizard").slideUp(speed); }); $("#getInitialInstances").click(getInitialInstances); $("#getRootClasses").click(getRootClassesOfInstances); //get class infos and create path $("input[class *='classInfos']").live('click',getClassInfos); $("input[name *='propertyInfos']").live('click', getPropertyBinding); $("#remove").click(removeSession); //hide the statistic info //add column event $("#addColumn").click(addColumn); $("#exitAddColumn").click(function(){ $("#propertyBinding").fadeOut(speed*2); //delete the last property in the path pathProperties.pop(); }); //delete column $(".deleteColumnClass").live('click',function(){ //get parameter var colId = $(this).attr("id"); //alert ("delete "+ colId); deleteColumn(colId); }); $("#columnBuilder").click(function(){ //reset patth and history of actions historyAction = new Array();//Reset history of actions pathProperties = new Array(); //show the path bulder div $("#divPathWizard").show(speed*2); getRootClassesOfInstances(); }); $("#backClass").click(backContext); // $("#hidePieStat").click(function (){ $("#pieStat").slideUp(speed); }); //show column detail $(".infoColumnClass").live('click', function(){ //get class id var colId = $(this).attr("id"); showColumnInfo(colId); }); //Manage delete row $("#deleteListRows").click(deleteListRows);}
width:400,
width:550,
function manageEvents(){ //alert ("manage"); $("#closePathBuilder").click(function (){ $("#divPathWizard").slideUp(speed); }); $("#getInitialInstances").click(getInitialInstances); $("#getRootClasses").click(getRootClassesOfInstances); //get class infos and create path $("input[class *='classInfos']").live('click',getClassInfos); $("input[name *='propertyInfos']").live('click', getPropertyBinding); $("#remove").click(removeSession); //hide the statistic info $("input[class = 'utrTemplate']").live('click',getUtrTemplate); //add column event $("#addColumn").click(addColumn); $("#exitAddColumn").click(function(){ $("#propertyBinding").dialog("close"); //delete the last property in the path pathProperties.pop(); }); //delete column $(".deleteColumnClass").live('click',function(){ //get parameter var colId = $(this).attr("id"); //alert ("delete "+ colId); deleteColumn(colId); }); $("#columnBuilder").click(function(){ //reset patth and history of actions historyAction = new Array();//Reset history of actions pathProperties = new Array(); //show the path bulder div $("#divPathWizard").show(speed*2); //with dialog optionPathWizard={ show:'blind', hide:'explode', height:420, width:800, modal:true, resizable:false }; //$("#divPathWizard").dialog(open,optionPathWizard); getRootClassesOfInstances(); }); $("#backClass").click(backContext); // $("#hidePieStat").click(function (){ $("#pieStat").slideUp(speed); }); //show column detail $(".infoColumnClass").live('click', function(){ //get class id var colId = $(this).attr("id"); showColumnInfo(colId); }); //Manage delete row $("#deleteListRows").click(deleteListRows); $("#saveUtrBtn").click(saveUtr); $("#loadUtrBtn").click(loadUtr); $("#manageUtr").click(function(){ /*$("#saveUtrBtn").toggle(); $("#loadUtrBtn").toggle(); $("#txtUtrName").toggle();*/ //$("link[rel=stylesheet]").attr({href:"green.css"}); getUtrModels(); }); //close utrManager $("#cancelUtrManager").click(function(){ $("#utrTemplateManager").dialog('close'); }); //manage filter $("#sendFilter").click(function (){ sendFilter(); $("#filterUtr").dialog('close'); }); $("#cancelFilter").click(function(){ $("#filterUtr").dialog('close'); }); $("#manageFilter").click(function(){ var ok = ''; var options ={ height:450, width:400, hide:'explode', modal : true, resizable: false, title:__("Filter & Search"), buttons: { "Cancel":function(){ $("#filterUtr").dialog('close'); }, "Apply Filter": function() { sendFilter(); $("#filterUtr").dialog('close'); } } }; $("#filterUtr").dialog(open,options); buildFilterLine(); }); //export to csv $("#export").click(exportCSV); }
"Apply Filter": function() {
"Apply filter": function() {
function manageEvents(){ //alert ("manage"); $("#closePathBuilder").click(function (){ $("#divPathWizard").slideUp(speed); }); $("#getInitialInstances").click(getInitialInstances); $("#getRootClasses").click(getRootClassesOfInstances); //get class infos and create path $("input[class *='classInfos']").live('click',getClassInfos); $("input[name *='propertyInfos']").live('click', getPropertyBinding); $("#remove").click(removeSession); //hide the statistic info $("input[class = 'utrTemplate']").live('click',getUtrTemplate); //add column event $("#addColumn").click(addColumn); $("#exitAddColumn").click(function(){ $("#propertyBinding").dialog("close"); //delete the last property in the path pathProperties.pop(); }); //delete column $(".deleteColumnClass").live('click',function(){ //get parameter var colId = $(this).attr("id"); //alert ("delete "+ colId); deleteColumn(colId); }); $("#columnBuilder").click(function(){ //reset patth and history of actions historyAction = new Array();//Reset history of actions pathProperties = new Array(); //show the path bulder div $("#divPathWizard").show(speed*2); //with dialog optionPathWizard={ show:'blind', hide:'explode', height:420, width:800, modal:true, resizable:false }; //$("#divPathWizard").dialog(open,optionPathWizard); getRootClassesOfInstances(); }); $("#backClass").click(backContext); // $("#hidePieStat").click(function (){ $("#pieStat").slideUp(speed); }); //show column detail $(".infoColumnClass").live('click', function(){ //get class id var colId = $(this).attr("id"); showColumnInfo(colId); }); //Manage delete row $("#deleteListRows").click(deleteListRows); $("#saveUtrBtn").click(saveUtr); $("#loadUtrBtn").click(loadUtr); $("#manageUtr").click(function(){ /*$("#saveUtrBtn").toggle(); $("#loadUtrBtn").toggle(); $("#txtUtrName").toggle();*/ //$("link[rel=stylesheet]").attr({href:"green.css"}); getUtrModels(); }); //close utrManager $("#cancelUtrManager").click(function(){ $("#utrTemplateManager").dialog('close'); }); //manage filter $("#sendFilter").click(function (){ sendFilter(); $("#filterUtr").dialog('close'); }); $("#cancelFilter").click(function(){ $("#filterUtr").dialog('close'); }); $("#manageFilter").click(function(){ var ok = ''; var options ={ height:450, width:400, hide:'explode', modal : true, resizable: false, title:__("Filter & Search"), buttons: { "Cancel":function(){ $("#filterUtr").dialog('close'); }, "Apply Filter": function() { sendFilter(); $("#filterUtr").dialog('close'); } } }; $("#filterUtr").dialog(open,options); buildFilterLine(); }); //export to csv $("#export").click(exportCSV); }
});
function manageEvents(){ //alert ("manage"); $("#closePathBuilder").click(function (){ $("#divPathWizard").slideUp(speed); }); $("#getInitialInstances").click(getInitialInstances); $("#getRootClasses").click(getRootClassesOfInstances); //get class infos and create path $("input[class *='classInfos']").live('click',getClassInfos); $("input[name *='propertyInfos']").live('click', getPropertyBinding); $("#remove").click(removeSession); //hide the statistic info $("input[class = 'utrTemplate']").live('click',getUtrTemplate); //add column event $("#addColumn").click(addColumn); $("#exitAddColumn").click(function(){ $("#propertyBinding").fadeOut(speed*2); //delete the last property in the path pathProperties.pop(); }); //delete column $(".deleteColumnClass").live('click',function(){ //get parameter var colId = $(this).attr("id"); //alert ("delete "+ colId); deleteColumn(colId); }); $("#columnBuilder").click(function(){ //reset patth and history of actions historyAction = new Array();//Reset history of actions pathProperties = new Array(); //show the path bulder div $("#divPathWizard").show(speed*2); getRootClassesOfInstances(); }); $("#backClass").click(backContext); // $("#hidePieStat").click(function (){ $("#pieStat").slideUp(speed); }); //show column detail $(".infoColumnClass").live('click', function(){ //get class id var colId = $(this).attr("id"); showColumnInfo(colId); }); //Manage delete row $("#deleteListRows").click(deleteListRows); $("#saveUtrBtn").click(saveUtr); $("#loadUtrBtn").click(loadUtr); $("#manageUtr").click(function(){ /*$("#saveUtrBtn").toggle(); $("#loadUtrBtn").toggle(); $("#txtUtrName").toggle();*/ getUtrModels(); });}
historyAction = new Array(); pathProperties = new Array();
function manageEvents(){ //alert ("manage"); $("#closePathBuilder").click(function (){ $("#divPathWizard").slideUp(speed); }); $("#getInitialInstances").click(getInitialInstances); $("#getRootClasses").click(getRootClassesOfInstances); //get class infos and create path $("input[class *='classInfos']").live('click',getClassInfos); $("input[name *='propertyInfos']").live('click', getPropertyBinding); $("#remove").click(removeSession); //hide the statistic info //add column event $("#addColumn").click(addColumn); $("#exitAddColumn").click(function(){ $("#propertyBinding").fadeOut(speed*2); //vider le path pathProperties.pop(); }); //delete column $(".deleteColumnClass").live('click',function(){ //get parameter var colId = $(this).attr("id"); //alert ("delete "+ colId); deleteColumn(colId); }); $("#columnBuilder").click(function(){ //show the path bulder div $("#divPathWizard").show(speed*2); getRootClassesOfInstances(); }); $("#backClass").click(backContext); // $("#hidePieStat").click(function (){ $("#pieStat").slideUp(speed); }); //show column detail $(".infoColumnClass").live('click', function(){ //get class id var colId = $(this).attr("id"); showColumnInfo(colId); }); //Manage delete row $("#deleteListRows").click(deleteListRows);}
0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||
"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||
function map(args, mapmodes, noremap) { mapmodes = getModes(args);
function map(args, noremap) { let mapmodes = array.uniq(args["-modes"].map(findMode));
function map(args, mapmodes, noremap) { mapmodes = getModes(args); if (!args.length) { mappings.list(mapmodes); return; } let [lhs, rhs] = args; if (noremap) args["-builtin"] = true; if (!rhs) // list the mapping mappings.list(mapmodes, mappings._expandLeader(lhs)); else { mappings.addUserMap(mapmodes, [lhs], args["-description"], Command.bindMacro(args, "-keys", ["count"]), { count: args["-count"], noremap: "-builtin" in args, persist: !args["-nopersist"], get rhs() String(this.action), silent: "-silent" in args }); } }
case 'SET[success]':
case 'SET_success':
var mapClasses = function (buttonId) { var className; switch (buttonId) { case 'SET[success]': className = 'testcaseSuccess'; break; case 'SET[failure]': className = 'testcaseFailure'; break; case 'SET[error]': className = 'testcaseError'; break; case 'SET[skipped]': className = 'testcaseSkipped'; break; case 'SET[notimplemented]': className = 'testcaseNotImplemented'; break; case 'SET[testdox]': checkbox = 'testdox'; break; case 'SET[showMemoryAndTime]': className = 'showMemoryAndTime'; break; default: // Yikes! break; } return className; }
case 'SET[failure]':
case 'SET_failure':
var mapClasses = function (buttonId) { var className; switch (buttonId) { case 'SET[success]': className = 'testcaseSuccess'; break; case 'SET[failure]': className = 'testcaseFailure'; break; case 'SET[error]': className = 'testcaseError'; break; case 'SET[skipped]': className = 'testcaseSkipped'; break; case 'SET[notimplemented]': className = 'testcaseNotImplemented'; break; case 'SET[testdox]': checkbox = 'testdox'; break; case 'SET[showMemoryAndTime]': className = 'showMemoryAndTime'; break; default: // Yikes! break; } return className; }
case 'SET[error]':
case 'SET_error':
var mapClasses = function (buttonId) { var className; switch (buttonId) { case 'SET[success]': className = 'testcaseSuccess'; break; case 'SET[failure]': className = 'testcaseFailure'; break; case 'SET[error]': className = 'testcaseError'; break; case 'SET[skipped]': className = 'testcaseSkipped'; break; case 'SET[notimplemented]': className = 'testcaseNotImplemented'; break; case 'SET[testdox]': checkbox = 'testdox'; break; case 'SET[showMemoryAndTime]': className = 'showMemoryAndTime'; break; default: // Yikes! break; } return className; }
case 'SET[skipped]':
case 'SET_skipped':
var mapClasses = function (buttonId) { var className; switch (buttonId) { case 'SET[success]': className = 'testcaseSuccess'; break; case 'SET[failure]': className = 'testcaseFailure'; break; case 'SET[error]': className = 'testcaseError'; break; case 'SET[skipped]': className = 'testcaseSkipped'; break; case 'SET[notimplemented]': className = 'testcaseNotImplemented'; break; case 'SET[testdox]': checkbox = 'testdox'; break; case 'SET[showMemoryAndTime]': className = 'showMemoryAndTime'; break; default: // Yikes! break; } return className; }