Merge remote-tracking branch 'origin/master' into multi-domain

pull/117/merge
Lennart Kats 2015-06-28 11:28:11 +02:00
commit dc3ccc2769
6 zmienionych plików z 28 dodań i 11 usunięć

15
node_modules/ace/lib/ace/ext/emmet.js wygenerowano vendored
Wyświetl plik

@ -212,7 +212,7 @@ AceEmmetEditor.prototype = {
* @return {String} * @return {String}
*/ */
getProfileName: function() { getProfileName: function() {
switch(this.getSyntax()) { switch (this.getSyntax()) {
case "css": return "css"; case "css": return "css";
case "xml": case "xml":
case "xsl": case "xsl":
@ -223,8 +223,10 @@ AceEmmetEditor.prototype = {
if (!profile) if (!profile)
profile = this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i) != -1 ? "xhtml": "html"; profile = this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i) != -1 ? "xhtml": "html";
return profile; return profile;
default:
var mode = this.ace.session.$mode;
return mode.emmetConfig && mode.emmetConfig.profile || "xhtml";
} }
return "xhtml";
}, },
/** /**
@ -392,15 +394,18 @@ exports.updateCommands = function(editor, enabled) {
} }
}; };
exports.isSupportedMode = function(modeId) { exports.isSupportedMode = function(mode) {
return modeId && /css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(modeId); if (!mode) return false;
if (mode.emmetConfig) return true;
var id = mode.$id || mode;
return /css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(id);
}; };
var onChangeMode = function(e, target) { var onChangeMode = function(e, target) {
var editor = target; var editor = target;
if (!editor) if (!editor)
return; return;
var enabled = exports.isSupportedMode(editor.session.$modeId); var enabled = exports.isSupportedMode(editor.session.$mode);
if (e.enableEmmet === false) if (e.enableEmmet === false)
enabled = false; enabled = false;
if (enabled) { if (enabled) {

5
node_modules/c9/uid.js wygenerowano vendored
Wyświetl plik

@ -8,5 +8,8 @@ module.exports = function(length) {
.toString("base64") .toString("base64")
.replace(/[^a-zA-Z0-9]/g, ""); .replace(/[^a-zA-Z0-9]/g, "");
} }
return uid.slice(0, length); // HACK: make sure unique id is never syntactically valid JavaScript
// See http://balpha.de/2013/02/plain-text-considered-harmful-a-cross-domain-exploit/
uid = "9c" +uid.slice(0, length - 2);
return uid;
}; };

Wyświetl plik

@ -74,7 +74,7 @@
"c9.ide.find.replace": "#e4daf722b8", "c9.ide.find.replace": "#e4daf722b8",
"c9.ide.run.debug": "#23a188b91a", "c9.ide.run.debug": "#23a188b91a",
"c9.automate": "#47e2c429c9", "c9.automate": "#47e2c429c9",
"c9.ide.ace.emmet": "#e5f1a92ac3", "c9.ide.ace.emmet": "#0ab4c6cd68",
"c9.ide.ace.gotoline": "#4d1a93172c", "c9.ide.ace.gotoline": "#4d1a93172c",
"c9.ide.ace.keymaps": "#43445d6306", "c9.ide.ace.keymaps": "#43445d6306",
"c9.ide.ace.repl": "#f3a62c1f2a", "c9.ide.ace.repl": "#f3a62c1f2a",

Wyświetl plik

@ -891,7 +891,11 @@ define(function(require, exports, module) {
{ caption : "Timed", value : "true" } { caption : "Timed", value : "true" }
], ],
position: 14000 position: 14000
} },
"Enable Wrapping For New Documents" : {
type: "checkbox",
path: "user/ace/@useWrapMode"
},
} }
} }
}, handle); }, handle);

Wyświetl plik

@ -1,6 +1,7 @@
define(function(require, exports, module) { define(function(require, exports, module) {
main.consumes = [ main.consumes = [
"Panel", "ui", "menus", "panels", "commands", "tabManager", "layout" "Panel", "ui", "menus", "panels", "commands", "tabManager", "layout",
"settings"
]; ];
main.provides = ["commands.panel"]; main.provides = ["commands.panel"];
return main; return main;
@ -13,6 +14,7 @@ define(function(require, exports, module) {
var panels = imports.panels; var panels = imports.panels;
var layout = imports.layout; var layout = imports.layout;
var commands = imports.commands; var commands = imports.commands;
var settings = imports.settings;
var markup = require("text!./panel.xml"); var markup = require("text!./panel.xml");
var search = require('../c9.ide.navigate/search'); var search = require('../c9.ide.navigate/search');
@ -130,6 +132,7 @@ define(function(require, exports, module) {
txtFilter.ace.on("input", function(e) { txtFilter.ace.on("input", function(e) {
var val = txtFilter.getValue(); var val = txtFilter.getValue();
filter(val); filter(val);
settings.set("state/commandPanel/@value", val);
}); });
function onblur(e) { function onblur(e) {
@ -154,8 +157,10 @@ define(function(require, exports, module) {
setTimeout(function(){ setTimeout(function(){
// Assign the dataprovider // Assign the dataprovider
tree.setDataProvider(ldSearch); tree.setDataProvider(ldSearch);
tree.selection.$wrapAround = true; tree.selection.$wrapAround = true;
var val = settings.get("state/commandPanel/@value");
if (val)
txtFilter.ace.setValue(val);
}, 200); }, 200);
} }

Wyświetl plik

@ -206,7 +206,7 @@ define(function(require, exports, module) {
}]); }]);
ace.onPaste = function(text) { ace.onPaste = function(text) {
this.send(text); this.send(text.replace(/\r\n/g, "\n"));
}; };
ace.setKeyboardHandler(this); ace.setKeyboardHandler(this);