}
});
-openerp.web.Loading = openerp.web.Widget.extend(/** @lends openerp.web.Loading# */{
+openerp.web.Loading = openerp.web.Widget.extend(/** @lends openerp.web.Loading# */{
+ template: 'Loading',
/**
* @constructs openerp.web.Loading
* @extends openerp.web.Widget
* @param parent
* @param element_id
*/
- init: function(parent, element_id) {
- this._super(parent, element_id);
+ init: function(parent) {
+ this._super(parent);
this.count = 0;
this.blocked_ui = false;
this.session.on_rpc_request.add_first(this.on_rpc_event, 1);
}
this.count += increment;
- if (this.count) {
+ if (this.count > 0) {
//this.$element.html(QWeb.render("Loading", {}));
this.$element.html("Loading ("+this.count+")");
this.$element.show();
this.widget_parent.$element.addClass('loading');
} else {
+ this.count = 0;
clearTimeout(this.long_running_timer);
// Don't unblock if blocked by somebody else
if (self.blocked_ui) {
this.$element.html(QWeb.render("Interface", params));
this.notification = new openerp.web.Notification(this);
- this.loading = new openerp.web.Loading(this,"oe_loading");
+ this.loading = new openerp.web.Loading(this);
this.crashmanager = new openerp.web.CrashManager();
this.header = new openerp.web.Header(this);
start: function() {
this._super.apply(this, arguments);
this.notification.prependTo(this.$element);
+ this.loading.appendTo($('#oe_loading'));
this.header.appendTo($("#oe_header"));
this.session.start();
this.login.appendTo($('#oe_login'));
</div>
</t>
<t t-name="Interface">
- <div id="oe_loading" class="loading"></div>
+ <div id="oe_loading"></div>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="main_table">
<tr>
<td colspan="2" valign="top">
</table>
</t>
<t t-name="Loading">
+ <div class="loading">
Loading...
+ </div>
</t>
<t t-name="Database">
<ul class="db_options" style="padding: 0px; display: inline;">