static/org.openpsa.documents/elfinder.custom.js   A
last analyzed

Complexity

Total Complexity 5
Complexity/F 1.25

Size

Lines of Code 18
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 11
mnd 1
bc 1
fnc 4
dl 0
loc 18
rs 10
bpm 0.25
cpm 1.25
noi 0
c 0
b 0
f 0
1
"use strict";
2
3
elFinder.prototype.commands.details = function() {
4
5
    this.init = function() {
6
        this.title = this.fm.i18n('cmdopen');
7
    };
8
    this.exec = function(hashes) {
9
        hashes = this.files(hashes);
10
        window.location.href = window.location.pathname + 'connector/goto/' + hashes[0].hash + '/';
11
        return jQuery.Deferred().resolve();
12
    };
13
14
    this.getstate = function(sel) {
15
        var selected = this.files(sel);
16
        return (selected.length !== 1) ? -1 : 0;
17
    };
18
}
19