changed org tree to be like the old org tree (children fleshed, parents are ID's)
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 23 Aug 2005 21:33:35 +0000 (21:33 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 23 Aug 2005 21:33:35 +0000 (21:33 +0000)
move communication exceptions to the remote request code
added new xul links and ids and code
persisting font changes

git-svn-id: svn://svn.open-ils.org/ILS/trunk@1711 dcc99617-32d9-48b4-a31d-7c20da2025e4

18 files changed:
Open-ILS/src/extras/autogen.sh
Open-ILS/src/extras/org_tree_js.pl
Open-ILS/web/opac/common/css/mediumfont.css
Open-ILS/web/opac/common/js/RemoteRequest.js
Open-ILS/web/opac/common/js/config.js
Open-ILS/web/opac/common/js/fmcore.js [deleted file]
Open-ILS/web/opac/common/js/init.js
Open-ILS/web/opac/skin/default/css/layout.css
Open-ILS/web/opac/skin/default/js/config.js
Open-ILS/web/opac/skin/default/js/mresult.js
Open-ILS/web/opac/skin/default/js/rresult.js
Open-ILS/web/opac/skin/default/js/search_bar.js
Open-ILS/web/opac/skin/default/xml/css_common.xml
Open-ILS/web/opac/skin/default/xml/header.xml
Open-ILS/web/opac/skin/default/xml/js_common.xml
Open-ILS/web/opac/skin/default/xml/rdetail.xml
Open-ILS/web/opac/skin/default/xml/searchbar.xml
Open-ILS/web/opac/skin/default/xml/sidebar.xml

index 577105d..092beff 100755 (executable)
@@ -8,10 +8,13 @@ CONFIG="$1";
 JSDIR="/openils/var/web/js/util";
 
 echo "Updating fieldmapper";
-perl fieldmapper.pl            > "$JSDIR/fieldmapper.js";
+perl fieldmapper.pl            > "$JSDIR/fmall.js";
 
 echo "Updating web_fieldmapper";
-perl fieldmapper.pl 1  > "$JSDIR/web_fieldmapper.js";
+perl fieldmapper.pl "web_core" > "$JSDIR/fmcore.js";
+
+echo "Updating web_fieldmapper";
+perl fieldmapper.pl "web"      > "$JSDIR/fmextcore.js";
 
 echo "Updating OrgTree";
 perl org_tree_js.pl "$CONFIG" > "$JSDIR/OrgTree.js";
index 710f548..71edb0e 100644 (file)
@@ -26,37 +26,6 @@ for my $o (@$tree) {
 $pile .= join ',', @array;
 $pile .= <<JS;
 ];
-var orgArraySearcher = {};
-var globalOrgTree;
-for (var i in _l) {
-       var x = new aou();
-       x.id(_l[i][0]);
-       x.ou_type(_l[i][1]);
-       x.parent_ou(_l[i][2]);
-       x.name(_l[i][3]);
-       orgArraySearcher[x.id()] = x;
-}
-for (var i in orgArraySearcher) {
-       var x = orgArraySearcher[i];
-       if (x.parent_ou() == null || x.parent_ou() == '') {
-               globalOrgTree = x;
-               continue;
-       } else {
-               x.parent_ou(orgArraySearcher[x.parent_ou()]);
-       }
-       if (!x.parent_ou().children()) 
-               x.parent_ou().children(new Array());
-       x.parent_ou().children().push(x);
-}
-function _tree_killer () {
-       globalOrgTree = null;
-       for (var i in orgArraySearcher) {
-               x=orgArraySearcher[i];
-               x.children(null);
-               x.parent_ou(null);
-               orgArraySearcher[i]=null;
-       }
-}
 JS
 
 $pile .= "var globalOrgTypes = JSON2js(\"$types_string\");";
index 5762738..1864944 100644 (file)
@@ -1,8 +1,10 @@
-body                           { font-family: Helvetica, Arial, Tahoma, sans-serif; font-size: 75%;} 
-body table             { font-size: inherit; }
+body                           { font-family: Helvetica, Arial, Tahoma, sans-serif; font-size: 95%;} 
+
+/*body table tr td     { font-size: inherit; }*/
+/*body table tr td     { font-size: 95%;}*/
 
 .org_link { font-size: 92%; }
-.sidebar_extra_item { font-size: 95%; }
+.sidebar_extra_item { font-size: 97%; }
 .searchbar_tag { font-size: 90%; } 
 #offset_start { font-weight: 600; }
 #offset_end { font-weight: 600; }
index e903c71..5bdf704 100644 (file)
@@ -2,8 +2,8 @@ var XML_HTTP_GATEWAY = "gateway";
 var XML_HTTP_SERVER = "spacely.georgialibraries.org:8080";
 var XML_HTTP_MAX_TRIES = 3;
 
-var IAMXUL = false;
-function isXUL() { return IAMXUL; }
+//var IAMXUL = false;
+function isXUL() { try { if(IAMXUL) return true;}catch(e){return false;}; }
 
 /* some communication exceptions */
 function EX(message) { this.init(message); }
index 047c7c6..1970c34 100644 (file)
@@ -85,6 +85,9 @@ config.page[RRESULT]          = "rresult.xml";
 config.page[MYOPAC]            = "myopac.xml";
 config.page[RDETAIL]           = "rdetail.xml";
 
+/* themes */
+config.themes = {};
+
 
 /* set up images  */
 config.images = {};
@@ -125,6 +128,8 @@ config.ids.common.canvas_main               = "canvas_main";
 config.ids.common.org_tree                     = "org_tree";                   
 config.ids.common.org_container        = "org_container";
 
+config.ids.xul = {};
+
 
 /* shared CSS */
 config.css.hide_me = "hide_me";
@@ -168,7 +173,9 @@ G.evt                               = {}; /* events container */
 
 function runEvt(scope, name, a, b, c, d, e, f, g) {
        var evt = G.evt[scope][name];
-       for( var i in evt ) evt[i](a, b, c, d, e, f, g);        
+       for( var i in evt ) {
+               evt[i](a, b, c, d, e, f, g);    
+       }
 }
 
 /* creates a new event if it doesn't already exist */
@@ -186,9 +193,8 @@ function attachEvt(scope, name, action) {
 createEvt("common", "init");                                           /* f() : what happens on page init */
 createEvt("common", "pageRendered");                   /* f() : what happens when the page is done (up to the skin to call this even)*/
 createEvt("common", "unload");                                 /* f() : what happens on window unload (clean memory, etc.)*/
-createEvt("mresult", "run");                                           /* f() : kick of the page*/
+createEvt("common", "run");                                            /* f() : make the page do stuff */
 createEvt("mresult", "idsReceived");                   /* f(ids) */
-createEvt("rresult", "run");                                           /* f() : kick of the page*/
 createEvt("rresult", "idsReceived");                   /* f(ids) */    
 
 createEvt("result", "hitCountReceived");               /* f() : display hit info, pagination, etc. */
@@ -196,6 +202,9 @@ createEvt("result", "recordReceived");                      /* f(mvr, pagePosition, isMr) : display
 createEvt("result", "copyCountsReceived");     /* f(mvr, pagePosition, copyCountInfo) : display copy counts*/
 createEvt("result", "allRecordsReceived");     /* f(mvrsArray) : add other page stuff, sidebars, etc.*/
 
+createEvt("rdetail", "recordDrawn");                   /* f() : the record has been drawn */
+
+
 
 
 
diff --git a/Open-ILS/web/opac/common/js/fmcore.js b/Open-ILS/web/opac/common/js/fmcore.js
deleted file mode 100644 (file)
index 4f4d15b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-var _c = {};
-_c["perm_ex"] = ["err_msg","type",];
-_c["au"] = ["addresses","cards","checkouts","hold_requests","settings","stat_cat_entries","survey_responses","active","alert_message","billing_address","card","claims_returned_count","create_date","credit_forward_balance","day_phone","dob","email","evening_phone","expire_date","family_name","first_given_name","home_ou","id","ident_type","ident_type2","ident_value","ident_value2","last_xact_id","mailing_address","master_account","net_access_level","other_phone","passwd","photo_url","prefix","profile","second_given_name","standing","suffix","super_user","usrgroup","usrname",];
-_c["ex"] = ["err_msg","type",];
-_c["mvr"] = ["author","call_numbers","copy_count","doc_id","doc_type","edition","isbn","online_loc","pubdate","publisher","serials","series","subject","synopsis","tcn","title","types_of_resource",];
-_c["aou"] = ["children","billing_address","holds_address","id","ill_address","mailing_address","name","ou_type","parent_ou","shortname",];
-_c["aout"] = ["children","can_have_users","can_have_vols","depth","id","name","opac_label","parent",];
-var fmclasses = _c;
index ea10215..aeabaf7 100644 (file)
@@ -14,10 +14,14 @@ attachEvt("common", "unload", cleanRemoteRequests);
 function init() {
        runEvt('common','init');
        setFontSize(getFontSize());
+       runEvt("common", "run");
+
+       /*
        switch(findCurrentPage()) {
                case MRESULT: runEvt('mresult', 'run'); break;
                case RRESULT: runEvt('rresult', 'run'); break;
        }
+       */
 }
 
 function windowUnload() { runEvt("common", "unload"); }
index fbece6e..c27c6ef 100644 (file)
@@ -16,6 +16,8 @@
 .org_link { padding-right: 15px; }
 #org_link_container { margin-bottom: 5px; padding-left: 4px; padding-bottom: 3px; padding-top: 3px; width: 100%; }
 
+#fonts_div { position: absolute; left: 220px; top: 10px; }
+
 /* ---------------------------------------------------------------------- */
 .sidebar_div { float: left; width: 19%; }
 .side_bar_item { padding-left: 15px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px; }
index 9f38deb..5b40131 100644 (file)
@@ -7,6 +7,9 @@ config.css.color_1 = "color_1";
 config.css.color_2 = "color_2";
 config.css.color_3 = "color_3";
 
+config.themes.def = "Default";
+config.themes.test = "ColorTest";
+
 /* result */
 config.ids.result = {};
 config.css.result = {};
@@ -72,6 +75,7 @@ config.ids.sidebar.myopac                     = 'myopac_link_div';
 config.ids.sidebar.prefs                       = 'prefs_link_div';
 config.ids.sidebar.mresult                     = 'mresult_link_div';
 config.ids.sidebar.rresult                     = 'result_link_div';
+config.ids.sidebar.rdetail                     = "rdetail_link_div"; 
 config.ids.sidebar.login                       = 'login_link';
 config.ids.sidebar.logout                      = 'logout_link';
 config.ids.sidebar.logoutbox           = 'logout_link_div';
@@ -93,6 +97,16 @@ config.names.sidebar.subject_item    = 'subject_item';
 config.names.sidebar.author_item       = 'author_item';
 config.names.sidebar.series_item       = 'series_item';
 
+/* record detail */
+config.ids.rdetail = {};
+
+
+/* XUL */
+config.ids.xul.marc_editor_link = "marc_editor_link";
+config.ids.xul.copy_browser_link = "copy_browser_link";
+config.ids.xul.marc_editor                     = "marc_editor_div";
+config.ids.xul.copy_browser            = "copy_browser_div";
+
 
 /* ---------------------------------------------------------------------------- */
 /* These are pages that may replace the canvas */
index e8c28b2..2fdbad7 100644 (file)
@@ -4,9 +4,11 @@ var table;
 var rowtemplate;
 var idsCookie = new cookieObject("ids", 1, "/", COOKIE_IDS);
 
-G.evt.common.unload.push(mresultUnload);
-G.evt.mresult.run.push(mresultDoSearch);
-G.evt.mresult.idsReceived.push(mresultSetRecords, mresultCollectRecords); 
+attachEvt("common", "unload", mresultUnload);
+attachEvt("common", "run", mresultDoSearch);
+attachEvt("mresult", "idsReceived", mresultSetRecords); 
+attachEvt("mresult", "idsReceived", mresultCollectRecords); 
+
 
 function mresultUnload() { removeChildren(table); table = null;}
 
index a50f3dc..49f572d 100644 (file)
@@ -4,9 +4,9 @@ var rowtemplate;
 
 function rresultUnload() { removeChildren(table); table = null;}
 
-G.evt.common.unload.push(rresultUnload);
-G.evt.rresult.run.push(rresultDoSearch);
-G.evt.rresult.idsReceived.push(rresultCollectRecords); 
+attachEvt("common", "unload", rresultUnload);
+attachEvt("common", "run", rresultDoSearch);
+attachEvt("rresult", "idsReceived", rresultCollectRecords); 
 
 function rresultDoSearch() {
        table = G.ui.result.main_table;
index 0702fbb..1113726 100644 (file)
@@ -12,6 +12,10 @@ var newSearchLocation;
 
 function searchBarInit() {
 
+       /* ----------------------------------- */
+       //setActivateStyleSheet("color_test");
+       /* ----------------------------------- */
+
        _ts = G.ui.searchbar.type_selector;
        _ds = G.ui.searchbar.depth_selector;
        _fs = G.ui.searchbar.form_selector;
index 6611e27..5435888 100644 (file)
@@ -9,19 +9,13 @@
 
        <!-- Our font CSS's -->
        <link type='text/css' rel='stylesheet'                                  
-               href='../../../common/css/mediumfont.css' csstype='font'/>
-
-       <link type='text/css' rel='alternate stylesheet'        
-               href='../../../common/css/smallfont.css' title='Small Fonts' csstype='font'/>
-
-       <link type='text/css' rel='alternate stylesheet'        
-               href='../../../common/css/largefont.css' title='Large Fonts' csstype='font'/>
+               href='../../../common/css/mediumfont.css' name='meduim_fonts' csstype='font'/>
 
        <!-- Our colors -->
        <link type='text/css' rel="stylesheet" href="../../../theme/default/css/colors.css"  
-               name='default_colors' csstype='color'/>
+               name='Default' csstype='color'/>
 
-       <link type='text/css' rel="alternate stylesheet" href="../../../theme/blackonwhite/css/colors.css" 
-               title='Color Test' name='color_test' csstype="color" />
+       <link type='text/css' rel="alternate stylesheet" href="../../../theme/test/css/colors.css" 
+               title='Color Test' name='ColorTest' csstype="color" />
 
 </css>
index 2e48e0e..6b58bcc 100644 (file)
@@ -2,6 +2,7 @@
 
 <div xmlns:xi="http://www.w3.org/2001/XInclude">
        <xi:include href="logo.xml"/>
+       <xi:include href="fonts.xml"/>
        <xi:include href="searchbar.xml"/> 
        <div class="vert_space"> </div>
        <xi:include href="sidebar.xml"/> 
index 0d6c420..0fabdda 100644 (file)
        <script language='javascript' src='../../../common/js/JSON.js'> </script>
        <script language='javascript' src='../../../common/js/fmcore.js'> </script>
        <script language='javascript' src='../../../common/js/fmgen.js'> </script>
+       <script language='javascript' src='../../../common/js/opac_utils.js'> </script>
        <script language='javascript' src='../../../common/js/OrgTree.js'> </script>
+       <script language='javascript' src='../../../common/js/org_utils.js'> </script>
        <script language='javascript' src='../../../common/js/RemoteRequest.js'> </script>
-       <script language='javascript' src='../../../common/js/opac_utils.js'> </script>
        <script language='javascript' src='../../../common/js/init.js'> </script>
        <script language='javascript' src='../../../common/js/added_content.js'> </script>
 
index 67a3681..91f45d4 100644 (file)
@@ -8,13 +8,17 @@
                <title>Evergreen: Titles</title>
                <xi:include href="css_common.xml#xpointer(//link)"/>
                <xi:include href="js_common.xml#xpointer(//script)"/>
+               <script language='javascript' src='../js/rdetail.js'> </script>
        </head>
 
        <body onload="init();">
                <xi:include href="header.xml"/> 
                <div id='canvas' class='canvas'>
                        <xi:include href="altcanvas.xml"/>
-                       <xi:include href="result_common.xml"/>
+
+                       <div id='canvas_main'>
+                       </div>
+
                </div>
        </body>
 
index 52e5484..9d77ca6 100644 (file)
@@ -8,6 +8,11 @@
        <!-- load my js -->
        <script language='javascript' src='../js/search_bar.js'> </script>
 
+       <!--
+       <a onclick="scaleFont(prompt('scale fonts...'));">CLICK</a>
+       -->
+
+
        <div id='searchbar_main' class='color_1'>
 
                <table>
index 0d9edaf..ea0fc2c 100644 (file)
@@ -34,6 +34,9 @@
                        <a id='logout_link' href='javascript:void(0);'>&navigate.logout;</a>
                </div>
 
+
+               <xi:include href="xulsidebar.xml"/>
+
                <!-- Informational sidebar components -->
 
                <div id='logged_in_as_div' title="&navigate.loggedinas.title;" class="side_bar_item hide_me">
                        <span>&navigate.titleResults;</span>
                </div>
 
+               <div title="Record Details"
+                       id='rdetail_link_div' class="side_bar_item hide_me">
+                       <span>Record Details</span>
+               </div>
+
        </div>