From f587526c5af31dfd3cd546bd8603a6a0e3bed26b Mon Sep 17 00:00:00 2001 From: "Martin@MBP" Date: Mon, 17 Apr 2017 10:09:50 +0200 Subject: [PATCH 1/6] Bump prerelease (1.17.1-0) [ci skip] --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 4a0080c..8278ad6 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "ui-contextmenu", "description": "Turn a jQuery UI Menu widget into a contextmenu.", - "version": "1.17.0", + "version": "1.17.1-0", "main": [ "jquery.ui-contextmenu.js" ], diff --git a/package.json b/package.json index 36d7887..cdebc48 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ui-contextmenu", "filename": "jquery.ui-contextmenu.min.js", "main": "jquery.ui-contextmenu.js", - "version": "1.17.0", + "version": "1.17.1-0", "title": "jQuery UI context menu plugin", "description": "Turn a jQuery UI Menu widget into a contextmenu.", "keywords": [ From fe10718a4103a25ebc15bd9633a40ce139e55e5b Mon Sep 17 00:00:00 2001 From: "Martin@MBP" Date: Mon, 17 Apr 2017 13:26:45 +0200 Subject: [PATCH 2/6] Update changelog --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1f341f..57ddd96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -# 1.17.0-1 / Unreleased +# 1.17.1-1 / Unreleased + +* + +# 1.17.0 / 2017-04-17 * [FEATURE] #59 Allow callbacks for `disabled`, `title`, and `tooltip` options * [FEATURE] #116 `autoFocus` skips leading disabled entries. From 66f22cd6495b06aef3a3038221ce5bc0ed9f2f16 Mon Sep 17 00:00:00 2001 From: "Martin@MBP" Date: Sun, 9 Jul 2017 22:12:48 +0200 Subject: [PATCH 3/6] Update .editorconfig --- .editorconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index fe6e86c..81ab38c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,10 +17,9 @@ indent_size = 4 ; Tab indentation (no size specified) [*.js] ; indent_style = tab -indent_style = space -indent_size = 4 +indent_style = tab ; Indentation override for all JS under lib directory -[lib/**.js] -indent_style = space -indent_size = 2 +;[lib/**.js] +;indent_style = space +;indent_size = 2 From 2b600e7ff5d2ea32a81208e29b5d7443e66ff64b Mon Sep 17 00:00:00 2001 From: Martin Wendt Date: Sun, 30 Jul 2017 19:15:26 +0200 Subject: [PATCH 4/6] Refactor set entry (#122) * Add updateEntry() method * Add tests * Fix jscs warnings --- .editorconfig | 5 +- CHANGELOG.md | 24 +++++--- README.md | 16 ++--- demo/index-1-12.html | 8 ++- jquery.ui-contextmenu.js | 124 +++++++++++++++++++++++++++++-------- package.json | 4 +- test/tests.js | 129 +++++++++++++++++++++++++++++++-------- 7 files changed, 239 insertions(+), 71 deletions(-) diff --git a/.editorconfig b/.editorconfig index 81ab38c..a9d53aa 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,7 +5,7 @@ root = true ; Unix-style newlines with a newline ending every file [*] -; end_of_line = lf +end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true @@ -16,8 +16,9 @@ indent_size = 4 ; Tab indentation (no size specified) [*.js] -; indent_style = tab indent_style = tab +;indent_style = space +;indent_size = 4 ; Indentation override for all JS under lib directory ;[lib/**.js] diff --git a/CHANGELOG.md b/CHANGELOG.md index 57ddd96..0bbc9d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ -# 1.17.1-1 / Unreleased - -* +# 1.18.0-0 / Unreleased + +* [CHANGE] Refactored entry update methods + - `setEntry(cmd, data)`: + Clarify that this method resets all attributes *not* passed in + `data` are reset to defaults.
+ Also, passing a plain title string as `data` is deprecated: use `setTitle()` instead. + - Add method `updateEntry(cmd, data)`.
+ Example: `updateEntry("info", {title: "Show info...", enable: false})`
+ Unlike `setEntry()`, this method only updates menu attibutes that are + passed in `data`, leaving other attributes intact. + - Add methods `getEntry()`, `getEntryWrapper()`, `setIcon`, `setTitle` + (in addition to the existing `enableEntry` and `showEntry`). # 1.17.0 / 2017-04-17 @@ -13,7 +23,7 @@ # 1.16.0 / 2017-03-30 -* [FEATURE] #114: Pass `extraData` argument to `select` and other events. +* [FEATURE] #114: Pass `extraData` argument to `select` and other events. The same ui.extraData instance is passed to all events of a open-select-close sequence, so it can also be used to pass data between events. @@ -24,7 +34,7 @@ # 1.14.0 / 2017-01-30 * #108: Update AMD dependency to be compatible with the jQuery 1.12 layout: - "jquery-ui/ui/widgets/menu" + "jquery-ui/ui/widgets/menu" NOTE: this is not backwards compatible with jQuery 1.11 and before: http://jqueryui.com/upgrade-guide/1.12/#official-package-on-npm @@ -103,11 +113,11 @@ * [FEATURE] New optional parameter open(..., extraData). * [FEATURE] New option `autoTrigger: true` can be set to `false` to prevent - opening menus on browser's `contextmenu` event (if you want to use the `open()` + opening menus on browser's `contextmenu` event (if you want to use the `open()` method instead). * [FEATURE] New option `preventContextMenuForPopup`to prevent opening the browser's system context menu on menu entries. -* [CHANGE] `setEntry()` and `replaceMenu()` now allow to define titles with HTML +* [CHANGE] `setEntry()` and `replaceMenu()` now allow to define titles with HTML markup. # 1.2.4 / 2013-12-25 diff --git a/README.md b/README.md index 84c8a2e..12de5b2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# jquery.ui-contextmenu [![GitHub version](https://badge.fury.io/gh/mar10%2Fjquery-ui-contextmenu.svg)](https://github.com/mar10/jquery-ui-contextmenu/releases/latest) [![Build Status](https://travis-ci.org/mar10/jquery-ui-contextmenu.png?branch=master)](https://travis-ci.org/mar10/jquery-ui-contextmenu) [![Selenium Test Status](https://saucelabs.com/buildstatus/sauce-contextmenu)](https://saucelabs.com/u/sauce-contextmenu) +# jquery.ui-contextmenu [![GitHub version](https://badge.fury.io/gh/mar10%2Fjquery-ui-contextmenu.svg)](https://github.com/mar10/jquery-ui-contextmenu/releases/latest) [![Build Status](https://travis-ci.org/mar10/jquery-ui-contextmenu.png?branch=master)](https://travis-ci.org/mar10/jquery-ui-contextmenu) [![Selenium Test Status](https://saucelabs.com/buildstatus/sauce-contextmenu)](https://saucelabs.com/u/sauce-contextmenu) [![npm](https://img.shields.io/npm/dm/ui-contextmenu.svg)](https://www.npmjs.com/package/ui-contextmenu) > A jQuery plugin that provides a context menu (based on the standard [jQueryUI menu] widget). - * Define menus from `