Hiding new connection/startup app button if in a restricted server mode
authorDarren <darren@darrenwhitlen.com>
Sat, 29 Mar 2014 15:44:13 +0000 (15:44 +0000)
committerDarren <darren@darrenwhitlen.com>
Sat, 29 Mar 2014 15:44:13 +0000 (15:44 +0000)
client/src/views/apptoolbar.js

index 5d4b87b8b96337009008d0ec9c5eb3546e607c1d..b249b1a7f229008c6a2dc7300a6ad380ab716387 100644 (file)
@@ -5,6 +5,10 @@ _kiwi.view.AppToolbar = Backbone.View.extend({
     },
 
     initialize: function () {
+        // Remove the new connection/startup link if the server has disabled server changing
+        if (_kiwi.app.server_settings.connection && !_kiwi.app.server_settings.connection.allow_change) {
+            this.$('.startup').css('display', 'none');
+        }
     },
 
     clickSettings: function (event) {