From 8aa90ef045c0a33445704e44b0bc31e4836f1647 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 3 Aug 2015 22:51:18 +0400 Subject: [PATCH 1/4] add textselect option to dialog --- plugins/c9.ide.dialog/dialog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/c9.ide.dialog/dialog.js b/plugins/c9.ide.dialog/dialog.js index 652758af..d7fc753d 100644 --- a/plugins/c9.ide.dialog/dialog.js +++ b/plugins/c9.ide.dialog/dialog.js @@ -190,7 +190,10 @@ define(function(require, module, exports) { } // allow selecting dialog message text - titles.textselect = !custom; + var textselect = options.textselect; + if (textselect == undefined) + textselect = !custom; + titles.textselect = textselect; // When the dialog closes the next dialog can appear plugin.once("hide", next); From 42e0b9663806597769f69be791c5ce2681cb584e Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 3 Aug 2015 22:51:52 +0400 Subject: [PATCH 2/4] fix focus issues with mount dialog --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 306de25d..e237e563 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "c9.ide.imgeditor": "#66a9733dc1", "c9.ide.immediate": "#6845a93705", "c9.ide.installer": "#be8d9aa07c", - "c9.ide.mount": "#f89d3f7570", + "c9.ide.mount": "#816dbe987b", "c9.ide.navigate": "#f358997d93", "c9.ide.newresource": "#f1f0624768", "c9.ide.openfiles": "#28a4f5af16", From 4d2e52229071a7a642ad6281c2a2cc69ca11062f Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 3 Aug 2015 22:58:04 +0400 Subject: [PATCH 3/4] use consistent skin for password inputs --- plugins/c9.ide.ui/forms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/c9.ide.ui/forms.js b/plugins/c9.ide.ui/forms.js index e181909c..0ea876c0 100644 --- a/plugins/c9.ide.ui/forms.js +++ b/plugins/c9.ide.ui/forms.js @@ -298,7 +298,7 @@ define(function(require, exports, module) { childNodes = [ new ui.label({ width : width, maxwidth: maxwidth, caption: name + ":" }), new ui.password({ - //skin : "codebox", + skin: skins.textbox || "searchbox", width: options.width || widths.password, value: options.path ? createBind(options.path) From 76ee1e289c4070d04de4ead5dec64daaa4088459 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 3 Aug 2015 23:28:18 +0400 Subject: [PATCH 4/4] add context menu for panels --- plugins/c9.ide.panels/area.js | 20 +++++++++++++++++++- plugins/c9.ide.panels/panel.js | 10 +++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/plugins/c9.ide.panels/area.js b/plugins/c9.ide.panels/area.js index 0ec93cd2..7b11cca2 100644 --- a/plugins/c9.ide.panels/area.js +++ b/plugins/c9.ide.panels/area.js @@ -1,5 +1,5 @@ define(function(require, module, exports) { - main.consumes = ["Plugin", "layout", "settings", "anims", "ui"]; + main.consumes = ["Plugin", "layout", "settings", "anims", "ui", "menus"]; main.provides = ["panels.Area"]; return main; @@ -8,6 +8,7 @@ define(function(require, module, exports) { var layout = imports.layout; var anims = imports.anims; var ui = imports.ui; + var menus = imports.menus; var settings = imports.settings; var uCaseFirst = require("c9/string").uCaseFirst; @@ -43,6 +44,23 @@ define(function(require, module, exports) { column.setWidth(CURWIDTH); column.setAttribute("class", where); + column.oncontextmenu = function(e) { + var menu = menus.get("Window").menu; + menu.display(e.x, e.y); + menu.childNodes.forEach(function(x) { + if (x.visible && !x.panel) { + x.hide(); + menu.on("prop.visible", function show(e) { + if (!e.value) { + menu.off("prop.visible", show); + x.show(); + } + }); + } + }); + return false; + }; + // Prevent scrolling column.$int.addEventListener("scroll", function(e){ column.$int.scrollTop = 0; diff --git a/plugins/c9.ide.panels/panel.js b/plugins/c9.ide.panels/panel.js index 588da214..1c71f1b4 100644 --- a/plugins/c9.ide.panels/panel.js +++ b/plugins/c9.ide.panels/panel.js @@ -46,8 +46,11 @@ define(function(require, module, exports) { area.enablePanel(plugin.name); else area.disablePanel(plugin.name); - } + }, }); + + mnuItem.panel = plugin; + menus.addItemByPath("Window/" + caption, mnuItem, index, plugin); panels.on("showPanel" + uCaseFirst(plugin.name), function(e) { @@ -206,9 +209,10 @@ define(function(require, module, exports) { caption: caption, auto: false, "class" : buttonCSSClass || "", - onmousedown: function(){ + onmousedown: function(e){ + if (e.htmlEvent && e.htmlEvent.button) return; panels.areas[where].toggle(plugin.name, autohide, true); - }, + } }); plugin.addElement(button); }