Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rjs_json_form
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
rjs_json_form
Commits
0df2f3ed
Commit
0df2f3ed
authored
Mar 07, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove function loadEventList(gadget)
parent
0028a25c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
39 deletions
+35
-39
gadget_json_generated_form.js
gadget_json_generated_form.js
+35
-39
No files found.
gadget_json_generated_form.js
View file @
0df2f3ed
...
...
@@ -461,44 +461,6 @@
});
}
function
loadEventList
(
gadget
)
{
var
g
=
gadget
,
field_list
=
g
.
props
.
inputs
,
button_list
=
g
.
props
.
add_buttons
,
label_list
=
g
.
element
.
querySelectorAll
(
'
label.slapos-parameter-dict-key
'
),
i
,
promise_list
=
[];
for
(
i
=
0
;
i
<
field_list
.
length
;
i
=
i
+
1
)
{
promise_list
.
push
(
loopEventListener
(
field_list
[
i
],
'
change
'
,
false
,
gadget
.
processValidation
.
bind
(
g
,
g
.
options
.
schema_url
,
undefined
)
));
}
for
(
i
=
0
;
i
<
button_list
.
length
;
i
=
i
+
1
)
{
promise_list
.
push
(
loopEventListener
(
button_list
[
i
].
element
,
'
click
'
,
false
,
addSubForm
.
bind
(
g
,
g
,
button_list
[
i
])
));
}
// for (i = 0; i < label_list.length; i = i + 1) {
// promise_list.push(loopEventListener(
// label_list[i],
// 'click',
// false,
// collapseParameter.bind(g, label_list[i])
// ));
// }
return
RSVP
.
all
(
promise_list
);
}
rJS
(
window
)
.
ready
(
function
()
{
var
g
=
this
;
...
...
@@ -641,7 +603,41 @@
})
.
declareJob
(
'
listenEvents
'
,
function
()
{
return
loadEventList
(
this
);
var
g
=
this
,
field_list
=
g
.
props
.
inputs
,
button_list
=
g
.
props
.
add_buttons
,
label_list
=
g
.
element
.
querySelectorAll
(
'
label.slapos-parameter-dict-key
'
),
i
,
promise_list
=
[];
for
(
i
=
0
;
i
<
field_list
.
length
;
i
=
i
+
1
)
{
promise_list
.
push
(
loopEventListener
(
field_list
[
i
],
'
change
'
,
false
,
g
.
processValidation
.
bind
(
g
,
g
.
options
.
schema_url
,
undefined
)
));
}
for
(
i
=
0
;
i
<
button_list
.
length
;
i
=
i
+
1
)
{
promise_list
.
push
(
loopEventListener
(
button_list
[
i
].
element
,
'
click
'
,
false
,
addSubForm
.
bind
(
g
,
g
,
button_list
[
i
])
));
}
// for (i = 0; i < label_list.length; i = i + 1) {
// promise_list.push(loopEventListener(
// label_list[i],
// 'click',
// false,
// collapseParameter.bind(g, label_list[i])
// ));
// }
return
RSVP
.
all
(
promise_list
);
})
.
declareMethod
(
'
getContent
'
,
function
()
{
...
...
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