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
93c6e52e
Commit
93c6e52e
authored
Mar 15, 2017
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert <timestamp> to a component
parent
9e362629
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
17 deletions
+13
-17
app.js
src/sidebar/app.js
+1
-1
timestamp-test.js
src/sidebar/directive/test/timestamp-test.js
+1
-1
timestamp.js
src/sidebar/directive/timestamp.js
+11
-15
No files found.
src/sidebar/app.js
View file @
93c6e52e
...
@@ -146,6 +146,7 @@ module.exports = angular.module('h', [
...
@@ -146,6 +146,7 @@ module.exports = angular.module('h', [
.
component
(
'loginControl'
,
require
(
'./directive/login-control'
))
.
component
(
'loginControl'
,
require
(
'./directive/login-control'
))
.
component
(
'loginForm'
,
require
(
'./directive/login-form'
).
component
)
.
component
(
'loginForm'
,
require
(
'./directive/login-form'
).
component
)
.
component
(
'publishAnnotationBtn'
,
require
(
'./directive/publish-annotation-btn'
))
.
component
(
'publishAnnotationBtn'
,
require
(
'./directive/publish-annotation-btn'
))
.
component
(
'timestamp'
,
require
(
'./directive/timestamp'
))
.
directive
(
'excerpt'
,
require
(
'./directive/excerpt'
).
directive
)
.
directive
(
'excerpt'
,
require
(
'./directive/excerpt'
).
directive
)
.
directive
(
'formInput'
,
require
(
'./directive/form-input'
))
.
directive
(
'formInput'
,
require
(
'./directive/form-input'
))
...
@@ -166,7 +167,6 @@ module.exports = angular.module('h', [
...
@@ -166,7 +167,6 @@ module.exports = angular.module('h', [
.
directive
(
'svgIcon'
,
require
(
'./directive/svg-icon'
))
.
directive
(
'svgIcon'
,
require
(
'./directive/svg-icon'
))
.
directive
(
'tagEditor'
,
require
(
'./directive/tag-editor'
))
.
directive
(
'tagEditor'
,
require
(
'./directive/tag-editor'
))
.
directive
(
'threadList'
,
require
(
'./directive/thread-list'
))
.
directive
(
'threadList'
,
require
(
'./directive/thread-list'
))
.
directive
(
'timestamp'
,
require
(
'./directive/timestamp'
))
.
directive
(
'topBar'
,
require
(
'./directive/top-bar'
))
.
directive
(
'topBar'
,
require
(
'./directive/top-bar'
))
.
directive
(
'windowScroll'
,
require
(
'./directive/window-scroll'
))
.
directive
(
'windowScroll'
,
require
(
'./directive/window-scroll'
))
...
...
src/sidebar/directive/test/timestamp-test.js
View file @
93c6e52e
...
@@ -11,7 +11,7 @@ describe('timestamp', function () {
...
@@ -11,7 +11,7 @@ describe('timestamp', function () {
before
(
function
()
{
before
(
function
()
{
angular
.
module
(
'app'
,[])
angular
.
module
(
'app'
,[])
.
directive
(
'timestamp'
,
require
(
'../timestamp'
));
.
component
(
'timestamp'
,
require
(
'../timestamp'
));
});
});
beforeEach
(
function
()
{
beforeEach
(
function
()
{
...
...
src/sidebar/directive/timestamp.js
View file @
93c6e52e
...
@@ -42,13 +42,10 @@ function TimestampController($scope, time) {
...
@@ -42,13 +42,10 @@ function TimestampController($scope, time) {
};
};
}
}
module
.
exports
=
function
()
{
module
.
exports
=
{
return
{
bindToController
:
true
,
controller
:
TimestampController
,
controller
:
TimestampController
,
controllerAs
:
'vm'
,
controllerAs
:
'vm'
,
restrict
:
'E'
,
bindings
:
{
scope
:
{
className
:
'<'
,
className
:
'<'
,
href
:
'<'
,
href
:
'<'
,
timestamp
:
'<'
,
timestamp
:
'<'
,
...
@@ -56,5 +53,4 @@ module.exports = function () {
...
@@ -56,5 +53,4 @@ module.exports = function () {
template
:
[
'<a class="{{vm.className}}" target="_blank" ng-title="vm.absoluteTimestamp"'
,
template
:
[
'<a class="{{vm.className}}" target="_blank" ng-title="vm.absoluteTimestamp"'
,
' href="{{vm.href}}"'
,
' href="{{vm.href}}"'
,
'>{{vm.relativeTimestamp}}</a>'
].
join
(
''
),
'>{{vm.relativeTimestamp}}</a>'
].
join
(
''
),
};
};
};
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