Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
8c60d825
Unverified
Commit
8c60d825
authored
Oct 08, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load folder data on dialog open
parent
f738d5a6
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72161 additions
and
72174 deletions
+72161
-72174
MoveMediaDialog.vue
Modules/Media/Assets/js/components/MoveMediaDialog.vue
+9
-5
app.js
public/js/app.js
+72152
-72169
No files found.
Modules/Media/Assets/js/components/MoveMediaDialog.vue
View file @
8c60d825
<
template
>
<div>
<el-dialog
title=
"Move Media"
:visible
.
sync=
"dialogFormVisible"
size=
"tiny"
class=
"move-media-dialog"
>
<el-dialog
title=
"Move Media"
:visible
.
sync=
"dialogFormVisible"
size=
"tiny"
class=
"move-media-dialog"
@
open=
"fetchFolders"
>
<el-form
v-loading
.
body=
"loading"
@
submit
.
native
.
prevent=
"onSubmit()"
>
<el-form-item
label=
"To"
:class=
"
{'el-form-item is-error': form.errors.has('name') }">
<el-select
v-model=
"destinationFolder"
placeholder=
"Select"
>
...
...
@@ -8,7 +8,8 @@
v-for=
"(item, id) in options"
:key=
"id"
:label=
"item"
:value=
"id"
>
:value=
"id"
:loading=
"selectIsLoading"
>
<span
v-html=
"item"
></span>
</el-option>
</el-select>
...
...
@@ -37,6 +38,7 @@
dialogFormVisible
:
false
,
form
:
new
Form
(),
loading
:
false
,
selectIsLoading
:
false
,
options
:
[],
destinationFolder
:
''
,
};
...
...
@@ -63,15 +65,17 @@
this
.
form
.
clear
();
this
.
dialogFormVisible
=
false
;
},
async
fetchFolders
()
{
fetchFolders
()
{
this
.
selectIsLoading
=
true
;
axios
.
get
(
route
(
'
api.media.folders.all-nestable
'
))
.
then
((
response
)
=>
{
this
.
options
=
_
.
merge
(
response
.
data
,
{
0
:
'
Root
'
});
console
.
log
(
response
);
this
.
options
=
_
.
merge
(
response
.
data
,
{
0
:
'
Root
'
});
this
.
selectIsLoading
=
false
;
});
},
},
mounted
()
{
this
.
fetchFolders
();
this
.
$events
.
listen
(
'
moveMediaWasClicked
'
,
(
eventData
)
=>
{
this
.
selectedMedia
=
eventData
;
this
.
dialogFormVisible
=
true
;
...
...
public/js/app.js
View file @
8c60d825
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment