• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

修訂3d3a34826219d73b3e8dd89995f42632b83f5218 (tree)
時間2012-07-03 22:38:05
作者Igor Bondarenko <jetmind2@gmai...>
CommiterIgor Bondarenko

Log Message

[#1937] ticket:98 Fix "link" link

Change Summary

差異

--- a/Allura/allura/lib/widgets/discuss.py
+++ b/Allura/allura/lib/widgets/discuss.py
@@ -309,6 +309,9 @@ class Post(HierWidget):
309309 evt.preventDefault();
310310 popup.lightbox_me();
311311 $('input', popup).select();
312+ $('input', popup).click(function() {
313+ this.select();
314+ });
312315 });
313316 $('.close', popup).bind('click', function() {
314317 popup.hide();
--- a/Allura/allura/templates/widgets/post_widget.html
+++ b/Allura/allura/templates/widgets/post_widget.html
@@ -1,5 +1,14 @@
11 {% import 'allura:templates/jinja_master/lib.html' as lib with context %}
22
3+{% if page == 0 %}
4+ {% set params = None %}
5+{% else %}
6+ {% set params = dict(page=page, limit=limit) %}
7+{% endif %}
8+{% set shortlink_url = tg.url(
9+ request.scheme + '://' + request.host + url.current(), params)
10+ + '#' + value.slug %}
11+
312 <div>
413 <div id="{{value.slug}}" class="discussion-post">
514 <div class="row">
@@ -67,7 +76,7 @@
6776 <a href="" class="reply_post btn"><b data-icon="{{g.icons['reply'].char}}" class="ico {{g.icons['reply'].css}}"></b>Reply</a>
6877 {% endif %}
6978 <div style="clear:both">
70- <a href="{{tg.url(url.current(),dict(page=page,limit=limit))}}#{{value.slug}}" class="little_link shortlink"><span>Link</span></a><br/>
79+ <a href="{{shortlink_url}}" class="little_link shortlink"><span>Link</span></a><br/>
7180 {% if c.user != c.user.anonymous() %}<a href="" class="edit_post little_link"><span>Edit</span></a><br/>{% endif %}
7281 {% if h.has_access(value, 'moderate')() %}
7382 {{widgets.moderate_post.display(value=value, action=value.url()+'moderate')}}
@@ -81,8 +90,7 @@
8190 <div class="shortlink_popup modal" style="display: none">
8291 <b data-icon="{{g.icons['close'].char}}" class="ico {{g.icons['close'].css}} close"></b>
8392 If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
84- <input type="text" style="width:100%"
85- value='{% filter forceescape %}<a href="{{tg.url(url.current(),dict(page=page,limit=limit))}}#{{value.slug}}">{{value.subject or "comment"}}</a>{% endfilter %}'>
93+ <input type="text" style="width:100%" value="{{shortlink_url}}">
8694 </div>
8795 </div>
8896 <ul>