Skip to content

Commit e448cd0

Browse files
committed
Added icon removal to _destroy
1 parent c6cbd81 commit e448cd0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/visual/menu/menubar.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ $.widget("ui.menubar", {
129129
}
130130
});
131131
},
132+
132133
_destroy : function() {
133134
var items = this.element.children("li")
134135
.removeClass("ui-menubar-item")
@@ -138,17 +139,18 @@ $.widget("ui.menubar", {
138139
this.element.removeClass('ui-menubar ui-widget-header ui-helper-clearfix').removeAttr("role", "menubar").unbind(".menubar");;
139140
items.unbind("focusin focusout click focus mouseenter keydown");
140141

141-
items
142-
.removeClass("ui-button ui-widget ui-button-text-only ui-menubar-link")
142+
items
143+
.removeClass("ui-button ui-widget ui-button-text-only ui-menubar-link ui-state-default")
143144
.removeAttr("role", "menuitem")
144145
.removeAttr("aria-haspopup", "true")
145146
.children("span.ui-button-text").each(function(i, e) {
146147
var item = $(this);
147148
item.parent().html(item.html());
148-
});
149-
$(document).unbind(".menubar");
149+
})
150+
.end()
151+
.children(".ui-icon").remove();
150152

151-
//TODO remove icons
153+
$(document).unbind(".menubar");
152154

153155
this.element.find(":ui-menu").menu("destroy")
154156
.show()

0 commit comments

Comments
 (0)