incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: CS-14010
Date Mon, 11 Jun 2012 18:41:14 GMT
Updated Branches:
  refs/heads/master 59f7cd412 -> 815f55d91


CS-14010

Add 'about' dialog to the CloudStack top header, showing current verison
information.

Patch submitted by: oyla.smola@gmail.com
Reviewed-by: brian

Conflicts:

	ui/scripts/ui/core.js


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/815f55d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/815f55d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/815f55d9

Branch: refs/heads/master
Commit: 815f55d9167d1b65706e98b4b44cfb182264572c
Parents: 59f7cd4
Author: bfederle <bfederle@gmail.com>
Authored: Mon Jun 11 11:11:20 2012 -0700
Committer: bfederle <bfederle@gmail.com>
Committed: Mon Jun 11 11:40:55 2012 -0700

----------------------------------------------------------------------
 ui/css/cloudstack3.css        |  101 ++++++++++++++++++++++--------------
 ui/scripts/cloudStack.js      |    4 ++
 ui/scripts/sharedFunctions.js |    1 +
 ui/scripts/ui/core.js         |   27 +++++++++-
 4 files changed, 92 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/815f55d9/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index d7e70f7..ffa0aeb 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -351,6 +351,68 @@ body.login {
   background: #FFFFFF;
 }
 
+/*About dialog*/
+.dialog-about .ui-widget-content {
+  padding-left: 0;
+  padding-right: 0;
+  width: 100% !important;
+}
+
+.dialog-about .logo {
+  font-size: 26px;
+  color: #636363;
+  padding-top: 20px;
+}
+
+.dialog-about .version {
+  font-size: 12px;
+  padding-top: 10px;
+}
+
+.dialog-about .ui-button {
+  float: none;
+  margin: 0 auto;
+}
+
+#browser div.panel div.detail-view .toolbar {
+  width: 594px;
+}
+
+div.list-view table tbody td span {
+  display: block;
+  float: left;
+  max-width: 210px;
+  word-wrap: break-word;
+  text-indent: 0;
+  margin-left: 12px;
+  line-height: 15px;
+  overflow: auto;
+  overflow-x: hidden;
+}
+
+div.list-view div.toolbar div.section-switcher div.section-select label {
+  margin: 0 9px 0 0;
+}
+
+.loading-overlay {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0px;
+  top: 0px;
+  background: #F2F2F2 url(../images/ajax-loader.gif) no-repeat center;
+  z-index: 500;
+  /*+opacity:70%;*/
+  filter: alpha(opacity=70);
+  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
+  -moz-opacity: 0.7;
+  opacity: 0.7;
+}
+
+.detail-view .ui-tabs-panel .loading-overlay {
+  background-position: 50% 250px;
+}
+
 /*Install wizard*/
 .install-wizard {
   width: 1024px;
@@ -1579,45 +1641,6 @@ div.details div.detail-group td.value input[type=text] {
   width: 93%;
 }
 
-#browser div.panel div.detail-view .toolbar {
-  width: 594px;
-}
-
-div.list-view table tbody td span {
-  display: block;
-  float: left;
-  max-width: 210px;
-  word-wrap: break-word;
-  text-indent: 0;
-  margin-left: 12px;
-  line-height: 15px;
-  overflow: auto;
-  overflow-x: hidden;
-}
-
-div.list-view div.toolbar div.section-switcher div.section-select label {
-  margin: 0 9px 0 0;
-}
-
-.loading-overlay {
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  left: 0px;
-  top: 0px;
-  background: #F2F2F2 url(../images/ajax-loader.gif) no-repeat center;
-  z-index: 500;
-  /*+opacity:70%;*/
-  filter: alpha(opacity=70);
-  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
-  -moz-opacity: 0.7;
-  opacity: 0.7;
-}
-
-.detail-view .ui-tabs-panel .loading-overlay {
-  background-position: 50% 250px;
-}
-
 /*** Actions*/
 div.detail-group.actions {
   padding: 0;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/815f55d9/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 1ea0b16..c528a15 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -132,6 +132,8 @@
 						
 						g_userProjectsEnabled = json.listcapabilitiesresponse.capability.allowusercreateprojects;
             $.cookie('userProjectsEnabled', g_userProjectsEnabled, { expires: 1 });
+			
+            g_cloudstackversion = json.listcapabilitiesresponse.capability.cloudstackversion;
 						
             userValid = true;
           },
@@ -243,6 +245,8 @@
 
                 g_userProjectsEnabled = json.listcapabilitiesresponse.capability.allowusercreateprojects;
                 $.cookie('userProjectsEnabled', g_userProjectsEnabled, { expires: 1 });
+				
+                g_cloudstackversion = json.listcapabilitiesresponse.capability.cloudstackversion;
 
                 args.response.success({
                   data: {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/815f55d9/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index c0c6f21..e7d2aeb 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -21,6 +21,7 @@ var g_timezoneoffset = null;
 var g_timezone = null;
 var g_supportELB = null;
 var g_userPublicTemplateEnabled = "true";
+var g_cloudstackversion = null;
 
 //keyboard keycode
 var keycode_Enter = 13;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/815f55d9/ui/scripts/ui/core.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/core.js b/ui/scripts/ui/core.js
index 5a1b229..ac691eb 100644
--- a/ui/scripts/ui/core.js
+++ b/ui/scripts/ui/core.js
@@ -255,8 +255,9 @@
 
     // User options
     var $options = $('<div>').attr({ id: 'user-options' })
-          .appendTo($container.find('#header'));
-    $(['label.logout', 'label.help']).each(function() {
+          .appendTo($('#header'));
+    
+    $(['label.logout', 'label.help', 'About']).each(function() {
       var $link = $('<a>')
             .attr({ href: '#' })
             .html(_l(this.toString()))
@@ -267,6 +268,28 @@
           var helpURL = 'http://docs.cloud.com/CloudStack_Documentation';
 
           window.open(helpURL, '_blank');
+          
+          return false;
+        });
+      }
+      if (this == 'About') {
+        $link.click(function() {
+          var $logo = $('<div>').addClass('logo').html('CloudStack'),
+          $version = $('<div>').addClass('version').html(g_cloudstackversion),
+          $about = $('<div>').addClass('about').append($logo).append($version);
+          $about.dialog({
+            modal: true,
+            width: 300,
+            title: 'About CloudStack',
+            closeOnEscape: false,
+            dialogClass: 'dialog-about',
+            buttons: {
+              'Close': function() {
+                $( this ).dialog( "close" );
+                $(':ui-dialog, .overlay').remove();
+              }
+            }
+          }).closest('.ui-dialog').overlay();
 
           return false;
         });


Mime
View raw message