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
Boxiang Sun
gitlab-ce
Commits
579092f5
Commit
579092f5
authored
Sep 14, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove discussion_lock
parent
a319418d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
75 deletions
+17
-75
app/assets/javascripts/discussion_lock.js
app/assets/javascripts/discussion_lock.js
+0
-46
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+0
-1
app/views/projects/merge_requests/_mr_title.html.haml
app/views/projects/merge_requests/_mr_title.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+0
-11
db/schema.rb
db/schema.rb
+16
-16
No files found.
app/assets/javascripts/discussion_lock.js
deleted
100644 → 0
View file @
a319418d
class
DiscussionLock
{
constructor
(
containerElm
)
{
this
.
containerElm
=
containerElm
;
const
lockButton
=
containerElm
.
querySelector
(
'
.js-discussion-lock-button
'
);
console
.
log
(
lockButton
);
if
(
lockButton
)
{
// remove class so we don't bind twice
lockButton
.
classList
.
remove
(
'
js-discussion-lock-button
'
);
console
.
log
(
lockButton
);
lockButton
.
addEventListener
(
'
click
'
,
this
.
toggleDiscussionLock
.
bind
(
this
));
}
}
toggleDiscussionLock
(
event
)
{
const
button
=
event
.
currentTarget
;
const
buttonSpan
=
button
.
querySelector
(
'
span
'
);
if
(
!
buttonSpan
||
button
.
classList
.
contains
(
'
disabled
'
))
{
return
;
}
button
.
classList
.
add
(
'
disabled
'
);
const
url
=
this
.
containerElm
.
dataset
.
url
;
const
lock
=
this
.
containerElm
.
dataset
.
lock
;
const
issuableType
=
this
.
containerElm
.
dataset
.
issuableType
;
const
data
=
{}
data
[
issuableType
]
=
{}
data
[
issuableType
].
discussion_locked
=
lock
$
.
ajax
({
url
,
data
:
data
,
type
:
'
PUT
'
}).
done
((
data
)
=>
{
button
.
classList
.
remove
(
'
disabled
'
);
});
}
static
bindAll
(
selector
)
{
[].
forEach
.
call
(
document
.
querySelectorAll
(
selector
),
elm
=>
new
DiscussionLock
(
elm
));
}
}
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
DiscussionLock
=
DiscussionLock
;
app/assets/javascripts/main.js
View file @
579092f5
...
@@ -80,7 +80,6 @@ import './copy_as_gfm';
...
@@ -80,7 +80,6 @@ import './copy_as_gfm';
import
'
./copy_to_clipboard
'
;
import
'
./copy_to_clipboard
'
;
import
'
./create_label
'
;
import
'
./create_label
'
;
import
'
./diff
'
;
import
'
./diff
'
;
import
'
./discussion_lock
'
;
import
'
./dropzone_input
'
;
import
'
./dropzone_input
'
;
import
'
./due_date_select
'
;
import
'
./due_date_select
'
;
import
'
./files_comment_button
'
;
import
'
./files_comment_button
'
;
...
...
app/views/projects/merge_requests/_mr_title.html.haml
View file @
579092f5
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
=
icon
(
'angle-double-left'
)
=
icon
(
'angle-double-left'
)
.issuable-meta
.issuable-meta
-
if
@merge_request
.
discussion_locked
-
if
@merge_request
.
discussion_locked
?
=
icon
(
'lock'
,
class:
'issuable-warning-icon'
)
=
icon
(
'lock'
,
class:
'issuable-warning-icon'
)
=
issuable_meta
(
@merge_request
,
@project
,
"Merge request"
)
=
issuable_meta
(
@merge_request
,
@project
,
"Merge request"
)
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
579092f5
...
@@ -135,17 +135,6 @@
...
@@ -135,17 +135,6 @@
%button
.btn.btn-default.pull-right.js-subscribe-button.issuable-subscribe-button.hide-collapsed
{
type:
"button"
}
%button
.btn.btn-default.pull-right.js-subscribe-button.issuable-subscribe-button.hide-collapsed
{
type:
"button"
}
%span
=
subscribed
?
'Unsubscribe'
:
'Subscribe'
%span
=
subscribed
?
'Unsubscribe'
:
'Subscribe'
-
if
can_edit_issuable
-
locked
=
issuable
.
discussion_locked?
.block.light.discussion-lock
{
data:
{
lock:
(
!
locked
).
to_s
,
url:
"#{issuable_json_path(issuable)}?basic=true"
,
issuable_type:
issuable
.
class
.
to_s
.
underscore
}
}
.sidebar-collapsed-icon
=
icon
(
'rss'
,
'aria-hidden'
:
'true'
)
%span
.issuable-header-text.hide-collapsed.pull-left
Discussion Lock
-
subscribtion_status
=
locked
?
'locked'
:
'not locked'
%button
.btn.btn-default.pull-right.js-discussion-lock-button.issuable-discussion-lock-button.hide-collapsed
{
type:
"button"
}
%span
=
locked
?
'Unlock'
:
'Lock'
-
project_ref
=
cross_project_reference
(
@project
,
issuable
)
-
project_ref
=
cross_project_reference
(
@project
,
issuable
)
.block.project-reference
.block.project-reference
.sidebar-collapsed-icon.dont-change-state
.sidebar-collapsed-icon.dont-change-state
...
...
db/schema.rb
View file @
579092f5
...
@@ -32,8 +32,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
...
@@ -32,8 +32,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
t
.
text
"description"
,
null:
false
t
.
text
"description"
,
null:
false
t
.
string
"header_logo"
t
.
string
"header_logo"
t
.
string
"logo"
t
.
string
"logo"
t
.
datetime
_with_timezone
"created_at"
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
_with_timezone
"updated_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
t
.
text
"description_html"
t
.
text
"description_html"
t
.
integer
"cached_markdown_version"
t
.
integer
"cached_markdown_version"
end
end
...
@@ -275,8 +275,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
...
@@ -275,8 +275,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
t
.
string
"encrypted_value_iv"
t
.
string
"encrypted_value_iv"
t
.
integer
"group_id"
,
null:
false
t
.
integer
"group_id"
,
null:
false
t
.
boolean
"protected"
,
default:
false
,
null:
false
t
.
boolean
"protected"
,
default:
false
,
null:
false
t
.
datetime
_with_timezone
"created_at"
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
_with_timezone
"updated_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
end
end
add_index
"ci_group_variables"
,
[
"group_id"
,
"key"
],
name:
"index_ci_group_variables_on_group_id_and_key"
,
unique:
true
,
using: :btree
add_index
"ci_group_variables"
,
[
"group_id"
,
"key"
],
name:
"index_ci_group_variables_on_group_id_and_key"
,
unique:
true
,
using: :btree
...
@@ -288,8 +288,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
...
@@ -288,8 +288,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
t
.
string
"encrypted_value_salt"
t
.
string
"encrypted_value_salt"
t
.
string
"encrypted_value_iv"
t
.
string
"encrypted_value_iv"
t
.
integer
"pipeline_schedule_id"
,
null:
false
t
.
integer
"pipeline_schedule_id"
,
null:
false
t
.
datetime
_with_timezone
"created_at"
t
.
datetime
"created_at"
t
.
datetime
_with_timezone
"updated_at"
t
.
datetime
"updated_at"
end
end
add_index
"ci_pipeline_schedule_variables"
,
[
"pipeline_schedule_id"
,
"key"
],
name:
"index_ci_pipeline_schedule_variables_on_schedule_id_and_key"
,
unique:
true
,
using: :btree
add_index
"ci_pipeline_schedule_variables"
,
[
"pipeline_schedule_id"
,
"key"
],
name:
"index_ci_pipeline_schedule_variables_on_schedule_id_and_key"
,
unique:
true
,
using: :btree
...
@@ -537,8 +537,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
...
@@ -537,8 +537,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
t
.
integer
"project_id"
t
.
integer
"project_id"
t
.
integer
"author_id"
,
null:
false
t
.
integer
"author_id"
,
null:
false
t
.
integer
"target_id"
t
.
integer
"target_id"
t
.
datetime
_with_timezone
"created_at"
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
_with_timezone
"updated_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
t
.
integer
"action"
,
limit:
2
,
null:
false
t
.
integer
"action"
,
limit:
2
,
null:
false
t
.
string
"target_type"
t
.
string
"target_type"
end
end
...
@@ -576,8 +576,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
...
@@ -576,8 +576,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
add_index
"forked_project_links"
,
[
"forked_to_project_id"
],
name:
"index_forked_project_links_on_forked_to_project_id"
,
unique:
true
,
using: :btree
add_index
"forked_project_links"
,
[
"forked_to_project_id"
],
name:
"index_forked_project_links_on_forked_to_project_id"
,
unique:
true
,
using: :btree
create_table
"gpg_keys"
,
force: :cascade
do
|
t
|
create_table
"gpg_keys"
,
force: :cascade
do
|
t
|
t
.
datetime
_with_timezone
"created_at"
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
_with_timezone
"updated_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
t
.
integer
"user_id"
t
.
integer
"user_id"
t
.
binary
"primary_keyid"
t
.
binary
"primary_keyid"
t
.
binary
"fingerprint"
t
.
binary
"fingerprint"
...
@@ -589,8 +589,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
...
@@ -589,8 +589,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
add_index
"gpg_keys"
,
[
"user_id"
],
name:
"index_gpg_keys_on_user_id"
,
using: :btree
add_index
"gpg_keys"
,
[
"user_id"
],
name:
"index_gpg_keys_on_user_id"
,
using: :btree
create_table
"gpg_signatures"
,
force: :cascade
do
|
t
|
create_table
"gpg_signatures"
,
force: :cascade
do
|
t
|
t
.
datetime
_with_timezone
"created_at"
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
_with_timezone
"updated_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
t
.
integer
"project_id"
t
.
integer
"project_id"
t
.
integer
"gpg_key_id"
t
.
integer
"gpg_key_id"
t
.
binary
"commit_sha"
t
.
binary
"commit_sha"
...
@@ -789,8 +789,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
...
@@ -789,8 +789,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
add_index
"members"
,
[
"user_id"
],
name:
"index_members_on_user_id"
,
using: :btree
add_index
"members"
,
[
"user_id"
],
name:
"index_members_on_user_id"
,
using: :btree
create_table
"merge_request_diff_commits"
,
id:
false
,
force: :cascade
do
|
t
|
create_table
"merge_request_diff_commits"
,
id:
false
,
force: :cascade
do
|
t
|
t
.
datetime
_with_timezone
"authored_date"
t
.
datetime
"authored_date"
t
.
datetime
_with_timezone
"committed_date"
t
.
datetime
"committed_date"
t
.
integer
"merge_request_diff_id"
,
null:
false
t
.
integer
"merge_request_diff_id"
,
null:
false
t
.
integer
"relative_order"
,
null:
false
t
.
integer
"relative_order"
,
null:
false
t
.
binary
"sha"
,
null:
false
t
.
binary
"sha"
,
null:
false
...
@@ -1114,8 +1114,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
...
@@ -1114,8 +1114,8 @@ ActiveRecord::Schema.define(version: 20170905112933) do
create_table
"project_auto_devops"
,
force: :cascade
do
|
t
|
create_table
"project_auto_devops"
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
,
null:
false
t
.
integer
"project_id"
,
null:
false
t
.
datetime
_with_timezone
"created_at"
,
null:
false
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
_with_timezone
"updated_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
t
.
boolean
"enabled"
t
.
boolean
"enabled"
t
.
string
"domain"
t
.
string
"domain"
end
end
...
...
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