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
4b4e1f04
Commit
4b4e1f04
authored
Mar 14, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-missing-blob-permalink-updater-on-blob-show' into 'master'
Fix missing blob line permalink updater on blob:show See merge request !9914
parents
302d0453
e10810de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
23 deletions
+21
-23
dispatcher.js
app/assets/javascripts/dispatcher.js
+21
-23
No files found.
app/assets/javascripts/dispatcher.js
View file @
4b4e1f04
...
...
@@ -67,6 +67,25 @@ const UserCallout = require('./user_callout');
}
path
=
page
.
split
(
':'
);
shortcut_handler
=
null
;
function
initBlob
()
{
new
LineHighlighter
();
new
BlobLinePermalinkUpdater
(
document
.
querySelector
(
'#blob-content-holder'
),
'.diff-line-num[data-line-number]'
,
document
.
querySelectorAll
(
'.js-data-file-blob-permalink-url, .js-blob-blame-link'
),
);
shortcut_handler
=
new
ShortcutsNavigation
();
fileBlobPermalinkUrlElement
=
document
.
querySelector
(
'.js-data-file-blob-permalink-url'
);
fileBlobPermalinkUrl
=
fileBlobPermalinkUrlElement
&&
fileBlobPermalinkUrlElement
.
getAttribute
(
'href'
);
new
ShortcutsBlob
({
skipResetBindings
:
true
,
fileBlobPermalinkUrl
,
});
}
switch
(
page
)
{
case
'sessions:new'
:
new
UsernameValidator
();
...
...
@@ -259,34 +278,13 @@ const UserCallout = require('./user_callout');
break
;
case
'projects:blob:show'
:
gl
.
TargetBranchDropDown
.
bootstrap
();
new
LineHighlighter
();
shortcut_handler
=
new
ShortcutsNavigation
();
fileBlobPermalinkUrlElement
=
document
.
querySelector
(
'.js-data-file-blob-permalink-url'
);
fileBlobPermalinkUrl
=
fileBlobPermalinkUrlElement
&&
fileBlobPermalinkUrlElement
.
getAttribute
(
'href'
);
new
ShortcutsBlob
({
skipResetBindings
:
true
,
fileBlobPermalinkUrl
,
});
initBlob
();
break
;
case
'projects:blob:edit'
:
gl
.
TargetBranchDropDown
.
bootstrap
();
break
;
case
'projects:blame:show'
:
new
LineHighlighter
();
new
BlobLinePermalinkUpdater
(
document
.
querySelector
(
'#blob-content-holder'
),
'.diff-line-num[data-line-number]'
,
document
.
querySelectorAll
(
'.js-data-file-blob-permalink-url, .js-blob-blame-link'
),
);
shortcut_handler
=
new
ShortcutsNavigation
();
fileBlobPermalinkUrlElement
=
document
.
querySelector
(
'.js-data-file-blob-permalink-url'
);
fileBlobPermalinkUrl
=
fileBlobPermalinkUrlElement
&&
fileBlobPermalinkUrlElement
.
getAttribute
(
'href'
);
new
ShortcutsBlob
({
skipResetBindings
:
true
,
fileBlobPermalinkUrl
,
});
initBlob
();
break
;
case
'groups:labels:new'
:
case
'groups:labels:edit'
:
...
...
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