Commit 6c8eaf12 authored by Sean Hammond's avatar Sean Hammond Committed by GitHub

Merge pull request #308 from hypothesis/split-viewer-template

Split viewer.html template into one template per app type
parents 62cafe08 b2c4cf03
...@@ -59,26 +59,24 @@ function configureLocation($locationProvider) { ...@@ -59,26 +59,24 @@ function configureLocation($locationProvider) {
} }
// @ngInject // @ngInject
var VIEWER_TEMPLATE = require('./templates/viewer.html');
function configureRoutes($routeProvider) { function configureRoutes($routeProvider) {
$routeProvider.when('/a/:id', $routeProvider.when('/a/:id',
{ {
controller: 'AnnotationViewerController', controller: 'AnnotationViewerController',
template: VIEWER_TEMPLATE, template: require('./templates/annotation_viewer_content.html'),
reloadOnSearch: false, reloadOnSearch: false,
resolve: resolve, resolve: resolve,
}); });
$routeProvider.when('/stream', $routeProvider.when('/stream',
{ {
controller: 'StreamController', controller: 'StreamController',
template: VIEWER_TEMPLATE, template: require('./templates/stream_content.html'),
reloadOnSearch: false, reloadOnSearch: false,
resolve: resolve, resolve: resolve,
}); });
$routeProvider.otherwise({ $routeProvider.otherwise({
controller: 'WidgetController', controller: 'WidgetController',
template: VIEWER_TEMPLATE, template: require('./templates/sidebar_content.html'),
reloadOnSearch: false, reloadOnSearch: false,
resolve: resolve, resolve: resolve,
}); });
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
<annotation ng-class="vm.annotationClasses()" <annotation ng-class="vm.annotationClasses()"
annotation="vm.thread.annotation" annotation="vm.thread.annotation"
is-collapsed="vm.thread.collapsed" is-collapsed="vm.thread.collapsed"
is-last-reply="$last"
is-sidebar="::vm.isSidebar"
name="annotation" name="annotation"
ng-mouseenter="vm.annotationHovered = true" ng-mouseenter="vm.annotationHovered = true"
ng-mouseleave="vm.annotationHovered = false" ng-mouseleave="vm.annotationHovered = false"
......
<thread-list
on-change-collapsed="setCollapsed(id, collapsed)"
on-force-visible="forceVisible(thread)"
show-document-info="true"
thread="rootThread">
</thread-list>
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<search-status-bar <search-status-bar
ng-show="!isLoading()" ng-show="!isLoading()"
ng-if="!isStream"
filter-active="!!search.query()" filter-active="!!search.query()"
filter-match-count="visibleCount()" filter-match-count="visibleCount()"
on-clear-selection="clearSelection()" on-clear-selection="clearSelection()"
...@@ -39,18 +38,15 @@ ...@@ -39,18 +38,15 @@
</p> </p>
</div> </div>
<span window-scroll="loadMore(20)"> <thread-list
<thread-list
on-change-collapsed="setCollapsed(id, collapsed)" on-change-collapsed="setCollapsed(id, collapsed)"
on-clear-selection="clearSelection()" on-clear-selection="clearSelection()"
on-focus="focus(annotation)" on-focus="focus(annotation)"
on-force-visible="forceVisible(thread)" on-force-visible="forceVisible(thread)"
on-select="scrollTo(annotation)" on-select="scrollTo(annotation)"
show-document-info="::!isSidebar" show-document-info="false"
thread="rootThread"> thread="rootThread">
</thread-list> </thread-list>
</span>
<loggedout-message ng-if="isSidebar && shouldShowLoggedOutMessage()" <loggedout-message ng-if="shouldShowLoggedOutMessage()" on-login="login()">
on-login="login()" ng-cloak>
</loggedout-message> </loggedout-message>
<span window-scroll="loadMore(20)">
<thread-list
on-change-collapsed="setCollapsed(id, collapsed)"
on-force-visible="forceVisible(thread)"
show-document-info="true"
thread="rootThread">
</thread-list>
</span>
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