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
61005b1b
Commit
61005b1b
authored
Mar 14, 2017
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert `<share-dialog>` to a component
parent
57e12ba0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
13 deletions
+9
-13
app.js
src/sidebar/app.js
+1
-1
share-dialog.js
src/sidebar/directive/share-dialog.js
+7
-11
share-dialog-test.js
src/sidebar/directive/test/share-dialog-test.js
+1
-1
No files found.
src/sidebar/app.js
View file @
61005b1b
...
...
@@ -147,6 +147,7 @@ module.exports = angular.module('h', [
.
component
(
'loginForm'
,
require
(
'./directive/login-form'
).
component
)
.
component
(
'publishAnnotationBtn'
,
require
(
'./directive/publish-annotation-btn'
))
.
component
(
'searchStatusBar'
,
require
(
'./directive/search-status-bar'
))
.
component
(
'shareDialog'
,
require
(
'./directive/share-dialog'
))
.
component
(
'timestamp'
,
require
(
'./directive/timestamp'
))
.
directive
(
'excerpt'
,
require
(
'./directive/excerpt'
).
directive
)
...
...
@@ -157,7 +158,6 @@ module.exports = angular.module('h', [
.
directive
(
'hOnTouch'
,
require
(
'./directive/h-on-touch'
))
.
directive
(
'hTooltip'
,
require
(
'./directive/h-tooltip'
))
.
directive
(
'markdown'
,
require
(
'./directive/markdown'
))
.
directive
(
'shareDialog'
,
require
(
'./directive/share-dialog'
))
.
directive
(
'sidebarTutorial'
,
require
(
'./directive/sidebar-tutorial'
).
directive
)
.
directive
(
'searchInput'
,
require
(
'./directive/search-input'
))
.
directive
(
'selectionTabs'
,
require
(
'./directive/selection-tabs'
))
...
...
src/sidebar/directive/share-dialog.js
View file @
61005b1b
...
...
@@ -28,15 +28,11 @@ function ShareDialogController($scope, $element, annotationUI) {
updateViaLink
);
}
module
.
exports
=
function
()
{
return
{
restrict
:
'E'
,
bindToController
:
true
,
module
.
exports
=
{
controller
:
ShareDialogController
,
controllerAs
:
'vm'
,
scope
:
{
bindings
:
{
onClose
:
'&'
,
},
template
:
require
(
'../templates/share_dialog.html'
),
};
};
src/sidebar/directive/test/share-dialog-test.js
View file @
61005b1b
...
...
@@ -11,7 +11,7 @@ describe('shareDialog', function () {
fakeAnnotationUI
=
{
frames
:
sinon
.
stub
().
returns
([])
};
angular
.
module
(
'h'
,
[])
.
directive
(
'shareDialog'
,
require
(
'../share-dialog'
))
.
component
(
'shareDialog'
,
require
(
'../share-dialog'
))
.
value
(
'annotationUI'
,
fakeAnnotationUI
)
.
value
(
'urlEncodeFilter'
,
function
(
val
)
{
return
val
;
});
angular
.
mock
.
module
(
'h'
);
...
...
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