Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
6c8eaf12
Commit
6c8eaf12
authored
Mar 27, 2017
by
Sean Hammond
Committed by
GitHub
Mar 27, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #308 from hypothesis/split-viewer-template
Split viewer.html template into one template per app type
parents
62cafe08
b2c4cf03
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
21 deletions
+27
-21
app.js
src/sidebar/app.js
+3
-5
annotation_thread.html
src/sidebar/templates/annotation_thread.html
+0
-2
annotation_viewer_content.html
src/sidebar/templates/annotation_viewer_content.html
+6
-0
sidebar_content.html
src/sidebar/templates/sidebar_content.html
+10
-14
stream_content.html
src/sidebar/templates/stream_content.html
+8
-0
No files found.
src/sidebar/app.js
View file @
6c8eaf12
...
...
@@ -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
,
});
...
...
src/sidebar/templates/annotation_thread.html
View file @
6c8eaf12
...
...
@@ -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"
...
...
src/sidebar/templates/annotation_viewer_content.html
0 → 100644
View file @
6c8eaf12
<thread-list
on-change-collapsed=
"setCollapsed(id, collapsed)"
on-force-visible=
"forceVisible(thread)"
show-document-info=
"true"
thread=
"rootThread"
>
</thread-list>
src/sidebar/templates/
viewer
.html
→
src/sidebar/templates/
sidebar_content
.html
View file @
6c8eaf12
...
...
@@ -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>
src/sidebar/templates/stream_content.html
0 → 100644
View file @
6c8eaf12
<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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment