Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
6c5088a7
Commit
6c5088a7
authored
9 years ago
by
Allen Gilliland
Browse files
Options
Downloads
Patches
Plain Diff
code cleanup.
parent
3c2be31e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/frontend_client/app/components/DashboardsDropdown.react.js
+4
-13
4 additions, 13 deletions
...rontend_client/app/components/DashboardsDropdown.react.js
with
4 additions
and
13 deletions
resources/frontend_client/app/components/DashboardsDropdown.react.js
+
4
−
13
View file @
6c5088a7
"
use strict
"
;
import
React
,
{
Component
,
PropTypes
}
from
'
react
'
;
import
_
from
"
underscore
"
;
import
cx
from
"
classnames
"
;
import
OnClickOut
from
'
react-onclickout
'
;
...
...
@@ -19,10 +20,7 @@ export default class DashboardsDropdown extends Component {
modalOpen
:
false
};
this
.
toggleDropdown
=
this
.
toggleDropdown
.
bind
(
this
);
this
.
closeDropdown
=
this
.
closeDropdown
.
bind
(
this
);
this
.
toggleModal
=
this
.
toggleModal
.
bind
(
this
);
this
.
closeModal
=
this
.
closeModal
.
bind
(
this
);
_
.
bindAll
(
this
,
"
toggleDropdown
"
,
"
closeDropdown
"
,
"
toggleModal
"
,
"
closeModal
"
);
}
onCreateDashboard
(
newDashboard
)
{
...
...
@@ -64,7 +62,7 @@ export default class DashboardsDropdown extends Component {
<
Modal
>
<
CreateDashboardModal
createDashboardFn
=
{
this
.
onCreateDashboard
.
bind
(
this
)}
closeFn
=
{
()
=>
this
.
closeModal
()
}
/
>
closeFn
=
{
this
.
closeModal
}
/
>
<
/Modal
>
);
}
...
...
@@ -73,19 +71,12 @@ export default class DashboardsDropdown extends Component {
let
{
dashboards
}
=
this
.
props
;
let
{
dropdownOpen
,
modalOpen
}
=
this
.
state
;
let
dropDownClasses
=
cx
({
'
NavDropdown
'
:
true
,
'
inline-block
'
:
true
,
'
cursor-pointer
'
:
true
,
'
open
'
:
dropdownOpen
,
})
return
(
<
div
>
{
modalOpen
?
this
.
renderCreateDashboardModal
()
:
null
}
<
OnClickOut
onClickOut
=
{
this
.
closeDropdown
}
>
<
div
className
=
{
d
rop
D
own
Classes
}
>
<
div
className
=
{
cx
(
'
NavD
rop
d
own
inline-block cursor-pointer
'
,
{
'
open
'
:
dropdownOpen
})
}
>
<
a
className
=
"
NavDropdown-button NavItem text-white cursor-pointer p2 flex align-center
"
onClick
=
{
this
.
toggleDropdown
}
>
<
span
className
=
"
NavDropdown-button-layer
"
>
Dashboards
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment