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
b3dd294f
Commit
b3dd294f
authored
Dec 22, 2021
by
Coung Ngo
Committed by
Ezekiel Kigbo
Dec 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tidy ~/issuable init functions
parent
67d9dbee
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
62 additions
and
71 deletions
+62
-71
app/assets/javascripts/issuable/bulk_update_sidebar/index.js
app/assets/javascripts/issuable/bulk_update_sidebar/index.js
+28
-0
app/assets/javascripts/issuable/bulk_update_sidebar/init_issue_status_select.js
.../issuable/bulk_update_sidebar/init_issue_status_select.js
+0
-17
app/assets/javascripts/issuable/bulk_update_sidebar/issuable_bulk_update_sidebar.js
...uable/bulk_update_sidebar/issuable_bulk_update_sidebar.js
+0
-2
app/assets/javascripts/issuable/bulk_update_sidebar/issuable_init_bulk_update_sidebar.js
.../bulk_update_sidebar/issuable_init_bulk_update_sidebar.js
+0
-19
app/assets/javascripts/issuable/index.js
app/assets/javascripts/issuable/index.js
+19
-18
app/assets/javascripts/issues_list/components/issues_list_app.vue
...ts/javascripts/issues_list/components/issues_list_app.vue
+3
-4
app/assets/javascripts/pages/groups/issues/index.js
app/assets/javascripts/pages/groups/issues/index.js
+2
-2
app/assets/javascripts/pages/groups/merge_requests/index.js
app/assets/javascripts/pages/groups/merge_requests/index.js
+2
-2
app/assets/javascripts/pages/projects/issues/index/index.js
app/assets/javascripts/pages/projects/issues/index/index.js
+3
-2
app/assets/javascripts/pages/projects/merge_requests/index/index.js
.../javascripts/pages/projects/merge_requests/index/index.js
+3
-2
ee/app/assets/javascripts/pages/groups/epics/index/index.js
ee/app/assets/javascripts/pages/groups/epics/index/index.js
+2
-3
No files found.
app/assets/javascripts/issuable/bulk_update_sidebar/index.js
0 → 100644
View file @
b3dd294f
import
Vue
from
'
vue
'
;
import
StatusSelect
from
'
./components/status_select.vue
'
;
import
issuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
import
IssuableBulkUpdateSidebar
from
'
./issuable_bulk_update_sidebar
'
;
export
function
initBulkUpdateSidebar
(
prefixId
)
{
const
el
=
document
.
querySelector
(
'
.issues-bulk-update
'
);
if
(
!
el
)
{
return
;
}
issuableBulkUpdateActions
.
init
({
prefixId
});
new
IssuableBulkUpdateSidebar
();
// eslint-disable-line no-new
}
export
function
initIssueStatusSelect
()
{
const
el
=
document
.
querySelector
(
'
.js-issue-status
'
);
if
(
!
el
)
{
return
null
;
}
return
new
Vue
({
el
,
render
:
(
createElement
)
=>
createElement
(
StatusSelect
),
});
}
app/assets/javascripts/issuable/bulk_update_sidebar/init_issue_status_select.js
deleted
100644 → 0
View file @
67d9dbee
import
Vue
from
'
vue
'
;
import
StatusSelect
from
'
./components/status_select.vue
'
;
export
default
function
initIssueStatusSelect
()
{
const
el
=
document
.
querySelector
(
'
.js-issue-status
'
);
if
(
!
el
)
{
return
null
;
}
return
new
Vue
({
el
,
render
(
h
)
{
return
h
(
StatusSelect
);
},
});
}
app/assets/javascripts/issuable/bulk_update_sidebar/issuable_bulk_update_sidebar.js
View file @
b3dd294f
...
...
@@ -6,7 +6,6 @@ import { property } from 'lodash';
import
issuableEventHub
from
'
~/issues_list/eventhub
'
;
import
LabelsSelect
from
'
~/labels/labels_select
'
;
import
MilestoneSelect
from
'
~/milestones/milestone_select
'
;
import
initIssueStatusSelect
from
'
./init_issue_status_select
'
;
import
IssuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
import
subscriptionSelect
from
'
./subscription_select
'
;
...
...
@@ -57,7 +56,6 @@ export default class IssuableBulkUpdateSidebar {
initDropdowns
()
{
new
LabelsSelect
();
new
MilestoneSelect
();
initIssueStatusSelect
();
subscriptionSelect
();
if
(
IS_EE
)
{
...
...
app/assets/javascripts/issuable/bulk_update_sidebar/issuable_init_bulk_update_sidebar.js
deleted
100644 → 0
View file @
67d9dbee
import
issuableBulkUpdateActions
from
'
./issuable_bulk_update_actions
'
;
import
IssuableBulkUpdateSidebar
from
'
./issuable_bulk_update_sidebar
'
;
export
default
{
bulkUpdateSidebar
:
null
,
init
(
prefixId
)
{
const
bulkUpdateEl
=
document
.
querySelector
(
'
.issues-bulk-update
'
);
const
alreadyInitialized
=
Boolean
(
this
.
bulkUpdateSidebar
);
if
(
bulkUpdateEl
&&
!
alreadyInitialized
)
{
issuableBulkUpdateActions
.
init
({
prefixId
});
this
.
bulkUpdateSidebar
=
new
IssuableBulkUpdateSidebar
();
}
return
this
.
bulkUpdateSidebar
;
},
};
app/assets/javascripts/issuable/index.js
View file @
b3dd294f
...
...
@@ -11,7 +11,9 @@ import IssuableHeaderWarnings from './components/issuable_header_warnings.vue';
export
function
initCsvImportExportButtons
()
{
const
el
=
document
.
querySelector
(
'
.js-csv-import-export-buttons
'
);
if
(
!
el
)
return
null
;
if
(
!
el
)
{
return
null
;
}
const
{
showExportButton
,
...
...
@@ -42,23 +44,24 @@ export function initCsvImportExportButtons() {
maxAttachmentSize
,
showLabel
,
},
render
(
h
)
{
return
h
(
CsvImportExportButtons
,
{
render
:
(
createElement
)
=>
createElement
(
CsvImportExportButtons
,
{
props
:
{
exportCsvPath
,
issuableCount
:
parseInt
(
issuableCount
,
10
),
},
});
},
}),
});
}
export
function
initIssuableByEmail
()
{
Vue
.
use
(
GlToast
);
const
el
=
document
.
querySelector
(
'
.js-issuable-by-email
'
);
if
(
!
el
)
return
null
;
if
(
!
el
)
{
return
null
;
}
Vue
.
use
(
GlToast
);
const
{
initialEmail
,
...
...
@@ -79,9 +82,7 @@ export function initIssuableByEmail() {
markdownHelpPath
,
resetPath
,
},
render
(
h
)
{
return
h
(
IssuableByEmail
);
},
render
:
(
createElement
)
=>
createElement
(
IssuableByEmail
),
});
}
...
...
@@ -89,7 +90,7 @@ export function initIssuableHeaderWarnings(store) {
const
el
=
document
.
getElementById
(
'
js-issuable-header-warnings
'
);
if
(
!
el
)
{
return
false
;
return
null
;
}
const
{
hidden
}
=
el
.
dataset
;
...
...
@@ -98,18 +99,18 @@ export function initIssuableHeaderWarnings(store) {
el
,
store
,
provide
:
{
hidden
:
parseBoolean
(
hidden
)
},
render
(
createElement
)
{
return
createElement
(
IssuableHeaderWarnings
);
},
render
:
(
createElement
)
=>
createElement
(
IssuableHeaderWarnings
),
});
}
export
function
initIssuableSidebar
()
{
const
sidebarOptE
l
=
document
.
querySelector
(
'
.js-sidebar-options
'
);
const
e
l
=
document
.
querySelector
(
'
.js-sidebar-options
'
);
if
(
!
sidebarOptEl
)
return
;
if
(
!
el
)
{
return
;
}
const
sidebarOptions
=
getSidebarOptions
(
sidebarOptE
l
);
const
sidebarOptions
=
getSidebarOptions
(
e
l
);
new
IssuableContext
(
sidebarOptions
.
currentUser
);
// eslint-disable-line no-new
Sidebar
.
initialize
();
...
...
app/assets/javascripts/issues_list/components/issues_list_app.vue
View file @
b3dd294f
...
...
@@ -516,10 +516,9 @@ export default {
},
async
handleBulkUpdateClick
()
{
if
(
!
this
.
hasInitBulkEdit
)
{
const
initBulkUpdateSidebar
=
await
import
(
'
~/issuable/bulk_update_sidebar/issuable_init_bulk_update_sidebar
'
);
initBulkUpdateSidebar
.
default
.
init
(
'
issuable_
'
);
const
bulkUpdateSidebar
=
await
import
(
'
~/issuable/bulk_update_sidebar
'
);
bulkUpdateSidebar
.
initBulkUpdateSidebar
(
'
issuable_
'
);
bulkUpdateSidebar
.
initIssueStatusSelect
();
const
usersSelect
=
await
import
(
'
~/users_select
'
);
const
UsersSelect
=
usersSelect
.
default
;
...
...
app/assets/javascripts/pages/groups/issues/index.js
View file @
b3dd294f
import
IssuableFilteredSearchTokenKeys
from
'
ee_else_ce/filtered_search/issuable_filtered_search_token_keys
'
;
import
issuableInitBulkUpdateSidebar
from
'
~/issuable/bulk_update_sidebar/issuable_init_
bulk_update_sidebar
'
;
import
{
initBulkUpdateSidebar
}
from
'
~/issuable/
bulk_update_sidebar
'
;
import
{
mountIssuablesListApp
,
mountIssuesListApp
}
from
'
~/issues_list
'
;
import
initManualOrdering
from
'
~/issues/manual_ordering
'
;
import
{
FILTERED_SEARCH
}
from
'
~/filtered_search/constants
'
;
...
...
@@ -13,7 +13,7 @@ if (gon.features?.vueIssuesList) {
IssuableFilteredSearchTokenKeys
.
addExtraTokensForIssues
();
IssuableFilteredSearchTokenKeys
.
removeTokensForKeys
(
'
release
'
);
i
ssuableInitBulkUpdateSidebar
.
init
(
ISSUE_BULK_UPDATE_PREFIX
);
i
nitBulkUpdateSidebar
(
ISSUE_BULK_UPDATE_PREFIX
);
initFilteredSearch
({
page
:
FILTERED_SEARCH
.
ISSUES
,
...
...
app/assets/javascripts/pages/groups/merge_requests/index.js
View file @
b3dd294f
import
addExtraTokensForMergeRequests
from
'
ee_else_ce/filtered_search/add_extra_tokens_for_merge_requests
'
;
import
IssuableFilteredSearchTokenKeys
from
'
~/filtered_search/issuable_filtered_search_token_keys
'
;
import
issuableInitBulkUpdateSidebar
from
'
~/issuable/bulk_update_sidebar/issuable_init_
bulk_update_sidebar
'
;
import
{
initBulkUpdateSidebar
}
from
'
~/issuable/
bulk_update_sidebar
'
;
import
{
FILTERED_SEARCH
}
from
'
~/filtered_search/constants
'
;
import
initFilteredSearch
from
'
~/pages/search/init_filtered_search
'
;
import
projectSelect
from
'
~/project_select
'
;
...
...
@@ -8,7 +8,7 @@ import projectSelect from '~/project_select';
const
ISSUABLE_BULK_UPDATE_PREFIX
=
'
merge_request_
'
;
addExtraTokensForMergeRequests
(
IssuableFilteredSearchTokenKeys
);
i
ssuableInitBulkUpdateSidebar
.
init
(
ISSUABLE_BULK_UPDATE_PREFIX
);
i
nitBulkUpdateSidebar
(
ISSUABLE_BULK_UPDATE_PREFIX
);
initFilteredSearch
({
page
:
FILTERED_SEARCH
.
MERGE_REQUESTS
,
...
...
app/assets/javascripts/pages/projects/issues/index/index.js
View file @
b3dd294f
import
IssuableFilteredSearchTokenKeys
from
'
ee_else_ce/filtered_search/issuable_filtered_search_token_keys
'
;
import
ShortcutsNavigation
from
'
~/behaviors/shortcuts/shortcuts_navigation
'
;
import
{
initCsvImportExportButtons
,
initIssuableByEmail
}
from
'
~/issuable
'
;
import
issuableInitBulkUpdateSidebar
from
'
~/issuable/bulk_update_sidebar/issuable_init_
bulk_update_sidebar
'
;
import
{
initBulkUpdateSidebar
,
initIssueStatusSelect
}
from
'
~/issuable/
bulk_update_sidebar
'
;
import
{
mountIssuablesListApp
,
mountIssuesListApp
,
mountJiraIssuesListApp
}
from
'
~/issues_list
'
;
import
initManualOrdering
from
'
~/issues/manual_ordering
'
;
import
{
FILTERED_SEARCH
}
from
'
~/filtered_search/constants
'
;
...
...
@@ -20,7 +20,8 @@ if (gon.features?.vueIssuesList) {
useDefaultState
:
true
,
});
issuableInitBulkUpdateSidebar
.
init
(
ISSUABLE_INDEX
.
ISSUE
);
initBulkUpdateSidebar
(
ISSUABLE_INDEX
.
ISSUE
);
initIssueStatusSelect
();
new
UsersSelect
();
// eslint-disable-line no-new
initCsvImportExportButtons
();
...
...
app/assets/javascripts/pages/projects/merge_requests/index/index.js
View file @
b3dd294f
...
...
@@ -2,13 +2,14 @@ import addExtraTokensForMergeRequests from 'ee_else_ce/filtered_search/add_extra
import
ShortcutsNavigation
from
'
~/behaviors/shortcuts/shortcuts_navigation
'
;
import
IssuableFilteredSearchTokenKeys
from
'
~/filtered_search/issuable_filtered_search_token_keys
'
;
import
{
initCsvImportExportButtons
,
initIssuableByEmail
}
from
'
~/issuable
'
;
import
issuableInitBulkUpdateSidebar
from
'
~/issuable/bulk_update_sidebar/issuable_init_
bulk_update_sidebar
'
;
import
{
initBulkUpdateSidebar
,
initIssueStatusSelect
}
from
'
~/issuable/
bulk_update_sidebar
'
;
import
{
FILTERED_SEARCH
}
from
'
~/filtered_search/constants
'
;
import
{
ISSUABLE_INDEX
}
from
'
~/issuable/constants
'
;
import
initFilteredSearch
from
'
~/pages/search/init_filtered_search
'
;
import
UsersSelect
from
'
~/users_select
'
;
issuableInitBulkUpdateSidebar
.
init
(
ISSUABLE_INDEX
.
MERGE_REQUEST
);
initBulkUpdateSidebar
(
ISSUABLE_INDEX
.
MERGE_REQUEST
);
initIssueStatusSelect
();
addExtraTokensForMergeRequests
(
IssuableFilteredSearchTokenKeys
);
IssuableFilteredSearchTokenKeys
.
removeTokensForKeys
(
'
iteration
'
);
...
...
ee/app/assets/javascripts/pages/groups/epics/index/index.js
View file @
b3dd294f
import
initEpicCreateApp
from
'
ee/epic/epic_bundle
'
;
import
initEpicsList
from
'
ee/epics_list/epics_list_bundle
'
;
import
FilteredSearchTokenKeysEpics
from
'
ee/filtered_search/filtered_search_token_keys_epics
'
;
import
issuableInitBulkUpdateSidebar
from
'
~/issuable/bulk_update_sidebar/issuable_init_
bulk_update_sidebar
'
;
import
{
initBulkUpdateSidebar
}
from
'
~/issuable/
bulk_update_sidebar
'
;
import
initFilteredSearch
from
'
~/pages/search/init_filtered_search
'
;
const
EPIC_BULK_UPDATE_PREFIX
=
'
epic_
'
;
...
...
@@ -21,6 +21,5 @@ if (gon.features.vueEpicsList) {
});
initEpicCreateApp
(
true
);
issuableInitBulkUpdateSidebar
.
init
(
EPIC_BULK_UPDATE_PREFIX
);
initBulkUpdateSidebar
(
EPIC_BULK_UPDATE_PREFIX
);
}
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