rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
return importContents; }catch(e){ logger.trace(fileName + "\n Cannot inline css import, skipping: " + importFileName); return fullMatch; } });
importContents = importContents.replace(buildUtil.cssUrlRegExp, function(fullMatch, urlMatch){ var fixedUrlMatch = buildUtil.cleanCssUrlQuotes(urlMatch); fixedUrlMatch = fixedUrlMatch.replace(buildUtil.backSlashRegExp, "/"); //Only do the work for relative URLs. Skip things that start with / or have //a protocol. var colonIndex = fixedUrlMatch.indexOf(":"); if(fixedUrlMatch.charAt(0) != "/" && (colonIndex == -1 || colonIndex > fixedUrlMatch.indexOf("/"))){ //It is a relative URL, tack on the path prefix urlMatch = importPath + fixedUrlMatch; }else{ logger.trace(importFileName + "\n URL not a relative URL, skipping: " + urlMatch); } //Collapse .. and . var parts = urlMatch.split("/"); for(var i = parts.length - 1; i > 0; i--){ if(parts[i] == "."){ parts.splice(i, 1); }else if(parts[i] == ".."){ if(i != 0 && parts[i - 1] != ".."){ parts.splice(i - 1, 2); i -= 1; } } } return "url(" + parts.join("/") + ")"; });
function () { document.commandDispatcher.rewindFocus(); });
function () { modes.push(modes.QUOTE); });
function () { document.commandDispatcher.rewindFocus(); });
commands.commandToString({ command: "bmark", options: options, arguments: [buffer.URL], bang: bmarks.length == 1 }),
commands.commandToString({ command: "bmark", options: options, arguments: [buffer.URL] }),
function () { let options = {}; let bmarks = bookmarks.get(buffer.URL).filter(function (bmark) bmark.url == buffer.URL); if (bmarks.length == 1) { let bmark = bmarks[0]; options["-title"] = bmark.title; if (bmark.keyword) options["-keyword"] = bmark.keyword; if (bmark.tags.length > 0) options["-tags"] = bmark.tags.join(", "); } else { if (buffer.title != buffer.URL) options["-title"] = buffer.title; } commandline.open(":", commands.commandToString({ command: "bmark", options: options, arguments: [buffer.URL], bang: bmarks.length == 1 }), modes.EX); });
e.observe("click", function(event) { $$(".upload").each(function(el) { el.disabled = true;
e.observe("click", function(ev) { uploading = true; $$(".form_hidden").invoke("remove"); var form = $(chip + "_form"); var crateEle = new Element("input", {"class": "form_hidden", name: "crate", value: crateNumber, type: "hidden"}); form.insert(crateEle); var boardEle = new Element("input", {"class": "form_hidden", name: "board", value: boardType, type: "hidden"}); form.insert(boardEle); var chipEle = new Element("input", {"class": "form_hidden", name: "chip", value: chip, type: "hidden"}); form.insert(chipEle); $$("input[chip=\"" + chip + "\"]").each(function(el) { if (el.checked) { var slotEle = new Element("input", {"class": "form_hidden", name: "slot", value: el.readAttribute("slot"), type: "hidden"}); form.insert(slotEle); }
e.observe("click", function(event) { // When firmware is being uploaded, make sure no other firmware can be uploaded by disabling buttons, $$(".upload").each(function(el) { el.disabled = true; }); var chip = e.readAttribute("chip"); // Then do the upload $$("form[chip=\"" + chip + "\"").each(function(el) { // Add some more form information el["crate"] = crateNumber; el["chip"] = chip; el["slot"] = new Array(); $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); el.submit; }); });
var chip = e.readAttribute("chip"); $$("form[chip=\"" + chip + "\"").each(function(el) { el["crate"] = crateNumber; el["chip"] = chip; el["slot"] = new Array(); $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); el.submit; });
var broadcast = $("broadcast_" + chip).checked ? 1 : 0; var broadcastEle = new Element("input", {"class": "form_hidden", name: "broadcast", value: broadcast, type: "hidden"}); form.insert(broadcastEle); form.submit();
e.observe("click", function(event) { // When firmware is being uploaded, make sure no other firmware can be uploaded by disabling buttons, $$(".upload").each(function(el) { el.disabled = true; }); var chip = e.readAttribute("chip"); // Then do the upload $$("form[chip=\"" + chip + "\"").each(function(el) { // Add some more form information el["crate"] = crateNumber; el["chip"] = chip; el["slot"] = new Array(); $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); el.submit; }); });
connect(window, 'onunload', this, function(ev){ if(!this.posted && isPopup){ this.save(); }
connect(window, 'onkeydown', this, function(ev){ var key = keyString(ev._event); var func = Form.shortcutkeys[key]; func && func(ev);
connect(window, 'onunload', this, function(ev){ if(!this.posted && isPopup){ this.save(); } });
.map(function (h) h.selector.replace(/^\[.*?=(.*?)\]/, ".hl-$1").replace(/html\|/, "") + "\t" + "{" + h.value + "}")
dir.readDirectory(true).forEach(function (file) { if (file.isFile() && loadplugins.getKey(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); });
.map(function (h) h.selector.replace(/^\[.*?=(.*?)\]/, ".hl-$1").replace(/html\|/, "") + "\t" + "{" + h.value + "}")
Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); });
img.addEventListener('load', function(res){ img.removeEventListener('load', arguments.callee, false); canvas.width = img.naturalWidth; canvas.height = img.naturalHeight; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); ret.callback(canvas.toDataURL("image/png", "")); }, false);
Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); });
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){
$(this).click(function(){
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
self.checked_list[check_id] = { element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) }
var c_detail = new DcmgrGUI.Detail({ element_id:$('<div></div>'), template_id:params.template_id });
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){
c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ var data = { item:params.data }
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
var data = { item:params.data } if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); }
if(!params.data){ data.item = self.getEmptyData(); } if(data.item){ $('#detail').html($( c_detail.template ).tmpl(data));
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
self.checked_list[check_id].c_detail.update({
c_detail.update({
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] }
$('#detail').html('');
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
})
this.element.find("[type='checkbox']").each(function(key,value){ $(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } }); })
uploading = true;
e.observe("click", function(ev) { // Make sure the updater knows that we are uploading uploading = true; $$(".form_hidden").invoke("remove"); var form = $(chip + "_form"); var crateEle = new Element("input", {"class": "form_hidden", name: "crate", value: crateNumber, type: "hidden"}); form.insert(crateEle); var boardEle = new Element("input", {"class": "form_hidden", name: "board", value: boardType, type: "hidden"}); form.insert(boardEle); var chipEle = new Element("input", {"class": "form_hidden", name: "chip", value: chip, type: "hidden"}); form.insert(chipEle); $$("input[chip=\"" + chip + "\"]").each(function(el) { if (el.checked) { var slotEle = new Element("input", {"class": "form_hidden", name: "slot", value: el.readAttribute("slot"), type: "hidden"}); form.insert(slotEle); } }); var broadcast = $("broadcast_" + chip).checked ? 1 : 0; var broadcastEle = new Element("input", {"class": "form_hidden", name: "broadcast", value: broadcast, type: "hidden"}); form.insert(broadcastEle); form.submit(); });
function () { editor.executeCommand("cmd_selectBeginLine", 1); if (Editor.getController().isCommandEnabled("cmd_delete")) editor.executeCommand("cmd_delete", 1); });
function () { editor.executeCommand("cmd_deleteWordBackward", 1); });
function () { // broken in FF3, deletes the whole line: // editor.executeCommand("cmd_deleteToBeginningOfLine", 1); editor.executeCommand("cmd_selectBeginLine", 1); if (Editor.getController().isCommandEnabled("cmd_delete")) editor.executeCommand("cmd_delete", 1); });
fileMap["plugins"] = function () ['text/xml;charset=UTF-8', help];
.map(function (h) h.selector.replace(/^\[.*?=(.*?)\]/, ".hl-$1").replace(/html\|/, "") + "\t" + "{" + h.value + "}")
fileMap["plugins"] = function () ['text/xml;charset=UTF-8', help];
d = $.grep(d, function (e) { return e >= b[j]; });
$.each(q, function (i_, e) { if (e == t) { found = true; return false; } });
d = $.grep(d, function (e) { return e >= b[j]; });
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);
return request(embedUrl, {charset : 'utf-8'}).addCallback(function(res){ var doc = createHTML(res.responseText); return { type : 'video', item : ctx.title, itemUrl : ctx.href, body : $X(' }; });
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);
$$("form[chip=\"" + e.readAttribute("chip") + "\"").invoke("submit");
$$("form[chip=\"" + chip + "\"").each(function(el) { el["crate"] = crateNumber; el["chip"] = chip; el["slot"] = new Array(); $$("input[chip=\"" + chip + "\"").each(function(ele) { el["slot"].push(ele.readAttribute("slot")); }); el.submit; });
e.observe("click", function(event) { // When firmware is being uploaded, make sure no other firmware can be uploaded by disabling buttons, $$(".upload").each(function(el) { el.disabled = true; }); // Then do the upload $$("form[chip=\"" + e.readAttribute("chip") + "\"").invoke("submit"); });
function () { dactyl.echomsg(io.cwd); },
function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = io.File(filename); dactyl.assert(!file.exists() || args.bang, "E189: " + filename.quote() + " exists (add ! to override)"); let lines = [cmd.serialize().map(commands.commandToString) for (cmd in commands) if (cmd.serialize)]; lines = array.flatten(lines); lines.unshift('"' + dactyl.version + "\n"); lines.push("\n\" vim: set ft=" + config.name + ":"); try { file.write(lines.join("\n")); } catch (e) { dactyl.echoerr("E190: Cannot open " + filename.quote() + " for writing"); dactyl.log("Could not write to " + file.path + ": " + e.message); } }, {
function () { dactyl.echomsg(io.cwd); },
ret.callback(canvas.toDataURL("image/png", ""));
ret.callback({ contentType: 'image/png', base64: true, height: img.naturalHeight, width : img.naturalWidth, binary: canvas.toDataURL('image/png', '') })
img.addEventListener('load', function(res){ img.removeEventListener('load', arguments.callee, false); canvas.width = img.naturalWidth; canvas.height = img.naturalHeight; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); ret.callback(canvas.toDataURL("image/png", "")); }, false);
dactyl.assert(events.every(function (event) validEvents.indexOf(event) >= 0),
].forEach(function (command) { commands.add([command.name], command.description, function (args) { if (args.length == 0) { dactyl.echomsg("No matching autocommands"); return; } let [event, url] = args; let defaultURL = url || buffer.URL; let validEvents = keys(config.autocommands); dactyl.assert(event != "*", "E217: Can't execute autocommands for ALL events"); dactyl.assert(validEvents.indexOf(event) >= 0, "E216: No such group or event: " + args); dactyl.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), "No matching autocommands"); if (this.name == "doautoall" && dactyl.has("tabs")) { let current = tabs.index(); for (let i = 0; i < tabs.count; i++) { tabs.select(i); autocommands.trigger(event, { url: url || buffer.URL }); } tabs.select(current); } else autocommands.trigger(event, { url: defaultURL }); }, { argCount: "*", completer: function (context) completion.autocmdEvent(context) }); });
dactyl.assert(events.every(function (event) validEvents.indexOf(event) >= 0),
function () { dactyl.echomsg(io.cwd); },
function () { dactyl.assert(io.sourcing, "E168: :finish used outside of a sourced file"); io.sourcing.finished = true; },
function () { dactyl.echomsg(io.cwd); },
var childViewsView = SC.View.extend({ childViews: "child1 child2 child3 child4".w(), child1: SC.View.extend({ classNames: "test test-1".w() }), child2: SC.View.extend({ classNames: "test test-2".w(), render: function(context, firstTime) { if (firstTime) { context.push("<a class='test-2-content'>content</a>"); } } }), child3: SC.View.extend({ classNames: "test test-3".w(), render: function(context, firstTime) { if (firstTime) context.push("<a class='test-3-content'>content</a>"); else context.push("<a class='test-3-content'>content-updated</a>") } }), child4: SC.View.extend({ classNames: "test test-4".w(), render: function(context, firstTime) { if (firstTime) { context.push("<a class='test-4-content'>content</a>"); } else { console.error("update child 4"); this.$(".test-4-content").text("content-updated"); } } }) });
var childViewsView = SC.View.extend(viewSettingsWithChildren);
test("rendering and updating a view with various kinds of non-renderer children works, without updating children.", function() { /* We test 4 kinds of children: plain render function that pushes to context on firstTime render function that pushes to context no matter what render function that pushes on firstTime and updates otherwise. Note: We are, in fact, testing that updates do NOT happen. */ var childViewsView = SC.View.extend({ childViews: "child1 child2 child3 child4".w(), child1: SC.View.extend({ classNames: "test test-1".w() }), child2: SC.View.extend({ classNames: "test test-2".w(), render: function(context, firstTime) { // this one will render a-special, but only on firstTime if (firstTime) { context.push("<a class='test-2-content'>content</a>"); } } }), child3: SC.View.extend({ classNames: "test test-3".w(), render: function(context, firstTime) { // this one will always render fully. if (firstTime) context.push("<a class='test-3-content'>content</a>"); else context.push("<a class='test-3-content'>content-updated</a>") } }), child4: SC.View.extend({ classNames: "test test-4".w(), render: function(context, firstTime) { if (firstTime) { context.push("<a class='test-4-content'>content</a>"); } else { console.error("update child 4"); this.$(".test-4-content").text("content-updated"); } } }) }); var view = childViewsView.create(); view.createLayer(); // check if rendering happened equals(view.$(".test").length, 4, "number of child views rendered should be"); // now, check if the children themselves can access their layer ok(view.child1.$().hasClass("test-1"), "child view gets its layer and has class name"); equals(view.child2.$(".test-2-content").text(), "content", "child view 2 has content"); equals(view.child3.$(".test-3-content").text(), "content", "child view 3 has content"); equals(view.child4.$(".test-4-content").text(), "content", "child view 4 has content"); // now, update and try again view.updateLayer(); // make sure we're still fine equals(view.$(".test").length, 4, "number of child views after updating should be"); // now, check if the children themselves can access their layer // and note: they should NOT have updated (they get to do that themselves) ok(view.child1.$().hasClass("test-1"), "after updating child view gets its layer and has class name"); equals(view.child2.$(".test-2-content").text(), "content", "child view 2 has content"); equals(view.child3.$(".test-3-content").text(), "content", "child view 3 has NON-updated content"); equals(view.child4.$(".test-4-content").text(), "content", "child view 4 has NOT updated content");});
equals(view.$(".test").length, 4, "number of child views rendered should be");
equals(view.$(".test-child").length, 4, "number of child views rendered should be");
test("rendering and updating a view with various kinds of non-renderer children works, without updating children.", function() { /* We test 4 kinds of children: plain render function that pushes to context on firstTime render function that pushes to context no matter what render function that pushes on firstTime and updates otherwise. Note: We are, in fact, testing that updates do NOT happen. */ var childViewsView = SC.View.extend({ childViews: "child1 child2 child3 child4".w(), child1: SC.View.extend({ classNames: "test test-1".w() }), child2: SC.View.extend({ classNames: "test test-2".w(), render: function(context, firstTime) { // this one will render a-special, but only on firstTime if (firstTime) { context.push("<a class='test-2-content'>content</a>"); } } }), child3: SC.View.extend({ classNames: "test test-3".w(), render: function(context, firstTime) { // this one will always render fully. if (firstTime) context.push("<a class='test-3-content'>content</a>"); else context.push("<a class='test-3-content'>content-updated</a>") } }), child4: SC.View.extend({ classNames: "test test-4".w(), render: function(context, firstTime) { if (firstTime) { context.push("<a class='test-4-content'>content</a>"); } else { console.error("update child 4"); this.$(".test-4-content").text("content-updated"); } } }) }); var view = childViewsView.create(); view.createLayer(); // check if rendering happened equals(view.$(".test").length, 4, "number of child views rendered should be"); // now, check if the children themselves can access their layer ok(view.child1.$().hasClass("test-1"), "child view gets its layer and has class name"); equals(view.child2.$(".test-2-content").text(), "content", "child view 2 has content"); equals(view.child3.$(".test-3-content").text(), "content", "child view 3 has content"); equals(view.child4.$(".test-4-content").text(), "content", "child view 4 has content"); // now, update and try again view.updateLayer(); // make sure we're still fine equals(view.$(".test").length, 4, "number of child views after updating should be"); // now, check if the children themselves can access their layer // and note: they should NOT have updated (they get to do that themselves) ok(view.child1.$().hasClass("test-1"), "after updating child view gets its layer and has class name"); equals(view.child2.$(".test-2-content").text(), "content", "child view 2 has content"); equals(view.child3.$(".test-3-content").text(), "content", "child view 3 has NON-updated content"); equals(view.child4.$(".test-4-content").text(), "content", "child view 4 has NOT updated content");});
equals(view.$(".test").length, 4, "number of child views after updating should be");
equals(view.$(".test-child").length, 4, "number of child views after updating should be");
test("rendering and updating a view with various kinds of non-renderer children works, without updating children.", function() { /* We test 4 kinds of children: plain render function that pushes to context on firstTime render function that pushes to context no matter what render function that pushes on firstTime and updates otherwise. Note: We are, in fact, testing that updates do NOT happen. */ var childViewsView = SC.View.extend({ childViews: "child1 child2 child3 child4".w(), child1: SC.View.extend({ classNames: "test test-1".w() }), child2: SC.View.extend({ classNames: "test test-2".w(), render: function(context, firstTime) { // this one will render a-special, but only on firstTime if (firstTime) { context.push("<a class='test-2-content'>content</a>"); } } }), child3: SC.View.extend({ classNames: "test test-3".w(), render: function(context, firstTime) { // this one will always render fully. if (firstTime) context.push("<a class='test-3-content'>content</a>"); else context.push("<a class='test-3-content'>content-updated</a>") } }), child4: SC.View.extend({ classNames: "test test-4".w(), render: function(context, firstTime) { if (firstTime) { context.push("<a class='test-4-content'>content</a>"); } else { console.error("update child 4"); this.$(".test-4-content").text("content-updated"); } } }) }); var view = childViewsView.create(); view.createLayer(); // check if rendering happened equals(view.$(".test").length, 4, "number of child views rendered should be"); // now, check if the children themselves can access their layer ok(view.child1.$().hasClass("test-1"), "child view gets its layer and has class name"); equals(view.child2.$(".test-2-content").text(), "content", "child view 2 has content"); equals(view.child3.$(".test-3-content").text(), "content", "child view 3 has content"); equals(view.child4.$(".test-4-content").text(), "content", "child view 4 has content"); // now, update and try again view.updateLayer(); // make sure we're still fine equals(view.$(".test").length, 4, "number of child views after updating should be"); // now, check if the children themselves can access their layer // and note: they should NOT have updated (they get to do that themselves) ok(view.child1.$().hasClass("test-1"), "after updating child view gets its layer and has class name"); equals(view.child2.$(".test-2-content").text(), "content", "child view 2 has content"); equals(view.child3.$(".test-3-content").text(), "content", "child view 3 has NON-updated content"); equals(view.child4.$(".test-4-content").text(), "content", "child view 4 has NOT updated content");});
let lines = [cmd.serialize().map(commands.commandToString) for (cmd in commands) if (cmd.serialize)];
let lines = [cmd.serialize().map(commands.commandToString, cmd) for (cmd in commands) if (cmd.serialize)];
function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = io.File(filename); dactyl.assert(!file.exists() || args.bang, "E189: " + filename.quote() + " exists (add ! to override)"); // TODO: Use a set/specifiable list here: let lines = [cmd.serialize().map(commands.commandToString) for (cmd in commands) if (cmd.serialize)]; lines = array.flatten(lines); lines.unshift('"' + dactyl.version + "\n"); lines.push("\n\" vim: set ft=" + config.name + ":"); try { file.write(lines.join("\n")); } catch (e) { dactyl.echoerr("E190: Cannot open " + filename.quote() + " for writing"); dactyl.log("Could not write to " + file.path + ": " + e.message); // XXX } }, {
$(function(){
$("#manageUtr").click(function(){
$(function(){ //alert("o jQuery"); // $("#coco").hide(); // $("#coco").toggle(1000); //remove session, neww table removeSession(); utrIntro(); manageEvents(); });
removeSession(); utrIntro(); manageEvents();
getUtrModels();
$(function(){ //alert("o jQuery"); // $("#coco").hide(); // $("#coco").toggle(1000); //remove session, neww table removeSession(); utrIntro(); manageEvents(); });
let count = args.count; let arg = args[0]; if (arg) { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true); else dactyl.echoerr("E488: Trailing characters");
for (let tab in values(tabs.visibleTabs)) { tabs.select(tab); if (!dactyl.execute(args[0] || "", null, true)) break;
function (args) { let count = args.count; let arg = args[0]; // count is ignored if an arg is specified, as per Vim if (arg) { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true); else dactyl.echoerr("E488: Trailing characters"); } else if (count > 0) tabs.select("-" + count, true); else tabs.select("-1", true); }, {
else if (count > 0) tabs.select("-" + count, true); else tabs.select("-1", true);
function (args) { let count = args.count; let arg = args[0]; // count is ignored if an arg is specified, as per Vim if (arg) { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true); else dactyl.echoerr("E488: Trailing characters"); } else if (count > 0) tabs.select("-" + count, true); else tabs.select("-1", true); }, {
$(containingList).append('<li class="empty">No ' + $(containingList).closest("div").find("h3").text().toLowerCase() + ' defined.</li>');
$(containingList).append('<li class="empty">No choice groups defined.</li>');
$("a.delete-group").live("click", function () { c = confirm('Are you sure you want to delete this group? This action cannot be undone.'); if (c) { trgt = this; action = $(this).attr("rel"); $.post(action, $.param({'delete': true}), function (data) { if (data['deleted']) { selector = '[rel="' + action + '"]'; containingList = $(selector).parent().parent(); $(selector).parent().remove(); if (!$(containingList).children().length) { $(containingList).append('<li class="empty">No ' + $(containingList).closest("div").find("h3").text().toLowerCase() + ' defined.</li>'); } } else { $(selector).insertAfter('<span class="fail">An error occurred.</span>'); $("span.fail").delay(1500).fadeOut("fast", function () { $(this).remove(); }); } }, "json"); } return false; });
a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,
var createURI = (function(){ var anchor = document.createElement('a'); return function(link){ var a = anchor.cloneNode(false); a.href = link; return a;
return function(id){ return hash[id] || document.getElementById(id);
var createURI = (function(){ var anchor = document.createElement('a'); return function(link){ var a = anchor.cloneNode(false); a.href = link; return a; }})();
})();
var createURI = (function(){ var anchor = document.createElement('a'); return function(link){ var a = anchor.cloneNode(false); a.href = link; return a; }})();
}, function(res){ });
}).addErrback(function(e){ console.log(e); });
}, function(res){ });
}).addCallback(function(image){
}).addCallback(function(file){
return succeed().addCallback(function(){ switch (type){ case 'Region': return self.selectRegion(ctx).addCallback(function(region){ return self.capture(win, region.position, region.dimensions); }); case 'Element': return self.selectElement(ctx).addCallback(function(elm){ var rect = elm.getBoundingClientRect(); return self.capture(win, {x: Math.round(rect.left), y: Math.round(rect.top)}, getElementDimensions(elm)); }); case 'View': return self.capture(win, getViewportPosition(), getViewDimensions()); case 'Page': return self.capture(win, {x:0, y:0}, getPageDimensions()); } return null; }).addCallback(function(image){
function () { tabs.select(0, false); },
function (args) { let count = args.count; let arg = args[0]; if (arg || count > 0) { let index; if (arg) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); index = arg - 1; } else index = count - 1; if (index < tabs.count) tabs.select(index, true); else dactyl.beep(); } else tabs.select("+1", true); }, {
function () { tabs.select(0, false); },
list_request.data = DcmgrGUI.Util.getPagenateData(c_list.page,c_list.maxrow)
list_request.data = DcmgrGUI.Util.getPagenateData(c_pagenate.start,c_pagenate.row);
bt_refresh.element.bind('dcmgrGUI.refresh',function(){ c_list.page = c_pagenate.current_page; list_request.url = DcmgrGUI.Util.getPagePath('/volumes/list/',c_list.page); list_request.data = DcmgrGUI.Util.getPagenateData(c_list.page,c_list.maxrow) c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) //update detail $.each(c_list.checked_list,function(check_id,obj){ $($('#detail').find('#'+check_id)).remove(); c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/volumes/show/',check_id) },true); }); });
this._backend.loadSchemaList(function (schemaList) { me._schemaList = schemaList; me.onSchemaListReady(schemaList); if (schemaList.length > 0) { me.loadSchema(schemaList[0].schema); } });
$.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } });
this._backend.loadSchemaList(function (schemaList) { me._schemaList = schemaList; me.onSchemaListReady(schemaList); if (schemaList.length > 0) { me.loadSchema(schemaList[0].schema); } });
.addCallback(function(ps){ TBRL.openQuickPostForm(ps); }).addErrback(function(e){
}, function(res){ d.callback(res); });
.addCallback(function(ps){ TBRL.openQuickPostForm(ps); }).addErrback(function(e){
return this.extractScripts().map(function(script) { return eval(script) });
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])*?\*\
return this.extractScripts().map(function(script) { return eval(script) });
$.each(this._selected, function (i, e) { result.push(e.text); start += e.text.length; });
var commitText = $.map(this._selected, function (e) { return e.text; }).join("");
$.each(this._selected, function (i, e) { result.push(e.text); start += e.text.length; });
function () { modes.push(modes.QUOTE); });
function () { document.commandDispatcher.advanceFocus(); });
function () { modes.push(modes.QUOTE); });
return Models.getPostConfig(config, m.name, ps, m) === 'default';
m.config = (m.config || {}); var val = m.config[ps.type] = Models.getPostConfig(config, m.name, ps, m); return val === undefined || /default|enabled/.test(val);
return this.check(ps).filter(function(m){ return Models.getPostConfig(config, m.name, ps, m) === 'default'; });
null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
return this.check(ps).filter(function(m){ m.config = (m.config || {}); var val = m.config[ps.type] = Models.getPostConfig(config, m.name, ps, m); return val === undefined || /default|enabled/.test(val); });
return Tumblr.getTumblelogs().addCallback(function(blogs){ return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; model.typeName = 'Tumblr'; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; }); }).addErrback(function(e){
return this.check(ps).filter(function(m){ m.config = (m.config || {}); var val = m.config[ps.type] = Models.getPostConfig(config, m.name, ps, m); return val === undefined || /default|enabled/.test(val); });
f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f= b,e=b.ownerDocument,i,j=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var p=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;p-=b.scrollTop;n-=b.scrollLeft;if(b===d){p+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){p+=parseFloat(i.borderTopWidth)|| 0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(j.scrollTop,o.scrollTop);n+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,i,j=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var p=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;p-=b.scrollTop;n-=b.scrollLeft;if(b===d){p+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(j.scrollTop,o.scrollTop);n+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),
return Tumblr.getTumblelogs().addCallback(function(blogs){ return blogs.map(function(blog){
return blogs.map(function(blog){
return Tumblr.getTumblelogs().addCallback(function(blogs){ return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; model.typeName = 'Tumblr'; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; }); }).addErrback(function(e){
}).addErrback(function(e){
return Tumblr.getTumblelogs().addCallback(function(blogs){ return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; model.typeName = 'Tumblr'; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; }); }).addErrback(function(e){
f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; model.typeName = 'Tumblr'; addBefore(model, 'appendTags', function(form, ps){
addBefore(model, 'appendTags', function(form, ps){
return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; model.typeName = 'Tumblr'; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; });
Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; });
return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; model.typeName = 'Tumblr'; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; });
e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a= this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; });
}).addErrback(function(e){ alert('Multiple Tumblelog'+ ': ' + (e.message.status ? '\n' + ('HTTP Status Code ' + e.message.status).indent(4) : '\n' + e.message.indent(4))); });
addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; });
this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b= this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle; k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&& f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
}).addErrback(function(e){ alert('Multiple Tumblelog'+ ': ' + (e.message.status ? '\n' + ('HTTP Status Code ' + e.message.status).indent(4) : '\n' + e.message.indent(4)));
Models.multipleTumblelogs.forEach(function(model){ Models.remove(model);
}).addErrback(function(e){ alert('Multiple Tumblelog'+ ': ' + (e.message.status ? '\n' + ('HTTP Status Code ' + e.message.status).indent(4) : '\n' + e.message.indent(4))); });
this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+ b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+
complained: Class.memoize(function () ({})),
dactyl.assert(!names.some(function (name) name in this._exMap, this),
complained: Class.memoize(function () ({})),
dir.readDirectory(true).forEach(function (file) { if (file.isFile() && loadplugins.getKey(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); });
<><dl>{ br + template.map(ary, function ([a, b]) <><dt>{a}</dt> <dd>{b}</dd></>, br) }
dir.readDirectory(true).forEach(function (file) { if (file.isFile() && loadplugins.getKey(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 bmarks = bookmarks.get(buffer.URL).filter(function (bmark) bmark.url == buffer.URL);
if (!searchEngines.some(function (item) item[0] == newAlias))
let bmarks = bookmarks.get(buffer.URL).filter(function (bmark) bmark.url == buffer.URL);
.map(function (re) RegExp(re, "i"));
(function (frame) { if (frame.document.body instanceof HTMLBodyElement) frames.push(frame); Array.forEach(frame.frames, arguments.callee); })(window.content);
.map(function (re) RegExp(re, "i"));
function (stylesheet) /^(screen|all|)$/i.test(stylesheet.media.mediaText) && !/^\s*$/.test(stylesheet.title) );
util.timeout(function () { buffer._triggerLoadAutocmd("LocationChange", webProgress.DOMWindow ? webProgress.DOMWindow.document : content.document, uri); });
function (stylesheet) /^(screen|all|)$/i.test(stylesheet.media.mediaText) && !/^\s*$/.test(stylesheet.title) );
equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%');
equals(view.$('.sc-inner')[0].style.width, "0%", 'width should be 0%');
test("changing value to a string", function() { var view = pane.view('progress basic'); SC.RunLoop.begin(); view.set('value', 25); SC.RunLoop.end(); SC.RunLoop.begin(); view.set('value', 'aString'); SC.RunLoop.end(); equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%'); var assertions = function(){ equals(view.$('.sc-inner').width(), 0, 'pixel width '); start(); }; stop(); setTimeout(assertions, 200);});
function () { tabs.select(0, false); },
function (args) { let special = args.bang; let count = args.count; let arg = args.literalArg; if (arg && count > 0) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) tabs.switchTo(count.toString(), special); else tabs.switchTo(arg, special); }, {
function () { tabs.select(0, false); },
$.each(data[q.ikey.join(" ")] || [], function (i, e) {
$.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } $.each(data[q.ikey.join(" ")] || [], function (i, e) {
$.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, q, ctx); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } });
});
$.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, q, ctx); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } });
chrome.tabs.getSelected(null, function(tab){ if(TBRL.Service.isEnableSite(tab.url)){ d.callback(tab); } });
}).addErrback(function(err){ self.alertError(err, ps.page, ps.pageUrl, ps); });
chrome.tabs.getSelected(null, function(tab){ if(TBRL.Service.isEnableSite(tab.url)){ d.callback(tab); } });
$.post(action, params, function (data) { errors = data['errors']; if (errors) { $(trgt).parent().find(":input").each(function () { if (errors[$(this).attr("name")]) { $(this).addClass("error"); if (!$(this).next().hasClass("msg")) { $(this).after('<span class="msg">' + errors[$(this).attr("name")][0] + '</span>'); } } else { $(this).removeClass("error"); $(this).parent().find('span.msg').remove(); } }); } else { $(trgt).parent().replaceWith(data['new_row']); $(selector).prev().find("li.empty").remove(); } }, "json");
$("span.fail").delay(1500).fadeOut("fast", function () { $(this).remove(); });
$.post(action, params, function (data) { errors = data['errors']; if (errors) { $(trgt).parent().find(":input").each(function () { if (errors[$(this).attr("name")]) { $(this).addClass("error"); if (!$(this).next().hasClass("msg")) { $(this).after('<span class="msg">' + errors[$(this).attr("name")][0] + '</span>'); } } else { $(this).removeClass("error"); $(this).parent().find('span.msg').remove(); } }); } else { $(trgt).parent().replaceWith(data['new_row']); $(selector).prev().find("li.empty").remove(); } }, "json");
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); });
fileMap["plugins"] = function () ['text/xml;charset=UTF-8', help];
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); });
function (args) { io.sourceFromRuntimePath(args, args.bang); },
function (args) { dactyl.assert(args.length <= 1, "E172: Only one file name allowed"); let filename = args[0] || io.getRCFile(null, true).path; let file = io.File(filename); dactyl.assert(!file.exists() || args.bang, "E189: " + filename.quote() + " exists (add ! to override)"); let lines = [cmd.serialize().map(commands.commandToString, cmd) for (cmd in commands) if (cmd.serialize)]; lines = array.flatten(lines); lines.unshift('"' + dactyl.version + "\n"); lines.push("\n\" vim: set ft=" + config.name + ":"); try { file.write(lines.join("\n")); } catch (e) { dactyl.echoerr("E190: Cannot open " + filename.quote() + " for writing"); dactyl.log("Could not write to " + file.path + ": " + e.message); } }, {
function (args) { io.sourceFromRuntimePath(args, args.bang); },
jsio.addCmd(function(context, path, request, opts, imports) {
jsio.addCmd(function(context, request, opts, imports) {
jsio.addCmd(function(context, path, request, opts, imports) { var match = request.match(/^\s*import\s+(.*)$/); if (match) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath}); }); return true; } });
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath});
match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { imports.push( as ? { from: fullPath, as: as } : { from: fullPath, as: fullPath });
jsio.addCmd(function(context, path, request, opts, imports) { var match = request.match(/^\s*import\s+(.*)$/); if (match) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, modulePath, as) { fullPath = resolveRelativePath(modulePath, path); imports.push(as ? {from: fullPath, as: as} : {from: fullPath, as: modulePath}); }); return true; } });
jsio.addCmd(function(context, request, opts, imports) { var match = request.match(/^\s*import\s+(.*)$/); if (match) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { imports.push( as ? { from: fullPath, as: as } : { from: fullPath, as: fullPath });
match[4].replace(/\s*([\w.$*]+)(?:\s+as\s+([\w.$]+))?/g, function(_, item, as) { imports[0]['import'][item] = as || item;
jsio.addCmd(function(context, request, opts, imports) { var match = request.match(/^\s*import\s+(.*)$/); if (match) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { imports.push( as ? { from: fullPath, as: as } : { from: fullPath, as: fullPath }); }); return true; } });
return true; } });
jsio.addCmd(function(context, request, opts, imports) { var match = request.match(/^\s*import\s+(.*)$/); if (match) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, fullPath, as) { imports.push( as ? { from: fullPath, as: as } : { from: fullPath, as: fullPath }); }); return true; } });
c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){
$(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ var c_detail = new DcmgrGUI.Detail({ element_id:$('<div></div>'), template_id:params.template_id }); c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){
c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ var data = { item:params.data } //initialize if(!params.data){ data.item = self.getEmptyData(); } if(data.item){ $('#detail').html($( c_detail.template ).tmpl(data)); } });
c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ $('#detail').html(''); } });
c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ var data = { item:params.data } //initialize if(!params.data){ data.item = self.getEmptyData(); } if(data.item){ $('#detail').html($( c_detail.template ).tmpl(data)); } });
var fieldset = this.visTypeFieldsetElements.filter(function(el) { return el.visType == visType.type.value; } )[0];
var container = this.containers.filter(function(el) { return el.visType == visType.type.value; } )[0];
var fieldset = this.visTypeFieldsetElements.filter(function(el) { return el.visType == visType.type.value; } )[0];
setTimeout(function() { AtD.suggestShow = false; }, 2);
jQuery("body").bind("click", function() { if (!AtD.suggestShow) jQuery('#suggestmenu').fadeOut(200); });
setTimeout(function() { AtD.suggestShow = false; }, 2);
var variables = this.variables.filter(function(variable) { return variable.variable.value == name; } );
var bindingType = Report.bindingTypes.filter(function(bindingType) { return bindingType.type.value == binding.type.value; } )[0];
var variables = this.variables.filter(function(variable) { return variable.variable.value == name; } );
this.ranges.forEach(function (range) range.save());
let ranges = this.ranges.filter(function (r) r.window == win && RangeFind.contains(r.range, range));
this.ranges.forEach(function (range) range.save());
(function(){ var names = "("; for(var param in buildUtil.baseMappings){ if(names != "("){ names += "|"; } names += param; } names += ")"; buildUtil.baseMappingRegExp = new RegExp("\\." + names + "\\W", "g"); })();
importContents = importContents.replace(buildUtil.cssUrlRegExp, function(fullMatch, urlMatch){ var fixedUrlMatch = buildUtil.cleanCssUrlQuotes(urlMatch); fixedUrlMatch = fixedUrlMatch.replace(buildUtil.backSlashRegExp, "/"); var colonIndex = fixedUrlMatch.indexOf(":"); if(fixedUrlMatch.charAt(0) != "/" && (colonIndex == -1 || colonIndex > fixedUrlMatch.indexOf("/"))){ urlMatch = importPath + fixedUrlMatch; }else{ logger.trace(importFileName + "\n URL not a relative URL, skipping: " + urlMatch); } var parts = urlMatch.split("/"); for(var i = parts.length - 1; i > 0; i--){ if(parts[i] == "."){ parts.splice(i, 1); }else if(parts[i] == ".."){ if(i != 0 && parts[i - 1] != ".."){ parts.splice(i - 1, 2); i -= 1; } } } return "url(" + parts.join("/") + ")"; });
(function(){ var names = "("; for(var param in buildUtil.baseMappings){ if(names != "("){ names += "|"; } names += param; } names += ")"; buildUtil.baseMappingRegExp = new RegExp("\\." + names + "\\W", "g");})();
function () { modes.push(modes.PASS_THROUGH); });
function () { return; });
function () { modes.push(modes.PASS_THROUGH); });
$$(".upload").each(function(el) { el.disabled = true;
$$("input[chip=\"" + chip + "\"]").each(function(el) { if (el.checked) { var slotEle = new Element("input", {"class": "form_hidden", name: "slot", value: el.readAttribute("slot"), type: "hidden"}); form.insert(slotEle); }
$$(".upload").each(function(el) { el.disabled = true; });
connect(window, 'onkeydown', this, function(ev){ var key = keyString(ev._event); var func = Form.shortcutkeys[key]; func && func(ev);
connect(toggle_detail, 'onclick', this, function(ev){ if(!addElementClass(toggle_detail, 'extended')){ removeElementClass(toggle_detail, 'extended'); } this.toggle();
connect(window, 'onkeydown', this, function(ev){ var key = keyString(ev._event); var func = Form.shortcutkeys[key]; func && func(ev); });
dir.readDirectory(true).forEach(function (file) { if (file.isFile() && loadplugins.getKey(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); });
dirs.forEach(function (dir) { dactyl.echomsg("Searching for " + (dir.path + "/**/*.{js," + config.fileExtension + "}").quote(), 3); sourceDirectory(dir); });
dir.readDirectory(true).forEach(function (file) { if (file.isFile() && loadplugins.getKey(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); });
chrome.tabs.getSelected(null, function(tab){ if(TBRL.Service.isEnableSite(tab.url)){ d.callback(tab); } });
Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); });
chrome.tabs.getSelected(null, function(tab){ if(TBRL.Service.isEnableSite(tab.url)){ d.callback(tab); } });
$(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ self.checked_list[check_id] = { element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){
c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ var data = { item:params.data }
$(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } });
var data = { item:params.data } if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); }
if(!params.data){ data.item = self.getEmptyData(); } if(data.item){ $('#detail').html($( c_detail.template ).tmpl(data));
$(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } });
self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } });
$(this).click(function(){ var check_id = $(this).val(); if($(this).is(':checked')){ //step1:onclick checkbox and generate detail object self.checked_list[check_id] = { //+1 is to remove table header element:$(self.element.find('tr')[key+1]), c_detail:new DcmgrGUI.Detail({ //id is to search element key id:check_id, element_id:$('<div></div>'), template_id:params.template_id }) } //step2:bind event dcmgrGUI.contentChange self.checked_list[check_id].c_detail.element.bind('dcmgrGUI.contentChange',function(event,params){ if(self.checked_list[check_id]){ //step4:marge data in template var data = { item:params.data } //initialize if(!params.data){ data.item = self.checked_list[check_id].c_detail.getEmptyData(); } if(data.item){ $( self.checked_list[check_id].c_detail.template ) .tmpl(data) .appendTo( $('#detail') ); } } }); //step3:update detail self.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath(params.detail_path,check_id) },true); }else{ //remove detail if(self.checked_list[check_id]){ $($('#detail').find('#'+check_id)).remove(); delete self.checked_list[check_id] } } });
$$("input[chip=\"" + chip + "\"]").each(function(el) { if (el.checked) { var slotEle = new Element("input", {"class": "form_hidden", name: "slot", value: el.readAttribute("slot"), type: "hidden"}); form.insert(slotEle); }
$$(".upload").each(function(ele) { ele.disabled = true;
$$("input[chip=\"" + chip + "\"]").each(function(el) { if (el.checked) { var slotEle = new Element("input", {"class": "form_hidden", name: "slot", value: el.readAttribute("slot"), type: "hidden"}); form.insert(slotEle); } });
var createURI = (function(){ var anchor = document.createElement('a'); return function(link){ var a = anchor.cloneNode(false); a.href = link; return a; } })();
Object.keys(attrs).forEach(function(key){ element.style[key] = attrs[key]; });
var createURI = (function(){ var anchor = document.createElement('a'); return function(link){ var a = anchor.cloneNode(false); a.href = link; return a; }})();
function () { editor.executeCommand("cmd_deleteToEndOfLine", 1); });
function () { editor.executeCommand("cmd_selectBeginLine", 1); if (Editor.getController().isCommandEnabled("cmd_delete")) editor.executeCommand("cmd_delete", 1); });
function () { editor.executeCommand("cmd_deleteToEndOfLine", 1); });
$.each(q, function (k, e) { if (e.end == b[i]) { r = {ikey: e.ikey.concat([kw]), start: e.start, end: b[j]}; me._registerQuery(r); if (r.ikey.length < maxKeyLength) s.push(r); } });
q.sort(function (a, b) { return a - b; });
$.each(q, function (k, e) { if (e.end == b[i]) { r = {ikey: e.ikey.concat([kw]), start: e.start, end: b[j]}; me._registerQuery(r); if (r.ikey.length < maxKeyLength) s.push(r); } });