[FIX] point_of_sale: removed the gif loader, replaced it by niv's js one
authorFrédéric van der Essen <fva@openerp.com>
Wed, 14 Nov 2012 17:00:06 +0000 (18:00 +0100)
committerFrédéric van der Essen <fva@openerp.com>
Wed, 14 Nov 2012 17:00:06 +0000 (18:00 +0100)
bzr revid: fva@openerp.com-20121114170006-gkx6ezikiw86po7u

addons/point_of_sale/static/src/css/pos.css
addons/point_of_sale/static/src/img/loader.gif [deleted file]
addons/point_of_sale/static/src/js/widgets.js
addons/point_of_sale/static/src/xml/pos.xml

index 675b773..9b286be 100644 (file)
     z-index: 999;
     text-align: center;
 }
-.point-of-sale .loader img{
-    position:absolute;
-    top:50%;
-    left:50%;
-}
 
 /*  ********* Generic element styling  ********* */
 
diff --git a/addons/point_of_sale/static/src/img/loader.gif b/addons/point_of_sale/static/src/img/loader.gif
deleted file mode 100644 (file)
index 967288f..0000000
Binary files a/addons/point_of_sale/static/src/img/loader.gif and /dev/null differ
index 94d6a5d..4ab6ee4 100644 (file)
@@ -791,7 +791,9 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
         template: 'PosWidget',
         init: function() { 
             this._super(arguments[0],{});
-            
+
+            instance.web.blockUI(); 
+
             this.pos = new module.PosModel(this.session);
             this.pos_widget = this; //So that pos_widget's childs have pos_widget set automatically
 
@@ -841,11 +843,11 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
                     self.screen_selector.show_popup('error', 'Sorry, we could not find any PoS Configuration for this session');
                 }
             
+                instance.web.unblockUI();
                 self.$('.loader').animate({opacity:0},1500,'swing',function(){self.$('.loader').hide();});
-                self.$('.loader img').hide();
 
             }).fail(function(){   // error when loading models data from the backend
-                self.$('.loader img').hide();
+                instance.web.unblockUI();
                 return new instance.web.Model("ir.model.data").get_func("search_read")([['name', '=', 'action_pos_session_opening']], ['res_id'])
                     .pipe( _.bind(function(res){
                         return instance.session.rpc('/web/action/load', {'action_id': res[0]['res_id']})
index 986921a..cb4d90f 100644 (file)
@@ -31,7 +31,6 @@
                 </div>
             </div>
             <div class="loader">
-                <img src="/point_of_sale/static/src/img/loader.gif" />
             </div>
         </div>
     </t>