[open-ils-commits] r14396 - trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Oct 13 02:57:26 EDT 2009


Author: phasefx
Date: 2009-10-13 02:57:22 -0400 (Tue, 13 Oct 2009)
New Revision: 14396

Modified:
   trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
Log:
Tweak the key used for oils_persist so that saved settings will survive staff client BUILD_ID changes.

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js	2009-10-13 05:23:50 UTC (rev 14395)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js	2009-10-13 06:57:22 UTC (rev 14396)
@@ -56,7 +56,8 @@
             var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
             var nodes = document.getElementsByAttribute('oils_persist','*');
             for (var i = 0; i < nodes.length; i++) {
-                var base_key = 'oils_persist_' + String(location.hostname + location.pathname + '_' + nodes[i].getAttribute('id')).replace('/','_','g') + '_';
+                var filename = location.pathname.split('/')[ location.pathname.split('/').length - 1 ];
+                var base_key = 'oils_persist_' + String(location.hostname + '_' + filename + '_' + nodes[i].getAttribute('id')).replace('/','_','g') + '_';
                 var attribute_list = nodes[i].getAttribute('oils_persist').split(' ');
                 for (var j = 0; j < attribute_list.length; j++) {
                     var key = base_key + attribute_list[j];



More information about the open-ils-commits mailing list