From c030c97a9d4f3a373755c625c7fb1ed5b1e3df9b Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 5 Oct 2010 20:12:58 +0000 Subject: [PATCH] patch from tsbere to use _blank for new windows instead of generated identifiers 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 | 4 ++-- Open-ILS/xul/staff_client/chrome/content/util/window.js | 14 +------------- Open-ILS/xul/staff_client/server/cat/util.js | 4 ++-- Open-ILS/xul/staff_client/server/serial/manage_items.js | 2 +- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js index b496f3935..d0287219d 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -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 ] diff --git a/Open-ILS/xul/staff_client/chrome/content/util/window.js b/Open-ILS/xul/staff_client/chrome/content/util/window.js index 9d803670a..fc1c19aca 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/window.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/window.js @@ -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; diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index 64ad0c01a..895f51c2d 100644 --- a/Open-ILS/xul/staff_client/server/cat/util.js +++ b/Open-ILS/xul/staff_client/server/cat/util.js @@ -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 diff --git a/Open-ILS/xul/staff_client/server/serial/manage_items.js b/Open-ILS/xul/staff_client/server/serial/manage_items.js index 7e217ac63..756ea5d57 100644 --- a/Open-ILS/xul/staff_client/server/serial/manage_items.js +++ b/Open-ILS/xul/staff_client/server/serial/manage_items.js @@ -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) { -- 2.11.0