File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 76
76
target = event . relatedTarget ;
77
77
console . log ( "beforeOpen" , this , event , ui ) ;
78
78
$menu . append ( $ ( "<li>" ) . text ( "hurz" ) ) ;
79
- $menu . contextmenu ( "enableEntry" , "cut" , false ) ;
79
+ $ ( document ) . contextmenu ( "enableEntry" , "cut" , false ) ;
80
+ $ ( document ) . contextmenu ( "showEntry" , "paste" , false ) ;
80
81
// optionally return false, to prevent opening the menu now
81
82
}
82
83
} ) ;
Original file line number Diff line number Diff line change 232
232
/** Enable or disable the menu command. */
233
233
enableEntry : function ( cmd , flag ) {
234
234
var $entry = this . element . find ( "a[href=#" + cmd + "]" ) ;
235
- $entry . toggleClass ( "ui-status-disabled" , ( flag === false ) ) ;
235
+ $entry . toggleClass ( "ui-state-disabled" , ( flag === false ) ) ;
236
+ } ,
237
+ /** Show or hide the menu command. */
238
+ showEntry : function ( cmd , flag ) {
239
+ var $entry = this . element . find ( "a[href=#" + cmd + "]" ) ;
240
+ $entry . toggle ( flag !== false ) ;
236
241
}
237
242
} ) ;
238
243
You can’t perform that action at this time.
0 commit comments