when logged in, default to org unit 1 when no org unit has been manually selected...
authorberick <berick@esilibrary.com>
Tue, 15 Mar 2011 16:31:54 +0000 (12:31 -0400)
committerberick <berick@esilibrary.com>
Tue, 15 Mar 2011 16:31:54 +0000 (12:31 -0400)
Open-ILS/web/opac/skin/kcls/js/myopac.js
Open-ILS/web/opac/skin/kcls/xml/common/js_shared.xml
Open-ILS/web/opac/skin/kcls/xml/myopac/myopac_holds.xml

index ac74ced..548eba4 100644 (file)
@@ -475,8 +475,11 @@ function drawOneHold(h, row, parent) {
         $n(row,'acct_holds_status').innerHTML = "<span style='color:blue;font-weight:bold;'>Ready for Pickup</span>";
         hideMe($n(row,'holds_editor_row'));
         unHideMe($n(row,'holds_ready_row'));
-        if(h.hold.shelf_expire_time()) $n(row,'hold_ready_expire').innerHTML = 
-            dojo.date.locale.format(dojo.date.stamp.fromISOString(h.hold.shelf_expire_time()), {selector:'date', fullYear: true});;
+        if(h.hold.shelf_expire_time()) {
+            var pdate = dojo.date.stamp.fromISOString(h.hold.shelf_expire_time());
+            $n(row,'hold_ready_expire').innerHTML += dojo.date.locale.format(pdate, {selector:'date', fullYear: true});;
+            unHideMe($n(row,'hold_ready_expire'));
+        }
     } else {
         var num = h.queue_position+'';
         suffix = (num.charAt(num.length-1)=="1")?"st":(num.charAt(num.length-1)=="2")?"nd":(num.charAt(num.length-1)=="3")?"rd":"th";
index 2be236c..7927bbc 100644 (file)
@@ -1,3 +1,15 @@
+/*
+Run this here so it's the first event fired after 'init'.
+This forces the LOCATION back to 1 when the user has not
+selected a location via widget, thus immediately overriding 
+the default behavior found in common/js/init.js
+*/
+attachEvt('common', 'run', function() {
+    var cgi = new CGI();
+    if( cgi.param(PARAM_LOCATION) == null ) LOCATION=1;
+});
+
+
 <!--#if expr="$OILS_PAGE='index.xml'"-->
 isFrontPage = true;
 <!--#endif-->
@@ -198,3 +210,5 @@ dojo.addOnLoad(function() {
     });
 });
 <!--#endif-->
+
+
index 9625013..faa9760 100644 (file)
          <td width="64" align="center"><div style="margin-top:6px;margin-bottom:6px;text-align:center;" name="myopac_holds_formats"></div></td>
          <td width="136"><span name="hold_pickup_lib_span"></span><span name="hold_pickup_lib"></span></td>
          <td width="105"><input title="Enter a date (e.g. 10/21/2010)" class="hide_me" style="width:91px;" name="activate_box" type="text" /><span name="activate_date"></span></td>
-         <td width="105"><input title="Enter a date (e.g. 10/21/2010)" class="hide_me" style="width:91px;" name="hold_expires_box" type="text" /><span name="hold_expires"></span></td>
+           <td width="105">
+            <input title="Enter a date (e.g. 10/21/2010)" class="hide_me" style="width:91px;" name="hold_expires_box" type="text" />
+            <span name="hold_expires"></span>
+        </td>
          <td width="95"><select name="hold_active_sel" style="width:90px;" class="hide_me"><option value="f">Active</option><option value="t">Suspended</option></select><span name="hold_active"></span></td>
-         <td width="110"><div name="acct_holds_status" style="margin-top:10px;margin-bottom:10px;"><span class="hide_me" name="hold_ready_expire"></span></div></td>
+         <td width="110">
+            <div name="acct_holds_status" style="margin-top:10px;margin-bottom:10px;"></div>
+            <div class="hide_me" name="hold_ready_expire">Expires </div>
+        </td>
          <td width="62" align="right" style="text-align:right;padding-right:7px;"><a name="hold_edit_link" href="javascript:;">Edit</a> <a href="javascript:;" name="hold_save_link" class="hide_me">Save</a> <a href="javascript:;" name="hold_cancel_link" class="hide_me">Back</a></td>
        </tr>
   </tbody>