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
Hide 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 @@
...
@@ -257,7 +257,10 @@
return
generateSchema
(
settings
);
return
generateSchema
(
settings
);
})
})
.
push
(
function
(
schema
)
{
.
push
(
function
(
schema
)
{
return
gadget_settings
.
rerender
(
rerender_path
,
schema
);
return
gadget_settings
.
rerender
({
path
:
rerender_path
,
schema
:
schema
});
})
})
.
push
(
function
()
{
.
push
(
function
()
{
// return g.notifyChange();
// return g.notifyChange();
...
...
jsonform.gadget.js
View file @
a9ac5818
...
@@ -963,25 +963,41 @@
...
@@ -963,25 +963,41 @@
return
g
;
return
g
;
});
});
})
})
.
declareMethod
(
'
rerender
'
,
function
(
path
,
schema
)
{
.
declareMethod
(
'
rerender
'
,
function
(
opt
)
{
var
g
=
this
,
var
g
=
this
,
gadget
;
gadget
,
if
(
path
)
{
queue
=
RSVP
.
Queue
();
return
g
.
props
.
form_gadget
.
getGadgetByPath
(
path
)
if
(
opt
.
path
)
{
queue
.
push
(
function
()
{
return
g
.
props
.
form_gadget
.
getGadgetByPath
(
opt
.
path
);
})
.
push
(
function
(
ret
)
{
.
push
(
function
(
ret
)
{
gadget
=
ret
.
gadget
;
gadget
=
ret
.
gadget
;
return
gadget
.
getContent
();
});
}
if
(
opt
.
scope
)
{
queue
.
push
(
function
()
{
return
g
.
props
.
form_gadget
.
getDeclaredGadget
(
opt
.
scope
);
})
})
.
push
(
function
(
value
)
{
.
push
(
function
(
ret
)
{
return
gadget
.
rerender
({
gadget
=
ret
;
schema
:
schema
,
value
:
value
})
.
push
(
function
()
{
return
gadget
.
reValidate
(
value
,
schema
);
});
});
});
}
}
return
queue
.
push
(
function
()
{
return
gadget
.
getContent
();
})
.
push
(
function
(
value
)
{
return
gadget
.
rerender
({
schema
:
opt
.
schema
,
value
:
value
})
.
push
(
function
()
{
return
gadget
.
reValidate
(
value
,
opt
.
schema
);
});
});
})
})
.
allowPublicAcquisition
(
"
expandSchema
"
,
function
(
arr
)
{
.
allowPublicAcquisition
(
"
expandSchema
"
,
function
(
arr
)
{
...
...
jsonform/gadget_json_generated_form_child.js
View file @
a9ac5818
...
@@ -625,11 +625,16 @@
...
@@ -625,11 +625,16 @@
gadget
.
props
.
add_custom_data
[
scope
]
=
{
gadget
.
props
.
add_custom_data
[
scope
]
=
{
element
:
g
.
element
,
element
:
g
.
element
,
event
:
function
()
{
event
:
function
()
{
var
notify
=
{
action
:
"
add
"
};
return
g
.
getContent
()
return
g
.
getContent
()
.
push
(
function
(
value
)
{
.
push
(
function
(
value
)
{
return
event
(
schema_alternatives
[
value
[
scope
]].
value
);
return
event
(
schema_alternatives
[
value
[
scope
]].
value
);
})
})
.
push
(
function
()
{
.
push
(
function
(
v
)
{
notify
.
scope
=
v
.
scope
;
notify
.
path
=
v
.
path
;
if
(
rerender
)
{
if
(
rerender
)
{
return
rerender
(
g
,
schema_alternatives
);
return
rerender
(
g
,
schema_alternatives
);
}
}
...
@@ -639,9 +644,7 @@
...
@@ -639,9 +644,7 @@
return
g
.
render
(
render_options
);
return
g
.
render
(
render_options
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
// XXX need path argument
return
gadget
.
rootNotifyChange
(
notify
);
// absent in current context
return
gadget
.
rootNotifyChange
();
});
});
},
},
rerender
:
function
()
{
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