BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
430131f7
Unverified
Commit
430131f7
authored
Oct 30, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove issue and issue status select from global namespace
parent
bba020a5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
51 deletions
+40
-51
header.js
app/assets/javascripts/header.js
+8
-6
init_legacy_filters.js
app/assets/javascripts/init_legacy_filters.js
+2
-2
issuable_bulk_update_sidebar.js
app/assets/javascripts/issuable_bulk_update_sidebar.js
+2
-3
issue.js
app/assets/javascripts/issue.js
+1
-3
issue_status_select.js
app/assets/javascripts/issue_status_select.js
+25
-33
main.js
app/assets/javascripts/main.js
+2
-4
No files found.
app/assets/javascripts/header.js
View file @
430131f7
...
@@ -7,10 +7,12 @@ import { highCountTrim } from '~/lib/utils/text_utility';
...
@@ -7,10 +7,12 @@ import { highCountTrim } from '~/lib/utils/text_utility';
* @param {jQuery.Event} e
* @param {jQuery.Event} e
* @param {String} count
* @param {String} count
*/
*/
$
(
document
).
on
(
'todo:toggle'
,
(
e
,
count
)
=>
{
export
default
function
initTodoToggle
()
{
const
parsedCount
=
parseInt
(
count
,
10
);
$
(
document
).
on
(
'todo:toggle'
,
(
e
,
count
)
=>
{
const
$todoPendingCount
=
$
(
'.todos-count'
);
const
parsedCount
=
parseInt
(
count
,
10
);
const
$todoPendingCount
=
$
(
'.todos-count'
);
$todoPendingCount
.
text
(
highCountTrim
(
parsedCount
));
$todoPendingCount
.
text
(
highCountTrim
(
parsedCount
));
$todoPendingCount
.
toggleClass
(
'hidden'
,
parsedCount
===
0
);
$todoPendingCount
.
toggleClass
(
'hidden'
,
parsedCount
===
0
);
});
});
}
app/assets/javascripts/init_legacy_filters.js
View file @
430131f7
/* eslint-disable no-new */
/* eslint-disable no-new */
/* global LabelsSelect */
/* global LabelsSelect */
/* global MilestoneSelect */
/* global MilestoneSelect */
/* global IssueStatusSelect */
/* global SubscriptionSelect */
/* global SubscriptionSelect */
import
UsersSelect
from
'./users_select'
;
import
UsersSelect
from
'./users_select'
;
import
issueStatusSelect
from
'./issue_status_select'
;
export
default
()
=>
{
export
default
()
=>
{
new
UsersSelect
();
new
UsersSelect
();
new
LabelsSelect
();
new
LabelsSelect
();
new
MilestoneSelect
();
new
MilestoneSelect
();
new
I
ssueStatusSelect
();
i
ssueStatusSelect
();
new
SubscriptionSelect
();
new
SubscriptionSelect
();
};
};
app/assets/javascripts/issuable_bulk_update_sidebar.js
View file @
430131f7
/* eslint-disable class-methods-use-this, no-new */
/* eslint-disable class-methods-use-this, no-new */
/* global LabelsSelect */
/* global LabelsSelect */
/* global MilestoneSelect */
/* global MilestoneSelect */
/* global IssueStatusSelect */
/* global SubscriptionSelect */
/* global SubscriptionSelect */
import
IssuableBulkUpdateActions
from
'./issuable_bulk_update_actions'
;
import
IssuableBulkUpdateActions
from
'./issuable_bulk_update_actions'
;
import
'./milestone_select'
;
import
'./milestone_select'
;
import
'./issue_status_select'
;
import
issueStatusSelect
from
'./issue_status_select'
;
import
'./subscription_select'
;
import
'./subscription_select'
;
import
'./labels_select'
;
import
'./labels_select'
;
...
@@ -49,7 +48,7 @@ export default class IssuableBulkUpdateSidebar {
...
@@ -49,7 +48,7 @@ export default class IssuableBulkUpdateSidebar {
initDropdowns
()
{
initDropdowns
()
{
new
LabelsSelect
();
new
LabelsSelect
();
new
MilestoneSelect
();
new
MilestoneSelect
();
new
I
ssueStatusSelect
();
i
ssueStatusSelect
();
new
SubscriptionSelect
();
new
SubscriptionSelect
();
}
}
...
...
app/assets/javascripts/issue.js
View file @
430131f7
...
@@ -6,7 +6,7 @@ import TaskList from './task_list';
...
@@ -6,7 +6,7 @@ import TaskList from './task_list';
import
CreateMergeRequestDropdown
from
'./create_merge_request_dropdown'
;
import
CreateMergeRequestDropdown
from
'./create_merge_request_dropdown'
;
import
IssuablesHelper
from
'./helpers/issuables_helper'
;
import
IssuablesHelper
from
'./helpers/issuables_helper'
;
class
Issue
{
export
default
class
Issue
{
constructor
()
{
constructor
()
{
if
(
$
(
'a.btn-close'
).
length
)
{
if
(
$
(
'a.btn-close'
).
length
)
{
this
.
taskList
=
new
TaskList
({
this
.
taskList
=
new
TaskList
({
...
@@ -147,5 +147,3 @@ class Issue {
...
@@ -147,5 +147,3 @@ class Issue {
});
});
}
}
}
}
export
default
Issue
;
app/assets/javascripts/issue_status_select.js
View file @
430131f7
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, quotes, object-shorthand, no-unused-vars, no-shadow, one-var, one-var-declaration-per-line, comma-dangle, max-len */
/* eslint-disable func-names,wrap-iife, no-shadow, no-unused-vars, one-var */
(
function
()
{
export
default
function
issueStatusSelect
()
{
this
.
IssueStatusSelect
=
(
function
()
{
$
(
'.js-issue-status'
).
each
(
function
(
i
,
el
)
{
function
IssueStatusSelect
()
{
const
fieldName
=
$
(
el
).
data
(
'field-name'
);
$
(
'.js-issue-status'
).
each
(
function
(
i
,
el
)
{
return
$
(
el
).
glDropdown
({
var
fieldName
;
selectable
:
true
,
fieldName
=
$
(
el
).
data
(
"field-name"
);
fieldName
,
return
$
(
el
).
glDropdown
({
toggleLabel
:
(
function
(
_this
)
{
selectable
:
true
,
return
function
(
selected
,
el
,
instance
)
{
fieldName
:
fieldName
,
let
label
=
'Author'
;
toggleLabel
:
(
function
(
_this
)
{
const
$item
=
instance
.
dropdown
.
find
(
'.is-active'
);
return
function
(
selected
,
el
,
instance
)
{
if
(
$item
.
length
)
{
var
$item
,
label
;
label
=
$item
.
text
();
label
=
'Author'
;
$item
=
instance
.
dropdown
.
find
(
'.is-active'
);
if
(
$item
.
length
)
{
label
=
$item
.
text
();
}
return
label
;
};
})(
this
),
clicked
:
function
(
options
)
{
return
options
.
e
.
preventDefault
();
},
id
:
function
(
obj
,
el
)
{
return
$
(
el
).
data
(
"id"
);
}
}
});
return
label
;
});
};
}
})(
this
),
clicked
(
options
)
{
return
IssueStatusSelect
;
return
options
.
e
.
preventDefault
();
})();
},
}).
call
(
window
);
id
(
obj
,
el
)
{
return
$
(
el
).
data
(
'id'
);
},
});
});
}
app/assets/javascripts/main.js
View file @
430131f7
...
@@ -54,11 +54,8 @@ import './gl_dropdown';
...
@@ -54,11 +54,8 @@ import './gl_dropdown';
import
'./gl_field_error'
;
import
'./gl_field_error'
;
import
'./gl_field_errors'
;
import
'./gl_field_errors'
;
import
'./gl_form'
;
import
'./gl_form'
;
import
'./header'
;
import
initTodoToggle
from
'./header'
;
import
initImporterStatus
from
'./importer_status'
;
import
initImporterStatus
from
'./importer_status'
;
import
'./issuable_form'
;
import
'./issue'
;
import
'./issue_status_select'
;
import
'./labels_select'
;
import
'./labels_select'
;
import
'./layout_nav'
;
import
'./layout_nav'
;
import
LazyLoader
from
'./lazy_loader'
;
import
LazyLoader
from
'./lazy_loader'
;
...
@@ -137,6 +134,7 @@ $(function () {
...
@@ -137,6 +134,7 @@ $(function () {
initBreadcrumbs
();
initBreadcrumbs
();
initImporterStatus
();
initImporterStatus
();
initTodoToggle
();
// Set the default path for all cookies to GitLab's root directory
// Set the default path for all cookies to GitLab's root directory
Cookies
.
defaults
.
path
=
gon
.
relative_url_root
||
'/'
;
Cookies
.
defaults
.
path
=
gon
.
relative_url_root
||
'/'
;
...
...
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