prevents js error when doubleclicking disabled app
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 3 Sep 2015 07:56:18 +0000 (09:56 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 4 Sep 2015 08:49:59 +0000 (10:49 +0200)
... in Admin/Applications

Change-Id: I577c23bac8096c1937a7ce8773f93b9e02f1f4a1
Reviewed-on: http://gerrit.tine20.com/customers/2163
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Admin/js/Applications.js

index 31c3456..b9712fc 100644 (file)
@@ -48,7 +48,7 @@ Tine.Admin.Applications.Main = function() {
                 'update': (Tine[appName].AdminPanel.onUpdate) ? Tine[appName].AdminPanel.onUpdate : Ext.emptyFn
             }
         });
-    }
+    };
 
     var _enableDisableButtonHandler = function(state) {
         var applicationIds = new Array();
@@ -336,8 +336,8 @@ Tine.Admin.Applications.Main = function() {
                  * Return CSS class to apply to rows depending upon flags
                  * - checks Flagged, Deleted and Seen
                  * 
-                 * @param {} record
-                 * @param {} index
+                 * @param {Object} record
+                 * @param {Integer} index
                  * @return {String}
                  */
                 getRowClass: function(record, index) {
@@ -378,12 +378,10 @@ Tine.Admin.Applications.Main = function() {
         
         grid_applications.on('rowdblclick', function(grid, index, e) {
             var record = grid.getStore().getAt(index);
-            if (Tine[record.data.name].AdminPanel && record.data.status == 'enabled') {
+            if (record.data.status == 'enabled' && Tine[record.data.name] && Tine[record.data.name].AdminPanel) {
                 _openSettingsWindow(record.data.name);
             }
         }, this);
-          
-        return;
     };
     
     // public functions and variables