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
a9ac5818
Commit
a9ac5818
authored
Feb 21, 2019
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rerender() use keyword arguments now
parent
9d7adfd1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
18 deletions
+40
-18
demo/xmla_connection/index.js
demo/xmla_connection/index.js
+4
-1
jsonform.gadget.js
jsonform.gadget.js
+29
-13
jsonform/gadget_json_generated_form_child.js
jsonform/gadget_json_generated_form_child.js
+7
-4
No files found.
demo/xmla_connection/index.js
View file @
a9ac5818
...
...
@@ -257,7 +257,10 @@
return
generateSchema
(
settings
);
})
.
push
(
function
(
schema
)
{
return
gadget_settings
.
rerender
(
rerender_path
,
schema
);
return
gadget_settings
.
rerender
({
path
:
rerender_path
,
schema
:
schema
});
})
.
push
(
function
()
{
// return g.notifyChange();
...
...
jsonform.gadget.js
View file @
a9ac5818
...
...
@@ -963,25 +963,41 @@
return
g
;
});
})
.
declareMethod
(
'
rerender
'
,
function
(
path
,
schema
)
{
.
declareMethod
(
'
rerender
'
,
function
(
opt
)
{
var
g
=
this
,
gadget
;
if
(
path
)
{
return
g
.
props
.
form_gadget
.
getGadgetByPath
(
path
)
gadget
,
queue
=
RSVP
.
Queue
();
if
(
opt
.
path
)
{
queue
.
push
(
function
()
{
return
g
.
props
.
form_gadget
.
getGadgetByPath
(
opt
.
path
);
})
.
push
(
function
(
ret
)
{
gadget
=
ret
.
gadget
;
});
}
if
(
opt
.
scope
)
{
queue
.
push
(
function
()
{
return
g
.
props
.
form_gadget
.
getDeclaredGadget
(
opt
.
scope
);
})
.
push
(
function
(
ret
)
{
gadget
=
ret
;
});
}
return
queue
.
push
(
function
()
{
return
gadget
.
getContent
();
})
.
push
(
function
(
value
)
{
return
gadget
.
rerender
({
schema
:
schema
,
schema
:
opt
.
schema
,
value
:
value
})
.
push
(
function
()
{
return
gadget
.
reValidate
(
value
,
schema
);
return
gadget
.
reValidate
(
value
,
opt
.
schema
);
});
});
}
})
.
allowPublicAcquisition
(
"
expandSchema
"
,
function
(
arr
)
{
...
...
jsonform/gadget_json_generated_form_child.js
View file @
a9ac5818
...
...
@@ -625,11 +625,16 @@
gadget
.
props
.
add_custom_data
[
scope
]
=
{
element
:
g
.
element
,
event
:
function
()
{
var
notify
=
{
action
:
"
add
"
};
return
g
.
getContent
()
.
push
(
function
(
value
)
{
return
event
(
schema_alternatives
[
value
[
scope
]].
value
);
})
.
push
(
function
()
{
.
push
(
function
(
v
)
{
notify
.
scope
=
v
.
scope
;
notify
.
path
=
v
.
path
;
if
(
rerender
)
{
return
rerender
(
g
,
schema_alternatives
);
}
...
...
@@ -639,9 +644,7 @@
return
g
.
render
(
render_options
);
})
.
push
(
function
()
{
// XXX need path argument
// absent in current context
return
gadget
.
rootNotifyChange
();
return
gadget
.
rootNotifyChange
(
notify
);
});
},
rerender
:
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