kopia lustrzana https://github.com/c9/core
Disable new plugin menu item when not sdk=1
rodzic
bc2af84013
commit
9c6188fd38
|
@ -353,6 +353,10 @@ define(function(require, module, exports) {
|
|||
* @readonly
|
||||
*/
|
||||
get aml(){ return aml; },
|
||||
/**
|
||||
* @property {HTMLElement} container
|
||||
*/
|
||||
get container(){ return aml.$ext; },
|
||||
|
||||
/**
|
||||
* The area that this panel is a part of.
|
||||
|
|
|
@ -100,6 +100,7 @@ define(function(require, exports, module) {
|
|||
// var emit = plugin.getEmitter();
|
||||
|
||||
var HASSDK = c9.location.indexOf("sdk=0") === -1;
|
||||
var ENABLED = c9.location.indexOf("sdk=1") > -1;
|
||||
|
||||
var model, datagrid, filterbox;
|
||||
var btnUninstall, btnReport, btnReadme, btnCloud9;
|
||||
|
@ -122,6 +123,7 @@ define(function(require, exports, module) {
|
|||
// updateCommandsFromSettings();
|
||||
// }, plugin);
|
||||
|
||||
if (ENABLED) {
|
||||
menus.addItemByPath("File/New Plugin", null, 210, plugin);
|
||||
Object.keys(TEMPLATES).forEach(function(name){
|
||||
menus.addItemByPath("File/New Plugin/" + TEMPLATES[name], new ui.item({
|
||||
|
@ -131,6 +133,7 @@ define(function(require, exports, module) {
|
|||
}), 210, plugin);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var drawn;
|
||||
function draw(e) {
|
||||
|
|
Ładowanie…
Reference in New Issue