[#5439] ticket:238 added horizontal scroll bar to code browser
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/f25280d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/f25280d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/f25280d8
Branch: refs/heads/cj/4691
Commit: f25280d8eae149faa1ca71c92626cb268e93e6fd
Parents: 161034e
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Tue Dec 18 08:58:07 2012 +0400
Committer: Cory Johns <johnsca@geek.net>
Committed: Mon Jan 7 18:11:38 2013 +0000
----------------------------------------------------------------------
Allura/allura/nf/allura/css/site_style.css | 6 +++++-
Allura/allura/templates/repo/file.html | 2 +-
.../forgegit/tests/functional/test_controllers.py | 8 ++++----
.../forgesvn/tests/functional/test_controllers.py | 2 +-
4 files changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f25280d8/Allura/allura/nf/allura/css/site_style.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css
index 9bc9b70..82c2727 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -2748,6 +2748,7 @@ h1.title .viewer:hover {
table.codehilitetable {
background: #F8F8F8;
margin-left:0px;
+ width:740px;
}
td.linenos {
@@ -2779,7 +2780,10 @@ div.codehilite pre {
}
div.codehilite pre div.code_block {
padding-left:10px;
- width: 97%;
+ width: 100%;
+}
+div.codebrowser{
+ overflow-x: auto;
}
input.nofloat {
float: none;
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f25280d8/Allura/allura/templates/repo/file.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/file.html b/Allura/allura/templates/repo/file.html
index 4f43dfe..ce2c612 100644
--- a/Allura/allura/templates/repo/file.html
+++ b/Allura/allura/templates/repo/file.html
@@ -65,7 +65,7 @@
<img src="?format=raw" alt=""/>
{% elif blob.has_html_view or blob.has_pypeline_view or force_display %}
<p><a href="?format=raw">Download this file</a></p>
- <div class="clip grid-19">
+ <div class="clip grid-19 codebrowser">
<h3>
<span class="ico-l"><b data-icon="{{g.icons['table'].char}}" class="ico
{{g.icons['table'].css}}"></b> {{h.really_unicode(blob.name)}}</span>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f25280d8/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index d89ee0f..61c3ad9 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -147,7 +147,7 @@ class TestRootController(_TestCase):
ci = self._get_ci()
resp = self.app.get(ci + 'tree/README')
assert 'README' in resp.html.find('h2', {'class':'dark title'}).contents[2]
- content = str(resp.html.find('div', {'class':'clip grid-19'}))
+ content = str(resp.html.find('div', {'class':'clip grid-19 codebrowser'}))
assert 'This is readme' in content, content
assert '<span id="l1" class="code_block">' in resp
assert 'var hash = window.location.hash.substring(1);' in resp
@@ -183,7 +183,7 @@ class TestRootController(_TestCase):
def test_file_force_display(self):
ci = self._get_ci()
resp = self.app.get(ci + 'tree/README?force=True')
- content = str(resp.html.find('div', {'class':'clip grid-19'}))
+ content = str(resp.html.find('div', {'class':'clip grid-19 codebrowser'}))
assert re.search(r'<pre>.*This is readme', content), content
assert '</pre>' in content, content
@@ -196,7 +196,7 @@ class TestRootController(_TestCase):
r = self.app.get(ci + 'tree/index.html')
header = r.html.find('h2', {'class': 'dark title'}).contents[2]
assert 'index.html' in header, header
- content = str(r.html.find('div', {'class': 'clip grid-19'}))
+ content = str(r.html.find('div', {'class': 'clip grid-19 codebrowser'}))
assert ('<span class="nt"><h1></span>'
'index.html'
'<span class="nt"></h1></span>') in content, content
@@ -210,7 +210,7 @@ class TestRootController(_TestCase):
header = r.html.find('h2', {'class': 'dark title'})
assert 'index' in header.contents[3], header.contents[3]
assert 'index.htm' in header.contents[4], header.contents[4]
- content = str(r.html.find('div', {'class': 'clip grid-19'}))
+ content = str(r.html.find('div', {'class': 'clip grid-19 codebrowser'}))
assert ('<span class="nt"><h1></span>'
'index/index.htm'
'<span class="nt"></h1></span>') in content, content
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f25280d8/ForgeSVN/forgesvn/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/functional/test_controllers.py b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
index 07e2fb0..35bec2c 100644
--- a/ForgeSVN/forgesvn/tests/functional/test_controllers.py
+++ b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
@@ -91,7 +91,7 @@ class TestRootController(SVNTestController):
def test_file(self):
resp = self.app.get('/src/1/tree/README')
assert 'README' in resp.html.find('h2', {'class':'dark title'}).contents[2]
- content = str(resp.html.find('div', {'class':'clip grid-19'}))
+ content = str(resp.html.find('div', {'class':'clip grid-19 codebrowser'}))
assert 'This is readme' in content, content
assert '<span id="l1" class="code_block">' in resp
assert 'var hash = window.location.hash.substring(1);' in resp
|