bullet_train-fields 1.3.12 → 1.3.13
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76bf3820e1108b6cc9ad85051e3031136ca00a7fb7c09ba981c47f50e2015b9b
|
4
|
+
data.tar.gz: 003d2b91b86199d44b9fc0ac905e11523b70e02e6aabdeb6eb78b8672d333c18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ede6dfa371f47802518b974c8a7d1ed09c3238c3c4732b2f9207d0ea7dd53275134e5588350bffe1c71319c2f81eed0f6f36486f301f9ff43c0626721cb8226
|
7
|
+
data.tar.gz: a7dd3d1d510fc4ef98d0a3f998b8d9bb28f54134161be63111d09d599d67601ad5e2808dd31990eb289b46d3b1f03cddff510a9926703d6d6943ee06df3bf448
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Controller } from "@hotwired/stimulus";
|
2
|
+
|
3
|
+
export default class extends Controller {
|
4
|
+
static targets = [
|
5
|
+
"removeFileFlag",
|
6
|
+
"downloadFileButton",
|
7
|
+
"removeFileButton",
|
8
|
+
"fileName"
|
9
|
+
];
|
10
|
+
|
11
|
+
static values = { id: Number }
|
12
|
+
|
13
|
+
removeFile() {
|
14
|
+
if (this.hasDownloadFileButtonTarget) {
|
15
|
+
this.downloadFileButtonTarget.classList.add("hidden");
|
16
|
+
}
|
17
|
+
|
18
|
+
this.removeFileButtonTarget.classList.add("hidden");
|
19
|
+
this.fileNameTarget.classList.add("hidden");
|
20
|
+
this.removeFileFlagTarget.value = this.idValue;
|
21
|
+
}
|
22
|
+
|
23
|
+
}
|
@@ -7,6 +7,7 @@ import ColorPickerController from './fields/color_picker_controller'
|
|
7
7
|
import DateController from './fields/date_controller'
|
8
8
|
import EmojiPickerController from './fields/emoji_picker_controller'
|
9
9
|
import FileFieldController from './fields/file_field_controller'
|
10
|
+
import FileItemController from './fields/file_item_controller'
|
10
11
|
import PasswordController from './fields/password_controller'
|
11
12
|
import PhoneController from './fields/phone_controller'
|
12
13
|
import SuperSelectController from './fields/super_select_controller'
|
@@ -19,6 +20,7 @@ export const controllerDefinitions = [
|
|
19
20
|
[DateController, 'fields/date_controller.js'],
|
20
21
|
[EmojiPickerController, 'fields/emoji_picker_controller.js'],
|
21
22
|
[FileFieldController, 'fields/file_field_controller.js'],
|
23
|
+
[FileItemController, 'fields/file_item_controller.js'],
|
22
24
|
[PasswordController, 'fields/password_controller.js'],
|
23
25
|
[PhoneController, 'fields/phone_controller.js'],
|
24
26
|
[SuperSelectController, 'fields/super_select_controller.js'],
|
@@ -39,6 +41,7 @@ export {
|
|
39
41
|
DateController,
|
40
42
|
EmojiPickerController,
|
41
43
|
FileFieldController,
|
44
|
+
FileItemController,
|
42
45
|
PasswordController,
|
43
46
|
PhoneController,
|
44
47
|
SuperSelectController,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- app/javascript/controllers/fields/emoji_picker_controller.js
|
112
112
|
- app/javascript/controllers/fields/field_controller.js
|
113
113
|
- app/javascript/controllers/fields/file_field_controller.js
|
114
|
+
- app/javascript/controllers/fields/file_item_controller.js
|
114
115
|
- app/javascript/controllers/fields/password_controller.js
|
115
116
|
- app/javascript/controllers/fields/phone_controller.js
|
116
117
|
- app/javascript/controllers/fields/super_select_controller.js
|