incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [26/29] git commit: refs/heads/master - List view: Subselect UI: Fixes
Date Thu, 14 Mar 2013 17:57:53 GMT
List view: Subselect UI: Fixes

-Split subselect options into 2 subcategories, 'label' and 'dataProvider'

-Localize subselect label


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

Branch: refs/heads/master
Commit: 7566424a0b9dc233b30eeba4c8be1777b7971fa1
Parents: 70164aa
Author: Brian Federle <brian.federle@citrix.com>
Authored: Wed Mar 13 11:05:20 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Wed Mar 13 11:05:50 2013 -0700

----------------------------------------------------------------------
 .../WEB-INF/classes/resources/messages.properties  |    1 +
 ui/dictionary.jsp                                  |    1 +
 ui/scripts/network.js                              |   10 ++++++++--
 ui/scripts/ui/widgets/listView.js                  |    4 ++--
 4 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7566424a/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index d167a5c..f0b6b36 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -17,6 +17,7 @@
 
 
 #new labels (begin) **********************************************************************************************
+label.use.vm.ip=Use VM IP:
 label.menu.regions=Regions
 label.region=Region
 label.add.region=Add Region

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7566424a/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index 3aecaaa..6c06a10 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -25,6 +25,7 @@ under the License.
 <% long now = System.currentTimeMillis(); %>
 <script language="javascript">
 dictionary = {
+'label.use.vm.ip': '<fmt:message key="label.use.vm.ip"/>',
 'label.add.region': '<fmt:message key="label.add.region"/>',
 'label.remove.region': '<fmt:message key="label.remove.region"/>',
 'message.remove.region': '<fmt:message key="message.remove.region"/>',

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7566424a/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 55f3523..b4e50db 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1682,7 +1682,10 @@
                     listView: $.extend(true, {}, cloudStack.sections.instances, {
                       listView: {
                         filters: false,
-                        subselect: instanceSecondaryIPSubselect,
+                        subselect: {
+                          label: 'label.use.vm.ip',
+                          dataProvider: instanceSecondaryIPSubselect
+                        },
                         dataProvider: function(args) {
                           var data = {
                             page: args.page,
@@ -3025,7 +3028,10 @@
                     listView: $.extend(true, {}, cloudStack.sections.instances, {
                       listView: {
                         filters: false,
-                        subselect: instanceSecondaryIPSubselect,
+                        subselect: {
+                          label: 'label.use.vm.ip',
+                          dataProvider: instanceSecondaryIPSubselect
+                        },
                         dataProvider: function(args) {
                           var networkid;
 													if('vpc' in args.context) 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7566424a/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index a8f2ddb..76ce526 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -1048,7 +1048,7 @@
       if (subselect) {
         var $td = $tr.find('td.first');
         var $select = $('<div></div>').addClass('subselect').append(
-          $('<span>').html('Use IP:'),
+          $('<span>').html(_l(subselect.label)),
           $('<select>')
         ).hide();
         var $selectionArea = $tr.find('td:last').find('input');
@@ -1059,7 +1059,7 @@
         $selectionArea.change(function() {
           if ($(this).is(':checked')) {
             // Populate data
-            subselect({
+            subselect.dataProvider({
               context: $.extend(true, {}, options.context, {
                 instances: [$tr.data('json-obj')]
               }),


Mime
View raw message