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
f0b16acd
Commit
f0b16acd
authored
Aug 16, 2017
by
Tim Zallmann
Committed by
Jose Ivan Vargas
Aug 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'dispatcher-race-condition-fix' into 'master'
Fix race condition with dispatcher.js See merge request !13377
parent
df9729d3
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
14 deletions
+20
-14
app/assets/javascripts/diff_notes/diff_notes_bundle.js
app/assets/javascripts/diff_notes/diff_notes_bundle.js
+4
-0
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+1
-1
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+2
-2
app/assets/javascripts/render_gfm.js
app/assets/javascripts/render_gfm.js
+1
-3
app/helpers/version_check_helper.rb
app/helpers/version_check_helper.rb
+1
-1
app/views/projects/merge_requests/_discussion.html.haml
app/views/projects/merge_requests/_discussion.html.haml
+3
-3
spec/features/merge_requests/conflicts_spec.rb
spec/features/merge_requests/conflicts_spec.rb
+7
-3
spec/helpers/version_check_helper_spec.rb
spec/helpers/version_check_helper_spec.rb
+1
-1
No files found.
app/assets/javascripts/diff_notes/diff_notes_bundle.js
View file @
f0b16acd
...
@@ -42,6 +42,10 @@ $(() => {
...
@@ -42,6 +42,10 @@ $(() => {
$components
.
each
(
function
()
{
$components
.
each
(
function
()
{
const
$this
=
$
(
this
);
const
$this
=
$
(
this
);
const
noteId
=
$this
.
attr
(
'
:note-id
'
);
const
noteId
=
$this
.
attr
(
'
:note-id
'
);
const
discussionId
=
$this
.
attr
(
'
:discussion-id
'
);
if
(
$this
.
is
(
'
comment-and-resolve-btn
'
)
&&
!
discussionId
)
return
;
const
tmp
=
Vue
.
extend
({
const
tmp
=
Vue
.
extend
({
template
:
$this
.
get
(
0
).
outerHTML
template
:
$this
.
get
(
0
).
outerHTML
});
});
...
...
app/assets/javascripts/dispatcher.js
View file @
f0b16acd
...
@@ -644,7 +644,7 @@ import initChangesDropdown from './init_changes_dropdown';
...
@@ -644,7 +644,7 @@ import initChangesDropdown from './init_changes_dropdown';
return
Dispatcher
;
return
Dispatcher
;
})();
})();
$
(
function
()
{
$
(
window
).
on
(
'
load
'
,
function
()
{
new
Dispatcher
();
new
Dispatcher
();
});
});
}).
call
(
window
);
}).
call
(
window
);
app/assets/javascripts/main.js
View file @
f0b16acd
...
@@ -132,8 +132,9 @@ import './project_select';
...
@@ -132,8 +132,9 @@ import './project_select';
import
'
./project_show
'
;
import
'
./project_show
'
;
import
'
./project_variables
'
;
import
'
./project_variables
'
;
import
'
./projects_list
'
;
import
'
./projects_list
'
;
import
'
./
render_gfm
'
;
import
'
./
syntax_highlight
'
;
import
'
./render_math
'
;
import
'
./render_math
'
;
import
'
./render_gfm
'
;
import
'
./right_sidebar
'
;
import
'
./right_sidebar
'
;
import
'
./search
'
;
import
'
./search
'
;
import
'
./search_autocomplete
'
;
import
'
./search_autocomplete
'
;
...
@@ -141,7 +142,6 @@ import './smart_interval';
...
@@ -141,7 +142,6 @@ import './smart_interval';
import
'
./star
'
;
import
'
./star
'
;
import
'
./subscription
'
;
import
'
./subscription
'
;
import
'
./subscription_select
'
;
import
'
./subscription_select
'
;
import
'
./syntax_highlight
'
;
import
'
./dispatcher
'
;
import
'
./dispatcher
'
;
...
...
app/assets/javascripts/render_gfm.js
View file @
f0b16acd
...
@@ -11,7 +11,5 @@
...
@@ -11,7 +11,5 @@
return
this
;
return
this
;
};
};
$
(
document
).
on
(
'
ready load
'
,
function
()
{
$
(()
=>
$
(
'
body
'
).
renderGFM
());
return
$
(
'
body
'
).
renderGFM
();
});
}).
call
(
window
);
}).
call
(
window
);
app/helpers/version_check_helper.rb
View file @
f0b16acd
...
@@ -2,7 +2,7 @@ module VersionCheckHelper
...
@@ -2,7 +2,7 @@ module VersionCheckHelper
def
version_status_badge
def
version_status_badge
if
Rails
.
env
.
production?
&&
current_application_settings
.
version_check_enabled
if
Rails
.
env
.
production?
&&
current_application_settings
.
version_check_enabled
image_url
=
VersionCheck
.
new
.
url
image_url
=
VersionCheck
.
new
.
url
image_tag
image_url
,
class:
'js-version-status-badge'
,
lazy:
false
image_tag
image_url
,
class:
'js-version-status-badge'
end
end
end
end
end
end
app/views/projects/merge_requests/_discussion.html.haml
View file @
f0b16acd
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
=
link_to
'Close merge request'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-nr btn-comment btn-close close-mr-link js-note-target-close"
,
title:
"Close merge request"
,
data:
{
original_text:
"Close merge request"
,
alternative_text:
"Comment & close merge request"
}
=
link_to
'Close merge request'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-nr btn-comment btn-close close-mr-link js-note-target-close"
,
title:
"Close merge request"
,
data:
{
original_text:
"Close merge request"
,
alternative_text:
"Comment & close merge request"
}
-
if
@merge_request
.
reopenable?
-
if
@merge_request
.
reopenable?
=
link_to
'Reopen merge request'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"btn btn-nr btn-comment btn-reopen reopen-mr-link js-note-target-close js-note-target-reopen"
,
title:
"Reopen merge request"
,
data:
{
original_text:
"Reopen merge request"
,
alternative_text:
"Comment & reopen merge request"
}
=
link_to
'Reopen merge request'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"btn btn-nr btn-comment btn-reopen reopen-mr-link js-note-target-close js-note-target-reopen"
,
title:
"Reopen merge request"
,
data:
{
original_text:
"Reopen merge request"
,
alternative_text:
"Comment & reopen merge request"
}
%comment-and-resolve-btn
{
"inline-template"
=>
true
,
":discussion-id"
=>
""
}
%comment-and-resolve-btn
{
"inline-template"
=>
true
}
%button
.btn.btn-nr.btn-default.append-right-10.js-comment-resolve-button
{
"v-if"
=>
"showButton"
,
type:
"submit"
,
data:
{
project_path:
"#{project_path(@merge_request.project)}"
}
}
%button
.btn.btn-nr.btn-default.append-right-10.js-comment-resolve-button
{
"v-if"
=>
"showButton"
,
type:
"submit"
,
data:
{
project_path:
"#{project_path(@merge_request.project)}"
}
}
{{ buttonText }}
{{ buttonText }}
...
...
spec/features/merge_requests/conflicts_spec.rb
View file @
f0b16acd
...
@@ -28,11 +28,12 @@ feature 'Merge request conflict resolution', js: true do
...
@@ -28,11 +28,12 @@ feature 'Merge request conflict resolution', js: true do
end
end
click_button
'Commit conflict resolution'
click_button
'Commit conflict resolution'
wait_for_requests
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
merge_request
.
reload_diff
merge_request
.
reload_diff
wait_for_requests
click_on
'Changes'
click_on
'Changes'
wait_for_requests
wait_for_requests
...
@@ -69,10 +70,12 @@ feature 'Merge request conflict resolution', js: true do
...
@@ -69,10 +70,12 @@ feature 'Merge request conflict resolution', js: true do
end
end
click_button
'Commit conflict resolution'
click_button
'Commit conflict resolution'
wait_for_requests
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
merge_request
.
reload_diff
merge_request
.
reload_diff
wait_for_requests
click_on
'Changes'
click_on
'Changes'
wait_for_requests
wait_for_requests
...
@@ -140,12 +143,13 @@ feature 'Merge request conflict resolution', js: true do
...
@@ -140,12 +143,13 @@ feature 'Merge request conflict resolution', js: true do
end
end
click_button
'Commit conflict resolution'
click_button
'Commit conflict resolution'
wait_for_requests
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
expect
(
page
).
to
have_content
(
'All merge conflicts were resolved'
)
merge_request
.
reload_diff
merge_request
.
reload_diff
wait_for_requests
click_on
'Changes'
click_on
'Changes'
wait_for_requests
wait_for_requests
click_link
'Expand all'
click_link
'Expand all'
...
...
spec/helpers/version_check_helper_spec.rb
View file @
f0b16acd
...
@@ -23,7 +23,7 @@ describe VersionCheckHelper do
...
@@ -23,7 +23,7 @@ describe VersionCheckHelper do
end
end
it
'should have a js prefixed css class'
do
it
'should have a js prefixed css class'
do
expect
(
@image_tag
).
to
match
(
/class="js-version-status-badge"/
)
expect
(
@image_tag
).
to
match
(
/class="js-version-status-badge
lazy
"/
)
end
end
it
'should have a VersionCheck url as the src'
do
it
'should have a VersionCheck url as the src'
do
...
...
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