From 7727d184847195d792df2edcedd16d8653a545ec Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 7 Jan 2010 23:09:22 +0000 Subject: [PATCH] Backport changesets 15235, 15265, 15269, 15270: removes some "speedbump" dialog boxes fixes dojo column picker fixes checkbox in vandelay queues fixes marc editor in acquisitions git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@15277 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/GridColumnPicker.js | 2 +- .../web/js/dojo/openils/widget/GridColumnPicker.js | 4 +- Open-ILS/web/js/ui/default/acq/common/li_table.js | 43 +++++++++++----------- Open-ILS/web/js/ui/default/vandelay/vandelay.js | 2 +- .../xul/staff_client/server/cat/copy_editor.js | 2 - Open-ILS/xul/staff_client/server/cat/marc_new.xul | 1 - Open-ILS/xul/staff_client/server/cat/util.js | 1 - .../server/locale/en-US/cat.properties | 3 -- 8 files changed, 25 insertions(+), 33 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/GridColumnPicker.js b/Open-ILS/web/js/dojo/openils/GridColumnPicker.js index 947601f5d9..3d00dda3bb 100644 --- a/Open-ILS/web/js/dojo/openils/GridColumnPicker.js +++ b/Open-ILS/web/js/dojo/openils/GridColumnPicker.js @@ -30,7 +30,7 @@ if(!dojo._hasResource["openils.GridColumnPicker"]) { this.dialog = dialog; this.grid = grid; this.structure = structure; - this.dialogTable = dialog.domNode.getElementsByTagName('tbody')[0]; + this.dialogTable = dialog.containerNode.getElementsByTagName('tbody')[0]; this.baseCellList = this.structure[0].cells[0].slice(); this.build(); this.grid.model.fields.get(0).sort = false; diff --git a/Open-ILS/web/js/dojo/openils/widget/GridColumnPicker.js b/Open-ILS/web/js/dojo/openils/widget/GridColumnPicker.js index e00823ea1d..377b934a90 100644 --- a/Open-ILS/web/js/dojo/openils/widget/GridColumnPicker.js +++ b/Open-ILS/web/js/dojo/openils/widget/GridColumnPicker.js @@ -36,7 +36,7 @@ if(!dojo._hasResource["openils.widget.GridColumnPicker"]) { this.structure = structure; if(!structure) this.structure = this.grid.attr('structure'); - this.dialogTable = this.dialog.domNode.getElementsByTagName('tbody')[0]; + this.dialogTable = this.dialog.containerNode.getElementsByTagName('tbody')[0]; this.baseCellList = this.structure[0].cells[0].slice(); this.build(); this.authtoken = authtoken; @@ -61,7 +61,7 @@ if(!dojo._hasResource["openils.widget.GridColumnPicker"]) { "ColumnDisplayAuto Width" + "
" }); - dialog.domNode.appendChild(table); + dialog.containerNode.appendChild(table); var button = new dijit.form.Button({label:'Save'}, dojo.query('[name=save_button]', table)[0]); button.onClick = function() { dialog.hide(); self.update(true); }; diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index 3fa3643e2e..30ac9e2160 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -967,30 +967,29 @@ function AcqLiTable() { if(openils.XUL.isXUL()) { win = window.open('/xul/' + openils.XUL.buildId() + '/server/cat/marcedit.xul'); } else { - win = window.open('/xul/server/cat/marcedit.xul'); - var self = this; - win.xulG = { - record : {marc : li.marc()}, - save : { - label: 'Save Record', // XXX I18N - func: function(xmlString) { - li.marc(xmlString); - fieldmapper.standardRequest( - ['open-ils.acq', 'open-ils.acq.lineitem.update'], - { async: true, - params: [openils.User.authtoken, li], - oncomplete: function(r) { - openils.Util.readResponse(r); - win.close(); - self.drawInfo(li.id()) - } - } - ); - }, - } - }; } + var self = this; + win.xulG = { + record : {marc : li.marc()}, + save : { + label: 'Save Record', // XXX I18N + func: function(xmlString) { + li.marc(xmlString); + fieldmapper.standardRequest( + ['open-ils.acq', 'open-ils.acq.lineitem.update'], + { async: true, + params: [openils.User.authtoken, li], + oncomplete: function(r) { + openils.Util.readResponse(r); + win.close(); + self.drawInfo(li.id()) + } + } + ); + }, + } + }; } this._savePl = function(values) { diff --git a/Open-ILS/web/js/ui/default/vandelay/vandelay.js b/Open-ILS/web/js/ui/default/vandelay/vandelay.js index 92e8981042..262b4fca3e 100644 --- a/Open-ILS/web/js/ui/default/vandelay/vandelay.js +++ b/Open-ILS/web/js/ui/default/vandelay/vandelay.js @@ -735,7 +735,7 @@ function vlQueueGridDrawSelectBox(rowIdx, item) { function vlQueueGridFormatSelectBox(id) { var domId = 'vl-record-list-selected-' + id; - selectableGridRecords[domId] = id; + if (id) { selectableGridRecords[domId] = id; } return "
"; } diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 8227654292..e20113e223 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -1225,8 +1225,6 @@ g.stash_and_close = function() { ); if (typeof r.ilsevent != 'undefined') { g.error.standard_unexpected_error_alert('copy update',r); - } else { - alert($('catStrings').getString('staff.cat.copy_editor.handle_update.success')); } /* FIXME -- revisit the return value here */ } catch(E) { diff --git a/Open-ILS/xul/staff_client/server/cat/marc_new.xul b/Open-ILS/xul/staff_client/server/cat/marc_new.xul index 2b1b1ebc31..13f3351888 100644 --- a/Open-ILS/xul/staff_client/server/cat/marc_new.xul +++ b/Open-ILS/xul/staff_client/server/cat/marc_new.xul @@ -107,7 +107,6 @@ [ ses(), new_marcxml, catStrings.getString('staff.cat.marc_new.system_local.label'), 1 ] ); if (typeof robj.ilsevent != 'undefined') throw(robj); - alert(catStrings.getString('staff.cat.marc_new.record_created.label')); /* Replace tab with OPAC-view of record */ diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index 74facfacdb..938c4b6db8 100644 --- a/Open-ILS/xul/staff_client/server/cat/util.js +++ b/Open-ILS/xul/staff_client/server/cat/util.js @@ -273,7 +273,6 @@ cat.util.spawn_copy_editor = function(params) { params ); if (!my_xulG.copies && params.edit) { - alert(typeof params.no_copies_modified_msg != 'undefined' ? params.no_copies_modified_msg : $("catStrings").getString('staff.cat.util.copy_editor.not_modified')); } else { return my_xulG.copies; } diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties index bfa269ea25..b1f0d6c3c7 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties @@ -137,7 +137,6 @@ staff.cat.copy_editor.copy_count.plural=%1$s copies staff.cat.copy_editor.apply.label=Apply staff.cat.copy_editor.apply.accesskey=A staff.cat.copy_editor.cancel.label=Cancel -staff.cat.copy_editor.handle_update.success=Items were added or modified. staff.cat.copy_editor.handle_update.error=copy update error: staff.cat.copy_editor.add_stat_cat.error=Error adding statistical category to display definition staff.cat.copy_editor.populate_stat_cat.error=Error populating statistical categories for display @@ -236,7 +235,6 @@ staff.cat.marcedit.no_authority_match.label=No matching authority records found staff.cat.marc_new.tab_name=MARC Template staff.cat.marc_new.create_record.label=Create Record staff.cat.marc_new.system_local.label=System Local -staff.cat.marc_new.record_created.label=Record created. staff.cat.marc_new.retrieving.label=Retrieving title... staff.cat.marc_new.creating_record.error=Error creating MARC record. staff.cat.marc_new.loading_template.error=Error loading MARC template: %1$s @@ -331,7 +329,6 @@ staff.cat.util.copy_editor.batch_edit=Batch Edit staff.cat.util.copy_editor.batch_view=Batch View staff.cat.util.copy_editor.edit=Edit staff.cat.util.copy_editor.view=View -staff.cat.util.copy_editor.not_modified=Copies not modified. staff.cat.util.mark_item_damaged.af_message=Action failed. One or more of these items is in a special status such as "Checked Out" or "In Transit" and cannot be changed to the Damaged status. staff.cat.util.mark_item_damaged.af_title=Action failed. staff.cat.util.mark_item_damaged.af_ok_label=OK -- 2.11.0