more webby goodness
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Jul 2005 22:36:14 +0000 (22:36 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 26 Jul 2005 22:36:14 +0000 (22:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1516 dcc99617-32d9-48b4-a31d-7c20da2025e4

12 files changed:
Evergreen/css/opac/adv_search.css
Evergreen/css/opac/box.css
Evergreen/css/opac/opac_main.css
Open-ILS/src/javascript/opac/AbstractRecordResultPage.js
Open-ILS/src/javascript/opac/GlobalInit.js
Open-ILS/src/javascript/opac/HoldsWindow.js
Open-ILS/src/javascript/opac/Page.js
Open-ILS/src/javascript/opac/RecordDetailPage.js
Open-ILS/src/javascript/opac/RecordResultPage.js
Open-ILS/src/javascript/util/RemoteRequest.js
Open-ILS/src/templates/opac/pages/main.ttk
Open-ILS/src/templates/opac/pages/record_result.ttk

index 45dde09..a24579e 100644 (file)
@@ -1,34 +1,21 @@
-.adv_search_quick_box {
-}
-
-.adv_search_left_box {
-       float: left;
-}
-
+.adv_search_left_box { float: left; }
+#adv_mixed_search_div { margin: 10px; }
+#adv_refined_search_div { margin: 10px; }
+.adv_search_left_item { text-align: center; }
+.adv_search_left_item { padding: 3px; }
+#adv_search_location { text-align: center; }
 
 .adv_search_big_box {
        float: left;
-       /*width: 80%;*/
        text-align: center;
        margin-top: -10px;
        margin-left: 20px;
 }
 
 
-.adv_search_left_item {
-       text-align: center;
-}
-
-.adv_search_chunk_box { 
-}
-
-.adv_search_left_item {
-       padding: 3px;
-}
-
 .adv_dashed_box {
        padding: 3px;
-       border: 2px dashed #99C;
+       border: 2px dashed #556644;
        text-align: left;
 }
 
        text-align: left;
 }
 
-/*
-.adv_dashed_box table tr td:first-child {
-       text-align: right;
-}
-*/
-
-#adv_mixed_search_div {
-       margin: 10px;
-}
-
-#adv_refined_search_div {
-       margin: 10px;
-}
 
 #adv_search_main_header {
        text-align: center;
@@ -62,8 +36,8 @@
 }
 
 .adv_search_header {
-       /*-moz-border-radius: 8px;*/
-       background: #CCF;
+       background: #556644;
+       color: #FFF;
        text-align: center;
        padding-top: 7px;
        padding-bottom: 7px;
@@ -71,8 +45,5 @@
        padding: 2px;
 }
 
-#adv_search_location {
-       text-align: center;
-}
 
 
index 1d05f9f..4430ad7 100644 (file)
@@ -1,5 +1,4 @@
 .box {
-/*     width: 200px; */
        width: 100%;
        margin: 3px;
 }
@@ -7,8 +6,6 @@
 .box_title {
        text-align: center;
        width: 98%;
-       /*background: #C99;*/
-       /*background: #445533;*/
        background: #556644;
        padding: 2px;
        color: #EFF;
index eef6d85..9348b94 100644 (file)
@@ -142,6 +142,7 @@ table { border-collapse: collapse; }
 
 .main_nav_cell {
        width: 100%;
+       text-decoration: underline;
 }
 
 .main_nav_cell_active {
index 1e99235..44caa8b 100644 (file)
@@ -287,6 +287,7 @@ AbstractRecordResultPage.prototype.displayRecord =
        author_cell.innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
        author_cell.appendChild(this.mkLink(record.doc_id(), "author", author ));
 
+       /*
        var marcd = null;
        if(instanceOf(this, RecordResultPage)) {
                var span = createAppElement("span");
@@ -316,6 +317,7 @@ AbstractRecordResultPage.prototype.displayRecord =
                marcd.appendChild(marcb);
 
        }
+       */
 
        var holddiv = null;
        if(instanceOf(this, RecordResultPage)) {
@@ -345,14 +347,8 @@ AbstractRecordResultPage.prototype.displayRecord =
                holds.onclick = function() { win.toggle(holds); }
                holddiv = elem("div");
        
-               //if(instanceOf(this,RecordResultPage))
                holddiv.setAttribute("style", "float:right");
-       
                holddiv.appendChild(holds);
-               //var space = elem("span", {style:"padding:5px"},null, " ");
-               //c.appendChild(space)
-               //c.appendChild(mktext(" "))
-               //c.appendChild(holddiv)
        }
        
        var tab = elem("table",{style:"float:right"});
@@ -365,7 +361,7 @@ AbstractRecordResultPage.prototype.displayRecord =
 
        if(holddiv) tc.appendChild(holddiv);
        tc2.appendChild(mktext(" "));
-       if(marcd) tc3.appendChild(marcd);
+       //if(marcd) tc3.appendChild(marcd);
 
        c.appendChild(tab);
 
index af0d2d7..f82cebe 100644 (file)
@@ -127,12 +127,22 @@ function globalInit() {
        globalPage.init();
 
        if(paramObj.__location != null) {
+               debug("Someone passed us a location ID of " + paramObj.__location);
+
                globalSelectedLocation = findOrgUnit(paramObj.__location);
+
+               if(paramObj.__depth == null) {
+                       paramObj.__depth = findOrgType(globalSelectedLocation.ou_type()).depth();
+               }
+
                if(globalSelectedLocation == null) 
                        debug("Invalid location in url : " + paramObj.__location);
                else
                        debug("Setting selected location to " + globalSelectedLocation.name() );
-       } 
+
+       } else {
+               debug("No location provided in URL");
+       }
 
 
        if(paramObj.__depth != null) {
index a813627..80d4274 100644 (file)
@@ -65,8 +65,8 @@ HoldsWindow.prototype.sendHoldsRequest = function(formats, org, email, phone) {
                }
                try {
                        var r = grabUserByBarcode(this.session, recip_barcode);
-                       debug("Done grabbing user");
-                       alert(js2JSON(r));
+                       //debug("Done grabbing user");
+                       //alert(js2JSON(r));
                        this.recipient = r;
                } catch(E) { if(E.err_msg) alert(E.err_msg()); else alert(E); }
        }
index 3777138..ea728d8 100644 (file)
@@ -229,7 +229,7 @@ Page.prototype.buildNavBox = function(full) {
 
        if(loc) arr.push(this.buildDeepLink());
 
-       if(UserSession.instance().verifySession()) {
+       if(UserSession.instance().verifySession() && !isXUL() ) {
                var a = elem("a", {href:"http://" + globalRootURL + ":" 
                                + globalPort + "/" + globalRootPath}, null, "Logout");
                a.onclick = doLogout;
index d8aa4cd..29585d1 100644 (file)
@@ -133,10 +133,12 @@ RecordDetailPage.prototype.draw = function() {
 
 RecordDetailPage.prototype.buildCustomOrgTree = function(record) {
 
+       var method = "open-ils.search.biblio.copy_counts.retrieve";
+
+       if(isXUL()) method += ".staff";
+
        var req = new RemoteRequest(
-               "open-ils.search",
-               "open-ils.search.biblio.copy_counts.retrieve",
-               record.doc_id() );
+               "open-ils.search", method, record.doc_id() );
 
        var obj = this;
        req.setCompleteCallback(
@@ -252,7 +254,9 @@ RecordDetailPage.prototype.setViewMarc = function(record) {
        debug(".ou_type()Setting up view marc callback with record " + record.doc_id());
 
        var func = buildViewMARCWindow(record);
+
        marcb.onclick = func;
+       if(isXUL()) { xulEvtViewMARC(marcb, record); }
        this.viewMarc.appendChild(marcb);
 }
 
index 478156f..35b14c5 100644 (file)
@@ -336,6 +336,8 @@ RecordResultPage.prototype.mrSearch = function(mrid) {
 
        var request;
        var method = "open-ils.search.biblio.metarecord_to_records";
+       if(isXUL()) method += ".staff";
+
        if(this.format == "all")
                request = new RemoteRequest("open-ils.search", method, mrid );
        else
index 6e21b71..0f37d2b 100644 (file)
@@ -33,10 +33,8 @@ RemoteRequest.prunePending = function(id) {
                        var req = RemoteRequest.pending[x];
                        if( req.id != id )
                                tmpArray.push(req);
-                       else {
-                               //debug("Cleaning " + req.id );
+                       else 
                                req.clean();
-                       }
                }
        }
        RemoteRequest.pending = tmpArray;
@@ -295,6 +293,11 @@ RemoteRequest.prototype.getResultObject = function() {
        }
 
        if(obj.is_err) { 
+               if( obj.err_msg.match("OpenSRF::EX::User") ) {
+                       alert("Session has timed out or cannot be authenticated.\nPlease log out and log back in if necessary.");
+                       return;
+               }
+
                debug("Something's Wrong: " + js2JSON(obj));
                throw new EXCommunication(obj.err_msg); 
        }
@@ -317,6 +320,7 @@ RemoteRequest.prototype.getResultObject = function() {
                throw obj;
        }
 
+
        return obj;
 }
 
index 5ce1ad7..7ed0744 100644 (file)
@@ -10,6 +10,7 @@
                [% 
                        top_target      = cgi.param("top_target"); 
                        sub_frame       = cgi.param("sub_frame");
+                       location                = cgi.param("location");
                %]
 
                <frameset cols='100%'>
@@ -40,7 +41,8 @@
                                        ELSE; 
                                %]
 
-                               src                     = '/opac/?target=[%- IF top_target; top_target; ELSE; "start";END; %]'
+                               src                     = '/opac/?target=[%- IF top_target; top_target; ELSE; "start";END; %]
+                                                                               [%- IF location; "&location=" _ location; END %]'
 
                                [% END; %] 
                        />      
index 3b80dca..702430d 100644 (file)
@@ -52,6 +52,7 @@
 
                                WRAPPER html/row id='hourglass_row';
                                        cell(style="text-align:center", content=img(src="http://www.filleacgil.it/Animate/book_b.gif"));
+                                       #cell(style="text-align:center", content=img(src="/images/computer.gif"));
                                END;