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
Jérome Perrin
rjs_json_form
Commits
8c970da5
Commit
8c970da5
authored
Mar 22, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop loopEventListener dependency
parent
17604d11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
56 deletions
+29
-56
gadget_json_generated_form.html
gadget_json_generated_form.html
+0
-1
gadget_json_generated_form.js
gadget_json_generated_form.js
+29
-55
No files found.
gadget_json_generated_form.html
View file @
8c970da5
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
<link
href=
"gadget_erp5_page_slap_parameter_form.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link
href=
"gadget_erp5_page_slap_parameter_form.css"
rel=
"stylesheet"
type=
"text/css"
/>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_global.js"
></script>
<script
src=
"gadget_json_generated_form.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_json_generated_form.js"
type=
"text/javascript"
></script>
</head>
</head>
<body>
<body>
...
...
gadget_json_generated_form.js
View file @
8c970da5
/*jslint nomen: true, maxlen: 200, indent: 2*/
/*jslint nomen: true, maxlen: 200, indent: 2*/
/*global window, document, rJS, RSVP
, loopEventListener
*/
/*global window, document, rJS, RSVP */
(
function
(
window
,
document
,
rJS
,
RSVP
,
loopEventListener
)
{
(
function
(
window
,
document
,
rJS
,
RSVP
)
{
"
use strict
"
;
"
use strict
"
;
function
decodeJsonPointer
(
_str
)
{
function
decodeJsonPointer
(
_str
)
{
...
@@ -812,62 +812,36 @@
...
@@ -812,62 +812,36 @@
});
});
})
})
.
declareJob
(
'
listenEvents
'
,
function
()
{
.
onEvent
(
'
click
'
,
function
(
evt
)
{
var
g
=
this
,
if
(
evt
.
target
===
this
.
props
.
delete_button
)
{
field_list
=
g
.
props
.
inputs
,
return
this
.
selfRemove
(
evt
);
button_list
=
g
.
props
.
add_buttons
,
label_list
=
g
.
element
.
querySelectorAll
(
'
label.slapos-parameter-dict-key
'
),
i
,
promise_list
=
[];
if
(
g
.
props
.
delete_button
)
{
promise_list
.
push
(
loopEventListener
(
g
.
props
.
delete_button
,
'
click
'
,
false
,
g
.
selfRemove
.
bind
(
g
)
));
}
if
(
g
.
props
.
property_name_edit
)
{
promise_list
.
push
(
loopEventListener
(
g
.
props
.
property_name_edit
,
'
change
'
,
false
,
function
(
event
)
{
return
g
.
rename
(
g
.
props
.
property_name_edit
.
value
,
event
);
}
));
}
}
for
(
i
=
0
;
i
<
field_list
.
length
;
i
=
i
+
1
)
{
var
button_list
=
this
.
props
.
add_buttons
,
promise_list
.
push
(
loopEventListener
(
i
;
field_list
[
i
],
for
(
i
=
0
;
i
<
button_list
.
length
;
i
=
i
+
1
)
{
'
change
'
,
if
(
evt
.
target
===
button_list
[
i
].
element
)
{
false
,
return
button_list
[
i
].
event
(
evt
);
g
.
processValidation
.
bind
(
g
,
g
.
options
.
schema_url
,
undefined
)
}
));
}
}
})
for
(
i
=
0
;
i
<
button_list
.
length
;
i
=
i
+
1
)
{
.
onEvent
(
'
change
'
,
function
(
evt
)
{
promise_list
.
push
(
loopEventListener
(
if
(
evt
.
target
===
this
.
props
.
property_name_edit
)
{
button_list
[
i
].
element
,
return
this
.
rename
(
this
.
props
.
property_name_edit
.
value
,
evt
);
'
click
'
,
}
false
,
button_list
[
i
].
event
var
field_list
=
this
.
props
.
inputs
,
));
i
;
}
for
(
i
=
0
;
i
<
field_list
.
length
;
i
=
i
+
1
)
{
if
(
evt
.
target
===
field_list
[
i
].
element
)
{
// for (i = 0; i < label_list.length; i = i + 1) {
return
this
.
processValidation
.
bind
(
this
,
this
.
options
.
schema_url
,
undefined
)(
evt
);
// promise_list.push(loopEventListener(
}
// label_list[i],
}
// 'click',
})
// false,
.
declareJob
(
'
listenEvents
'
,
function
()
{
// collapseParameter.bind(g, label_list[i])
// XXX Disable
// ));
return
;
// }
return
RSVP
.
all
(
promise_list
);
})
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
()
{
...
@@ -882,4 +856,4 @@
...
@@ -882,4 +856,4 @@
// });
// });
});
});
}(
window
,
document
,
rJS
,
RSVP
,
loopEventListener
));
}(
window
,
document
,
rJS
,
RSVP
));
\ No newline at end of file
\ No newline at end of file
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