Project

General

Profile

« Previous | Next » 

Revision 50035

made a new look

View differences:

queryController.js
35 35
        $scope.hideSpinner();
36 36
    });
37 37

  
38
    $scope.showDate = function (dates) {
39
        var nArray = [];
38 40

  
41
        if (dates== null)
42
            return [];
43

  
44
        for (item in dates){
45
            var current = dates[item];
46
            if (current != null && current.length > 4) {
47
                nArray.push(current.substr(0, 4));
48
            }
49
        }
50
        return nArray;
51
    }
52

  
53

  
39 54
    $scope.startSearch= function (type, nextPage) {
40 55
        queryService.getItem($scope.identifier, type, nextPage).success(function (data) {
41 56
        if ('result' in data) {
......
140 155
            return $scope.filterType+ "/";
141 156
        }
142 157
        return"";
143

  
144 158
    }
145 159

  
146 160
    if ($scope.page != null) {
......
158 172
        $location.path("/query/q=" + $scope.query);
159 173
    };
160 174

  
175

  
176
    $scope.showDate = function (dates) {
177
        var nArray = [];
178

  
179
        if (dates== null)
180
            return [];
181

  
182
        for (item in dates){
183
            var current = dates[item];
184
            if (current != null && current.length > 4) {
185
                nArray.push(current.substr(0, 4));
186
            }
187
        }
188
        return nArray;
189
    }
190

  
161 191
    queryService.query($scope.query, $scope.page, $scope.filter).success(function (data) {
162 192

  
163 193
        $scope.result_query = data['result']['hits'];

Also available in: Unified diff