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 1
1
# 1.10.1-0 / Unreleased
2
2
3
3
* [ FEATURE] #94 Add ` main ` field to package.json
4
+ * [ CHANGE] #98 Allow to show/hide separators
4
5
5
6
# 1.10.0 / 2015-06-27
6
7
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ $(document).contextmenu({
87
87
});
88
88
```
89
89
** Note:** only one contextmenu widget instance can be bound to one element.
90
+ See the * Howto* below for a solution to this problem.
90
91
91
92
The ` menu ` options may contain a (nested) array of entry defiitions.
92
93
Following a list of available properties:
Original file line number Diff line number Diff line change @@ -377,13 +377,14 @@ $.extend($.moogle.contextmenu, {
377
377
createEntryMarkup : function ( entry , $parentLi ) {
378
378
var $a = null ;
379
379
380
+ $parentLi . attr ( "data-command" , entry . cmd ) ;
381
+
380
382
if ( ! / [ ^ \- \u2014 \u2013 \s ] / . test ( entry . title ) ) {
381
383
// hyphen, em dash, en dash: separator as defined by UI Menu 1.10
382
384
$parentLi . text ( entry . title ) ;
383
385
} else {
384
386
if ( isLTE110 ) {
385
387
// jQuery UI Menu 1.10 or before required an `<a>` tag
386
- $parentLi . attr ( "data-command" , entry . cmd ) ;
387
388
$a = $ ( "<a/>" , {
388
389
html : "" + entry . title ,
389
390
href : "#"
@@ -395,9 +396,7 @@ $.extend($.moogle.contextmenu, {
395
396
396
397
} else {
397
398
// 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 ) ;
401
400
if ( $ . isFunction ( entry . action ) ) {
402
401
$parentLi . data ( "actionHandler" , entry . action ) ;
403
402
}
You can’t perform that action at this time.
0 commit comments