instead of the old progress meter, show some textual progress information
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Sep 2006 15:51:38 +0000 (15:51 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Sep 2006 15:51:38 +0000 (15:51 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6164 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
Open-ILS/xul/staff_client/chrome/content/main/main.js
Open-ILS/xul/staff_client/chrome/content/main/main.xul
Open-ILS/xul/staff_client/server/main/data.xul

index 258df90..7f7bdf9 100644 (file)
@@ -17,6 +17,17 @@ OpenILS.data.prototype = {
 
        'temp' : '',
 
+       'data_progress' : function(msg) {
+               try {
+                       var x = document.getElementById('data_progress');
+                       if (x) {
+                               x.appendChild( document.createTextNode( msg ) );
+                       }
+               } catch(E) {
+                       this.error.sdump('D_ERROR',msg + '\n' + E);
+               }
+       },
+
        'init' : function (params) {
 
                try {
@@ -232,6 +243,7 @@ OpenILS.data.prototype = {
 
                JSAN.use('util.file'); var file = new util.file('print_list_templates');
                obj.print_list_defaults();
+               obj.data_progress('Default print templates set. ');
                if (file._file.exists()) {
                        try {
                                var x = file.get_object();
@@ -240,6 +252,7 @@ OpenILS.data.prototype = {
                                                obj.print_list_templates[i] = x[i];
                                        }
                                        obj.stash('print_list_templates');
+                                       obj.data_progress('Saved print templates retrieved from file. ');
                                }
                        } catch(E) {
                                alert(E);
@@ -254,6 +267,7 @@ OpenILS.data.prototype = {
                                if (x) {
                                        obj.global_font_adjust = x;
                                        obj.stash('global_font_adjust');
+                                       obj.data_progress('Saved font settings retrieved from file. ');
                                }
                        } catch(E) {
                                alert(E);
@@ -268,6 +282,7 @@ OpenILS.data.prototype = {
                                if (x) {
                                        obj.no_sound = x;
                                        obj.stash('no_sound');
+                                       obj.data_progress('Saved sound settings retrieved from file. ');
                                }
                        } catch(E) {
                                alert(E);
@@ -311,6 +326,7 @@ OpenILS.data.prototype = {
                                        obj.list[classname] = robj;
                                        obj.error.sdump_levels.D_SES_RESULT = level;
                                        convert();
+                                       obj.data_progress('Retrieved list for ' + classname + ' objects. ');
                                        // if cacheable, store an offline copy
                                        /* FIXME -- we're going to revisit caching and do it differently
                                        if (cacheable) {
@@ -347,6 +363,7 @@ OpenILS.data.prototype = {
                                        var robj = obj.network.simple_request('CIRC_MODIFIER_LIST',[]);
                                        if (typeof robj.ilsevent != 'undefined') throw(robj);
                                        obj.list.circ_modifier = robj;
+                                       obj.data_progress('Retrieved circ modifier list. ');
                                } catch(E) {
                                        var error = 'Error: ' + js2JSON(E);
                                        obj.error.sdump('D_ERROR',error);
@@ -361,6 +378,7 @@ OpenILS.data.prototype = {
                                        var robj = obj.network.simple_request('BILLING_TYPE_LIST',[]);
                                        if (typeof robj.ilsevent != 'undefined') throw(robj);
                                        obj.list.billing_type = robj;
+                                       obj.data_progress('Retrieved billing type list. ');
                                } catch(E) {
                                        var error = 'Error: ' + js2JSON(E);
                                        obj.error.sdump('D_ERROR',error);
index 1a62326..384b863 100644 (file)
@@ -108,7 +108,9 @@ function main_init() {
                        }
 
                        if (G.data.ws_info && G.data.ws_info[G.auth.controller.view.server_prompt.value]) {
-                               var deck = document.getElementById('main_deck');
+                               JSAN.use('util.widgets');
+                               var deck = document.getElementById('progress_space');
+                               util.widgets.remove_children( deck );
                                var iframe = document.createElement('iframe'); deck.appendChild(iframe);
                                iframe.setAttribute( 'src', url + '/xul/server/main/data.xul' );
                                iframe.contentWindow.xulG = xulG;
index 9baafd5..b316fdd 100644 (file)
 </row>
 </rows>
 </grid>
-               <progressmeter id="progress_bar" mode="normal" value="0"/>
+               <vbox id="progress_space">
+                       <progressmeter id="progress_bar" mode="normal" value="0" hidden="true"/>
+               </vbox>
                <button label="&staff.auth.quit_prompt;" accesskey="&staff.auth.quit_prompt.key;" command="cmd_close_window"/>
                <groupbox id="debug_gb" flex="1" hidden="true">
                        <caption label="Debug Options"/>
index f7eddd2..dd35949 100644 (file)
@@ -69,6 +69,9 @@
                                        'src',
                                        urls.XUL_OFFLINE_GENERATE_WIDGETS       
                                );
+
+                               document.getElementById('caption').setAttribute('label','Data loaded.');
+
                                xulG.window.open(urls.XUL_MENU_FRAME
                                        + '?server='+window.escape(xulG.url),
                                        'main'+xulG.window.window_name_increment(),'chrome,resizable'
@@ -81,8 +84,9 @@
        ]]>
        </script>
 
-       <groupbox id="data_groupbox" flex="1"> 
-               <caption label="Loading data..."/> 
+       <groupbox id="data_groupbox" flex="1" class="my_overflow"> 
+               <caption id="caption" label="Loading data..."/> 
+               <description id="data_progress"/>
                <iframe id="iframe" />
        </groupbox>