Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
571de11e
Commit
571de11e
authored
Jul 06, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor Todos class to ES module syntax
parent
4ad4efb8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
8 deletions
+5
-8
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+2
-1
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+0
-1
app/assets/javascripts/todos.js
app/assets/javascripts/todos.js
+1
-4
spec/javascripts/todos_spec.js
spec/javascripts/todos_spec.js
+2
-2
No files found.
app/assets/javascripts/dispatcher.js
View file @
571de11e
...
...
@@ -51,6 +51,7 @@ import UsersSelect from './users_select';
import
RefSelectDropdown
from
'
./ref_select_dropdown
'
;
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
Todos
from
'
./todos
'
;
import
TreeView
from
'
./tree
'
;
import
UsagePing
from
'
./usage_ping
'
;
import
UsernameValidator
from
'
./username_validator
'
;
...
...
@@ -166,7 +167,7 @@ import OAuthRememberMe from './oauth_remember_me';
new
UsersSelect
();
break
;
case
'
dashboard:todos:index
'
:
new
gl
.
Todos
();
new
Todos
();
break
;
case
'
dashboard:projects:index
'
:
case
'
dashboard:projects:starred
'
:
...
...
app/assets/javascripts/main.js
View file @
571de11e
...
...
@@ -152,7 +152,6 @@ import './subscription';
import
'
./subscription_select
'
;
import
'
./syntax_highlight
'
;
import
'
./task_list
'
;
import
'
./todos
'
;
import
'
./user
'
;
// eslint-disable-next-line global-require, import/no-commonjs
...
...
app/assets/javascripts/todos.js
View file @
571de11e
...
...
@@ -2,7 +2,7 @@
import
UsersSelect
from
'
./users_select
'
;
class
Todos
{
export
default
class
Todos
{
constructor
()
{
this
.
initFilters
();
this
.
bindEvents
();
...
...
@@ -159,6 +159,3 @@ class Todos {
}
}
}
window
.
gl
=
window
.
gl
||
{};
gl
.
Todos
=
Todos
;
spec/javascripts/todos_spec.js
View file @
571de11e
import
'
~/todos
'
;
import
Todos
from
'
~/todos
'
;
import
'
~/lib/utils/common_utils
'
;
describe
(
'
Todos
'
,
()
=>
{
...
...
@@ -9,7 +9,7 @@ describe('Todos', () => {
loadFixtures
(
'
todos/todos.html.raw
'
);
todoItem
=
document
.
querySelector
(
'
.todos-list .todo
'
);
return
new
gl
.
Todos
();
return
new
Todos
();
});
describe
(
'
goToTodoUrl
'
,
()
=>
{
...
...
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