Changeset - 789de118156b
[Not reviewed]
default
0 6 0
domruf - 8 years ago 2017-06-29 23:17:15
dominikruf@gmail.com
style: consistently use 'changeset_hash' class for monospace hashes

Get rid of 'revision-link' and some use of 'hash'.

There is still some use of 'hash' for columns, but the content there already
has 'changeset_hash'.
6 files changed with 7 insertions and 29 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -1034,7 +1034,7 @@ def urlify_text(s, repo_name=None, link_
 
        hash_ = match_obj.group('hash')
 
        if hash_ is not None and repo_name is not None:
 
            from kallithea.config.routing import url  # doh, we need to re-import url to mock it later
 
            return '<a class="revision-link" href="%(url)s">%(hash)s</a>' % {
 
            return '<a class="changeset_hash" href="%(url)s">%(hash)s</a>' % {
 
                 'url': url('changeset_home', repo_name=repo_name, revision=hash_),
 
                 'hash': hash_,
 
                }
kallithea/public/css/style.css
Show inline comments
 
@@ -1586,23 +1586,6 @@ table#changesets tr > td.mid .message a:
 
    margin-left: 40px !important;
 
}
 

	
 
#compare_branches + div.panel-body .revision-link,
 
#compare_tags + div.panel-body .revision-link,
 
#compare_bookmarks + div.panel-body .revision-link,
 
div.panel-body #files_data .revision-link,
 
#repos_list_wrap .revision-link,
 
#shortlog_data .revision-link {
 
    font-weight: normal !important;
 
    font-family: monospace;
 
    font-size: 12px;
 
    color: #577632;
 
}
 

	
 
.revision-link {
 
    color: #3F6F9F;
 
    font-weight: bold !important;
 
}
 

	
 
.issue-tracker-link {
 
    color: #3F6F9F;
 
    font-weight: bold !important;
 
@@ -2024,11 +2007,6 @@ table.code-browser i[class^='icon-'] {
 
    font-size: 14px;
 
}
 

	
 
.breadcrumbs .hash {
 
    text-transform: none;
 
    color: #fff;
 
}
 

	
 
div#legend_data {
 
    padding-left: 10px;
 
}
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -9,7 +9,7 @@
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Changeset')} - <span class='hash'>${h.show_id(c.changeset)}</span>
 
    ${_('Changeset')} - <span class='changeset_hash'>${h.show_id(c.changeset)}</span>
 
</%def>
 

	
 
<%block name="header_menu">
kallithea/templates/data_table/_dt_elements.html
Show inline comments
 
@@ -40,7 +40,7 @@
 
<%def name="revision(name,rev,tip,author,last_msg)">
 
  <div>
 
  %if rev >= 0:
 
      <a data-toggle="popover" title="${author | entity}" data-content="${last_msg | entity}" class="hash" href="${h.url('changeset_home',repo_name=name,revision=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a>
 
      <a data-toggle="popover" title="${author | entity}" data-content="${last_msg | entity}" class="changeset_hash" href="${h.url('changeset_home',repo_name=name,revision=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a>
 
  %else:
 
      ${_('No changesets yet')}
 
  %endif
kallithea/templates/files/files_browser.html
Show inline comments
 
@@ -92,7 +92,7 @@
 
                     </td>
 
                     <td>
 
                         %if node.is_file():
 
                             <a data-toggle="tooltip" title="${node.last_changeset.message}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=node.last_changeset.raw_id)}" class="revision-link">${h.show_id(node.last_changeset)}</a>
 
                             <a data-toggle="tooltip" title="${node.last_changeset.message}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=node.last_changeset.raw_id)}" class="changeset_hash">${h.show_id(node.last_changeset)}</a>
 
                         %endif
 
                     </td>
 
                     <td>
kallithea/tests/other/test_libs.py
Show inline comments
 
@@ -287,7 +287,7 @@ class TestLibs(TestController):
 
                                  repo_name=repo_name, repo_id=23, **overrides)
 
        assert clone_url == expected
 

	
 
    def _quick_url(self, text, tmpl="""<a class="revision-link" href="%s">%s</a>""", url_=None):
 
    def _quick_url(self, text, tmpl="""<a class="changeset_hash" href="%s">%s</a>""", url_=None):
 
        """
 
        Changes `some text url[foo]` => `some text <a href="/">foo</a>
 

	
 
@@ -363,7 +363,7 @@ class TestLibs(TestController):
 
       """<b>@mention</b> <b>@someone</b>""",
 
       ""),
 
      ("deadbeefcafe 123412341234",
 
       """<a class="revision-link" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a> <a class="revision-link" href="/repo_name/changeset/123412341234">123412341234</a>""",
 
       """<a class="changeset_hash" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a> <a class="changeset_hash" href="/repo_name/changeset/123412341234">123412341234</a>""",
 
       ""),
 
      ("We support * markup for *bold* markup of *single or multiple* words, "
 
       "*a bit @like http://slack.com*. "
 
@@ -390,7 +390,7 @@ class TestLibs(TestController):
 

	
 
    @parametrize('sample,expected', [
 
      ("deadbeefcafe @mention, and http://foo.bar/ yo",
 
       """<a class="revision-link" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a>"""
 
       """<a class="changeset_hash" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a>"""
 
       """<a class="message-link" href="#the-link"> <b>@mention</b>, and </a>"""
 
       """<a href="http://foo.bar/">http://foo.bar/</a>"""
 
       """<a class="message-link" href="#the-link"> yo</a>"""),
0 comments (0 inline, 0 general)