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
00ee7a9f
Commit
00ee7a9f
authored
Oct 01, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FE review changes app code
parent
fe96bd41
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
24 deletions
+41
-24
app/assets/javascripts/diff.js
app/assets/javascripts/diff.js
+1
-1
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+2
-2
app/assets/javascripts/notes/components/issue_discussion_locked_widget.vue
...ripts/notes/components/issue_discussion_locked_widget.vue
+2
-2
app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue
...pts/sidebar/components/confidential/edit_form_buttons.vue
+2
-2
app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
...avascripts/sidebar/components/lock/lock_issue_sidebar.vue
+17
-5
app/assets/javascripts/sidebar/sidebar_bundle.js
app/assets/javascripts/sidebar/sidebar_bundle.js
+11
-11
app/assets/javascripts/vue_shared/components/issue/issue_warning.vue
...javascripts/vue_shared/components/issue/issue_warning.vue
+2
-0
app/assets/javascripts/vue_shared/mixins/issuable.js
app/assets/javascripts/vue_shared/mixins/issuable.js
+3
-1
db/schema.rb
db/schema.rb
+1
-0
No files found.
app/assets/javascripts/diff.js
View file @
00ee7a9f
...
@@ -18,7 +18,7 @@ class Diff {
...
@@ -18,7 +18,7 @@ class Diff {
});
});
const
tab
=
document
.
getElementById
(
'
diffs
'
);
const
tab
=
document
.
getElementById
(
'
diffs
'
);
if
(
!
tab
||
(
tab
&&
!
Object
.
hasOwnProperty
.
call
(
tab
.
dataset
,
'
isLocked
'
)
))
FilesCommentButton
.
init
(
$diffFile
);
if
(
!
tab
||
(
tab
&&
tab
.
dataset
&&
tab
.
dataset
.
isLocked
!==
''
))
FilesCommentButton
.
init
(
$diffFile
);
$diffFile
.
each
((
index
,
file
)
=>
new
gl
.
ImageFile
(
file
));
$diffFile
.
each
((
index
,
file
)
=>
new
gl
.
ImageFile
(
file
));
...
...
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
00ee7a9f
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
isIssueOpen
()
{
isIssueOpen
()
{
return
this
.
issueState
===
constants
.
OPENED
||
this
.
issueState
===
constants
.
REOPENED
;
return
this
.
issueState
===
constants
.
OPENED
||
this
.
issueState
===
constants
.
REOPENED
;
},
},
canCreate
()
{
canCreate
Note
()
{
return
this
.
getIssueData
.
current_user
.
can_create_note
;
return
this
.
getIssueData
.
current_user
.
can_create_note
;
},
},
issueActionButtonTitle
()
{
issueActionButtonTitle
()
{
...
@@ -241,7 +241,7 @@
...
@@ -241,7 +241,7 @@
<
template
>
<
template
>
<div>
<div>
<issue-note-signed-out-widget
v-if=
"!isLoggedIn"
/>
<issue-note-signed-out-widget
v-if=
"!isLoggedIn"
/>
<issue-discussion-locked-widget
v-else-if=
"!canCreate"
/>
<issue-discussion-locked-widget
v-else-if=
"!canCreate
Note
"
/>
<ul
<ul
v-else
v-else
class=
"notes notes-form timeline"
>
class=
"notes notes-form timeline"
>
...
...
app/assets/javascripts/notes/components/issue_discussion_locked_widget.vue
View file @
00ee7a9f
<
script
>
<
script
>
export
default
{
export
default
{
computed
:
{
computed
:
{
i
con
()
{
lockI
con
()
{
return
gl
.
utils
.
spriteIcon
(
'
lock
'
);
return
gl
.
utils
.
spriteIcon
(
'
lock
'
);
},
},
},
},
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<
template
>
<
template
>
<div
class=
"disabled-comment text-center"
>
<div
class=
"disabled-comment text-center"
>
<span
class=
"issuable-note-warning"
>
<span
class=
"issuable-note-warning"
>
<span
class=
"icon"
v-html=
"
i
con"
></span>
<span
class=
"icon"
v-html=
"
lockI
con"
></span>
<span>
This issue is locked. Only
<b>
project members
</b>
can comment.
</span>
<span>
This issue is locked. Only
<b>
project members
</b>
can comment.
</span>
</span>
</span>
</div>
</div>
...
...
app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue
View file @
00ee7a9f
...
@@ -15,7 +15,7 @@ export default {
...
@@ -15,7 +15,7 @@ export default {
},
},
},
},
computed
:
{
computed
:
{
b
uttonText
()
{
toggleB
uttonText
()
{
return
this
.
isConfidential
?
'
Turn Off
'
:
'
Turn On
'
;
return
this
.
isConfidential
?
'
Turn Off
'
:
'
Turn On
'
;
},
},
updateConfidentialBool
()
{
updateConfidentialBool
()
{
...
@@ -39,7 +39,7 @@ export default {
...
@@ -39,7 +39,7 @@ export default {
class=
"btn btn-close"
class=
"btn btn-close"
@
click.prevent=
"updateConfidentialAttribute(updateConfidentialBool)"
@
click.prevent=
"updateConfidentialAttribute(updateConfidentialBool)"
>
>
{{
b
uttonText
}}
{{
toggleB
uttonText
}}
</button>
</button>
</div>
</div>
</
template
>
</
template
>
app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
View file @
00ee7a9f
...
@@ -86,7 +86,7 @@ export default {
...
@@ -86,7 +86,7 @@ export default {
<
/div
>
<
/div
>
<
div
class
=
"
value sidebar-item-value hide-collapsed
"
>
<
div
class
=
"
value sidebar-item-value hide-collapsed
"
>
<
edit
F
orm
<
edit
-
f
orm
v
-
if
=
"
isLockDialogOpen
"
v
-
if
=
"
isLockDialogOpen
"
:
toggle
-
form
=
"
toggleForm
"
:
toggle
-
form
=
"
toggleForm
"
:
is
-
locked
=
"
isLocked
"
:
is
-
locked
=
"
isLocked
"
...
@@ -94,13 +94,25 @@ export default {
...
@@ -94,13 +94,25 @@ export default {
:
issuable
-
type
=
"
issuableType
"
:
issuable
-
type
=
"
issuableType
"
/>
/>
<
div
v
-
if
=
"
isLocked
"
class
=
"
value sidebar-item-value
"
>
<
div
<
i
aria
-
hidden
=
"
true
"
class
=
"
fa fa-lock sidebar-item-icon is-active
"
><
/i
>
v
-
if
=
"
isLocked
"
class
=
"
value sidebar-item-value
"
>
<
i
aria
-
hidden
=
"
true
"
class
=
"
fa fa-lock sidebar-item-icon is-active
"
><
/i
>
{{
__
(
'
Locked
'
)
}}
{{
__
(
'
Locked
'
)
}}
<
/div
>
<
/div
>
<
div
v
-
else
class
=
"
no-value sidebar-item-value hide-collapsed
"
>
<
div
<
i
aria
-
hidden
=
"
true
"
class
=
"
fa fa-unlock sidebar-item-icon
"
><
/i
>
v
-
else
class
=
"
no-value sidebar-item-value hide-collapsed
"
>
<
i
aria
-
hidden
=
"
true
"
class
=
"
fa fa-unlock sidebar-item-icon
"
><
/i
>
{{
__
(
'
Unlocked
'
)
}}
{{
__
(
'
Unlocked
'
)
}}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
app/assets/javascripts/sidebar/sidebar_bundle.js
View file @
00ee7a9f
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
s
idebarTimeTracking
from
'
./components/time_tracking/sidebar_time_tracking
'
;
import
S
idebarTimeTracking
from
'
./components/time_tracking/sidebar_time_tracking
'
;
import
s
idebarAssignees
from
'
./components/assignees/sidebar_assignees
'
;
import
S
idebarAssignees
from
'
./components/assignees/sidebar_assignees
'
;
import
confidential
from
'
./components/confidential/confidential_issue_sidebar.vue
'
;
import
ConfidentialIssueSidebar
from
'
./components/confidential/confidential_issue_sidebar.vue
'
;
import
SidebarMoveIssue
from
'
./lib/sidebar_move_issue
'
;
import
SidebarMoveIssue
from
'
./lib/sidebar_move_issue
'
;
import
lockBlock
from
'
./components/lock/lock_issue_sidebar.vue
'
;
import
LockIssueSidebar
from
'
./components/lock/lock_issue_sidebar.vue
'
;
import
Translate
from
'
../vue_shared/translate
'
;
import
Translate
from
'
../vue_shared/translate
'
;
import
Mediator
from
'
./sidebar_mediator
'
;
import
Mediator
from
'
./sidebar_mediator
'
;
...
@@ -11,14 +11,14 @@ import Mediator from './sidebar_mediator';
...
@@ -11,14 +11,14 @@ import Mediator from './sidebar_mediator';
Vue
.
use
(
Translate
);
Vue
.
use
(
Translate
);
function
mountConfidentialComponent
(
mediator
)
{
function
mountConfidentialComponent
(
mediator
)
{
const
el
=
document
.
querySelector
(
'
#
js-confidential-entry-point
'
);
const
el
=
document
.
getElementById
(
'
js-confidential-entry-point
'
);
if
(
!
el
)
return
;
if
(
!
el
)
return
;
const
dataNode
=
document
.
getElementById
(
'
js-confidential-issue-data
'
);
const
dataNode
=
document
.
getElementById
(
'
js-confidential-issue-data
'
);
const
initialData
=
JSON
.
parse
(
dataNode
.
innerHTML
);
const
initialData
=
JSON
.
parse
(
dataNode
.
innerHTML
);
const
ConfidentialComp
=
Vue
.
extend
(
confidential
);
const
ConfidentialComp
=
Vue
.
extend
(
ConfidentialIssueSidebar
);
new
ConfidentialComp
({
new
ConfidentialComp
({
propsData
:
{
propsData
:
{
...
@@ -30,14 +30,14 @@ function mountConfidentialComponent(mediator) {
...
@@ -30,14 +30,14 @@ function mountConfidentialComponent(mediator) {
}
}
function
mountLockComponent
(
mediator
)
{
function
mountLockComponent
(
mediator
)
{
const
el
=
document
.
querySelector
(
'
#
js-lock-entry-point
'
);
const
el
=
document
.
getElementById
(
'
js-lock-entry-point
'
);
if
(
!
el
)
return
;
if
(
!
el
)
return
;
const
dataNode
=
document
.
getElementById
(
'
js-lock-issue-data
'
);
const
dataNode
=
document
.
getElementById
(
'
js-lock-issue-data
'
);
const
initialData
=
JSON
.
parse
(
dataNode
.
innerHTML
);
const
initialData
=
JSON
.
parse
(
dataNode
.
innerHTML
);
const
LockComp
=
Vue
.
extend
(
lockBlock
);
const
LockComp
=
Vue
.
extend
(
LockIssueSidebar
);
new
LockComp
({
new
LockComp
({
propsData
:
{
propsData
:
{
...
@@ -54,11 +54,11 @@ function domContentLoaded() {
...
@@ -54,11 +54,11 @@ function domContentLoaded() {
const
mediator
=
new
Mediator
(
sidebarOptions
);
const
mediator
=
new
Mediator
(
sidebarOptions
);
mediator
.
fetch
();
mediator
.
fetch
();
const
sidebarAssigneesEl
=
document
.
querySelector
(
'
#
js-vue-sidebar-assignees
'
);
const
sidebarAssigneesEl
=
document
.
getElementById
(
'
js-vue-sidebar-assignees
'
);
// Only create the sidebarAssignees vue app if it is found in the DOM
// Only create the sidebarAssignees vue app if it is found in the DOM
// We currently do not use sidebarAssignees for the MR page
// We currently do not use sidebarAssignees for the MR page
if
(
sidebarAssigneesEl
)
{
if
(
sidebarAssigneesEl
)
{
new
Vue
(
s
idebarAssignees
).
$mount
(
sidebarAssigneesEl
);
new
Vue
(
S
idebarAssignees
).
$mount
(
sidebarAssigneesEl
);
}
}
mountConfidentialComponent
(
mediator
);
mountConfidentialComponent
(
mediator
);
...
@@ -70,7 +70,7 @@ function domContentLoaded() {
...
@@ -70,7 +70,7 @@ function domContentLoaded() {
$
(
'
.js-move-issue-confirmation-button
'
),
$
(
'
.js-move-issue-confirmation-button
'
),
).
init
();
).
init
();
new
Vue
(
s
idebarTimeTracking
).
$mount
(
'
#issuable-time-tracker
'
);
new
Vue
(
S
idebarTimeTracking
).
$mount
(
'
#issuable-time-tracker
'
);
}
}
document
.
addEventListener
(
'
DOMContentLoaded
'
,
domContentLoaded
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
domContentLoaded
);
...
...
app/assets/javascripts/vue_shared/components/issue/issue_warning.vue
View file @
00ee7a9f
...
@@ -4,11 +4,13 @@
...
@@ -4,11 +4,13 @@
isLocked
:
{
isLocked
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
required
:
false
,
},
},
isConfidential
:
{
isConfidential
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
default
:
false
,
required
:
false
,
},
},
},
},
...
...
app/assets/javascripts/vue_shared/mixins/issuable.js
View file @
00ee7a9f
export
default
{
export
default
{
methods
:
{
methods
:
{
issuableDisplayName
(
issuableType
)
{
issuableDisplayName
(
issuableType
)
{
return
issuableType
.
replace
(
/_/
,
'
'
);
const
displayName
=
issuableType
.
replace
(
/_/
,
'
'
);
return
this
.
__
?
this
.
__
(
displayName
)
:
displayName
;
},
},
},
},
};
};
db/schema.rb
View file @
00ee7a9f
...
@@ -1218,6 +1218,7 @@ ActiveRecord::Schema.define(version: 20170921115009) do
...
@@ -1218,6 +1218,7 @@ ActiveRecord::Schema.define(version: 20170921115009) do
t
.
datetime
"last_repository_updated_at"
t
.
datetime
"last_repository_updated_at"
t
.
integer
"storage_version"
,
limit:
2
t
.
integer
"storage_version"
,
limit:
2
t
.
boolean
"resolve_outdated_diff_discussions"
t
.
boolean
"resolve_outdated_diff_discussions"
t
.
boolean
"merge_requests_ff_only_enabled"
,
default:
false
,
null:
false
end
end
add_index
"projects"
,
[
"ci_id"
],
name:
"index_projects_on_ci_id"
,
using: :btree
add_index
"projects"
,
[
"ci_id"
],
name:
"index_projects_on_ci_id"
,
using: :btree
...
...
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