[open-ils-commits] r11963 - branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Jan 25 23:18:28 EST 2009
Author: phasefx
Date: 2009-01-25 23:18:26 -0500 (Sun, 25 Jan 2009)
New Revision: 11963
Removed:
branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/opac.xul
Log:
This was an earlier experiment that needs to be thrown out
Deleted: branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/opac.xul
===================================================================
--- branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/opac.xul 2009-01-26 04:09:22 UTC (rev 11962)
+++ branches/staff-client-experiment/Open-ILS/xul/staff_client/server/cat/opac.xul 2009-01-26 04:18:26 UTC (rev 11963)
@@ -1,363 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Cataloger's Search Result Screen -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- STYLESHEETS -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
-]>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
-
-<window id="opac_win"
- onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
- <!-- BEHAVIOR -->
- <script type="text/javascript">
- var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- </script>
- <scripts id="openils_util_scripts"/>
-
- <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
- <script>
- <![CDATA[
- function $(id) { return document.getElementById(id); }
- function $w(id,text) { if ($(id)) util.widgets.set_text($(id),text); }
-
- var docid; var marc_html; var top_pane; var bottom_pane; var opac_frame;
- var browser_frame; var browser_obj; var browser_win;
- var editor_obj;
- var holdings_obj;
- var holds_obj;
-
- var iframe_method = 'reset_iframe'; // set_iframe
-
- function my_init() {
- try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
- JSAN.errorLevel = "die"; // none, warn, or die
- JSAN.addRepository('/xul/server/');
- JSAN.use('util.error'); g.error = new util.error();
- g.error.sdump('D_TRACE','my_init() for cat/opac.xul');
-
- JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
- XML_HTTP_SERVER = data.server_unadorned;
-
- JSAN.use('util.network'); g.network = new util.network();
-
- try { authtime = xul_param('authtime'); } catch(E) { g.error.sdump('D_ERROR',E); }
- try { docid = xul_param('docid'); } catch(E) { g.error.sdump('D_ERROR',E); }
- try { opac_url = xul_param('opac_url'); } catch(E) { g.error.sdump('D_ERROR',E); }
-
- JSAN.use('util.deck');
- top_pane = new util.deck('top_pane');
- bottom_pane = new util.deck('bottom_pane');
-
- set_opac();
-
- } catch(E) {
- var err_msg = $("commonStrings").getFormattedString('common.exception', ['cat/opac.xul', E]);
- try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
- alert(err_msg);
- }
- }
-
- function set_brief_view() {
- try {
- var url = xulG.url_prefix( urls.XUL_BIB_BRIEF ); // + '?docid=' + window.escape(docid);
- dump('spawning ' + url + '\n');
- top_pane[iframe_method](
- url,
- {},
- {
- 'docid' : docid,
- 'set_tab_name' : function(n) {
- if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
- try { window.xulG.set_tab_name($("catStrings").getFormattedString('staff.cat.opac.set_tab_name', [n])); } catch(E) { alert(E); }
- } else {
- dump('no set_tab_name\n');
- }
- }
- }
- );
- } catch(E) {
- alert(E);
- }
- }
-
- function set_marc_view() {
- try {
- bottom_pane[iframe_method](
- xulG.url_prefix( urls.XUL_MARC_VIEW ), // + '?docid=' + window.escape(docid),
- {},
- {
- 'docid' : docid,
- }
- );
- } catch(E) {
- alert(E);
- }
- }
-
- function set_marc_edit() {
- try {
- bottom_pane.node.selectedIndex = 1;
- var content_params = {
- 'show_nav_buttons' : false,
- 'show_print_button' : false,
- 'passthru_content_params' : {
- 'record' : { 'url' : '/opac/extras/supercat/retrieve/marcxml/record/' + docid },
- 'save' : {
- 'label' : 'Save Record',
- 'func' : function (new_marcxml) {
- try {
- var r = g.network.simple_request('MARC_XML_RECORD_UPDATE', [ ses(), docid, new_marcxml ]);
- if (typeof r.ilsevent != 'undefined') {
- throw(r);
- } else {
- alert( $("catStrings").getString('staff.cat.opac.set_marc_edit.alert') );
- }
- } catch(E) {
- g.error.standard_unexpected_error_alert( $("catStrings").getString('staff.cat.opac.set_marc_edit.std_unexpected_error'), E );
- }
- }
- },
- },
- 'url' : xulG.url_prefix( urls.XUL_MARC_EDIT ),
- 'name' : 'MarcEditor',
- };
- if (editor_obj) return;
- JSAN.use('util.browser');
- editor_obj = new util.browser();
- editor_obj.init(
- {
- 'url' : xulG.url_prefix(urls.XUL_REMOTE_BROWSER), // + '?name=MarcEditor',
- 'push_xulG' : true,
- 'alt_print' : false,
- 'browser_id' : 'editor',
- 'passthru_content_params' : content_params,
- }
- );
- } catch(E) {
- g.error.sdump('D_ERROR','set_marc_edit: ' + E);
- alert('set_marc_edit: ' + E);
- }
- }
-
- function set_copy_browser() {
- try {
- bottom_pane.node.selectedIndex = 2;
- xulG.docid = docid;
- var content_params = {
- 'show_nav_buttons' : false,
- 'show_print_button' : false,
- 'passthru_content_params' : xulG,
- 'url' : xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ), // + '?docid=' + window.escape(docid),
- 'name' : 'HoldingsMaintenance',
- };
- if (holdings_obj) return;
- JSAN.use('util.browser');
- holdings_obj = new util.browser();
- holdings_obj.init(
- {
- 'url' : xulG.url_prefix(urls.XUL_REMOTE_BROWSER), // + '?name=HoldingsMaintenance',
- 'push_xulG' : true,
- 'alt_print' : false,
- 'browser_id' : 'holdings',
- 'passthru_content_params' : content_params,
- }
- );
-
- //bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ) + '?docid=' + window.escape(docid),{},xulG);
- } catch(E) {
- alert(E);
- }
- }
-
- function set_hold_browser() {
- try {
- bottom_pane.node.selectedIndex = 3;
- xulG.docid = docid;
- var content_params = {
- 'show_nav_buttons' : false,
- 'show_print_button' : false,
- 'passthru_content_params' : xulG,
- 'url' : xulG.url_prefix( urls.XUL_HOLDS_BROWSER ), // + '?docid=' + window.escape(docid),
- 'name' : 'Holds',
- };
- if (holds_obj) return;
- JSAN.use('util.browser');
- holds_obj = new util.browser();
- holds_obj.init(
- {
- 'url' : xulG.url_prefix(urls.XUL_REMOTE_BROWSER), // + '?name=Holds',
- 'push_xulG' : true,
- 'alt_print' : false,
- 'browser_id' : 'holds',
- 'passthru_content_params' : content_params,
- }
- );
- //bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_HOLDS_BROWSER ) + '?docid=' + window.escape(docid),{},xulG);
- } catch(E) {
- alert(E);
- }
- }
-
- function set_opac() {
- try {
- bottom_pane.node.selectedIndex = 0;
- var content_params = {
- 'show_nav_buttons' : true,
- 'show_print_button' : true,
- 'passthru_content_params' : {
- 'authtoken' : ses(),
- 'authtime' : ses('authtime'),
- 'window_open' : function(a,b,c) {
- try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
- return window.open(a,b,c);
- } catch(E) {
- g.error.standard_unexpected_error_alert('window_open',E);
- }
- }
- },
- 'on_url_load' : function(f) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- var win;
- try {
- if (typeof f.contentWindow.wrappedJSObject.attachEvt != 'undefined') {
- win = f.contentWindow.wrappedJSObject;
- } else {
- win = f.contentWindow;
- }
- } catch(E) {
- win = f.contentWindow;
- }
- browser_win = win;
- win.attachEvt("rdetail", "recordRetrieved",
- function(id){
- try {
- docid = id;
- browser_obj = null; editor_obj = null; holdings_obj = null; holds_obj = null;
- top_pane.clear(); bottom_pane.clear();
- set_brief_view();
- document.getElementById('nav').setAttribute('hidden','false');
- } catch(E) {
- g.error.standard_unexpected_error_alert('rdetail -> recordRetrieved',E);
- }
- }
- );
- },
- 'url_prefix' : xulG.url_prefix,
- 'name' : 'Catalog',
- };
- if (opac_url) content_params.url = opac_url;
- if (browser_obj) return;
- JSAN.use('util.browser');
- browser_obj = new util.browser();
- browser_obj.init(
- {
- 'url' : xulG.url_prefix(urls.XUL_REMOTE_BROWSER), // + '?name=Catalog',
- 'push_xulG' : true,
- 'alt_print' : false,
- 'browser_id' : 'browser',
- 'passthru_content_params' : content_params,
- }
- );
- //browser_frame = bottom_pane.set_browser( xulG.url_prefix(urls.XUL_REMOTE_BROWSER) + '?name=Catalog', {}, content_params);
- } catch(E) {
- g.error.sdump('D_ERROR','set_opac: ' + E);
- alert('set_opac: ' + E);
- }
- }
-
- function bib_in_new_tab() {
- try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
- var url = browser_win.location.href;
- var content_params = { 'session' : ses(), 'authtime' : ses('authtime'), 'opac_url' : url };
- xulG.new_tab(xulG.url_prefix(urls.XUL_OPAC_WRAPPER), {}, content_params);
- } catch(E) {
- g.error.sdump('D_ERROR',E);
- alert(E);
- }
- }
-
- function remove_me() {
- try {
- browser_obj = null; editor_obj = null; holdings_obj = null; holds_obj = null;
- top_pane.clear(); bottom_pane.clear();
- document.getElementById('nav').setAttribute('hidden','true');
- } catch(E) {
- alert(E);
- }
- }
-
- function add_to_bucket() {
- try {
- JSAN.use('util.window'); var win = new util.window();
- win.open(
- xulG.url_prefix(urls.XUL_RECORD_BUCKETS),
- //+ '?record_ids=' + js2JSON( [ docid ] ),
- 'sel_bucket_win' + win.window_name_increment(),
- 'chrome,resizable,modal,center',
- { 'record_ids' : [ docid ] }
- );
- } catch(E) {
- alert(E);
- }
- }
-
- function refresh() {
- alert( $("catStrings").getString('staff.cat.opac.refresh.function_not_implemented.alert') );
- }
- ]]>
- </script>
-
- <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties" />
- <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
-
- <commandset><command id="cmd_forward"/><command id="cmd_back"/></commandset>
-
- <vbox flex="1">
- <deck id="top_pane"/>
- <splitter><grippy/></splitter>
- <menubar id="nav" hidden="true">
- <menu label="&staff.cat.opac.menu.label;" accesskey="&staff.cat.opac.menu.accesskey;">
- <menupopup>
- <menuitem label="&staff.cat.opac.menuitem.opacview.label;" accesskey="&staff.cat.opac.menuitem.opacview.accesskey;" id="opac_view" oncommand="set_opac();"/>
- <menuitem label="&staff.cat.opac.menuitem.marcview.label;" accesskey="&staff.cat.opac.menuitem.marcview.accesskey;" id="marc_view" oncommand="set_marc_view();"/>
- <menuitem label="&staff.cat.opac.menuitem.marcedit.label;" accesskey="&staff.cat.opac.menuitem.marcedit.accesskey;" id="marc_edit" oncommand="set_marc_edit();"/>
- <menuitem label="&staff.cat.opac.menuitem.holding.label;" accesskey="&staff.cat.opac.menuitem.holding.accesskey;" id="copy_browse" oncommand="set_copy_browser();"/>
- <menuitem label="&staff.cat.opac.menuitem.viewholds.label;" accesskey="&staff.cat.opac.menuitem.viewholds.accesskey;" id="view_holds" oncommand="set_hold_browser();"/>
- <menuseparator/>
- <menuitem label="&staff.cat.opac.menuitem.addtobucket.label;" accesskey="&staff.cat.opac.menuitem.addtobucket.accesskey;" id="add_bucket" oncommand="add_to_bucket();"/>
- <menuseparator/>
- <menuitem label="&staff.cat.opac.menuitem.refreshinterfaces.label;" id="refresh" oncommand="refresh();"/>
- <menuitem label="&staff.cat.opac.menuitem.dupnewtab.label;" id="bib_in_new_tab" oncommand="bib_in_new_tab();"/>
- <menuitem label="&staff.cat.opac.menuitem.removeframe.label;" id="remove_me" oncommand="remove_me();"/>
- </menupopup>
- </menu>
- </menubar>
- <deck id="bottom_pane" flex="1">
- <browser id="browser"/>
- <browser id="editor"/>
- <browser id="holdings"/>
- <browser id="holds"/>
- </deck>
- </vbox>
-
-</window>
-
More information about the open-ils-commits
mailing list