11 Commits

Author SHA1 Message Date
Brian Federle
48118a4f9c Add license headers to new JS files 2013-02-13 14:59:01 -08:00
Brian Federle
6e02fb96c9 UI Plugins, API call helper: Add 'pollAyncJobResult' helper, allow passing data 2013-02-12 16:10:40 -08:00
Brian Federle
5b8e4b9fd9 UI Plugin API: Implement 'apiCall' helper
Adds a helper method to standardize how plugin writers handle server calls,
without having to directly invoke jQuery.ajax. It will correctly sanitize data
and ensure all required parameters (e.g., session key data) are passed.
2013-02-12 15:21:29 -08:00
Brian Federle
690dd66d3e UI plugin: Show custom icon
Show custom icon '<pluginName>/icon.png' on side nav bar (if plugin
added new section), and on plugin listing.
2013-01-29 16:05:48 -08:00
Brian Federle
0f6eb2f53d UI plugins: Add localization strings 2013-01-29 15:36:02 -08:00
Brian Federle
806105f9a1 UI plugins: Dynamically load CSS
Adds a CSS file <pluginName>.css to the plugin structure, which allows
developer to specify custom CSS to be loaded after their JS code.
2013-01-29 13:56:36 -08:00
Brian Federle
1a3ea28243 UI plugins API: addSection method
Adds 'addSection' method to UI plugins, which will add a new top-level
section. It follows the same syntax used by the existing sections in
the UI.
2012-12-20 13:27:37 -08:00
Brian Federle
347ac311a0 UI Plugin: Use new format
Define plugins as namespaced objects instead of as function calls. This
is easier to implement and manage by the framework.

New format changes for defining plugins:

Now create 2 JS files in plugin folder:
  -config.js
  -[pluginName].js

plugins.js (listing) format:

  cloudStack.plugins = [
    'testPlugin'
  ];

config.js format:

  cloudStack.plugins.testPlugin.config = {
    title: 'Test Plugin',
    desc: 'Sample plugin'
  };

[pluginName].js format:

  cloudStack.plugins.testPlugin = function(plugin) {
    //
    // Plugin code goes here
    //
  };
2012-12-20 11:55:44 -08:00
Brian Federle
59c77b4850 Add plugin loading functionality and basic framework
Dynamically load UI plugins via require.js

Plugin code uses the following format:

(function (cloudStack) {
  var testPlugin1 = function(plugin) {
    // Plugin code goes here
  };

  cloudStack.plugin({
    id: 'testPlugin1',
    title: 'Test Plugin 1',
    desc: 'Sample plugin 1',
    load: testPlugin1
  });
}(cloudStack));
2012-12-19 15:47:25 -08:00
Brian Federle
f0a6e86e14 Add/style basic plugin listing 2012-12-19 15:04:47 -08:00
Brian Federle
bd9bedac8a Fix path for plugins.js 2012-12-19 14:03:31 -08:00