Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
9e06df17
Commit
9e06df17
authored
Apr 05, 2019
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_json_form] update from
https://lab.nexedi.com/bk/rjs_json_form
parent
dd4d457b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form/jsonform.gadget.js.js
...ateItem/portal_skins/erp5_json_form/jsonform.gadget.js.js
+14
-2
No files found.
bt5/erp5_json_form/SkinTemplateItem/portal_skins/erp5_json_form/jsonform.gadget.js.js
View file @
9e06df17
...
...
@@ -311,6 +311,7 @@
pointed_a
]
};
console
.
error
(
err
);
return
null
;
// schema part can't be null
})
.
push
(
function
(
schema_part
)
{
...
...
@@ -897,6 +898,7 @@
if
(
json_document
!==
undefined
)
{
json_document
=
JSON
.
parse
(
json_document
);
}
g
.
props
.
init_value
=
json_document
;
if
(
g
.
state
.
schema
!==
undefined
)
{
schema
=
JSON
.
parse
(
g
.
state
.
schema
);
}
...
...
@@ -987,6 +989,7 @@
if
(
g
.
props
.
form_gadget
.
props
.
changed
.
length
>
0
)
{
g
.
notifyChange
();
}
delete
g
.
props
.
init_value
;
})
.
push
(
undefined
,
function
(
err
)
{
console
.
error
(
err
);
...
...
@@ -1044,10 +1047,19 @@
return
expandSchemaForField
(
this
,
arr
[
0
],
arr
[
1
],
arr
[
2
],
arr
[
3
]);
})
.
declareMethod
(
'
getContentMutex
'
,
function
()
{
return
this
.
props
.
form_gadget
.
getContent
();
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
'
getContent
'
,
function
(
sub_path
)
{
var
g
=
this
;
if
(
g
.
state
.
editable
)
{
return
g
.
props
.
form_gadget
.
getContent
()
return
RSVP
.
Queue
()
.
push
(
function
()
{
if
(
g
.
props
.
init_value
)
{
return
g
.
props
.
init_value
;
}
return
g
.
getContentMutex
();
})
.
push
(
function
(
value
)
{
// Change the value state in place
// This will prevent the gadget to be changed if
...
...
@@ -1067,6 +1079,6 @@
});
}
return
{};
}
,
{
mutex
:
'
changestate
'
}
);
});
}(
window
,
document
,
Blob
,
rJS
,
RSVP
,
jIO
));
\ 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