You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/18 11:37:13 UTC

[21/27] brooklyn-ui git commit: use icons for example and docs link

use icons for example and docs link


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/d4d88aab
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/d4d88aab
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/d4d88aab

Branch: refs/heads/master
Commit: d4d88aab92794cf4b2e16cc429ae4dfaac518a94
Parents: 631292f
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Tue Feb 16 16:57:57 2016 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Tue Feb 16 16:57:57 2016 +0000

----------------------------------------------------------------------
 src/main/webapp/assets/js/view/editor.js    | 4 ++++
 src/main/webapp/assets/tpl/editor/page.html | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/d4d88aab/src/main/webapp/assets/js/view/editor.js
----------------------------------------------------------------------
diff --git a/src/main/webapp/assets/js/view/editor.js b/src/main/webapp/assets/js/view/editor.js
index 19e4378..07f68c0 100644
--- a/src/main/webapp/assets/js/view/editor.js
+++ b/src/main/webapp/assets/js/view/editor.js
@@ -63,6 +63,7 @@ define([
             'click #button-switch-app':'switchModeApp',
             'click #button-switch-catalog':'switchModeCatalog',
             'click #button-example':'populateExampleBlueprint',
+            'click #button-docs':'openDocumentation',
         },
         editorTemplate:_.template(EditorHtml),
 
@@ -286,6 +287,9 @@ define([
         populateExampleBlueprint: function() {
             this.editor.setValue(this.mode==MODE_CATALOG ? _DEFAULT_CATALOG : _DEFAULT_BLUEPRINT);
         },
+        openDocumentation: function() {
+            window.open(this.mode==MODE_CATALOG ? "https://brooklyn.apache.org/v/latest/ops/catalog/" : "https://brooklyn.apache.org/v/latest/yaml/yaml-reference.html", "_blank");
+        },
         
         onSubmissionComplete: function(succeeded, data, type) {
             var that = this;

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/d4d88aab/src/main/webapp/assets/tpl/editor/page.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/assets/tpl/editor/page.html b/src/main/webapp/assets/tpl/editor/page.html
index 67bb09c..05b62db 100644
--- a/src/main/webapp/assets/tpl/editor/page.html
+++ b/src/main/webapp/assets/tpl/editor/page.html
@@ -23,7 +23,11 @@ under the License.
                 <h3 style="margin-top: 6px;">Blueprint Composer</h3>
                 <div class="apps-tree-toolbar btn-toolbar" style="margin-top: -24px !important;">
                     <span class="btn-group">
-                    <button id="button-example" class="btn btn-sm" style="margin-right: 12px;">Insert Example</button>
+                    <button id="button-example" class="btn btn-sm fa fa-file-text-o" title="Insert Example"></button>
+                    </span>
+                    
+                    <span class="btn-group">
+                    <button id="button-docs" class="btn btn-sm fa fa-book" title="Open Brooklyn Website Documentation"></button>
                     </span>
                     
                     <!-- no need for this