cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [2/2] git commit: updated refs/heads/4.2 to 31e8e1c
Date Mon, 05 Aug 2013 22:26:38 GMT
CLOUDSTACK-4077: Fix refresh issue; localization labels

-Localize labels for event/alerts

-Fix UI refresh issue when performing delete/archive actions


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

Branch: refs/heads/4.2
Commit: 31e8e1c66c7937b878402000c5bb4ed3d5194357
Parents: 23f5a84
Author: Brian Federle <brian.federle@citrix.com>
Authored: Mon Aug 5 15:26:12 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Mon Aug 5 15:26:31 2013 -0700

----------------------------------------------------------------------
 .../classes/resources/messages.properties       |   8 ++
 ui/dictionary.jsp                               |   8 ++
 ui/scripts/events.js                            | 108 +++++--------------
 3 files changed, 44 insertions(+), 80 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/31e8e1c6/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 41284f1..4fc09ee 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -14,6 +14,14 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+label.delete.events=Delete events
+label.delete.alerts=Delete alerts
+label.archive.alerts=Archive alerts
+label.archive.events=Archive events
+label.by.alert.type=By alert type
+label.by.event.type=By event type
+label.by.date.start=By date (start)
+label.by.date.end=By date (end)
 label.switch.type=Switch Type
 label.service.state=Service State
 label.egress.default.policy=Egress Default Policy

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/31e8e1c6/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index 394700c..3dfdefe 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -25,6 +25,14 @@ under the License.
 <% long now = System.currentTimeMillis(); %>
 <script language="javascript">
 dictionary = {
+'label.delete.events': '<fmt:message key="label.delete.events" />',
+'label.delete.alerts': '<fmt:message key="label.delete.alerts" />',
+'label.archive.events': '<fmt:message key="label.archive.events" />',
+'label.archive.alerts': '<fmt:message key="label.archive.alerts" />',
+'label.by.alert.type': '<fmt:message key="label.by.alert.type" />',
+'label.by.event.type': '<fmt:message key="label.by.event.type" />',
+'label.by.date.start': '<fmt:message key="label.by.date.start" />',
+'label.by.date.end': '<fmt:message key="label.by.date.end" />',
 'label.switch.type': '<fmt:message key="label.switch.type" />',
 'label.service.state': '<fmt:message key="label.service.state" />',
 'label.egress.default.policy': '<fmt:message key="label.egress.default.policy" />',

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/31e8e1c6/ui/scripts/events.js
----------------------------------------------------------------------
diff --git a/ui/scripts/events.js b/ui/scripts/events.js
index d2e9aa4..46d45c0 100644
--- a/ui/scripts/events.js
+++ b/ui/scripts/events.js
@@ -59,29 +59,29 @@
                     actions: {
                         // Remove multiple events
                         remove: {
-                            label: 'Delete Events',
+                            label: 'label.delete.events',
                             isHeader: true,
                             addRow: false,
                             messages: {
                                 notification: function(args) {
-                                    return 'Events Deleted';
+                                    return 'label.delete.events';
                                 }
                             },
                             createForm: {
-                                title: 'Delete Events',
+                                title: 'label.delete.events',
                                 desc: '',
                                 fields: {
                                     type: {
-                                        label: 'By event type',
+                                        label: 'label.by.event.type',
                                         docID: 'helpEventsDeleteType'
                                     },
                                     startdate: {
-                                        label: 'By date (start date)',
+                                        label: 'label.by.date.start',
                                         docID: 'helpEventsDeleteDate',
                                         isDatepicker: true
                                     },
                                     enddate: {
-                                        label: 'By date (end date)',
+                                        label: 'label.by.date.end',
                                         docID: 'helpEventsDeleteDate',
                                         isDatepicker: true
                                     }
@@ -107,48 +107,40 @@
                                     });
 
                                 $.ajax({
-
                                     url: createURL("deleteEvents"),
                                     data: data,
-                                    dataType: 'json',
-                                    async: false,
-
                                     success: function(data) {
-
                                         args.response.success();
-
                                     }
                                 });
-                                // Reloads window with events removed
-                                $(window).trigger('cloudStack.fullRefresh');
                             }
                         },
 
                         // Archive multiple events
                         archive: {
-                            label: 'Archive Events',
+                            label: 'label.archive.events',
                             isHeader: true,
                             addRow: false,
                             messages: {
                                 notification: function(args) {
-                                    return 'Archive events';
+                                    return 'label.archive.events';
                                 }
                             },
                             createForm: {
-                                title: 'Archive Events',
+                                title: 'label.archive.events',
                                 desc: '',
                                 fields: {
                                     type: {
-                                        label: 'By event type',
+                                        label: 'label.by.event.type',
                                         docID: 'helpEventsArchiveType'
                                     },
                                     startdate: {
-                                        label: 'By date (start date)',
+                                        label: 'label.by.date.start',
                                         docID: 'helpEventsArchiveDate',
                                         isDatepicker: true
                                     },
                                     enddate: {
-                                        label: 'By date (end date)',
+                                        label: 'label.by.date.end',
                                         docID: 'helpEventsArchiveDate',
                                         isDatepicker: true
                                     }
@@ -173,21 +165,16 @@
                                     });
 
                                 $.ajax({
-
                                     url: createURL("archiveEvents"),
                                     data: data,
                                     dataType: 'json',
                                     async: false,
 
                                     success: function(data) {
-
                                         args.response.success();
-
                                     }
                                 });
 
-                                // Reloads window with events removed
-                                $(window).trigger('cloudStack.fullRefresh');
                             }
                         }
 
@@ -269,17 +256,6 @@
                                     return true;
                             }
                         }
-                        /*
-						             ,
-                         startdate: {
-                         label: 'Start Date',
-							           isDatepicker: true
-                         },
-                         enddate: {
-                         label: 'End Date',
-							           isDatepicker: true
-                         }
-                         */
                     },
 
                     dataProvider: function(args) {
@@ -317,9 +293,8 @@
                                     $.ajax({
                                         url: createURL("deleteEvents&ids=" + args.context.events[0].id),
                                         success: function(json) {
-
                                             args.response.success();
-
+                                            $(window).trigger('cloudStack.fullRefresh');
                                         }
 
                                     });
@@ -342,16 +317,10 @@
                                     $.ajax({
                                         url: createURL("archiveEvents&ids=" + args.context.events[0].id),
                                         success: function(json) {
-
                                             args.response.success();
-
+                                            $(window).trigger('cloudStack.fullRefresh');
                                         }
-
                                     });
-
-
-                                    // Reloads window with item archived
-                                    $(window).trigger('cloudStack.fullRefresh');
                                 }
                             }
                         },
@@ -428,29 +397,29 @@
                     actions: {
                         // Remove multiple Alerts
                         remove: {
-                            label: 'Delete Alerts',
+                            label: 'label.delete.alerts',
                             isHeader: true,
                             addRow: false,
                             messages: {
                                 notification: function(args) {
-                                    return 'Alerts Deleted';
+                                    return 'label.delete.alerts';
                                 }
                             },
                             createForm: {
-                                title: 'Delete Alerts',
+                                title: 'label.delete.alerts',
                                 desc: '',
                                 fields: {
                                     type: {
-                                        label: 'By Alert type',
+                                        label: 'label.by.alert.type',
                                         docID: 'helpAlertsDeleteType'
                                     },
                                     startdate: {
-                                        label: 'By date (start date)',
+                                        label: 'label.by.date.start',
                                         docID: 'helpAlertsDeleteDate',
                                         isDatepicker: true
                                     },
                                     enddate: {
-                                        label: 'By date (end than)',
+                                        label: 'label.by.date.end',
                                         docID: 'helpAlertsDeleteDate',
                                         isDatepicker: true
                                     }
@@ -476,48 +445,43 @@
                                     });
 
                                 $.ajax({
-
                                     url: createURL("deleteAlerts"),
                                     data: data,
                                     dataType: 'json',
                                     async: false,
 
                                     success: function(data) {
-
                                         args.response.success();
-
                                     }
                                 });
-                                // Reloads window with events removed
-                                $(window).trigger('cloudStack.fullRefresh');
                             }
                         },
 
                         // Archive multiple Alerts
                         archive: {
-                            label: 'Archive Alerts',
+                            label: 'label.archive.alerts',
                             isHeader: true,
                             addRow: false,
                             messages: {
                                 notification: function(args) {
-                                    return 'Alerts Archived';
+                                    return 'label.archive.alerts';
                                 }
                             },
                             createForm: {
-                                title: 'Archive Alerts',
+                                title: 'label.archive.alerts',
                                 desc: '',
                                 fields: {
                                     type: {
-                                        label: 'By Alert type',
+                                        label: 'label.by.alert.type',
                                         docID: 'helpAlertsArchiveType'
                                     },
                                     startdate: {
-                                        label: 'By date (start date)',
+                                        label: 'label.by.date.start',
                                         docID: 'helpAlertsArchiveDate',
                                         isDatepicker: true
                                     },
                                     enddate: {
-                                        label: 'By date (end date)',
+                                        label: 'label.by.date.end',
                                         docID: 'helpAlertsArchiveDate',
                                         isDatepicker: true
                                     }
@@ -543,24 +507,17 @@
                                     });
 
                                 $.ajax({
-
                                     url: createURL("archiveAlerts"),
                                     data: data,
                                     dataType: 'json',
                                     async: false,
 
                                     success: function(data) {
-
                                         args.response.success();
-
                                     }
                                 });
-
-                                // Reloads window with events removed
-                                $(window).trigger('cloudStack.fullRefresh');
                             }
                         }
-
                     },
 
                     dataProvider: function(args) {
@@ -599,13 +556,10 @@
                                     $.ajax({
                                         url: createURL("deleteAlerts&ids=" + args.context.alerts[0].id),
                                         success: function(json) {
-
                                             args.response.success();
-
+                                            $(window).trigger('cloudStack.fullRefresh');
                                         }
-
                                     });
-                                    $(window).trigger('cloudStack.fullRefresh');
 
                                 }
                             },
@@ -625,16 +579,10 @@
                                     $.ajax({
                                         url: createURL("archiveAlerts&ids=" + args.context.alerts[0].id),
                                         success: function(json) {
-
                                             args.response.success();
-
+                                            $(window).trigger('cloudStack.fullRefresh');
                                         }
-
                                     });
-
-
-                                    // Reloads window with item archived
-                                    $(window).trigger('cloudStack.fullRefresh');
                                 }
                             }
 


Mime
View raw message