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
00d3d49a
Commit
00d3d49a
authored
Mar 14, 2017
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert `<search-input>` to a component
parent
2cbf1969
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
20 deletions
+15
-20
app.js
src/sidebar/app.js
+1
-1
search-input.js
src/sidebar/directive/search-input.js
+13
-18
search-input-test.js
src/sidebar/directive/test/search-input-test.js
+1
-1
No files found.
src/sidebar/app.js
View file @
00d3d49a
...
@@ -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
(
'searchInput'
,
require
(
'./directive/search-input'
))
.
component
(
'searchStatusBar'
,
require
(
'./directive/search-status-bar'
))
.
component
(
'searchStatusBar'
,
require
(
'./directive/search-status-bar'
))
.
component
(
'sidebarTutorial'
,
require
(
'./directive/sidebar-tutorial'
).
component
)
.
component
(
'sidebarTutorial'
,
require
(
'./directive/sidebar-tutorial'
).
component
)
.
component
(
'shareDialog'
,
require
(
'./directive/share-dialog'
))
.
component
(
'shareDialog'
,
require
(
'./directive/share-dialog'
))
...
@@ -159,7 +160,6 @@ module.exports = angular.module('h', [
...
@@ -159,7 +160,6 @@ module.exports = angular.module('h', [
.
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'
))
.
directive
(
'markdown'
,
require
(
'./directive/markdown'
))
.
directive
(
'markdown'
,
require
(
'./directive/markdown'
))
.
directive
(
'searchInput'
,
require
(
'./directive/search-input'
))
.
directive
(
'selectionTabs'
,
require
(
'./directive/selection-tabs'
))
.
directive
(
'selectionTabs'
,
require
(
'./directive/selection-tabs'
))
.
directive
(
'sortDropdown'
,
require
(
'./directive/sort-dropdown'
))
.
directive
(
'sortDropdown'
,
require
(
'./directive/sort-dropdown'
))
.
directive
(
'spinner'
,
require
(
'./directive/spinner'
))
.
directive
(
'spinner'
,
require
(
'./directive/spinner'
))
...
...
src/sidebar/directive/search-input.js
View file @
00d3d49a
...
@@ -32,14 +32,10 @@ function SearchInputController($element, $http, $scope) {
...
@@ -32,14 +32,10 @@ function SearchInputController($element, $http, $scope) {
};
};
}
}
// @ngInject
module
.
exports
=
{
module
.
exports
=
function
()
{
return
{
bindToController
:
true
,
controller
:
SearchInputController
,
controller
:
SearchInputController
,
controllerAs
:
'vm'
,
controllerAs
:
'vm'
,
restrict
:
'E'
,
bindings
:
{
scope
:
{
// Specifies whether the search input field should always be expanded,
// Specifies whether the search input field should always be expanded,
// regardless of whether the it is focused or has an active query.
// regardless of whether the it is focused or has an active query.
//
//
...
@@ -49,5 +45,4 @@ module.exports = function () {
...
@@ -49,5 +45,4 @@ module.exports = function () {
onSearch
:
'&'
,
onSearch
:
'&'
,
},
},
template
:
require
(
'../templates/search_input.html'
),
template
:
require
(
'../templates/search_input.html'
),
};
};
};
src/sidebar/directive/test/search-input-test.js
View file @
00d3d49a
...
@@ -9,7 +9,7 @@ describe('searchInput', function () {
...
@@ -9,7 +9,7 @@ describe('searchInput', function () {
before
(
function
()
{
before
(
function
()
{
angular
.
module
(
'app'
,
[])
angular
.
module
(
'app'
,
[])
.
directive
(
'searchInput'
,
require
(
'../search-input'
));
.
component
(
'searchInput'
,
require
(
'../search-input'
));
});
});
beforeEach
(
function
()
{
beforeEach
(
function
()
{
...
...
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