Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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
nexedi
dream
Commits
3bf98f96
Commit
3bf98f96
authored
Jan 30, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GUI: re-enable expandable fields
parent
74b43c52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
dream/platform/src/expandable_field/expandablefield.js
dream/platform/src/expandable_field/expandablefield.js
+13
-5
dream/platform/src/fieldset/fieldset.js
dream/platform/src/fieldset/fieldset.js
+7
-1
No files found.
dream/platform/src/expandable_field/expandablefield.js
View file @
3bf98f96
...
...
@@ -130,7 +130,7 @@
default_value
=
properties_dict
[
sub_title
].
default
;
// find previous value if any
if
(
gadget
.
props
.
options
.
value
[
prop_name
])
{
if
(
gadget
.
props
.
options
.
value
&&
gadget
.
props
.
options
.
value
[
prop_name
])
{
if
(
gadget
.
props
.
options
.
value
[
prop_name
][
sub_title
]
||
gadget
.
props
.
options
.
value
[
prop_name
][
sub_title
]
===
""
)
{
previous_value
=
gadget
.
props
.
options
.
value
[
prop_name
][
sub_title
];
...
...
@@ -204,7 +204,15 @@
}
}
function
handleSelectChange
()
{
//evt) {
function
handleSelectChange
()
{
try
{
return
_handleSelectChange
.
bind
(
this
)();
}
catch
(
e
)
{
console
.
log
(
"
ERROR in handleSelectChange
"
,
e
);
console
.
log
(
e
.
stack
);
}
}
function
_handleSelectChange
()
{
//evt) {
console
.
log
(
"
UPDATING FIELDS DUE TO SELECTION CHANGE
"
);
var
gadget
=
this
,
oneOf_list
,
i
,
prop_name
=
gadget
.
props
.
definition
.
property_def
.
title
,
...
...
@@ -676,9 +684,9 @@
}
console
.
log
(
"
thr r
"
+
promise_list
.
length
+
"
subgadget promises
"
);
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
()
{
waitForListFieldSelection
(
gadget
);
})
.
push
(
function
()
{
// XXX return is required so that we see errors, but it blocks everything
/* return */
waitForListFieldSelection
(
gadget
);
});
});
}(
window
,
rJS
,
RSVP
,
Handlebars
,
initGadgetMixin
,
loopEventListener
));
dream/platform/src/fieldset/fieldset.js
View file @
3bf98f96
...
...
@@ -42,7 +42,13 @@
property_id
)
})
);
// use expandable field if we have a oneOf in the schema
if
(
property_definition
.
oneOf
)
{
property_definition
=
{
allOf
:
[{
properties
:
property_definition
.
properties
},
{
oneOf
:
property_definition
.
oneOf
}
]
};
return
gadget
.
declareGadget
(
"
../expandable_field/index.html
"
);
}
if
(
property_definition
.
type
===
"
object
"
)
{
// Create a recursive fieldset for this key.
return
gadget
.
declareGadget
(
"
../fieldset/index.html
"
);
...
...
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