File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ $.widget("ui.menubar", {
129
129
}
130
130
} ) ;
131
131
} ,
132
+
132
133
_destroy : function ( ) {
133
134
var items = this . element . children ( "li" )
134
135
. removeClass ( "ui-menubar-item" )
@@ -138,17 +139,18 @@ $.widget("ui.menubar", {
138
139
this . element . removeClass ( 'ui-menubar ui-widget-header ui-helper-clearfix' ) . removeAttr ( "role" , "menubar" ) . unbind ( ".menubar" ) ; ;
139
140
items . unbind ( "focusin focusout click focus mouseenter keydown" ) ;
140
141
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 " )
143
144
. removeAttr ( "role" , "menuitem" )
144
145
. removeAttr ( "aria-haspopup" , "true" )
145
146
. children ( "span.ui-button-text" ) . each ( function ( i , e ) {
146
147
var item = $ ( this ) ;
147
148
item . parent ( ) . html ( item . html ( ) ) ;
148
- } ) ;
149
- $ ( document ) . unbind ( ".menubar" ) ;
149
+ } )
150
+ . end ( )
151
+ . children ( ".ui-icon" ) . remove ( ) ;
150
152
151
- //TODO remove icons
153
+ $ ( document ) . unbind ( ".menubar" ) ;
152
154
153
155
this . element . find ( ":ui-menu" ) . menu ( "destroy" )
154
156
. show ( )
You can’t perform that action at this time.
0 commit comments