Fixed clear_custom_buttons (clear_primary_action)

This commit is contained in:
Anand Doshi 2014-04-24 20:20:43 +05:30
parent f5f54750ef
commit f1007f62c8

View file

@ -80,7 +80,8 @@ frappe.ui.AppFrame = Class.extend({
clear_primary_action: function() {
if(this.primary_dropdown) {
this.primary_dropdown.remove();
this.primary_dropdown = null;
this.primary_action.remove();
this.primary_dropdown = this.primary_action = null;
}
},
@ -101,7 +102,7 @@ frappe.ui.AppFrame = Class.extend({
.attr("data-toggle", "dropdown")
.addClass("dropdown-toggle")
.parent()
.addClass("dropdown")
.addClass("dropdown");
this.primary_dropdown = $('<ul class="dropdown-menu pull-right" role="menu" \
aria-labelledby="'+ id +'"></ul>')
.insertAfter(this.primary_action).dropdown();