diff --git a/package.json b/package.json index ea8bde68..31590b2f 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "c9.ide.language.javascript.tern": "#7aab8b0b6a", "c9.ide.language.javascript.infer": "#ebb2daf81a", "c9.ide.language.jsonalyzer": "#d82c60fcb9", - "c9.ide.collab": "#7c770ca148", + "c9.ide.collab": "#7009f69cb0", "c9.ide.local": "#2bfd7ff051", "c9.ide.find": "#989c06e6a7", "c9.ide.find.infiles": "#f98dfef554", @@ -78,7 +78,7 @@ "c9.ide.configuration": "#b8470f4107", "c9.ide.dialog.wizard": "#a588b64050", "c9.ide.fontawesome": "#781602c5d8", - "c9.ide.format": "#1ae38e60e6", + "c9.ide.format": "#4295dcca4d", "c9.ide.help.support": "#60e88f5680", "c9.ide.imgeditor": "#08bbc53578", "c9.ide.immediate": "#e9ba147cc2", @@ -87,9 +87,9 @@ "c9.ide.navigate": "#64156c7f4a", "c9.ide.newresource": "#9a7464cc47", "c9.ide.openfiles": "#28a4f5af16", - "c9.ide.preview": "#f6d1bd9921", - "c9.ide.preview.browser": "#be197b0464", - "c9.ide.preview.markdown": "#bf952685f6", + "c9.ide.preview": "#dba2f4214d", + "c9.ide.preview.browser": "#ac18aaf31d", + "c9.ide.preview.markdown": "#ab8d30ad9f", "c9.ide.pubsub": "#92ec19ed3a", "c9.ide.readonly": "#f6f07bbe42", "c9.ide.recentfiles": "#7c099abf40", diff --git a/plugins/c9.ide.keys/editor.js b/plugins/c9.ide.keys/editor.js index e6c90708..3eb708ba 100644 --- a/plugins/c9.ide.keys/editor.js +++ b/plugins/c9.ide.keys/editor.js @@ -2,7 +2,7 @@ define(function(require, exports, module) { main.consumes = [ "PreferencePanel", "commands", "settings", "ui", "util", "Form", "c9", "dialog.alert", "tabManager", "save", "dialog.confirm", "layout", - "preferences", "menus" + "menus" // "preferenced" ]; main.provides = ["preferences.keybindings"]; return main; @@ -12,7 +12,7 @@ define(function(require, exports, module) { var commands = imports.commands; var settings = imports.settings; var layout = imports.layout; - var preferences = imports.preferences; + // var preferences = imports.preferences; var ui = imports.ui; var c9 = imports.c9; var util = imports.util; @@ -32,7 +32,7 @@ define(function(require, exports, module) { var plugin = new PreferencePanel("Ajax.org", main.consumes, { caption: "Keybindings", - className: "keybindings", + className: "keybindings flatform", form: true, noscroll: true, index: 200 @@ -211,7 +211,7 @@ define(function(require, exports, module) { node: container = new ui.bar({ anchors: "269 0 0 0", "class" : "keybindings", - style: "padding:44px 10px 10px 10px;position:relative" + style: "padding:44px 10px 10px 10px" }) } ], commands); @@ -509,16 +509,19 @@ define(function(require, exports, module) { }); plugin.on("resize", function(e) { datagrid && datagrid.resize(); - }); - plugin.on("enable", function() { - - }); - plugin.on("disable", function() { - }); plugin.on("unload", function() { loaded = false; drawn = false; + + model = null; + datagrid = null; + changed = null; + container = null; + filterbox = null; + appliedCustomSets = null; + intro = null; + reloading = null; }); /***** Register and define API *****/ diff --git a/plugins/c9.ide.preferences/general.js b/plugins/c9.ide.preferences/general.js index 67a811a0..1c656659 100644 --- a/plugins/c9.ide.preferences/general.js +++ b/plugins/c9.ide.preferences/general.js @@ -23,7 +23,7 @@ define(function(require, exports, module) { var emit = plugin.getEmitter(); emit.setMaxListeners(1000); - var navHtml, intro; + var intro; var loaded = false; function load() { @@ -44,7 +44,7 @@ define(function(require, exports, module) { prefs.on("add", function(e) { if (!("Project" in e.state)) plugin.add(e.state, e.plugin); - }); + }, plugin); } var drawn = false; @@ -52,8 +52,6 @@ define(function(require, exports, module) { if (drawn) return; drawn = true; - navHtml = e.navHtml; - plugin.add({ "General" : { position: 10, @@ -71,7 +69,7 @@ define(function(require, exports, module) { + "Cloud9 will return to it's original configuration", function(){ settings.reset(); - }, function(){}) + }, function(){}); } } }, @@ -109,8 +107,8 @@ define(function(require, exports, module) { + '

These settings are synced across all your workspaces.

'; intro.$int.querySelector("a").onclick = function(){ - emit("edit") - } + emit("edit"); + }; } /***** Methods *****/ @@ -123,16 +121,11 @@ define(function(require, exports, module) { }); plugin.on("draw", function(e) { draw(e); - }); - plugin.on("enable", function() { - - }); - plugin.on("disable", function() { - }); plugin.on("unload", function() { loaded = false; drawn = false; + intro = null; }); /***** Register and define API *****/ diff --git a/plugins/c9.ide.preferences/preferencepanel.js b/plugins/c9.ide.preferences/preferencepanel.js index 35088827..66acbaa4 100644 --- a/plugins/c9.ide.preferences/preferencepanel.js +++ b/plugins/c9.ide.preferences/preferencepanel.js @@ -261,7 +261,7 @@ define(function(require, module, exports) { "textarea" : 400, "checked-spinner" : 50 } - }); + }, plugin); } }); diff --git a/plugins/c9.ide.preferences/preferences.css b/plugins/c9.ide.preferences/preferences.css index c5450847..74ccdc48 100644 --- a/plugins/c9.ide.preferences/preferences.css +++ b/plugins/c9.ide.preferences/preferences.css @@ -148,14 +148,15 @@ .bar-preferences .keybindings{ min-height: 250px; } -.bar-preferences .keybindings .container > .hsplitbox, .bar-preferences .keybindings .container > .basic{ +.bar-preferences .flatform .container > .hsplitbox, +.bar-preferences .flatform .container > .basic{ border-top : 1px solid @preferences-border-top-color-light; box-sizing: border-box; } .bar-preferences .keybindings .intro when(@preferences-flat){ margin-bottom: 8px !important; } -.bar-preferences .keybindings .container > .hsplitbox:last-child when(@preferences-flat){ +.bar-preferences .flatform .container > .hsplitbox:last-child when(@preferences-flat){ height: 49px !important; } .bar-preferences .container>.hsplitbox:last-child{ diff --git a/plugins/c9.ide.preferences/project.js b/plugins/c9.ide.preferences/project.js index 1b9aafee..bc28a828 100644 --- a/plugins/c9.ide.preferences/project.js +++ b/plugins/c9.ide.preferences/project.js @@ -21,7 +21,7 @@ define(function(require, exports, module) { var emit = plugin.getEmitter(); emit.setMaxListeners(1000); - var navHtml, intro; + var intro; var loaded = false; function load() { @@ -42,12 +42,12 @@ define(function(require, exports, module) { prefs.on("add", function(e) { if ("Project" in e.state) plugin.add(e.state, e.plugin); - }); + }, plugin); prefs.on("draw", function(e) { if (!prefs.activePanel) prefs.activate(plugin); - }); + }, plugin); } var drawn = false; @@ -65,8 +65,6 @@ define(function(require, exports, module) { intro.$int.querySelector("a").onclick = function(){ emit("edit"); } - - navHtml = e.navHtml; } /***** Methods *****/ @@ -78,16 +76,11 @@ define(function(require, exports, module) { }); plugin.on("draw", function(e) { draw(e); - }); - plugin.on("enable", function() { - - }); - plugin.on("disable", function() { - }); plugin.on("unload", function() { loaded = false; drawn = false; + intro = null; }); /***** Register and define API *****/ diff --git a/plugins/c9.ide.ui/forms.js b/plugins/c9.ide.ui/forms.js index a8b39694..354a32cf 100644 --- a/plugins/c9.ide.ui/forms.js +++ b/plugins/c9.ide.ui/forms.js @@ -10,7 +10,7 @@ define(function(require, exports, module) { /***** Initialization *****/ - function Form(options) { + function Form(options, forPlugin) { var plugin = new Plugin("Ajax.org", main.consumes); var emit = plugin.getEmitter(); @@ -41,6 +41,9 @@ define(function(require, exports, module) { if (options.form) add(options.form); + + if (forPlugin) + forPlugin.addOther(function(){ plugin.unload(); }); } var drawn = false; @@ -398,7 +401,7 @@ define(function(require, exports, module) { function update(items) { items.forEach(function(item) { var el = plugin.getElement(item.id); - switch(el.type) { + switch (el.type) { case "dropdown": var dropdown = el.lastChild; @@ -412,7 +415,14 @@ define(function(require, exports, module) { dropdown.setAttribute("value", item.value); break; default: - el.lastChild.setAttribute('value', item.value); + if ("value" in item) + el.lastChild.setAttribute('value', item.value); + if ("onclick" in item) + el.lastChild.onclick = item.onclick; + if ("visible" in item) + el.lastChild.setAttribute("visible", item.visible) + if ("zindex" in item) + el.lastChild.setAttribute("zindex", item.zindex) break; } }) diff --git a/plugins/c9.ide.ui/ui.js b/plugins/c9.ide.ui/ui.js index f44aec7c..311cd574 100644 --- a/plugins/c9.ide.ui/ui.js +++ b/plugins/c9.ide.ui/ui.js @@ -40,6 +40,12 @@ define(function(require, module, exports) { apf.Class.prototype.emit = apf.Class.prototype.dispatchEvent; apf.Class.prototype.off = apf.Class.prototype.removeEventListener; + Object.defineProperty(apf.Class.prototype, '$html', { + get: function() { return this.$int || this.$container || this.$ext; }, + enumerable: false, + configurable: false + }); + apf.preProcessCSS = insertLess; // Load a basic document into APF