Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian authored and nightwing committed Sep 11, 2012
1 parent 1868e7c commit 3bbfc45
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
22 changes: 11 additions & 11 deletions demo/kitchen-sink/demo.js
Expand Up @@ -75,7 +75,7 @@ var Mode = function(name, desc, extensions) {
this.name = name; this.name = name;
this.desc = desc; this.desc = desc;
this.mode = "ace/mode/" + name; this.mode = "ace/mode/" + name;
this.extRe = new RegExp("^.*\\.(" + extensions + ")$" , "g"); this.extRe = new RegExp("^.*\\.(" + extensions + ")$", "g");
}; };


Mode.prototype.supportsFile = function(filename) { Mode.prototype.supportsFile = function(filename) {
Expand Down Expand Up @@ -236,7 +236,7 @@ function prepareDocList(docs) {
doc = {name: doc || path}; doc = {name: doc || path};


doc.path = path; doc.path = path;
doc.desc = doc.name.replace(/^(ace|docs|demo|build)\// , ""); doc.desc = doc.name.replace(/^(ace|docs|demo|build)\//, "");
if (doc.desc.length > 18) if (doc.desc.length > 18)
doc.desc = doc.desc.slice(0, 7) + ".." + doc.desc.slice(-9) doc.desc = doc.desc.slice(0, 7) + ".." + doc.desc.slice(-9)


Expand Down Expand Up @@ -325,7 +325,7 @@ cmdLine.commands.bindKeys({
}, },
}) })


cmdLine.commands.removeCommands(["find" , "gotoline" , "findall" , "replace" , "replaceall"]) cmdLine.commands.removeCommands(["find", "gotoline", "findall", "replace", "replaceall"])


/** /**
* This demonstrates how you can define commands and bind shortcuts to them. * This demonstrates how you can define commands and bind shortcuts to them.
Expand Down Expand Up @@ -389,15 +389,15 @@ var softTabEl = document.getElementById("soft_tab");
var behavioursEl = document.getElementById("enable_behaviours"); var behavioursEl = document.getElementById("enable_behaviours");


var group = document.createElement("optgroup"); var group = document.createElement("optgroup");
group.setAttribute("label" , "Mode Examples"); group.setAttribute("label", "Mode Examples");
fillDropdown(docs, group); fillDropdown(docs, group);
docEl.appendChild(group); docEl.appendChild(group);
var group = document.createElement("optgroup"); var group = document.createElement("optgroup");
group.setAttribute("label" , "Huge documents"); group.setAttribute("label", "Huge documents");
fillDropdown(hugeDocs, group); fillDropdown(hugeDocs, group);
docEl.appendChild(group); docEl.appendChild(group);
var group = document.createElement("optgroup"); var group = document.createElement("optgroup");
group.setAttribute("label" , "own source"); group.setAttribute("label", "own source");
fillDropdown(ownSource, group); fillDropdown(ownSource, group);
docEl.appendChild(group); docEl.appendChild(group);


Expand Down Expand Up @@ -479,13 +479,13 @@ function saveOption(el, val) {
} }
} }


event.addListener(themeEl , "mouseover", function(e){ event.addListener(themeEl, "mouseover", function(e){
this.desiredValue = e.target.value; this.desiredValue = e.target.value;
if (!this.$timer) if (!this.$timer)
this.$timer = setTimeout(this.updateTheme); this.$timer = setTimeout(this.updateTheme);
}) })


event.addListener(themeEl , "mouseout", function(e){ event.addListener(themeEl, "mouseout", function(e){
this.desiredValue = null; this.desiredValue = null;
if (!this.$timer) if (!this.$timer)
this.$timer = setTimeout(this.updateTheme, 20); this.$timer = setTimeout(this.updateTheme, 20);
Expand Down Expand Up @@ -653,11 +653,11 @@ function fillDropdown(list, el) {




/************** dragover ***************************/ /************** dragover ***************************/
event.addListener(container , "dragover", function(e) { event.addListener(container, "dragover", function(e) {
return event.preventDefault(e); return event.preventDefault(e);
}); });


event.addListener(container , "drop", function(e) { event.addListener(container, "drop", function(e) {
var file; var file;
try { try {
file = e.dataTransfer.files[0]; file = e.dataTransfer.files[0];
Expand Down Expand Up @@ -753,7 +753,7 @@ var statusUpdate = lang.deferredCall(function() {
add("REC"); add("REC");


var c = editor.selection.lead; var c = editor.selection.lead;
add(c.row + ":" + c.column , " "); add(c.row + ":" + c.column, " ");
if (!editor.selection.isEmpty()) { if (!editor.selection.isEmpty()) {
var r = editor.getSelectionRange() var r = editor.getSelectionRange()
add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")"); add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")");
Expand Down
4 changes: 2 additions & 2 deletions tool/theme.tmpl.js
Expand Up @@ -34,6 +34,6 @@ exports.isDark = %isDark%;
exports.cssClass = "%cssClass%"; exports.cssClass = "%cssClass%";
exports.cssText = %css%; exports.cssText = %css%;


var dom = require("../lib/dom"); var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass); dom.importCssString(exports.cssText, exports.cssClass);
}); });
2 changes: 0 additions & 2 deletions tool/tmtheme.js
Expand Up @@ -7,8 +7,6 @@ function parseTheme(themeXml, callback) {
}); });
} }




var supportedScopes = { var supportedScopes = {
"keyword": "keyword", "keyword": "keyword",
"keyword.operator": "keyword.operator", "keyword.operator": "keyword.operator",
Expand Down

0 comments on commit 3bbfc45

Please sign in to comment.