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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b8e3d85c
Commit
b8e3d85c
authored
Jul 10, 2019
by
Filipa Lacerda
Committed by
Phil Hughes
Jul 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes EE diff in imports
Deletes ee project model file
parent
6f2b7f96
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
121 additions
and
114 deletions
+121
-114
app/assets/javascripts/boards/config_toggle.js
app/assets/javascripts/boards/config_toggle.js
+1
-0
app/assets/javascripts/boards/index.js
app/assets/javascripts/boards/index.js
+18
-105
app/assets/javascripts/boards/toggle_focus.js
app/assets/javascripts/boards/toggle_focus.js
+1
-0
ee/app/assets/javascripts/boards/config_toggle.js
ee/app/assets/javascripts/boards/config_toggle.js
+48
-0
ee/app/assets/javascripts/boards/models/issue.js
ee/app/assets/javascripts/boards/models/issue.js
+3
-3
ee/app/assets/javascripts/boards/models/project.js
ee/app/assets/javascripts/boards/models/project.js
+0
-6
ee/app/assets/javascripts/boards/toggle_focus.js
ee/app/assets/javascripts/boards/toggle_focus.js
+50
-0
No files found.
app/assets/javascripts/boards/config_toggle.js
0 → 100644
View file @
b8e3d85c
export
default
()
=>
{};
app/assets/javascripts/boards/index.js
View file @
b8e3d85c
...
@@ -3,21 +3,24 @@ import Vue from 'vue';
...
@@ -3,21 +3,24 @@ import Vue from 'vue';
import
mountMultipleBoardsSwitcher
from
'
ee_else_ce/boards/mount_multiple_boards_switcher
'
;
import
mountMultipleBoardsSwitcher
from
'
ee_else_ce/boards/mount_multiple_boards_switcher
'
;
import
Flash
from
'
~/flash
'
;
import
Flash
from
'
~/flash
'
;
import
{
s__
,
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
'
./models/label
'
;
import
'
./models/label
'
;
import
'
./models/assignee
'
;
import
'
./models/assignee
'
;
import
FilteredSearchBoards
from
'
.
/filtered_search_boards
'
;
import
FilteredSearchBoards
from
'
~/boards
/filtered_search_boards
'
;
import
eventHub
from
'
.
/eventhub
'
;
import
eventHub
from
'
~/boards
/eventhub
'
;
import
sidebarEventHub
from
'
~/sidebar/event_hub
'
;
import
sidebarEventHub
from
'
~/sidebar/event_hub
'
;
import
'
./models/milestone
'
;
import
'
ee_else_ce/boards/models/issue
'
;
import
'
./models/project
'
;
import
'
ee_else_ce/boards/models/list
'
;
import
boardsStore
from
'
./stores/boards_store
'
;
import
'
~/boards/models/milestone
'
;
import
ModalStore
from
'
./stores/modal_store
'
;
import
'
~/boards/models/project
'
;
import
modalMixin
from
'
./mixins/modal_mixins
'
;
import
boardsStore
from
'
~/boards/stores/boards_store
'
;
import
'
./filters/due_date_filters
'
;
import
ModalStore
from
'
~/boards/stores/modal_store
'
;
import
Board
from
'
ee/boards/components/board
'
;
import
BoardService
from
'
ee_else_ce/boards/services/board_service
'
;
import
BoardSidebar
from
'
ee/boards/components/board_sidebar
'
;
import
modalMixin
from
'
~/boards/mixins/modal_mixins
'
;
import
'
~/boards/filters/due_date_filters
'
;
import
Board
from
'
ee_else_ce/boards/components/board
'
;
import
BoardSidebar
from
'
ee_else_ce/boards/components/board_sidebar
'
;
import
initNewListDropdown
from
'
ee_else_ce/boards/components/new_list_dropdown
'
;
import
initNewListDropdown
from
'
ee_else_ce/boards/components/new_list_dropdown
'
;
import
BoardAddIssuesModal
from
'
ee/boards/components/modal/index
'
;
import
BoardAddIssuesModal
from
'
ee/boards/components/modal/index
'
;
import
'
~/vue_shared/vue_resource_interceptor
'
;
import
'
~/vue_shared/vue_resource_interceptor
'
;
...
@@ -26,20 +29,13 @@ import {
...
@@ -26,20 +29,13 @@ import {
convertObjectPropsToCamelCase
,
convertObjectPropsToCamelCase
,
parseBoolean
,
parseBoolean
,
}
from
'
~/lib/utils/common_utils
'
;
}
from
'
~/lib/utils/common_utils
'
;
import
boardConfigToggle
from
'
ee_else_ce/boards/config_toggle
'
;
import
'
ee/boards/models/list
'
;
import
toggleFocusMode
from
'
ee_else_ce/boards/toggle_focus
'
;
import
'
ee/boards/models/issue
'
;
import
'
ee/boards/models/project
'
;
import
BoardService
from
'
ee/boards/services/board_service
'
;
import
collapseIcon
from
'
ee/boards/icons/fullscreen_collapse.svg
'
;
import
expandIcon
from
'
ee/boards/icons/fullscreen_expand.svg
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
let
issueBoardsApp
;
let
issueBoardsApp
;
export
default
()
=>
{
export
default
()
=>
{
const
$boardApp
=
document
.
getElementById
(
'
board-app
'
);
const
$boardApp
=
document
.
getElementById
(
'
board-app
'
);
const
issueBoardsContent
=
document
.
querySelector
(
'
.content-wrapper > .js-focus-mode-board
'
);
// check for browser back and trigger a hard reload to circumvent browser caching.
// check for browser back and trigger a hard reload to circumvent browser caching.
window
.
addEventListener
(
'
pageshow
'
,
event
=>
{
window
.
addEventListener
(
'
pageshow
'
,
event
=>
{
...
@@ -220,48 +216,7 @@ export default () => {
...
@@ -220,48 +216,7 @@ export default () => {
},
},
});
});
const
configEl
=
document
.
querySelector
(
'
.js-board-config
'
);
boardConfigToggle
(
boardsStore
);
if
(
configEl
)
{
gl
.
boardConfigToggle
=
new
Vue
({
el
:
configEl
,
directives
:
{
tooltip
,
},
data
()
{
return
{
canAdminList
:
this
.
$options
.
el
.
hasAttribute
(
'
data-can-admin-list
'
),
hasScope
:
this
.
$options
.
el
.
hasAttribute
(
'
data-has-scope
'
),
state
:
boardsStore
.
state
,
};
},
computed
:
{
buttonText
()
{
return
this
.
canAdminList
?
s__
(
'
Boards|Edit board
'
)
:
s__
(
'
Boards|View scope
'
);
},
tooltipTitle
()
{
return
this
.
hasScope
?
__
(
"
This board's scope is reduced
"
)
:
''
;
},
},
methods
:
{
showPage
:
page
=>
boardsStore
.
showPage
(
page
),
},
template
:
`
<div class="prepend-left-10">
<button
v-tooltip
:title="tooltipTitle"
class="btn btn-inverted"
:class="{ 'dot-highlight': hasScope }"
type="button"
@click.prevent="showPage('edit')"
>
{{ buttonText }}
</button>
</div>
`
,
});
}
const
issueBoardsModal
=
document
.
getElementById
(
'
js-add-issues-btn
'
);
const
issueBoardsModal
=
document
.
getElementById
(
'
js-add-issues-btn
'
);
...
@@ -339,48 +294,6 @@ export default () => {
...
@@ -339,48 +294,6 @@ export default () => {
});
});
}
}
// eslint-disable-next-line no-new
toggleFocusMode
(
ModalStore
,
boardsStore
,
$boardApp
);
new
Vue
({
el
:
document
.
getElementById
(
'
js-toggle-focus-btn
'
),
data
:
{
modal
:
ModalStore
.
store
,
store
:
boardsStore
.
state
,
isFullscreen
:
false
,
focusModeAvailable
:
$boardApp
.
hasAttribute
(
'
data-focus-mode-available
'
),
},
methods
:
{
toggleFocusMode
()
{
if
(
!
this
.
focusModeAvailable
)
{
return
;
}
$
(
this
.
$refs
.
toggleFocusModeButton
).
tooltip
(
'
hide
'
);
issueBoardsContent
.
classList
.
toggle
(
'
is-focused
'
);
this
.
isFullscreen
=
!
this
.
isFullscreen
;
},
},
template
:
`
<div class="board-extra-actions">
<a
href="#"
class="btn btn-default has-tooltip prepend-left-10 js-focus-mode-btn"
role="button"
aria-label="Toggle focus mode"
title="Toggle focus mode"
ref="toggleFocusModeButton"
v-if="focusModeAvailable"
@click="toggleFocusMode">
<span v-show="isFullscreen">
${
collapseIcon
}
</span>
<span v-show="!isFullscreen">
${
expandIcon
}
</span>
</a>
</div>
`
,
});
mountMultipleBoardsSwitcher
();
mountMultipleBoardsSwitcher
();
};
};
app/assets/javascripts/boards/toggle_focus.js
0 → 100644
View file @
b8e3d85c
export
default
()
=>
{};
ee/app/assets/javascripts/boards/config_toggle.js
0 → 100644
View file @
b8e3d85c
import
Vue
from
'
vue
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
{
s__
,
__
}
from
'
~/locale
'
;
export
default
boardsStore
=>
{
const
configEl
=
document
.
querySelector
(
'
.js-board-config
'
);
if
(
configEl
)
{
gl
.
boardConfigToggle
=
new
Vue
({
el
:
configEl
,
directives
:
{
tooltip
,
},
data
()
{
return
{
canAdminList
:
this
.
$options
.
el
.
hasAttribute
(
'
data-can-admin-list
'
),
hasScope
:
this
.
$options
.
el
.
hasAttribute
(
'
data-has-scope
'
),
state
:
boardsStore
.
state
,
};
},
computed
:
{
buttonText
()
{
return
this
.
canAdminList
?
s__
(
'
Boards|Edit board
'
)
:
s__
(
'
Boards|View scope
'
);
},
tooltipTitle
()
{
return
this
.
hasScope
?
__
(
"
This board's scope is reduced
"
)
:
''
;
},
},
methods
:
{
showPage
:
page
=>
boardsStore
.
showPage
(
page
),
},
template
:
`
<div class="prepend-left-10">
<button
v-tooltip
:title="tooltipTitle"
class="btn btn-inverted"
:class="{ 'dot-highlight': hasScope }"
type="button"
@click.prevent="showPage('edit')"
>
{{ buttonText }}
</button>
</div>
`
,
});
}
};
ee/app/assets/javascripts/boards/models/issue.js
View file @
b8e3d85c
import
ListIssue
from
'
~/boards/models/issue
'
;
import
ListIssue
from
'
~/boards/models/issue
'
;
import
IssueProject
EE
from
'
.
/project
'
;
import
IssueProject
from
'
~/boards/models
/project
'
;
class
ListIssueEE
extends
ListIssue
{
class
ListIssueEE
extends
ListIssue
{
constructor
(
obj
,
defaultAvatar
)
{
constructor
(
obj
,
defaultAvatar
)
{
super
(
obj
,
defaultAvatar
,
{
super
(
obj
,
defaultAvatar
,
{
IssueProject
:
IssueProjectEE
,
IssueProject
,
});
});
this
.
isFetching
.
weight
=
true
;
this
.
isFetching
.
weight
=
true
;
...
@@ -12,7 +12,7 @@ class ListIssueEE extends ListIssue {
...
@@ -12,7 +12,7 @@ class ListIssueEE extends ListIssue {
this
.
weight
=
obj
.
weight
;
this
.
weight
=
obj
.
weight
;
if
(
obj
.
project
)
{
if
(
obj
.
project
)
{
this
.
project
=
new
IssueProject
EE
(
obj
.
project
);
this
.
project
=
new
IssueProject
(
obj
.
project
);
}
}
}
}
}
}
...
...
ee/app/assets/javascripts/boards/models/project.js
deleted
100644 → 0
View file @
6f2b7f96
export
default
class
IssueProject
{
constructor
(
obj
)
{
this
.
id
=
obj
.
id
;
this
.
path
=
obj
.
path
;
}
}
ee/app/assets/javascripts/boards/toggle_focus.js
0 → 100644
View file @
b8e3d85c
import
$
from
'
jquery
'
;
import
Vue
from
'
vue
'
;
import
collapseIcon
from
'
ee/boards/icons/fullscreen_collapse.svg
'
;
import
expandIcon
from
'
ee/boards/icons/fullscreen_expand.svg
'
;
export
default
(
ModalStore
,
boardsStore
,
$boardApp
)
=>
{
const
issueBoardsContent
=
document
.
querySelector
(
'
.content-wrapper > .js-focus-mode-board
'
);
return
new
Vue
({
el
:
document
.
getElementById
(
'
js-toggle-focus-btn
'
),
data
:
{
modal
:
ModalStore
.
store
,
store
:
boardsStore
.
state
,
isFullscreen
:
false
,
focusModeAvailable
:
$boardApp
.
hasAttribute
(
'
data-focus-mode-available
'
),
},
methods
:
{
toggleFocusMode
()
{
if
(
!
this
.
focusModeAvailable
)
{
return
;
}
$
(
this
.
$refs
.
toggleFocusModeButton
).
tooltip
(
'
hide
'
);
issueBoardsContent
.
classList
.
toggle
(
'
is-focused
'
);
this
.
isFullscreen
=
!
this
.
isFullscreen
;
},
},
template
:
`
<div class="board-extra-actions">
<a
href="#"
class="btn btn-default has-tooltip prepend-left-10 js-focus-mode-btn"
role="button"
aria-label="Toggle focus mode"
title="Toggle focus mode"
ref="toggleFocusModeButton"
v-if="focusModeAvailable"
@click="toggleFocusMode">
<span v-show="isFullscreen">
${
collapseIcon
}
</span>
<span v-show="!isFullscreen">
${
expandIcon
}
</span>
</a>
</div>
`
,
});
};
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