Add a new visible alert to the main client screen alerting about pending transactions
authorAtom Edoceo <atom@helium.edoceo.lan>
Mon, 22 Aug 2011 18:23:14 +0000 (11:23 -0700)
committerMike Rylander <mrylander@gmail.com>
Thu, 25 Aug 2011 00:30:51 +0000 (20:30 -0400)
Signed-off-by: Edoceo <code@edoceo.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/chrome/content/main/main.js
Open-ILS/xul/staff_client/chrome/content/main/main.xul

index ba5ce63..4003508 100644 (file)
 <!ENTITY staff.main.auth.hostname "Hostname">
 <!ENTITY staff.main.auth.hostname.accesskey "H">
 <!ENTITY staff.main.auth.offline.caption "Offline Use">
 <!ENTITY staff.main.auth.hostname "Hostname">
 <!ENTITY staff.main.auth.hostname.accesskey "H">
 <!ENTITY staff.main.auth.offline.caption "Offline Use">
+<!ENTITY staff.main.auth.offline.message "Offline Transactions Pending">
 <!ENTITY staff.main.auth.offline.export "Export Transactions">
 <!ENTITY staff.main.auth.offline.import "Import Transactions">
 <!ENTITY staff.main.auth.offline.interface "Standalone Interface">
 <!ENTITY staff.main.auth.offline.export "Export Transactions">
 <!ENTITY staff.main.auth.offline.import "Import Transactions">
 <!ENTITY staff.main.auth.offline.interface "Standalone Interface">
index f13cbfe..77e72af 100644 (file)
@@ -664,6 +664,16 @@ function main_init() {
             false
         );
 
             false
         );
 
+        /**
+            @brief Stats for Offline Files / Transactions
+            @launchpad #797408
+        */
+        var px = new util.file('pending_xacts');
+        document.getElementById('offline_message').setAttribute('style','display:none;');
+        if (px._file.exists()) {
+            document.getElementById('offline_message').setAttribute('style','background-color:red;display:block;font-weight:bold;padding:2px;');
+            document.getElementById('offline_import_btn').disabled = true;
+        }
 
     } catch(E) {
         var error = offlineStrings.getFormattedString('common.exception', [E, '']);
 
     } catch(E) {
         var error = offlineStrings.getFormattedString('common.exception', [E, '']);
index 1c9d96f..c9ab790 100644 (file)
             </grid>
         </groupbox>
 
             </grid>
         </groupbox>
 
+        <!-- Offline Information Section -->
         <groupbox flex="1">
             <caption label="&staff.main.auth.offline.caption;"/>
         <groupbox flex="1">
             <caption label="&staff.main.auth.offline.caption;"/>
+            <hbox><label id="offline_message" value="&staff.main.auth.offline.message;" style="display:none;" /></hbox>
             <hbox><button label="&staff.main.auth.offline.interface;" accesskey="&staff.main.auth.offline.interface.accesskey;" command="cmd_standalone"/></hbox>
             <hbox><button label="&staff.main.auth.offline.export;" command="cmd_standalone_export"/></hbox>
             <hbox><button label="&staff.main.auth.offline.import;" command="cmd_standalone_import"/></hbox>
         </groupbox>
             <hbox><button label="&staff.main.auth.offline.interface;" accesskey="&staff.main.auth.offline.interface.accesskey;" command="cmd_standalone"/></hbox>
             <hbox><button label="&staff.main.auth.offline.export;" command="cmd_standalone_export"/></hbox>
             <hbox><button label="&staff.main.auth.offline.import;" command="cmd_standalone_import"/></hbox>
         </groupbox>
+
 </row>
 </rows>
 </grid>
 </row>
 </rows>
 </grid>