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
2f8367d9
Commit
2f8367d9
authored
Dec 19, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fieldset; correction needed after rebase
parent
e01fe793
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
38 deletions
+36
-38
dream/platform/src/fieldset/fieldset.js
dream/platform/src/fieldset/fieldset.js
+33
-36
dream/platform/src/jsplumb/jsplumb.js
dream/platform/src/jsplumb/jsplumb.js
+3
-2
No files found.
dream/platform/src/fieldset/fieldset.js
View file @
2f8367d9
/*global rJS, RSVP, jQuery, Handlebars,
/*global rJS, RSVP, jQuery, Handlebars,
promiseEventListener, initGadgetMixin*/
promiseEventListener, initGadgetMixin
, console
*/
/*jslint nomen: true */
/*jslint nomen: true */
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
,
initGadgetMixin
)
{
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
,
initGadgetMixin
)
{
"
use strict
"
;
"
use strict
"
;
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
delete
property_definition
.
allOf
[
0
].
type
;
delete
property_definition
.
allOf
[
0
].
type
;
}
}
return
gadget
.
declareGadget
(
"
../expandable_field/index.html
"
);
return
gadget
.
declareGadget
(
"
../expandable_field/index.html
"
);
}
if
(
property_definition
.
type
===
"
object
"
)
{
if
(
property_definition
.
type
===
"
object
"
)
{
// Create a recursive fieldset for this key.
// Create a recursive fieldset for this key.
return
gadget
.
declareGadget
(
"
../fieldset/index.html
"
);
return
gadget
.
declareGadget
(
"
../fieldset/index.html
"
);
...
@@ -89,46 +90,42 @@
...
@@ -89,46 +90,42 @@
if
(
node_id
)
{
if
(
node_id
)
{
addField
(
'
id
'
,
{
'
type
'
:
'
string
'
},
node_id
);
addField
(
'
id
'
,
{
'
type
'
:
'
string
'
},
node_id
);
}
}
Object
.
keys
(
options
.
property_definition
.
properties
Object
.
keys
(
options
.
property_definition
.
properties
)
).
forEach
(
function
(
property_name
)
{
.
forEach
(
function
(
property_name
)
{
var
property_definition
=
var
property_definition
=
options
.
property_definition
.
properties
[
property_name
],
options
.
property_definition
.
properties
[
property_name
],
value
=
property_definition
.
default
,
value
=
property_definition
.
default
,
i
=
0
,
property
;
i
=
0
,
property
;
// XXX some properties are not editable
if
(
property_definition
.
allOf
)
{
if
(
property_name
!==
'
coordinate
'
&&
property_name
!==
'
_class
'
)
{
if
(
property_definition
.
allOf
[
0
].
properties
)
{
addField
(
property_name
,
property_definition
,
value
);
for
(
property
in
property_definition
if
(
property_definition
.
allOf
)
{
.
allOf
[
0
].
properties
)
{
if
(
property_definition
.
allOf
[
0
].
properties
)
{
if
(
property_definition
.
allOf
[
0
]
for
(
property
in
property_definition
.
properties
.
hasOwnProperty
(
property
))
{
.
allOf
[
0
].
properties
)
{
i
+=
1
;
if
(
property_definition
.
allOf
[
0
].
properties
if
(
i
>
1
)
{
console
.
log
(
"
something is wrong!
"
);}
.
hasOwnProperty
(
property
))
{
value
=
property_definition
.
allOf
[
0
]
i
+=
1
;
.
properties
[
property
].
default
;
if
(
i
>
1
)
{
console
.
log
(
"
something is wrong!
"
);}
}
value
=
property_definition
.
allOf
[
0
]
.
properties
[
property
].
default
;
}
}
}
}
}
}
}
console
.
log
(
"
TRYING TO FIND A VALUE!!!!
"
);
console
.
log
(
"
TRYING TO FIND A VALUE!!!!
"
);
console
.
log
(
options
);
console
.
log
(
options
);
console
.
log
(
options
.
value
);
console
.
log
(
options
.
value
);
console
.
log
(
property_name
);
console
.
log
(
property_name
);
value
=
(
options
.
value
||
{})[
property_name
]
===
undefined
value
=
(
options
.
value
||
{})[
property_name
]
===
undefined
?
value
:
options
.
value
[
property_name
];
?
value
:
options
.
value
[
property_name
];
if
(
property_name
!==
'
coordinate
'
if
(
property_name
!==
'
coordinate
'
&&
property_name
!==
'
_class
'
&&
property_name
!==
'
_class
'
&&
property_name
!==
'
id
'
)
{
&&
property_name
!==
'
id
'
)
{
console
.
log
(
"
ADDING FIELD FOR
"
+
property_name
+
"
!!!!!!!
"
);
console
.
log
(
"
ADDING FIELD FOR
"
+
property_name
+
"
!!!!!!!
"
);
addField
(
property_name
,
property_definition
,
value
);
addField
(
property_name
,
property_definition
,
value
);
}
}
});
});
});
});
return
queue
;
return
queue
;
})
})
// getContent of all subfields
// getContent of all subfields
.
declareMethod
(
"
getContent
"
,
function
()
{
.
declareMethod
(
"
getContent
"
,
function
()
{
console
.
log
(
"
GET CONTENT SIMPLE FIELDSET
"
);
console
.
log
(
"
GET CONTENT SIMPLE FIELDSET
"
);
...
...
dream/platform/src/jsplumb/jsplumb.js
View file @
2f8367d9
...
@@ -596,7 +596,9 @@
...
@@ -596,7 +596,9 @@
gadget
.
props
.
data
.
class_definition
[
node_data
.
_class
],
gadget
.
props
.
data
.
class_definition
[
node_data
.
_class
],
gadget
.
props
.
data
gadget
.
props
.
data
);
);
console
.
log
(
"
----schema----
"
);
console
.
log
(
schema
);
console
.
log
(
"
----schema----
"
);
if
(
node_edit_popup
.
length
!==
0
)
{
if
(
node_edit_popup
.
length
!==
0
)
{
node_edit_popup
.
remove
();
node_edit_popup
.
remove
();
}
}
...
@@ -606,7 +608,6 @@
...
@@ -606,7 +608,6 @@
);
);
node_edit_popup
=
$
(
gadget
.
props
.
element
).
find
(
'
#edit-popup
'
);
node_edit_popup
=
$
(
gadget
.
props
.
element
).
find
(
'
#edit-popup
'
);
console
.
log
(
"
openNODEDIALOG 1.3
"
);
console
.
log
(
"
openNODEDIALOG 1.3
"
);
console
.
log
(
"
openNODEDIALOG 1.35
"
);
console
.
log
(
node_edit_popup
);
console
.
log
(
node_edit_popup
);
console
.
log
(
node_edit_popup
.
find
(
"
.node_class
"
));
console
.
log
(
node_edit_popup
.
find
(
"
.node_class
"
));
console
.
log
(
gadget
.
props
.
data
.
graph
.
node
);
console
.
log
(
gadget
.
props
.
data
.
graph
.
node
);
...
...
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