adapt-authoring-ui 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -195,19 +195,12 @@ define(function(require) {
195
195
  },
196
196
 
197
197
  copyIdToClipboard: function(model) {
198
- var id = model.get('_id');
199
-
200
- if (helpers.copyStringToClipboard(id)) {
201
- Origin.Notify.alert({
202
- type: 'info',
203
- text: Origin.l10n.t('app.copyidtoclipboardsuccess', { id: id })
204
- });
205
- } else {
206
- Origin.Notify.alert({
207
- type: 'warning',
208
- text: Origin.l10n.t('app.copyidtoclipboarderror', { id: id })
209
- });
210
- }
198
+ const id = model.get('_friendlyId') || model.get('_id');
199
+ const isSuccess = helpers.copyStringToClipboard(id)
200
+ Origin.Notify.alert({
201
+ type: isSuccess ? 'info' : 'warning',
202
+ text: Origin.l10n.t(isSuccess ? 'app.copyidtoclipboardsuccess' : 'app.copyidtoclipboarderror', { id })
203
+ });
211
204
  },
212
205
 
213
206
  pasteFromClipboard: function(_parentId, _sortOrder, _layout) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-ui",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "Front-end application for the Adapt authoring tool",
5
5
  "homepage": "https://github.com/adapt-security/adapt-authoring-ui",
6
6
  "license": "GPL-3.0",
@@ -20,7 +20,7 @@
20
20
  "@rollup/plugin-babel": "^6.0.3",
21
21
  "@rollup/plugin-commonjs": "^29.0.0",
22
22
  "@rollup/plugin-node-resolve": "^16.0.3",
23
- "@rollup/plugin-terser": "^0.4.0",
23
+ "@rollup/plugin-terser": "^1.0.0",
24
24
  "adapt-authoring-core": "^2.0.0",
25
25
  "babel-plugin-transform-amd-to-es6": "^1.0.2",
26
26
  "cpy": "^13.0.0",