# HG changeset patch # User Mads Kiilerich # Date 2016-11-08 23:29:12 # Node ID c40e567e4b82180246daf6cf923a37c8d8fc1bb7 # Parent 103f07acad8396654608817a6f99d29d966b3aa7 style: use Bootstrap compatible data-toggle="tooltip" markup Based on work by Dominik Ruf and Andrew Shadura. diff --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py --- a/kallithea/lib/helpers.py +++ b/kallithea/lib/helpers.py @@ -321,8 +321,9 @@ def pygmentize_annotation(repo_name, fil url('changeset_home', repo_name=repo_name, revision=changeset.raw_id), style=get_color_string(changeset.raw_id), - class_='tooltip safe-html-title', - title=tooltip_html + class_='safe-html-title', + title=tooltip_html, + **{'data-toggle': 'tooltip'} ) uri += '\n' @@ -612,7 +613,7 @@ def action_parser(user_log, feed=False, _rev = '%s...%s' % (_name1, _name2) compare_view = ( - '
' + '
' '%s
' % ( _('Show all combined changesets %s->%s') % ( revs_ids[0][:12], revs_ids[-1][:12] diff --git a/kallithea/public/js/base.js b/kallithea/public/js/base.js --- a/kallithea/public/js/base.js +++ b/kallithea/public/js/base.js @@ -499,7 +499,7 @@ var _init_tooltip = function(){ $tipBox.css('position', 'absolute'); $tipBox.css('max-width', '600px'); - _activate_tooltip($('.tooltip')); + _activate_tooltip($('[data-toggle="tooltip"]')); }; var _show_tooltip = function(e, tipText, safe){ @@ -1313,7 +1313,7 @@ var addReviewMember = function(id,fname, var element = ( '
  • \n'+ '
    \n'+ - '
    \n'+ + '
    \n'+ ' \n'+ '
    \n'+ (gravatarelm ? diff --git a/kallithea/templates/admin/admin.html b/kallithea/templates/admin/admin.html --- a/kallithea/templates/admin/admin.html +++ b/kallithea/templates/admin/admin.html @@ -8,7 +8,7 @@ <%def name="breadcrumbs_links()">
    - ? + ? ${_('Admin Journal')} - ${ungettext('%s Entry', '%s Entries', c.users_log.item_count) % (c.users_log.item_count)}
    diff --git a/kallithea/templates/admin/permissions/permissions_globals.html b/kallithea/templates/admin/permissions/permissions_globals.html --- a/kallithea/templates/admin/permissions/permissions_globals.html +++ b/kallithea/templates/admin/permissions/permissions_globals.html @@ -17,8 +17,8 @@ ${h.form(url('admin_permissions'), metho ${h.select('default_repo_perm','',c.repo_perms_choices)} ${h.checkbox('overwrite_default_repo','true')} ${_('Permissions for the Default user on new repositories.')}
    @@ -29,8 +29,8 @@ ${h.form(url('admin_permissions'), metho ${h.select('default_group_perm','',c.group_perms_choices)} ${h.checkbox('overwrite_default_group','true')} ${_('Permissions for the Default user on new repository groups.')}
    @@ -41,8 +41,8 @@ ${h.form(url('admin_permissions'), metho ${h.select('default_user_group_perm','',c.user_group_perms_choices)} ${h.checkbox('overwrite_default_user_group','true')} ${_('Permissions for the Default user on new user groups.')}
  • diff --git a/kallithea/templates/admin/settings/settings_vcs.html b/kallithea/templates/admin/settings/settings_vcs.html --- a/kallithea/templates/admin/settings/settings_vcs.html +++ b/kallithea/templates/admin/settings/settings_vcs.html @@ -46,7 +46,7 @@ ${h.form(url('admin_settings'), method='
    ${h.text('paths_root_path',size=60,readonly="readonly")} -
    diff --git a/kallithea/templates/changelog/changelog.html b/kallithea/templates/changelog/changelog.html --- a/kallithea/templates/changelog/changelog.html +++ b/kallithea/templates/changelog/changelog.html @@ -89,11 +89,11 @@ ${self.repo_context_bar('changelog', c.f %if c.statuses.get(cs.raw_id):
    %if c.statuses.get(cs.raw_id)[2]: - + %else: - @@ -103,13 +103,13 @@ ${self.repo_context_bar('changelog', c.f ${h.gravatar(h.email_or_none(cs.author), size=16)} - ${h.shorter(h.person(cs.author),22)} + ${h.shorter(h.person(cs.author),22)} ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id), class_='changeset_hash')} -
    ${h.age(cs.date,True)}
    +
    ${h.age(cs.date,True)}
    @@ -120,7 +120,7 @@ ${self.repo_context_bar('changelog', c.f
    %if c.comments.get(cs.raw_id):
    -
    +
    - + - + - + ${c.ignorews_url(request.GET)} diff --git a/kallithea/templates/changeset/changeset_file_comment.html b/kallithea/templates/changeset/changeset_file_comment.html --- a/kallithea/templates/changeset/changeset_file_comment.html +++ b/kallithea/templates/changeset/changeset_file_comment.html @@ -55,7 +55,7 @@ ${h.form('#', class_='inline-form')}
    ${_('Commenting on line.')} - ${_('Comments are in plain text. Use @username inside this text to notify another user.')|n} + ${_('Comments are in plain text. Use @username inside this text to notify another user.')|n}
    diff --git a/kallithea/templates/changeset/changeset_range.html b/kallithea/templates/changeset/changeset_range.html --- a/kallithea/templates/changeset/changeset_range.html +++ b/kallithea/templates/changeset/changeset_range.html @@ -44,7 +44,7 @@ ${self.repo_context_bar('changelog')} %endif ${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}
    ${h.person(cs.author)}
    - ${cs.date} + ${cs.date} %if c.statuses:
    @@ -80,7 +80,7 @@ ${self.repo_context_bar('changelog')} %for cs in c.cs_ranges: ## diff block
    - ${h.show_id(cs)} + ${h.show_id(cs)} ${h.gravatar_div(h.email_or_none(cs.author), size=20)}
    diff --git a/kallithea/templates/changeset/diff_block.html b/kallithea/templates/changeset/diff_block.html --- a/kallithea/templates/changeset/diff_block.html +++ b/kallithea/templates/changeset/diff_block.html @@ -29,43 +29,43 @@
    %if op == 'A': - + %else: - + %endif %if op == 'A': - + %elif op == 'M': - + %elif op == 'D': - + %elif op == 'R': - + %elif op is None: - + %else: - + %endif %if op == 'D': - + %else: - + %endif - + - + - + - + ${c.ignorews_url(request.GET, url_fid)} ${c.context_url(request.GET, url_fid)} diff --git a/kallithea/templates/compare/compare_cs.html b/kallithea/templates/compare/compare_cs.html --- a/kallithea/templates/compare/compare_cs.html +++ b/kallithea/templates/compare/compare_cs.html @@ -47,11 +47,11 @@ else: title = _('Position in this list of changesets') %> - + ${index} - ${cs.date} + ${cs.date} %if c.visual.use_gravatar: ${h.gravatar_div(h.email_or_none(cs.author), size=14, div_commit_id="${cs.raw_id}")} %endif diff --git a/kallithea/templates/data_table/_dt_elements.html b/kallithea/templates/data_table/_dt_elements.html --- a/kallithea/templates/data_table/_dt_elements.html +++ b/kallithea/templates/data_table/_dt_elements.html @@ -87,13 +87,13 @@ <%def name="last_change(last_change)"> - ${h.age(last_change)} + ${h.age(last_change)} <%def name="revision(name,rev,tip,author,last_msg)">
    %if rev >= 0: - ${'r%s:%s' % (rev,h.short_id(tip))} + ${'r%s:%s' % (rev,h.short_id(tip))} %else: ${_('No changesets yet')} %endif diff --git a/kallithea/templates/files/diff_2way.html b/kallithea/templates/files/diff_2way.html --- a/kallithea/templates/files/diff_2way.html +++ b/kallithea/templates/files/diff_2way.html @@ -40,16 +40,16 @@ ${self.repo_context_bar('changelog')} revision=c.cs2.raw_id,f_path=h.safe_unicode(c.node1.path)))}
    - + - + - + - + ${h.checkbox('ignorews', label=_('Ignore whitespace'))} diff --git a/kallithea/templates/files/files_browser.html b/kallithea/templates/files/files_browser.html --- a/kallithea/templates/files/files_browser.html +++ b/kallithea/templates/files/files_browser.html @@ -90,12 +90,12 @@ %if node.is_file(): - ${h.show_id(node.last_changeset)} + ${h.show_id(node.last_changeset)} %endif %if node.is_file(): - + ${h.age(node.last_changeset.date)} %endif diff --git a/kallithea/templates/files/files_history_box.html b/kallithea/templates/files/files_history_box.html --- a/kallithea/templates/files/files_history_box.html +++ b/kallithea/templates/files/files_history_box.html @@ -1,7 +1,7 @@
    ${h.literal(ungettext(u'%s author',u'%s authors',len(c.authors)) % ('%s' % len(c.authors))) }
    %for email, user in c.authors: -
    +
    ${h.gravatar_div(email, size=20, div_style="margin:1px")}
    %endfor diff --git a/kallithea/templates/files/files_source.html b/kallithea/templates/files/files_source.html --- a/kallithea/templates/files/files_source.html +++ b/kallithea/templates/files/files_source.html @@ -22,7 +22,7 @@
    -
    ${h.link_to(h.show_id(c.changeset),h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
    +
    ${h.link_to(h.show_id(c.changeset),h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
    ${h.format_byte_size(c.file.size,binary=True)}
    ${c.file.mimetype}
    diff --git a/kallithea/templates/followers/followers_data.html b/kallithea/templates/followers/followers_data.html --- a/kallithea/templates/followers/followers_data.html +++ b/kallithea/templates/followers/followers_data.html @@ -8,7 +8,7 @@
    ${_('Started following -')} - ${h.age(f.follows_from)}
    + ${h.age(f.follows_from)}
    % endfor diff --git a/kallithea/templates/forks/forks_data.html b/kallithea/templates/forks/forks_data.html --- a/kallithea/templates/forks/forks_data.html +++ b/kallithea/templates/forks/forks_data.html @@ -13,7 +13,7 @@
    ${_('Forked')} - - ${h.age(f.created_on)} + ${h.age(f.created_on)} ${_('Compare Fork')} diff --git a/kallithea/templates/journal/journal.html b/kallithea/templates/journal/journal.html --- a/kallithea/templates/journal/journal.html +++ b/kallithea/templates/journal/journal.html @@ -7,7 +7,7 @@
    - ? + ? ${_('Journal')} - ${ungettext('%s Entry', '%s Entries', c.journal_pager.item_count) % (c.journal_pager.item_count)}
    diff --git a/kallithea/templates/journal/journal_data.html b/kallithea/templates/journal/journal_data.html --- a/kallithea/templates/journal/journal_data.html +++ b/kallithea/templates/journal/journal_data.html @@ -26,7 +26,7 @@
    ${h.literal(h.action_parser(entry)[1]())}
    -
    ${h.age(entry.action_date)}
    +
    ${h.age(entry.action_date)}
    %endfor
    diff --git a/kallithea/templates/pullrequests/pullrequest_data.html b/kallithea/templates/pullrequests/pullrequest_data.html --- a/kallithea/templates/pullrequests/pullrequest_data.html +++ b/kallithea/templates/pullrequests/pullrequest_data.html @@ -42,7 +42,7 @@ ${pr.owner.full_name_and_username} - + ${h.age(pr.created_on)} diff --git a/kallithea/templates/pullrequests/pullrequest_show.html b/kallithea/templates/pullrequests/pullrequest_show.html --- a/kallithea/templates/pullrequests/pullrequest_show.html +++ b/kallithea/templates/pullrequests/pullrequest_show.html @@ -70,7 +70,7 @@ ${self.repo_context_bar('showpullrequest %if c.current_voting_result: - + %if c.pull_request.is_closed(): ${_('Closed')}, %endif @@ -84,7 +84,7 @@ ${self.repo_context_bar('showpullrequest
    % if len(c.pull_request_pending_reviewers) > 0: -
    ${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}
    +
    ${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}
    % elif len(c.pull_request_reviewers) > 0:
    ${_('Pull request was reviewed by all reviewers')}
    %else: @@ -173,7 +173,7 @@ ${self.repo_context_bar('showpullrequest ${h.radio(name='updaterev', value=cs.raw_id)} %endif - ${cs.date} + ${cs.date} ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id), class_='changeset_hash')}
    @@ -213,7 +213,7 @@ ${self.repo_context_bar('showpullrequest ## If you change something here it should be reflected in the template too.
  • -
    +
    ${h.gravatar_div(member.email, size=14, div_class="reviewer_gravatar gravatar")} diff --git a/kallithea/templates/summary/summary.html b/kallithea/templates/summary/summary.html --- a/kallithea/templates/summary/summary.html +++ b/kallithea/templates/summary/summary.html @@ -10,9 +10,9 @@ ## locking icon %if c.db_repo.enable_locking: %if c.db_repo.locked[0]: - + %else: - + %endif %endif @@ -114,7 +114,7 @@ summary = lambda n:{False:'summary-short ${h.hidden('download_options')} - + %endif
    diff --git a/kallithea/tests/functional/test_changelog.py b/kallithea/tests/functional/test_changelog.py --- a/kallithea/tests/functional/test_changelog.py +++ b/kallithea/tests/functional/test_changelog.py @@ -74,7 +74,7 @@ class TestChangelogController(TestContro # response.mustcontain( # """
    3
    """ # )