kopia lustrzana https://github.com/c9/core
commit
bffdbe4681
|
@ -50,7 +50,7 @@
|
||||||
},
|
},
|
||||||
"licenses": [],
|
"licenses": [],
|
||||||
"c9plugins": {
|
"c9plugins": {
|
||||||
"c9.ide.language": "#8cc3cba38e",
|
"c9.ide.language": "#854575579b",
|
||||||
"c9.ide.language.css": "#afda1f867c",
|
"c9.ide.language.css": "#afda1f867c",
|
||||||
"c9.ide.language.generic": "#87a4a44671",
|
"c9.ide.language.generic": "#87a4a44671",
|
||||||
"c9.ide.language.html": "#fa4833e117",
|
"c9.ide.language.html": "#fa4833e117",
|
||||||
|
@ -61,12 +61,12 @@
|
||||||
"c9.ide.language.javascript.tern": "#a65ad88dd9",
|
"c9.ide.language.javascript.tern": "#a65ad88dd9",
|
||||||
"c9.ide.language.javascript.infer": "#ebb2daf81a",
|
"c9.ide.language.javascript.infer": "#ebb2daf81a",
|
||||||
"c9.ide.language.jsonalyzer": "#c5dfe5fb7e",
|
"c9.ide.language.jsonalyzer": "#c5dfe5fb7e",
|
||||||
"c9.ide.collab": "#e2a500a964",
|
"c9.ide.collab": "#b94018ab2b",
|
||||||
"c9.ide.local": "#2bfd7ff051",
|
"c9.ide.local": "#2bfd7ff051",
|
||||||
"c9.ide.find": "#989c06e6a7",
|
"c9.ide.find": "#989c06e6a7",
|
||||||
"c9.ide.find.infiles": "#f98dfef554",
|
"c9.ide.find.infiles": "#f98dfef554",
|
||||||
"c9.ide.find.replace": "#e4daf722b8",
|
"c9.ide.find.replace": "#e4daf722b8",
|
||||||
"c9.ide.run.debug": "#a3e0f7b134",
|
"c9.ide.run.debug": "#68c75beeaa",
|
||||||
"c9.ide.ace.emmet": "#e5f1a92ac3",
|
"c9.ide.ace.emmet": "#e5f1a92ac3",
|
||||||
"c9.ide.ace.gotoline": "#4d1a93172c",
|
"c9.ide.ace.gotoline": "#4d1a93172c",
|
||||||
"c9.ide.ace.keymaps": "#6c4bb65b1f",
|
"c9.ide.ace.keymaps": "#6c4bb65b1f",
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
"c9.ide.immediate": "#e9ba147cc2",
|
"c9.ide.immediate": "#e9ba147cc2",
|
||||||
"c9.ide.installer": "#24e7d6f399",
|
"c9.ide.installer": "#24e7d6f399",
|
||||||
"c9.ide.mount": "#32e79866ee",
|
"c9.ide.mount": "#32e79866ee",
|
||||||
"c9.ide.navigate": "#d4cccbcab4",
|
"c9.ide.navigate": "#64156c7f4a",
|
||||||
"c9.ide.newresource": "#9a7464cc47",
|
"c9.ide.newresource": "#9a7464cc47",
|
||||||
"c9.ide.openfiles": "#28a4f5af16",
|
"c9.ide.openfiles": "#28a4f5af16",
|
||||||
"c9.ide.preview": "#3c4dded23f",
|
"c9.ide.preview": "#3c4dded23f",
|
||||||
|
|
|
@ -689,7 +689,7 @@ define(function(require, exports, module) {
|
||||||
* plugin.freezePublicAPI({
|
* plugin.freezePublicAPI({
|
||||||
* doSomething : doSomething
|
* doSomething : doSomething
|
||||||
* });
|
* });
|
||||||
* });
|
* }
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* @class Plugin
|
* @class Plugin
|
||||||
|
|
|
@ -24,7 +24,6 @@ define(function(require, exports, module) {
|
||||||
var plugin = new Panel("Ajax.org", main.consumes, {
|
var plugin = new Panel("Ajax.org", main.consumes, {
|
||||||
index: options.index || 300,
|
index: options.index || 300,
|
||||||
caption: "Commands",
|
caption: "Commands",
|
||||||
elementName: "winCommands",
|
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
autohide: true,
|
autohide: true,
|
||||||
where: options.where || "left"
|
where: options.where || "left"
|
||||||
|
@ -69,7 +68,7 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
var treeParent = plugin.getElement("commandsList");
|
var treeParent = plugin.getElement("commandsList");
|
||||||
txtFilter = plugin.getElement("txtFilter");
|
txtFilter = plugin.getElement("txtFilter");
|
||||||
winCommands = plugin.getElement("winCommands");
|
winCommands = options.aml;
|
||||||
|
|
||||||
// Create the Ace Tree
|
// Create the Ace Tree
|
||||||
tree = new Tree(treeParent.$int);
|
tree = new Tree(treeParent.$int);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<a:application xmlns:a="http://ajax.org/2005/aml">
|
<a:application xmlns:a="http://ajax.org/2005/aml">
|
||||||
<a:bar id="winCommands" skin="panel-bar" visible="false">
|
<a:codebox id="txtFilter" realtime="true" skin="codebox" clearbutton="true"
|
||||||
<a:codebox id="txtFilter" realtime="true" skin="codebox" clearbutton="true"
|
focusselect="true" height="27" left="10" top="10" right="10" singleline="true" />
|
||||||
focusselect="true" height="27" left="10" top="10" right="10" singleline="true" />
|
<a:bar id="commandsList" style="position:absolute;top:47px;right:10px;left:10px;bottom:0" class="searchresults" />
|
||||||
<a:bar id="commandsList" style="position:absolute;top:47px;right:10px;left:10px;bottom:0" class="searchresults" />
|
|
||||||
</a:bar>
|
|
||||||
</a:application>
|
</a:application>
|
|
@ -17,19 +17,18 @@ define(function(require, module, exports) {
|
||||||
var uCaseFirst = require("c9/string").uCaseFirst;
|
var uCaseFirst = require("c9/string").uCaseFirst;
|
||||||
|
|
||||||
function Panel(developer, deps, options) {
|
function Panel(developer, deps, options) {
|
||||||
// Panel extends ext.Plugin
|
|
||||||
var plugin = new Plugin(developer, deps);
|
var plugin = new Plugin(developer, deps);
|
||||||
var emit = plugin.getEmitter();
|
var emit = plugin.getEmitter();
|
||||||
|
|
||||||
var autohide = options.autohide || false;
|
var autohide = options.autohide || false;
|
||||||
var index = options.index || 100;
|
var index = options.index || 100;
|
||||||
var className = options.className;
|
var buttonCSSClass = options.buttonCSSClass;
|
||||||
|
var panelCSSClass = options.panelCSSClass;
|
||||||
var caption = options.caption;
|
var caption = options.caption;
|
||||||
var elementName = options.elementName;
|
|
||||||
var width = options.width;
|
var width = options.width;
|
||||||
var minWidth = options.minWidth;
|
var minWidth = options.minWidth;
|
||||||
|
|
||||||
var mnuItem, button, area, lastPanel, xpath, where;
|
var mnuItem, button, area, lastPanel, xpath, where, aml;
|
||||||
|
|
||||||
plugin.on("load", function(){
|
plugin.on("load", function(){
|
||||||
xpath = "state/panels/" + plugin.name;
|
xpath = "state/panels/" + plugin.name;
|
||||||
|
@ -153,23 +152,27 @@ define(function(require, module, exports) {
|
||||||
if (drawn) return false;
|
if (drawn) return false;
|
||||||
drawn = true;
|
drawn = true;
|
||||||
|
|
||||||
|
aml = area.aml.appendChild(new ui.bar({
|
||||||
|
"skin": "panel-bar",
|
||||||
|
"class" : panelCSSClass || "",
|
||||||
|
"visible": false
|
||||||
|
}));
|
||||||
|
plugin.addElement(aml);
|
||||||
|
|
||||||
emit.sticky("draw", {
|
emit.sticky("draw", {
|
||||||
html: area.container,
|
html: aml.$int,
|
||||||
aml: area.aml
|
aml: aml
|
||||||
});
|
});
|
||||||
|
|
||||||
var aml = plugin.getElement(elementName);
|
aml.$ext.style.zIndex = 100;
|
||||||
if (aml) {
|
aml.$ext.style.minWidth = ""; //Needed for the anims
|
||||||
aml.$ext.style.zIndex = 100;
|
aml.$ext.style.position = "absolute";
|
||||||
aml.$ext.style.minWidth = ""; //Needed for the anims
|
aml.$ext.style.left = where == "left" ? area.width + "px" : 0;
|
||||||
aml.$ext.style.position = "absolute";
|
aml.$ext.style.top = 0;
|
||||||
aml.$ext.style.left = where == "left" ? area.width + "px" : 0;
|
aml.$ext.style.right = where == "right" ? area.width + "px" : 0;
|
||||||
aml.$ext.style.top = 0;
|
aml.$ext.style.bottom = 0;
|
||||||
aml.$ext.style.right = where == "right" ? area.width + "px" : 0;
|
|
||||||
aml.$ext.style.bottom = 0;
|
aml.$display = apf.CSSPREFIX + "Flex";
|
||||||
|
|
||||||
aml.$display = apf.CSSPREFIX + "Flex";
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +181,6 @@ define(function(require, module, exports) {
|
||||||
area = toArea;
|
area = toArea;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var aml = plugin.getElement(elementName);
|
|
||||||
if (aml)
|
if (aml)
|
||||||
area.aml.appendChild(aml);
|
area.aml.appendChild(aml);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
@ -203,7 +205,7 @@ define(function(require, module, exports) {
|
||||||
state: true,
|
state: true,
|
||||||
caption: caption,
|
caption: caption,
|
||||||
auto: false,
|
auto: false,
|
||||||
"class" : className || "",
|
"class" : buttonCSSClass || "",
|
||||||
onmousedown: function(){
|
onmousedown: function(){
|
||||||
panels.areas[where].toggle(plugin.name, autohide, true);
|
panels.areas[where].toggle(plugin.name, autohide, true);
|
||||||
},
|
},
|
||||||
|
@ -312,8 +314,8 @@ define(function(require, module, exports) {
|
||||||
* autohiding panel. The developer is responsible for hiding
|
* autohiding panel. The developer is responsible for hiding
|
||||||
* the panel. This behavior will animate the panel during
|
* the panel. This behavior will animate the panel during
|
||||||
* @param hide and show over other panels, if there are any.
|
* @param hide and show over other panels, if there are any.
|
||||||
* @param {String} [options.elementName] Specifies the name of the aml element that renders the panel
|
* @param {String} [options.buttonCSSClass] Specifies the name of the css class that is applied to the button
|
||||||
* @param {String} [options.className] Specifies the name of the css class that is applied to the panel
|
* @param {String} [options.panelCSSClass] Specifies the name of the css class that is applied to the panel
|
||||||
* @param {Number} [options.width] Specifies the default width of the panel
|
* @param {Number} [options.width] Specifies the default width of the panel
|
||||||
* @param {Number} [options.minWidth] Specifies the minimal width of the panel
|
* @param {Number} [options.minWidth] Specifies the minimal width of the panel
|
||||||
* @param {String} [options.where] Accepts "left" or "right" to determine where the panel is added
|
* @param {String} [options.where] Accepts "left" or "right" to determine where the panel is added
|
||||||
|
@ -350,7 +352,11 @@ define(function(require, module, exports) {
|
||||||
* @private
|
* @private
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get aml(){ return plugin.getElement(elementName); },
|
get aml(){ return aml; },
|
||||||
|
/**
|
||||||
|
* @property {HTMLElement} container
|
||||||
|
*/
|
||||||
|
get container(){ return aml.$ext; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The area that this panel is a part of.
|
* The area that this panel is a part of.
|
||||||
|
|
|
@ -33,7 +33,7 @@ define(function(require, exports, module) {
|
||||||
// var emit = plugin.getEmitter();
|
// var emit = plugin.getEmitter();
|
||||||
|
|
||||||
var ENABLED = c9.location.indexOf("debug=2") > -1;
|
var ENABLED = c9.location.indexOf("debug=2") > -1;
|
||||||
var HASSDK = c9.location.indexOf("sdk=1") > -1;
|
var HASSDK = c9.location.indexOf("sdk=0") === -1;
|
||||||
|
|
||||||
var loaded = false;
|
var loaded = false;
|
||||||
function load() {
|
function load() {
|
||||||
|
|
|
@ -20,7 +20,7 @@ define(function(require, exports, module) {
|
||||||
var plugin = new Plugin("Ajax.org", main.consumes);
|
var plugin = new Plugin("Ajax.org", main.consumes);
|
||||||
// var emit = plugin.getEmitter();
|
// var emit = plugin.getEmitter();
|
||||||
|
|
||||||
var HASSDK = c9.location.indexOf("sdk=1") > -1;
|
var HASSDK = c9.location.indexOf("sdk=0") === -1;
|
||||||
|
|
||||||
var queue = [];
|
var queue = [];
|
||||||
var installing;
|
var installing;
|
||||||
|
|
|
@ -23,7 +23,7 @@ define(function(require, exports, module) {
|
||||||
// var emit = plugin.getEmitter();
|
// var emit = plugin.getEmitter();
|
||||||
|
|
||||||
var ENABLED = c9.location.indexOf("plugins=0") == -1;
|
var ENABLED = c9.location.indexOf("plugins=0") == -1;
|
||||||
var HASSDK = c9.location.indexOf("sdk=1") > -1;
|
var HASSDK = c9.location.indexOf("sdk=0") === -1;
|
||||||
|
|
||||||
var plugins = options.plugins;
|
var plugins = options.plugins;
|
||||||
var names = [];
|
var names = [];
|
||||||
|
|
|
@ -99,7 +99,8 @@ define(function(require, exports, module) {
|
||||||
});
|
});
|
||||||
// var emit = plugin.getEmitter();
|
// var emit = plugin.getEmitter();
|
||||||
|
|
||||||
var HASSDK = c9.location.indexOf("sdk=1") > -1;
|
var HASSDK = c9.location.indexOf("sdk=0") === -1;
|
||||||
|
var ENABLED = c9.location.indexOf("sdk=1") > -1;
|
||||||
|
|
||||||
var model, datagrid, filterbox;
|
var model, datagrid, filterbox;
|
||||||
var btnUninstall, btnReport, btnReadme, btnCloud9;
|
var btnUninstall, btnReport, btnReadme, btnCloud9;
|
||||||
|
@ -122,14 +123,16 @@ define(function(require, exports, module) {
|
||||||
// updateCommandsFromSettings();
|
// updateCommandsFromSettings();
|
||||||
// }, plugin);
|
// }, plugin);
|
||||||
|
|
||||||
menus.addItemByPath("File/New Plugin", null, 210, plugin);
|
if (ENABLED) {
|
||||||
Object.keys(TEMPLATES).forEach(function(name){
|
menus.addItemByPath("File/New Plugin", null, 210, plugin);
|
||||||
menus.addItemByPath("File/New Plugin/" + TEMPLATES[name], new ui.item({
|
Object.keys(TEMPLATES).forEach(function(name){
|
||||||
onclick: function(){
|
menus.addItemByPath("File/New Plugin/" + TEMPLATES[name], new ui.item({
|
||||||
createNewPlugin(name);
|
onclick: function(){
|
||||||
}
|
createNewPlugin(name);
|
||||||
}), 210, plugin);
|
}
|
||||||
});
|
}), 210, plugin);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var drawn;
|
var drawn;
|
||||||
|
|
|
@ -44,7 +44,7 @@ define(function(require, exports, module) {
|
||||||
var plugin = new Panel("Ajax.org", main.consumes, {
|
var plugin = new Panel("Ajax.org", main.consumes, {
|
||||||
index: options.index || 100,
|
index: options.index || 100,
|
||||||
caption: "Workspace",
|
caption: "Workspace",
|
||||||
elementName: "winFilesViewer",
|
panelCSSClass: "workspace_files",
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
where: options.where || "left"
|
where: options.where || "left"
|
||||||
});
|
});
|
||||||
|
@ -227,7 +227,7 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
// Fetch UI elements
|
// Fetch UI elements
|
||||||
container = plugin.getElement("container");
|
container = plugin.getElement("container");
|
||||||
winFilesViewer = plugin.getElement("winFilesViewer");
|
winFilesViewer = options.aml
|
||||||
|
|
||||||
// Create the Ace Tree
|
// Create the Ace Tree
|
||||||
tree = new Tree(container.$int);
|
tree = new Tree(container.$int);
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
<a:application xmlns:a="http://ajax.org/2005/aml">
|
<a:application xmlns:a="http://ajax.org/2005/aml">
|
||||||
<a:bar id="winFilesViewer" skin="panel-bar" class="workspace_files">
|
<a:button id="btnTreeSettings"
|
||||||
<a:button id="btnTreeSettings"
|
skin="header-btn"
|
||||||
skin="header-btn"
|
class="panel-settings" />
|
||||||
class="panel-settings" />
|
<a:menu id="mnuFilesSettings" />
|
||||||
<a:menu id="mnuFilesSettings" />
|
<a:menu id="mnuCtxTree" />
|
||||||
<a:menu id="mnuCtxTree" />
|
|
||||||
|
<a:bar id="winOpenfiles" class="openfiles" height="10" visible="false" />
|
||||||
<a:bar id="winOpenfiles" class="openfiles" height="10" visible="false" />
|
<a:bar id="container" class="filetree real" focussable="true" contextmenu="mnuCtxTree" />
|
||||||
<a:bar id="container" class="filetree real" focussable="true" contextmenu="mnuCtxTree" />
|
|
||||||
</a:bar>
|
|
||||||
</a:application>
|
</a:application>
|
Ładowanie…
Reference in New Issue