Skip to content

Commit

Permalink
Brandon: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Goh committed Aug 25, 2013
1 parent 37c6f17 commit 6943698
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion app/js/angular/search-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ function SearchController($scope,$resource,sharedProperties, sharedFunctions){
var searchmeta = new $scope.SearchResource($scope.searchmeta.data);
searchmeta.$save(function(response) {
$scope.searchitems = response;
$scope.search_pagination.next_offset = $scope.searchitems.next_offset;$scope.search_notice = $scope.search;
$scope.search_pagination.next_offset = $scope.searchitems.next_offset;
$scope.search_notice = $scope.search;
$scope.waiting = "Ready";
});
}
Expand Down
11 changes: 10 additions & 1 deletion app/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,15 @@
}
e = document.getElementById('testdiv');
scope = angular.element(e).scope();
if (query_string.query !== undefined) {
if (query_string.query !== undefined && query_string.query !== "") {
scope.$apply(function() {
scope.setTest(unescape(query_string.query));
scope.searchlist();
});
} else {
scope.$apply(function() {
scope.acknowledge();
});
}
}
</script>
Expand Down Expand Up @@ -245,6 +249,11 @@ <h3 id="myUploadItems">{{heading}}</h3>
}
</script>
<hr/>
<span ui-if="search_notice.length == 0" ng-cloak>
<em>
Please enter a search string.
</em>
</span>
<span ui-if="!searchitems.entities.length && search_notice.length > 0" ng-cloak>
<em>
There are no animations or usernames containing "{{search_notice}}".
Expand Down
5 changes: 0 additions & 5 deletions handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ def group_sketch(self): #/list/sketch/group
#Handler for searching for Sketches
def list_sketch(self): #/list/sketch

offset = 0
new_offset = self.request.get("offset")
if new_offset:
offset = int(new_offset)

auser = self.auth.get_user_by_session()
userid = 0
if auser:
Expand Down

0 comments on commit 6943698

Please sign in to comment.