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