var noHookAction = args.splice(0,1)[0]
var result = false;
- // $.log('calling hook: ', hookName, 'with args: ', args);
+ $.log('calling hook: ', hookName, 'with args: ', args);
if(this.hooks && this.hooks[hookName])
result = this.hooks[hookName].apply(this, args);
else if (noHookAction instanceof Function)
return result;
}
+Panel.prototype._endload = function () {
+ // this needs to be here, so we
+ this.connectToolbar();
+ this.callHook('toolbarResized');
+}
+
Panel.prototype.load = function (url) {
// $.log('preparing xhr load: ', this.wrap);
$(document).trigger('panel:unload', this);
panel_hooks = null;
$(self.contentDiv).html(data);
self.hooks = panel_hooks;
- panel_hooks = null;
- self.connectToolbar();
- self.callHook('load');
- self.callHook('toolbarResized');
+ panel_hooks = null;
+ self.callHook('load');
},
error: function(request, textStatus, errorThrown) {
$.log('ajax', url, this.target, 'error:', textStatus, errorThrown);
- $(self.contentDiv).html("<p>Wystapił błąd podczas wczytywania panelu.");
+ $(self.contentDiv).html("<p>Wystapił błąd podczas wczytywania panelu.</p>");
}
});
}
var extra_buttons = $('span.panel-toolbar-extra', toolbar);
var placeholder = $('div.panel-toolbar span.panel-toolbar-extra', this.wrap);
placeholder.replaceWith(extra_buttons);
+ extra_buttons.hide();
var action_buttons = $('button', extra_buttons);
}
else {
self.refreshPanels();
- $('#toolbar-button-save').attr('disabled', 'disabled');
- $('#toolbar-button-commit').removeAttr('disabled');
- $('#toolbar-button-update').removeAttr('disabled');
+
+
if(self.autosaveTimer)
clearTimeout(self.autosaveTimer);