\r
_kiwi.app = new _kiwi.model.Application(opts);\r
\r
- if (opts.kiwi_server) {\r
- _kiwi.app.kiwi_server = opts.kiwi_server;\r
- }\r
-\r
// Start the client up\r
_kiwi.app.start();\r
\r
this.server_settings = options[0].server_settings || {};\r
this.translations = options[0].translations || {};\r
\r
- // Best guess at where the kiwi server is\r
- this.detectKiwiServer();\r
+ // Best guess at where the kiwi server is if not already specified\r
+ this.kiwi_server = options[0].kiwi_server || this.detectKiwiServer();\r
\r
// Set any default settings before anything else is applied\r
if (this.server_settings && this.server_settings.client && this.server_settings.client.settings) {\r
this.detectKiwiServer = function () {\r
// If running from file, default to localhost:7777 by default\r
if (window.location.protocol === 'file:') {\r
- this.kiwi_server = 'http://localhost:7778';\r
+ return 'http://localhost:7778';\r
} else {\r
// Assume the kiwi server is on the same server\r
- this.kiwi_server = window.location.protocol + '//' + window.location.host;\r
+ return window.location.protocol + '//' + window.location.host;\r
}\r
};\r
\r