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
Jérome Perrin
gitlab-ce
Commits
4c1e1ab1
Commit
4c1e1ab1
authored
Jan 08, 2018
by
Clement Ho
Committed by
Jacob Schatz
Jan 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor dashboard todos inside dispatcher
parent
8a7bbe1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
+10
-7
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+3
-3
app/assets/javascripts/pages/dashboard/todos/index/index.js
app/assets/javascripts/pages/dashboard/todos/index/index.js
+3
-0
app/assets/javascripts/pages/dashboard/todos/index/todos.js
app/assets/javascripts/pages/dashboard/todos/index/todos.js
+3
-3
spec/javascripts/todos_spec.js
spec/javascripts/todos_spec.js
+1
-1
No files found.
app/assets/javascripts/dispatcher.js
View file @
4c1e1ab1
...
@@ -56,7 +56,6 @@ import GfmAutoComplete from './gfm_auto_complete';
...
@@ -56,7 +56,6 @@ import GfmAutoComplete from './gfm_auto_complete';
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
SigninTabsMemoizer
from
'
./signin_tabs_memoizer
'
;
import
SigninTabsMemoizer
from
'
./signin_tabs_memoizer
'
;
import
Star
from
'
./star
'
;
import
Star
from
'
./star
'
;
import
Todos
from
'
./todos
'
;
import
TreeView
from
'
./tree
'
;
import
TreeView
from
'
./tree
'
;
import
UsagePing
from
'
./usage_ping
'
;
import
UsagePing
from
'
./usage_ping
'
;
import
UsernameValidator
from
'
./username_validator
'
;
import
UsernameValidator
from
'
./username_validator
'
;
...
@@ -111,6 +110,7 @@ import Activities from './activities';
...
@@ -111,6 +110,7 @@ import Activities from './activities';
}
}
const
fail
=
()
=>
Flash
(
'
Error loading dynamic module
'
);
const
fail
=
()
=>
Flash
(
'
Error loading dynamic module
'
);
const
callDefault
=
m
=>
m
.
default
();
path
=
page
.
split
(
'
:
'
);
path
=
page
.
split
(
'
:
'
);
shortcut_handler
=
null
;
shortcut_handler
=
null
;
...
@@ -212,7 +212,7 @@ import Activities from './activities';
...
@@ -212,7 +212,7 @@ import Activities from './activities';
projectSelect
();
projectSelect
();
break
;
break
;
case
'
dashboard:todos:index
'
:
case
'
dashboard:todos:index
'
:
new
Todos
(
);
import
(
'
./pages/dashboard/todos/index
'
).
then
(
callDefault
).
catch
(
fail
);
break
;
break
;
case
'
dashboard:projects:index
'
:
case
'
dashboard:projects:index
'
:
case
'
dashboard:projects:starred
'
:
case
'
dashboard:projects:starred
'
:
...
@@ -542,7 +542,7 @@ import Activities from './activities';
...
@@ -542,7 +542,7 @@ import Activities from './activities';
new
CILintEditor
();
new
CILintEditor
();
break
;
break
;
case
'
users:show
'
:
case
'
users:show
'
:
import
(
'
./pages/users/show
'
).
then
(
m
=>
m
.
default
()
).
catch
(
fail
);
import
(
'
./pages/users/show
'
).
then
(
callDefault
).
catch
(
fail
);
break
;
break
;
case
'
admin:conversational_development_index:show
'
:
case
'
admin:conversational_development_index:show
'
:
new
UserCallout
();
new
UserCallout
();
...
...
app/assets/javascripts/pages/dashboard/todos/index/index.js
0 → 100644
View file @
4c1e1ab1
import
Todos
from
'
./todos
'
;
export
default
()
=>
new
Todos
();
app/assets/javascripts/todos.js
→
app/assets/javascripts/
pages/dashboard/todos/index/
todos.js
View file @
4c1e1ab1
/* eslint-disable class-methods-use-this, no-unneeded-ternary, quote-props */
/* eslint-disable class-methods-use-this, no-unneeded-ternary, quote-props */
import
{
visitUrl
}
from
'
.
/lib/utils/url_utility
'
;
import
{
visitUrl
}
from
'
~
/lib/utils/url_utility
'
;
import
UsersSelect
from
'
.
/users_select
'
;
import
UsersSelect
from
'
~
/users_select
'
;
import
{
isMetaClick
}
from
'
.
/lib/utils/common_utils
'
;
import
{
isMetaClick
}
from
'
~
/lib/utils/common_utils
'
;
export
default
class
Todos
{
export
default
class
Todos
{
constructor
()
{
constructor
()
{
...
...
spec/javascripts/todos_spec.js
View file @
4c1e1ab1
import
*
as
urlUtils
from
'
~/lib/utils/url_utility
'
;
import
*
as
urlUtils
from
'
~/lib/utils/url_utility
'
;
import
Todos
from
'
~/todos
'
;
import
Todos
from
'
~/
pages/dashboard/todos/index/
todos
'
;
import
'
~/lib/utils/common_utils
'
;
import
'
~/lib/utils/common_utils
'
;
describe
(
'
Todos
'
,
()
=>
{
describe
(
'
Todos
'
,
()
=>
{
...
...
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