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