Merge pull request +8538 from c9/sdk

Sdk fixes
pull/117/merge
Ruben Daniels 2015-08-03 14:12:28 -07:00
commit aa693a42d4
5 zmienionych plików z 32 dodań i 7 usunięć

Wyświetl plik

@ -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",

Wyświetl plik

@ -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);

Wyświetl plik

@ -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;

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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)