File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 11# 1.10.1-0 / Unreleased
22
33* [ FEATURE] #94 Add ` main ` field to package.json
4+ * [ CHANGE] #98 Allow to show/hide separators
45
56# 1.10.0 / 2015-06-27
67
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ $(document).contextmenu({
8787});
8888```
8989** Note:** only one contextmenu widget instance can be bound to one element.
90+ See the * Howto* below for a solution to this problem.
9091
9192The ` menu ` options may contain a (nested) array of entry defiitions.
9293Following a list of available properties:
Original file line number Diff line number Diff line change @@ -377,13 +377,14 @@ $.extend($.moogle.contextmenu, {
377377 createEntryMarkup : function ( entry , $parentLi ) {
378378 var $a = null ;
379379
380+ $parentLi . attr ( "data-command" , entry . cmd ) ;
381+
380382 if ( ! / [ ^ \- \u2014 \u2013 \s ] / . test ( entry . title ) ) {
381383 // hyphen, em dash, en dash: separator as defined by UI Menu 1.10
382384 $parentLi . text ( entry . title ) ;
383385 } else {
384386 if ( isLTE110 ) {
385387 // jQuery UI Menu 1.10 or before required an `<a>` tag
386- $parentLi . attr ( "data-command" , entry . cmd ) ;
387388 $a = $ ( "<a/>" , {
388389 html : "" + entry . title ,
389390 href : "#"
@@ -395,9 +396,7 @@ $.extend($.moogle.contextmenu, {
395396
396397 } else {
397398 // jQuery UI Menu 1.11+ preferes to avoid `<a>` tags
398- $parentLi
399- . attr ( "data-command" , entry . cmd )
400- . html ( "" + entry . title ) ;
399+ $parentLi . html ( "" + entry . title ) ;
401400 if ( $ . isFunction ( entry . action ) ) {
402401 $parentLi . data ( "actionHandler" , entry . action ) ;
403402 }
You can’t perform that action at this time.
0 commit comments