patch from tsbere to use _blank for new windows instead of generated identifiers
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Oct 2010 20:12:58 +0000 (20:12 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 5 Oct 2010 20:12:58 +0000 (20:12 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18182 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/cat/opac.js
Open-ILS/xul/staff_client/chrome/content/util/window.js
Open-ILS/xul/staff_client/server/cat/util.js
Open-ILS/xul/staff_client/server/serial/manage_items.js

index b496f39..d028721 100644 (file)
@@ -497,7 +497,7 @@ function create_mfhd() {
         JSAN.use('util.window'); var win = new util.window();
         win.open(
             xulG.url_prefix(urls.XUL_SERIAL_SELECT_AOU),
-            'sel_bucket_win' + win.window_name_increment(),
+            '_blank',
             'chrome,resizable,modal,centerscreen'
         );
         if (!g.data.create_mfhd_aou) {
@@ -634,7 +634,7 @@ function add_to_bucket() {
     JSAN.use('util.window'); var win = new util.window();
     win.open(
         xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK),
-        'sel_bucket_win' + win.window_name_increment(),
+        '_blank',
         'chrome,resizable,modal,centerscreen',
         {
             record_ids: [ docid ]
index 9d80367..fc1c19a 100644 (file)
@@ -17,18 +17,6 @@ util.window.prototype = {
     // list of documents for debugging.  BROKEN
     'doc_list' : [],    
 
-    // Windows need unique names.  This number helps.
-    'window_name_increment' :  function() {
-        JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
-        if (typeof data.window_name_increment == 'undefined') {
-            data.window_name_increment = 1;
-        } else {
-            data.window_name_increment++;
-        }
-        data.stash('window_name_increment');
-        return data.window_name_increment;
-    },
-
     // This number gets put into the title bar for Top Level menu interface windows
     'appshell_name_increment' : function() {
         JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
@@ -74,7 +62,7 @@ util.window.prototype = {
     'open' : function(url,title,features,my_xulG) {
         netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
         var key;
-        if (!title) title = 'anon' + this.window_name_increment();
+        if (!title) title = '_blank';
         if (!features) features = 'chrome';
         this.error.sdump('D_WIN', 'opening ' + url + ', ' + title + ', ' + features + ' from ' + this.win + '\n');
         var data;
index 64ad0c0..895f51c 100644 (file)
@@ -260,7 +260,7 @@ cat.util.add_copies_to_bucket = function(selection_list) {
     data.stash('cb_temp_copy_ids');
     win.open( 
         xulG.url_prefix(urls.XUL_COPY_BUCKETS_QUICK),
-        'sel_bucket_win' + win.window_name_increment(),
+        '_blank',
         'chrome,resizable,center'
     );
 }
@@ -269,7 +269,7 @@ cat.util.add_titles_to_bucket = function(record_ids) {
     JSAN.use('util.window'); var win = new util.window();
     win.open(
         xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK),
-        'sel_bucket_win' + win.window_name_increment(),
+        '_blank',
         'chrome,resizable,modal,center',
         {
             record_ids: record_ids 
index 7e217ac..756ea5d 100644 (file)
@@ -496,7 +496,7 @@ serial.manage_items.prototype = {
             JSAN.use('util.window'); var win = new util.window();
             win.open(
                 xulG.url_prefix(urls.XUL_SERIAL_SELECT_UNIT),
-                'sel_serial_sunit_win_' + win.window_name_increment(),
+                '_blank',
                 'chrome,resizable,modal,centerscreen'
             );
             if (!g.serial_items_sunit_select) {