Improved search template rendering.
parent
89094a3399
commit
7a25581a8a
|
@ -128,7 +128,7 @@ SearchDirective = ($log, $compile, $templatecache) ->
|
||||||
}
|
}
|
||||||
|
|
||||||
renderTableContent = (section) ->
|
renderTableContent = (section) ->
|
||||||
oldElements = $el.find(".search-result-table-body").children()
|
oldElements = $el.find(".search-result-table").children()
|
||||||
oldScope = oldElements.scope()
|
oldScope = oldElements.scope()
|
||||||
|
|
||||||
if oldScope
|
if oldScope
|
||||||
|
@ -140,7 +140,7 @@ SearchDirective = ($log, $compile, $templatecache) ->
|
||||||
|
|
||||||
template = angular.element.parseHTML(trim(templates[section.name]))
|
template = angular.element.parseHTML(trim(templates[section.name]))
|
||||||
element = $compile(template)(scope)
|
element = $compile(template)(scope)
|
||||||
$el.find(".search-result-table-body").html(element)
|
$el.find(".search-result-table").html(element)
|
||||||
|
|
||||||
$scope.$watch "searchResults", (data) ->
|
$scope.$watch "searchResults", (data) ->
|
||||||
lastSeatchResults = data
|
lastSeatchResults = data
|
||||||
|
|
|
@ -1,32 +1,41 @@
|
||||||
section.search-result-table
|
section.search-result-table
|
||||||
|
|
||||||
|
script(type="text/ng-template", id="search-issues")
|
||||||
|
div.search-result-table-header
|
||||||
|
div.row.title
|
||||||
|
div.user-stories.width-4 Issues
|
||||||
|
div.status.width-2 Status
|
||||||
|
div.points.width-1 Assigned to
|
||||||
|
div.search-result-table-body
|
||||||
|
div.row.table-main(ng-repeat="issue in issues track by issue.id")
|
||||||
|
div.user-stories.width-6
|
||||||
|
div.user-story-name
|
||||||
|
a(href="", tg-bo-html="issue.subject")
|
||||||
|
div.status.width-2(tg-issue-status="issue")
|
||||||
|
div.points.width-1(tg-issue-assignedto="issue")
|
||||||
|
|
||||||
|
script(type="text/ng-template", id="search-userstories")
|
||||||
div.search-result-table-header
|
div.search-result-table-header
|
||||||
div.row.title
|
div.row.title
|
||||||
div.user-stories.width-4 User Stories
|
div.user-stories.width-4 User Stories
|
||||||
div.status.width-2 Status
|
div.status.width-2 Status
|
||||||
div.points.width-1 Points
|
div.points.width-1 Points
|
||||||
div.points.width-1 Sprints
|
|
||||||
div.search-result-table-body
|
div.search-result-table-body
|
||||||
|
|
||||||
|
|
||||||
script(type="text/ng-template", id="search-issues")
|
|
||||||
div.row.table-main(ng-repeat="issue in issues track by issue.id")
|
|
||||||
div.user-stories.width-4
|
|
||||||
div.user-story-name
|
|
||||||
a(href="", tg-bo-html="issue.subject")
|
|
||||||
div.status.width-2 Status
|
|
||||||
div.points.width-1 12
|
|
||||||
div.points.width-1 54
|
|
||||||
|
|
||||||
script(type="text/ng-template", id="search-userstories")
|
|
||||||
div.row.table-main(ng-repeat="us in userstories track by us.id")
|
div.row.table-main(ng-repeat="us in userstories track by us.id")
|
||||||
div.user-stories.width-4
|
div.user-stories.width-4
|
||||||
div.user-story-name
|
div.user-story-name
|
||||||
a(href="", tg-bo-html="us.subject")
|
a(href="", tg-bo-html="us.subject")
|
||||||
div.status.width-2 Status
|
div.status.width-2 Status
|
||||||
div.points.width-1 12
|
div.points.width-1 12
|
||||||
div.points.width-1 54
|
|
||||||
|
|
||||||
script(type="text/ng-template", id="search-tasks")
|
script(type="text/ng-template", id="search-tasks")
|
||||||
|
div.search-result-table-header
|
||||||
|
div.row.title
|
||||||
|
div.user-stories.width-4 Tasks
|
||||||
|
div.status.width-2 Status
|
||||||
|
div.points.width-1 Points
|
||||||
|
div.points.width-1 Sprints
|
||||||
|
div.search-result-table-body
|
||||||
div.row.table-main(ng-repeat="task in tasks track by task.id")
|
div.row.table-main(ng-repeat="task in tasks track by task.id")
|
||||||
div.user-stories.width-4
|
div.user-stories.width-4
|
||||||
div.user-story-name
|
div.user-story-name
|
||||||
|
|
Loading…
Reference in New Issue