Save MARC Default Template per-server
authorThomas Berezansky <tsbere@mvlc.org>
Wed, 14 Sep 2011 17:58:27 +0000 (13:58 -0400)
committerDan Scott <dscott@laurentian.ca>
Mon, 17 Oct 2011 17:32:53 +0000 (13:32 -0400)
In case you use multiple servers with different template lists

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/xul/staff_client/server/cat/marc_new.xul

index 859f410..7a9209d 100644 (file)
@@ -66,7 +66,7 @@
                 if (typeof templates.ilsevent != 'undefined') throw(templates);
                 var default_template;
                 g.prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
-                var default_template_key = 'oils.marc_new.default_template';
+                var default_template_key = 'oils.marc_new.default_template.' + window.location.hostname;
                 if(g.data.last_marc_template) default_template = g.data.last_marc_template;
                 if(!default_template) {
                     var has_key = g.prefs.prefHasUserValue(default_template_key);