Commit 645b69d4 authored by Ujvari Gergely's avatar Ujvari Gergely

Streamsearch skeleton page

Stream annotation rendering was moved to streamviewer.html and can be included as a template.
Both stream.pt and streamsearch.pt uses this template.
Stremsearch skeleton page has the visualsearch widget and the streamviewer template.
parent 39fd5639
......@@ -387,6 +387,14 @@ fuzzytime = ['$filter', '$window', ($filter, $window) ->
template: '<span class="small">{{ftime | date:mediumDate}}</span>'
]
streamviewer = [ ->
link: (scope, elem, attr, ctrl) ->
return unless ctrl?
require: '?ngModel'
restrict: 'E'
templateUrl: 'streamviewer.html'
]
angular.module('h.directives', ['ngSanitize'])
.directive('authentication', authentication)
......@@ -404,4 +412,4 @@ angular.module('h.directives', ['ngSanitize'])
.directive('ngBlur', ngBlur)
.directive('repeatAnim', repeatAnim)
.directive('notification', notification)
.directive('streamviewer', streamviewer)
class StreamSearch
this.inject = ['$element','$scope']
constructor: (
$element, $scope
) ->
search_query = ''
@search = VS.init
container: $element.find('.visual-search')
query: search_query
callbacks:
search: (query, searchCollection) =>
console.log 'search'
facetMatches: (callback) =>
return callback ['text','tag', 'quote', 'scope', 'group','time','user'], {preserveOrder: true}
valueMatches: (facet, searchTerm, callback) ->
switch facet
when 'group' then callback ['Public', 'Private']
when 'scope' then callback ['sidebar', 'document']
when 'time'
callback ['5 min', '30 min', '1 hour', '12 hours', '1 day', '1 week', '1 month', '1 year'], {preserveOrder: true}
angular.module('h.streamsearch',['bootstrap'])
.controller('StreamSearchController', StreamSearch)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment