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
d9c86a49
Commit
d9c86a49
authored
Jul 01, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add styles to look good on windows in general.
parent
78db68ab
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
3 deletions
+24
-3
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+12
-1
app/assets/javascripts/repo/repo_store.js
app/assets/javascripts/repo/repo_store.js
+2
-0
app/assets/javascripts/repo/repo_tabs.js
app/assets/javascripts/repo/repo_tabs.js
+7
-0
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+2
-1
app/views/projects/tree/_tree_content.html.haml
app/views/projects/tree/_tree_content.html.haml
+1
-1
No files found.
app/assets/javascripts/dispatcher.js
View file @
d9c86a49
...
...
@@ -72,11 +72,22 @@ import RepoBundle from './repo/repo_bundle';
}
Dispatcher
.
prototype
.
initPageScripts
=
function
()
{
var
page
,
path
,
shortcut_handler
,
fileBlobPermalinkUrlElement
,
fileBlobPermalinkUrl
;
var
page
,
path
,
shortcut_handler
,
fileBlobPermalinkUrlElement
,
fileBlobPermalinkUrl
,
os
;
page
=
$
(
'
body
'
).
attr
(
'
data-page
'
);
if
(
!
page
)
{
return
false
;
}
function
getScrollBarWidth
()
{
var
$outer
=
$
(
'
<div>
'
).
css
({
visibility
:
'
hidden
'
,
width
:
100
,
overflow
:
'
scroll
'
}).
appendTo
(
'
body
'
),
widthWithScroll
=
$
(
'
<div>
'
).
css
({
width
:
'
100%
'
}).
appendTo
(
$outer
).
outerWidth
();
$outer
.
remove
();
return
100
-
widthWithScroll
;
};
$
(
'
body
'
).
attr
(
'
data-scroll-width
'
,
getScrollBarWidth
());
path
=
page
.
split
(
'
:
'
);
shortcut_handler
=
null
;
...
...
app/assets/javascripts/repo/repo_store.js
View file @
d9c86a49
...
...
@@ -14,6 +14,8 @@ let RepoStore = {
files
:
[],
binary
:
false
,
binaryMimeType
:
''
,
//scroll bar space for windows
scrollWidth
:
0
,
binaryTypes
:
{
png
:
false
}
...
...
app/assets/javascripts/repo/repo_tabs.js
View file @
d9c86a49
...
...
@@ -5,6 +5,7 @@ import RepoMiniMixin from './repo_mini_mixin'
export
default
class
RepoTabs
{
constructor
()
{
this
.
styleTabsForWindows
();
this
.
initVue
();
}
...
...
@@ -18,4 +19,10 @@ export default class RepoTabs {
data
:
()
=>
Store
,
});
}
styleTabsForWindows
()
{
const
scrollWidth
=
Number
(
document
.
body
.
dataset
.
scrollWidth
);
Store
.
scrollWidth
=
scrollWidth
;
console
.
log
(
Store
.
scrollWidth
)
}
}
\ No newline at end of file
app/assets/stylesheets/pages/repo.scss
View file @
d9c86a49
...
...
@@ -38,7 +38,8 @@ header {
display
:
inline-block
;
white-space
:
nowrap
;
width
:
100%
;
overflow
:
scroll
;
overflow-y
:
none
;
overflow-x
:
scroll
;
li
{
list-style-type
:
none
;
...
...
app/views/projects/tree/_tree_content.html.haml
View file @
d9c86a49
...
...
@@ -13,7 +13,7 @@
%tr
{
is:
"repo-previous-directory"
,
":prevurl"
=>
"prevURL"
,
"@linkclicked"
=>
"linkClicked"
}
%tr
{
is:
"repo-file"
,
"v-for"
=>
"file in files"
,
":key"
=>
"file.id"
,
":file"
=>
"file"
,
":is-mini"
=>
"isMini"
,
"@linkclicked"
=>
"linkClicked(file)"
,
":is-tree"
=>
"isTree"
}
.panel-right
>
%ul
#tabs
{
"v-if"
=>
"isMini"
}
%ul
#tabs
{
"v-if"
=>
"isMini"
,
":style"
=>
"{height: 41 + scrollWidth + 'px'}"
}
%li
{
is:
"repo-tab"
,
"v-for"
=>
"tab in openedFiles"
,
":key"
=>
"tab.id"
,
":tab"
=>
"tab"
,
":class"
=>
"{'active' : tab.active}"
}
#ide
{
data:
{
url:
repo_url
}
}
#binary-viewer
{
"v-if"
=>
"binary"
}
...
...
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