Completed
Pull Request — develop (#161)
by Wachter
15:19
created

page-tree-route.js ➔ ... ➔   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 25

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
cc 1
c 2
b 0
f 2
nc 1
nop 2
dl 0
loc 25
rs 8.8571
1
/*
2
 * This file is part of Sulu.
3
 *
4
 * (c) MASSIVE ART WebServices GmbH
5
 *
6
 * This source file is subject to the MIT license that is bundled
7
 * with this source code in the file LICENSE.
8
 */
9
10
define(['type/default'], function(Default) {
11
12
    'use strict';
13
14
    return function($el, options) {
15
        var defaults = {},
16
17
            subType = {
18
                setValue: function(value) {
19
                    App.dom.data($el, 'value', value);
0 ignored issues
show
Bug introduced by
The variable App seems to be never declared. If this is a global, consider adding a /** global: App */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
20
                },
21
22
                getValue: function() {
23
                    return App.dom.data($el, 'value');
0 ignored issues
show
Bug introduced by
The variable App seems to be never declared. If this is a global, consider adding a /** global: App */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
24
                },
25
26
                needsValidation: function() {
27
                    return true;
28
                },
29
30
                validate: function() {
31
                    var value = this.getValue();
32
33
                    return value && value.page && value.page.uuid;
34
                }
35
            };
36
37
        return new Default($el, defaults, options, 'pageTreeRoute', subType);
38
    };
39
});
40