Forráskód Böngészése

Move config settings to the relevant plugins

JC Brand 9 éve
szülő
commit
a2b8d04d84

+ 4 - 0
src/converse-controlbox.js

@@ -162,7 +162,11 @@
              */
              */
             var converse = this.converse;
             var converse = this.converse;
             this.updateSettings({
             this.updateSettings({
+                allow_logout: true,
+                default_domain: undefined,
                 show_controlbox_by_default: false,
                 show_controlbox_by_default: false,
+                xhr_user_search: false,
+                xhr_user_search_url: ''
             });
             });
 
 
             var LABEL_CONTACTS = __('Contacts');
             var LABEL_CONTACTS = __('Contacts');

+ 0 - 7
src/converse-core.js

@@ -243,15 +243,11 @@
         // Default configuration values
         // Default configuration values
         // ----------------------------
         // ----------------------------
         this.default_settings = {
         this.default_settings = {
-            allow_chat_pending_contacts: false,
-            allow_contact_removal: true,
             allow_contact_requests: true,
             allow_contact_requests: true,
             allow_dragresize: true,
             allow_dragresize: true,
-            allow_logout: true,
             animate: true,
             animate: true,
             authentication: 'login', // Available values are "login", "prebind", "anonymous".
             authentication: 'login', // Available values are "login", "prebind", "anonymous".
             auto_away: 0, // Seconds after which user status is set to 'away'
             auto_away: 0, // Seconds after which user status is set to 'away'
-            auto_list_rooms: false,
             auto_login: false, // Currently only used in connection with anonymous login
             auto_login: false, // Currently only used in connection with anonymous login
             auto_reconnect: false,
             auto_reconnect: false,
             auto_subscribe: false,
             auto_subscribe: false,
@@ -259,7 +255,6 @@
             bosh_service_url: undefined, // The BOSH connection manager URL.
             bosh_service_url: undefined, // The BOSH connection manager URL.
             csi_waiting_time: 0, // Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
             csi_waiting_time: 0, // Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
             debug: false,
             debug: false,
-            default_domain: undefined,
             expose_rid_and_sid: false,
             expose_rid_and_sid: false,
             forward_messages: false,
             forward_messages: false,
             hide_offline_users: false,
             hide_offline_users: false,
@@ -287,8 +282,6 @@
             websocket_url: undefined,
             websocket_url: undefined,
             xhr_custom_status: false,
             xhr_custom_status: false,
             xhr_custom_status_url: '',
             xhr_custom_status_url: '',
-            xhr_user_search: false,
-            xhr_user_search_url: ''
         };
         };
 
 
         _.extend(this, this.default_settings);
         _.extend(this, this.default_settings);

+ 1 - 0
src/converse-muc.js

@@ -207,6 +207,7 @@
             this.updateSettings({
             this.updateSettings({
                 allow_muc: true,
                 allow_muc: true,
                 auto_join_on_invite: false,  // Auto-join chatroom on invite
                 auto_join_on_invite: false,  // Auto-join chatroom on invite
+                auto_list_rooms: false,
                 hide_muc_server: false,
                 hide_muc_server: false,
                 muc_history_max_stanzas: undefined, // Takes an integer, limits the amount of messages to fetch from chat room's history
                 muc_history_max_stanzas: undefined, // Takes an integer, limits the amount of messages to fetch from chat room's history
                 show_toolbar: true,
                 show_toolbar: true,

+ 2 - 0
src/converse-rosterview.js

@@ -41,6 +41,8 @@
              * loaded by converse.js's plugin machinery.
              * loaded by converse.js's plugin machinery.
              */
              */
             this.updateSettings({
             this.updateSettings({
+                allow_chat_pending_contacts: false,
+                allow_contact_removal: true,
                 show_toolbar: true,
                 show_toolbar: true,
             });
             });