Updated Branches:
  refs/heads/master b0c11fdda -> 73326f9a1

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/73326f9a/components/org.apache.stratos.manager.console/themes/theme1/ui/font-awesome/fonts/fontawesome-webfont.ttf
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.manager.console/themes/theme1/ui/font-awesome/fonts/fontawesome-webfont.ttf
 
b/components/org.apache.stratos.manager.console/themes/theme1/ui/font-awesome/fonts/fontawesome-webfont.ttf
new file mode 100644
index 0000000..e89738d
Binary files /dev/null and 
b/components/org.apache.stratos.manager.console/themes/theme1/ui/font-awesome/fonts/fontawesome-webfont.ttf
 differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/73326f9a/components/org.apache.stratos.manager.console/themes/theme1/ui/font-awesome/fonts/fontawesome-webfont.woff
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.manager.console/themes/theme1/ui/font-awesome/fonts/fontawesome-webfont.woff
 
b/components/org.apache.stratos.manager.console/themes/theme1/ui/font-awesome/fonts/fontawesome-webfont.woff
new file mode 100644
index 0000000..8c1748a
Binary files /dev/null and 
b/components/org.apache.stratos.manager.console/themes/theme1/ui/font-awesome/fonts/fontawesome-webfont.woff
 differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/73326f9a/components/org.apache.stratos.manager.console/themes/theme1/ui/js/configure_stratos.js
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.manager.console/themes/theme1/ui/js/configure_stratos.js
 
b/components/org.apache.stratos.manager.console/themes/theme1/ui/js/configure_stratos.js
new file mode 100644
index 0000000..3a277a6
--- /dev/null
+++ 
b/components/org.apache.stratos.manager.console/themes/theme1/ui/js/configure_stratos.js
@@ -0,0 +1,38 @@
+$(function () {
+    $('pre').each(function () {
+        var jsonStr = $(this).html();
+        jsonStr = jsonStr.replace(/\'/g, '\"');
+        var obj = jQuery.parseJSON(jsonStr);
+        jsonStr = JSON.stringify(obj, undefined, 2);
+        $('textarea', $(this).parent()).val(jsonStr);
+        $(this).html(syntaxHighlight(jsonStr));
+    });
+    $('.js_jsonEdit').click(function () {
+        var $container = $(this).parent();
+        $(this).hide();
+        var preHeight = $('pre', $container).height();
+        $('.js_jsonEdit', $container).hide();
+        $('pre', $container).hide();
+        $('textarea', $container).show().height(preHeight);
+        $('.js_jsonCancel', $container).show();
+        $('.js_jsonSave', $container).show();
+    });
+    $('.js_jsonSave').click(function () {
+        alert('save - ' + $('textarea', $(this).parent()).val())
+    });
+    $('.js_jsonCancel').click(function () {
+        var $container = $(this).parent();
+        $('.js_jsonEdit', $container).show();
+        $('pre', $container).show();
+        $('textarea', $container).hide();
+        $('.js_jsonCancel', $container).hide();
+        $('.js_jsonSave', $container).hide();
+    });
+    $('.js_handle_click').click(function(event){
+        event.preventDefault();
+        $('#addItemSection').show('fast');
+    });
+    $('#deployPolicy').click(function(){
+        alert('saving ' + $('#policy').val());
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/73326f9a/components/org.apache.stratos.manager.console/themes/theme1/ui/js/utils.js
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.manager.console/themes/theme1/ui/js/utils.js 
b/components/org.apache.stratos.manager.console/themes/theme1/ui/js/utils.js
new file mode 100644
index 0000000..528fdd1
--- /dev/null
+++ b/components/org.apache.stratos.manager.console/themes/theme1/ui/js/utils.js
@@ -0,0 +1,21 @@
+function syntaxHighlight(json) {
+    if (typeof json != 'string') {
+        json = JSON.stringify(json, undefined, 2);
+    }
+    json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, 
'&gt;');
+    return 
json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,
 function (match) {
+        var cls = 'number';
+        if (/^"/.test(match)) {
+            if (/:$/.test(match)) {
+                cls = 'key';
+            } else {
+                cls = 'string';
+            }
+        } else if (/true|false/.test(match)) {
+            cls = 'boolean';
+        } else if (/null/.test(match)) {
+            cls = 'null';
+        }
+        return '<span class="' + cls + '">' + match + '</span>';
+    });
+}
\ No newline at end of file

Reply via email to