Skip to content

Commit

Permalink
make default config file configureable
Browse files Browse the repository at this point in the history
  • Loading branch information
green3g committed Mar 3, 2017
1 parent d6f840a commit 1ee3e7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion viewer/js/viewer/_ConfigMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ define([
) {

return declare(null, {

// the default name of the config file to load if ?config=configName
// is not specified
defaultConfig: 'viewer',
loadConfig: function (wait) {

// this will be used to make any inherited methods 'wait'
Expand Down Expand Up @@ -49,7 +53,7 @@ define([
initConfigAsync: function () {
var returnDeferred = new Deferred();
// get the config file from the url if present
var file = 'config/viewer',
var file = 'config/' + this.defaultConfig,
s = window.location.search,
q = s.match(/config=([^&]*)/i);
if (q && q.length > 0) {
Expand Down

0 comments on commit 1ee3e7f

Please sign in to comment.