Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DDA
dda-wizard
Commits
d3dc7bb7
Commit
d3dc7bb7
authored
Aug 10, 2016
by
Hellmich, Christoph
Browse files
Rename tree to treeService
parent
fd832197
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/webapp/scripts/app/wizardEditor/wizardEditor.controller.js
View file @
d3dc7bb7
...
...
@@ -56,7 +56,7 @@ angular.module('ddaApp')
fgConfigProvider
.
validation
.
message
(
validationMessages
);
fgConfigProvider
.
validation
.
pattern
(
validationPattern
);
})
.
controller
(
'
WizardEditorController
'
,
function
(
$scope
,
$state
,
entity
,
Wizard
,
Step
,
Element
,
tree
)
{
.
controller
(
'
WizardEditorController
'
,
function
(
$scope
,
$state
,
entity
,
Wizard
,
Step
,
Element
,
tree
Service
)
{
var
deletedFields
=
[];
$scope
.
formDirty
=
false
;
// TODO: use $dirty, or something else
...
...
@@ -76,7 +76,7 @@ angular.module('ddaApp')
$scope
.
treeOptions
=
{
beforeDrop
:
function
(
e
)
{
return
tree
.
updateStepPosition
(
e
.
source
.
nodeScope
.
$modelValue
,
return
tree
Service
.
updateStepPosition
(
e
.
source
.
nodeScope
.
$modelValue
,
e
.
dest
.
nodesScope
.
node
?
e
.
dest
.
nodesScope
.
node
:
undefined
,
e
.
dest
.
index
);
}
...
...
@@ -194,7 +194,7 @@ angular.module('ddaApp')
$scope
.
addSubStep
=
function
(
scope
)
{
var
parent
=
scope
.
$modelValue
;
tree
.
addSubStep
(
scope
.
$modelValue
).
then
(
function
(
step
)
{
tree
Service
.
addSubStep
(
scope
.
$modelValue
).
then
(
function
(
step
)
{
step
.
nodes
=
[];
parent
.
nodes
.
push
(
step
);
});
...
...
@@ -209,8 +209,8 @@ angular.module('ddaApp')
Wizard
.
steps
({
id
:
$state
.
params
.
id
},
function
(
steps
)
{
$scope
.
tree
=
tree
.
buildAngularUiTree
(
steps
);
loadFields
(
tree
.
getStep
(
$state
.
params
.
stepId
));
$scope
.
tree
=
tree
Service
.
buildAngularUiTree
(
steps
);
loadFields
(
tree
Service
.
getStep
(
$state
.
params
.
stepId
));
$scope
.
isLoading
=
false
;
});
}
...
...
src/main/webapp/scripts/components/wizardEditor/tree.service.js
View file @
d3dc7bb7
'
use strict
'
;
angular
.
module
(
'
ddaApp
'
).
factory
(
'
tree
'
,
function
(
Step
)
{
.
module
(
'
ddaApp
'
).
factory
(
'
tree
Service
'
,
function
(
Step
)
{
var
steps
=
[];
function
getStep
(
stepId
)
{
...
...
Write
Preview
Supports
Markdown
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