kopia lustrzana https://github.com/c9/core
				
				
				
			More API improvements
							rodzic
							
								
									af7a410f21
								
							
						
					
					
						commit
						6a4bcaa1f4
					
				|  | @ -83,7 +83,7 @@ | |||
|         "c9.ide.imgeditor": "#08bbc53578", | ||||
|         "c9.ide.immediate": "#e9ba147cc2", | ||||
|         "c9.ide.installer": "#24e7d6f399", | ||||
|         "c9.ide.mount": "#eac3f96d4f", | ||||
|         "c9.ide.mount": "#32e79866ee", | ||||
|         "c9.ide.navigate": "#1ff8b463aa", | ||||
|         "c9.ide.newresource": "#9a7464cc47", | ||||
|         "c9.ide.openfiles": "#28a4f5af16", | ||||
|  |  | |||
|  | @ -391,6 +391,8 @@ define(function(require, exports, module) { | |||
|                 // }
 | ||||
|                  | ||||
|                 if (!baseclass) { | ||||
|                     delete this.baseclass; | ||||
|                     delete this.freezePublicAPI.baseclass; | ||||
|                     delete this.freezePublicAPI; | ||||
|                     delete this.setAPIKey; | ||||
|                     delete this.getEmitter; | ||||
|  | @ -401,6 +403,7 @@ define(function(require, exports, module) { | |||
|                 return this; | ||||
|             }; | ||||
|             var baseclass; | ||||
|             this.baseclass =  | ||||
|             this.freezePublicAPI.baseclass = function(){ baseclass = true; }; | ||||
|              | ||||
|             function getElement(name, callback) { | ||||
|  | @ -611,7 +614,7 @@ define(function(require, exports, module) { | |||
|              | ||||
|             /***** Register and define API *****/ | ||||
|              | ||||
|             this.freezePublicAPI.baseclass(); | ||||
|             this.baseclass(); | ||||
|              | ||||
|             /** | ||||
|              * Base class for all Plugins of Cloud9. A Cloud9 Plugin is | ||||
|  |  | |||
|  | @ -74,11 +74,14 @@ define(function(require, module, exports) { | |||
|             var modal = options.modal; | ||||
|             var zindex = options.zindex; | ||||
|             var allowClose = options.allowClose; | ||||
|             var elements = options.elements; | ||||
|             var elements = options.elements || []; | ||||
|             var resizable = options.resizable || false; | ||||
|             var widths = options.widths || {}; | ||||
|             var count = 0; | ||||
|              | ||||
|             if (custom === undefined) | ||||
|                 custom = !(body || heading); | ||||
|              | ||||
|             var dialog, buttons, titles; | ||||
|              | ||||
|             var loaded; | ||||
|  | @ -148,9 +151,14 @@ define(function(require, module, exports) { | |||
|                 buttons = plugin.getElement("buttons"); | ||||
|                  | ||||
|                 // Create dynamic UI elements
 | ||||
|                 elements.forEach(function(item) { | ||||
|                     createItem(null, null, item); | ||||
|                 }); | ||||
|                 if (elements.length) { | ||||
|                     elements.forEach(function(item) { | ||||
|                         createItem(null, null, item); | ||||
|                     }); | ||||
|                 } | ||||
|                 else { | ||||
|                     buttons.parentNode.removeChild(buttons); | ||||
|                 } | ||||
|                  | ||||
|                 emit.sticky("draw", { | ||||
|                     aml: titles, | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Ruben Daniels
						Ruben Daniels