easy-file-system 2.1.258 → 2.1.262
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.
- package/example.js +358 -775
- package/lib/button/toggle.js +11 -24
- package/lib/div/item/entry/drag/directoryName.js +11 -25
- package/lib/div/item/entry/drag/fileName.js +11 -24
- package/lib/div/item/entry/drag.js +11 -25
- package/lib/div/item/entry/marker.js +11 -24
- package/lib/div/item/entry.js +11 -24
- package/lib/example/view/explorer/first.js +11 -24
- package/lib/example/view/explorer/second.js +11 -24
- package/lib/example/view/rubbishBin.js +11 -24
- package/lib/example/view.js +19 -41
- package/lib/explorer.js +13 -28
- package/lib/item/entry/drag/directoryName.js +12 -27
- package/lib/item/entry/drag/fileName.js +11 -24
- package/lib/item/entry/drag.js +28 -35
- package/lib/item/entry/marker/directoryName.js +11 -24
- package/lib/item/entry/marker/fileName.js +11 -24
- package/lib/item/entry/marker.js +11 -24
- package/lib/item/entry.js +11 -24
- package/lib/list/entries.js +11 -24
- package/lib/rubbishBin.js +13 -28
- package/lib/span/name.js +22 -28
- package/lib/svg/directoryName.js +11 -24
- package/lib/svg/fileName.js +11 -24
- package/lib/svg/marker.js +11 -24
- package/lib/svg/rubbishBin/closed.js +11 -24
- package/lib/svg/rubbishBin/open.js +11 -24
- package/lib/svg/toggle/down.js +11 -24
- package/lib/svg/toggle/up.js +11 -24
- package/lib/svg.js +11 -24
- package/package.json +1 -1
- package/src/item/entry/drag.js +18 -4
- package/src/span/name.js +13 -4
package/src/span/name.js
CHANGED
|
@@ -63,6 +63,8 @@ class NameSpan extends Element {
|
|
|
63
63
|
|
|
64
64
|
this.addAttribute(CONTENT_EDITABLE, TRUE);
|
|
65
65
|
|
|
66
|
+
this.onKeyDown(this.keyDownHandler);
|
|
67
|
+
|
|
66
68
|
const html = this.html(),
|
|
67
69
|
range = document.createRange(),
|
|
68
70
|
selection = window.getSelection(),
|
|
@@ -79,8 +81,6 @@ class NameSpan extends Element {
|
|
|
79
81
|
selection.removeAllRanges();
|
|
80
82
|
|
|
81
83
|
selection.addRange(range);
|
|
82
|
-
|
|
83
|
-
this.onKeyDown(this.keyDownHandler);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
reset() {
|
|
@@ -89,14 +89,22 @@ class NameSpan extends Element {
|
|
|
89
89
|
this.removeAttribute(CONTENT_EDITABLE, TRUE);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
isEditable() {
|
|
93
|
+
const contentEditableAttribute = this.hasAttribute(CONTENT_EDITABLE),
|
|
94
|
+
editable = contentEditableAttribute; ///
|
|
95
|
+
|
|
96
|
+
return editable;
|
|
97
|
+
}
|
|
98
|
+
|
|
92
99
|
parentContext() {
|
|
93
100
|
const editNameSpan = this.edit.bind(this), ///
|
|
94
101
|
resetNameSpan = this.reset.bind(this), ///
|
|
95
102
|
getNameSpanName = this.getName.bind(this), ///
|
|
96
103
|
setNameSpanName = this.setName.bind(this), ///
|
|
104
|
+
isNameSpanEditable = this.isEditable.bind(this), ///
|
|
97
105
|
onCustomNameSpanCancel = this.onCustomCancel.bind(this), ///
|
|
98
|
-
offCustomNameSpanCancel = this.offCustomCancel.bind(this), ///
|
|
99
106
|
onCustomNameSpanChange = this.onCustomChange.bind(this), ///
|
|
107
|
+
offCustomNameSpanCancel = this.offCustomCancel.bind(this), ///
|
|
100
108
|
offCustomNameSpanChange = this.offCustomChange.bind(this); ///
|
|
101
109
|
|
|
102
110
|
return ({
|
|
@@ -104,9 +112,10 @@ class NameSpan extends Element {
|
|
|
104
112
|
resetNameSpan,
|
|
105
113
|
getNameSpanName,
|
|
106
114
|
setNameSpanName,
|
|
115
|
+
isNameSpanEditable,
|
|
107
116
|
onCustomNameSpanCancel,
|
|
108
|
-
offCustomNameSpanCancel,
|
|
109
117
|
onCustomNameSpanChange,
|
|
118
|
+
offCustomNameSpanCancel,
|
|
110
119
|
offCustomNameSpanChange
|
|
111
120
|
});
|
|
112
121
|
}
|