Project

General

Profile

« Previous | Next » 

Revision 28298

document viewer

View differences:

dnet_lightui.js
23 23
	$scope.query = "";
24 24
	$scope.browseResults = [];
25 25
	$scope.searchResults = {};
26
	$scope.documentHTML = '';
26 27

  
27 28
	initSpinner();
28 29
	$scope.showError        = function(error)   { show_notification("error", error); }
......
96 97
	    });
97 98
	}
98 99
	
100
	$scope.getDocument = function(id) {
101
		$scope.documentHTML = '';
102
		
103
		$http.post('lightui_get', $.param({
104
			'id' : id,
105
	    })).success(function(data) {
106
	    	$scope.hideSpinner();
107
	    	$scope.documentHTML = data;
108
	    }).error(function() {
109
	            $scope.showError('Something really bad must have happened to our fellow hamster..');
110
	            $scope.hideSpinner();
111
	    });
112
	}
113
	
99 114
	$scope.updateQueryWithValue = function(field, value) {
100 115
		if ($scope.query) { $scope.query += " AND ";	}
101 116
		

Also available in: Unified diff