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
85217178
Commit
85217178
authored
Mar 15, 2017
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert <help-link> and <help-panel> to components
parent
f7f10dfd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
48 deletions
+40
-48
app.js
src/sidebar/app.js
+2
-2
help-link.js
src/sidebar/directive/help-link.js
+12
-16
help-panel.js
src/sidebar/directive/help-panel.js
+26
-30
No files found.
src/sidebar/app.js
View file @
85217178
...
@@ -140,14 +140,14 @@ module.exports = angular.module('h', [
...
@@ -140,14 +140,14 @@ module.exports = angular.module('h', [
.
component
(
'annotationShareDialog'
,
require
(
'./directive/annotation-share-dialog'
))
.
component
(
'annotationShareDialog'
,
require
(
'./directive/annotation-share-dialog'
))
.
component
(
'annotationThread'
,
require
(
'./directive/annotation-thread'
))
.
component
(
'annotationThread'
,
require
(
'./directive/annotation-thread'
))
.
component
(
'dropdownMenuBtn'
,
require
(
'./directive/dropdown-menu-btn'
))
.
component
(
'dropdownMenuBtn'
,
require
(
'./directive/dropdown-menu-btn'
))
.
component
(
'helpLink'
,
require
(
'./directive/help-link'
))
.
component
(
'helpPanel'
,
require
(
'./directive/help-panel'
))
.
component
(
'publishAnnotationBtn'
,
require
(
'./directive/publish-annotation-btn'
))
.
component
(
'publishAnnotationBtn'
,
require
(
'./directive/publish-annotation-btn'
))
.
directive
(
'excerpt'
,
require
(
'./directive/excerpt'
).
directive
)
.
directive
(
'excerpt'
,
require
(
'./directive/excerpt'
).
directive
)
.
directive
(
'formInput'
,
require
(
'./directive/form-input'
))
.
directive
(
'formInput'
,
require
(
'./directive/form-input'
))
.
directive
(
'formValidate'
,
require
(
'./directive/form-validate'
))
.
directive
(
'formValidate'
,
require
(
'./directive/form-validate'
))
.
directive
(
'groupList'
,
require
(
'./directive/group-list'
).
directive
)
.
directive
(
'groupList'
,
require
(
'./directive/group-list'
).
directive
)
.
directive
(
'helpLink'
,
require
(
'./directive/help-link'
))
.
directive
(
'helpPanel'
,
require
(
'./directive/help-panel'
))
.
directive
(
'hAutofocus'
,
require
(
'./directive/h-autofocus'
))
.
directive
(
'hAutofocus'
,
require
(
'./directive/h-autofocus'
))
.
directive
(
'hOnTouch'
,
require
(
'./directive/h-on-touch'
))
.
directive
(
'hOnTouch'
,
require
(
'./directive/h-on-touch'
))
.
directive
(
'hTooltip'
,
require
(
'./directive/h-tooltip'
))
.
directive
(
'hTooltip'
,
require
(
'./directive/h-tooltip'
))
...
...
src/sidebar/directive/help-link.js
View file @
85217178
'use strict'
;
'use strict'
;
module
.
exports
=
function
()
{
module
.
exports
=
{
return
{
controllerAs
:
'vm'
,
bindToController
:
true
,
template
:
require
(
'../templates/help_link.html'
),
controllerAs
:
'vm'
,
controller
:
function
()
{},
restrict
:
'E'
,
scope
:
{
template
:
require
(
'../templates/help_link.html'
),
version
:
'<'
,
controller
:
function
()
{},
userAgent
:
'<'
,
scope
:
{
url
:
'<'
,
version
:
'<'
,
documentFingerprint
:
'<'
,
userAgent
:
'<'
,
auth
:
'<'
,
url
:
'<'
,
dateTime
:
'<'
,
documentFingerprint
:
'<'
,
},
auth
:
'<'
,
dateTime
:
'<'
,
},
};
};
};
src/sidebar/directive/help-panel.js
View file @
85217178
...
@@ -6,35 +6,31 @@
...
@@ -6,35 +6,31 @@
* @description Displays product version and environment info
* @description Displays product version and environment info
*/
*/
// @ngInject
// @ngInject
module
.
exports
=
function
()
{
module
.
exports
=
{
return
{
controllerAs
:
'vm'
,
bindToController
:
true
,
// @ngInject
controllerAs
:
'vm'
,
controller
:
function
(
$scope
,
$window
,
annotationUI
,
serviceUrl
)
{
// @ngInject
this
.
userAgent
=
$window
.
navigator
.
userAgent
;
controller
:
function
(
$scope
,
$window
,
annotationUI
,
serviceUrl
)
{
this
.
version
=
'__VERSION__'
;
// replaced by versionify
this
.
userAgent
=
$window
.
navigator
.
userAgent
;
this
.
dateTime
=
new
Date
();
this
.
version
=
'__VERSION__'
;
// replaced by versionify
this
.
serviceUrl
=
serviceUrl
;
this
.
dateTime
=
new
Date
();
this
.
serviceUrl
=
serviceUrl
;
$scope
.
$watch
(
$scope
.
$watch
(
function
()
{
function
()
{
return
annotationUI
.
frames
();
return
annotationUI
.
frames
();
},
},
function
(
frames
)
{
function
(
frames
)
{
if
(
frames
.
length
===
0
)
{
if
(
frames
.
length
===
0
)
{
return
;
return
;
}
}
this
.
url
=
frames
[
0
].
uri
;
this
.
url
=
frames
[
0
].
uri
;
this
.
documentFingerprint
=
frames
[
0
].
documentFingerprint
;
this
.
documentFingerprint
=
frames
[
0
].
documentFingerprint
;
}.
bind
(
this
)
}.
bind
(
this
)
);
);
},
},
restrict
:
'E'
,
template
:
require
(
'../templates/help_panel.html'
),
template
:
require
(
'../templates/help_panel.html'
),
bindings
:
{
scope
:
{
auth
:
'<'
,
auth
:
'<'
,
onClose
:
'&'
,
onClose
:
'&'
,
},
},
};
};
};
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