##// END OF EJS Templates
Added refmaps for the threads list.
neko259 -
r125:449be9e6 default
parent child Browse files
Show More
@@ -10,5 +10,15 b' authors = {'
10 'name': 'Ilyas Babayev',
10 'name': 'Ilyas Babayev',
11 'contacts': ['zamesilyasa@gmail.com'],
11 'contacts': ['zamesilyasa@gmail.com'],
12 'roles': ['author', 'developer'],
12 'roles': ['author', 'developer'],
13 }
13 },
14 'ritsufag': {
15 'name': 'Aiko Kirino',
16 'contacts': ['ritsufag@gmail.com'],
17 'roles': ['javascript developer', 'designer'],
18 },
19 'Tenno Seremel': {
20 'name': 'anonymous',
21 'contacts': ['html@serenareem.net'],
22 'roles': ['javascript developer', 'designer'],
23 },
14 } No newline at end of file
24 }
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -7,7 +7,7 b' msgid ""'
7 msgstr ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "Report-Msgid-Bugs-To: \n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2013-08-27 22:50+0300\n"
10 "POT-Creation-Date: 2013-08-27 23:51+0300\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -173,4 +173,10 b' msgstr "\xd0\x9f\xd0\xbe\xd1\x81\xd0\xbb\xd0\xb5\xd0\xb4\xd0\xbd\xd0\xb5\xd0\xb5 \xd0\xbe\xd0\xb1\xd0\xbd\xd0\xbe\xd0\xb2\xd0\xbb\xd0\xb5\xd0\xbd\xd0\xb8\xd0\xb5: "'
173 #~ msgstr "автор"
173 #~ msgstr "автор"
174
174
175 #~ msgid "developer"
175 #~ msgid "developer"
176 #~ msgstr "разработчик" No newline at end of file
176 #~ msgstr "разработчик"
177
178 #~ msgid "javascript developer"
179 #~ msgstr "разработчик javascript"
180
181 #~ msgid "designer"
182 #~ msgstr "дизайнер"
@@ -11,4 +11,6 b''
11 openEffect: 'none',
11 openEffect: 'none',
12 closeEffect: 'none'
12 closeEffect: 'none'
13 });
13 });
14
15 addRefLinkMap();
14 })
16 })
@@ -95,44 +95,6 b' function addQuickReply(postId) {'
95 $("html, body").animate({ scrollTop: $(textAreaId).offset().top }, "slow");
95 $("html, body").animate({ scrollTop: $(textAreaId).offset().top }, "slow");
96 }
96 }
97
97
98 function addRefLinkMap() {
99 var postByNum = [], refMap = [];
100
101 $('.post').each(function() {
102 var self = $(this);
103
104 var postNum = self.attr('id');
105 //add post by id
106 postByNum[postNum] = self;
107 //add ref link
108 self.find('p').children('a').each(function() {
109 if($(this).text().indexOf('>>') == 0) {
110 var refNum = $(this).text().match(/\d+/);
111
112 if(postByNum[refNum]) {
113 if(!refMap[refNum])
114 refMap[refNum] = [];
115
116 //if !exist
117 if((',' + refMap[refNum].toString() + ',').indexOf(',' + postNum + ',') < 0) {
118 refMap[refNum].push(postNum);
119 };
120 }
121 }
122 });
123 });
124
125 var label_replies = gettext('Replies') + ':';
126 for(var pNum in refMap) {
127 if(typeof refMap[pNum] === 'object') {
128 //append refmap panel
129 if(!$("#refmap_"+pNum).length) {
130 var data = label_replies + refMap[pNum].toString().replace(/(\d+)/g, ' <a href="/jump/$1/">>>$1</a>');
131 $('#'+pNum+'').find('.message').after($('<div class="refmap" id="refmap_'+pNum+'">'+data+'</div>'));
132 }
133 }
134 }
135 }
136
98
137
99
138 $(document).ready(function(){
100 $(document).ready(function(){
@@ -21,7 +21,8 b''
21 <body>
21 <body>
22 <script src="{{ STATIC_URL }}js/jquery-2.0.1.min.js"></script>
22 <script src="{{ STATIC_URL }}js/jquery-2.0.1.min.js"></script>
23 <script src="{{ STATIC_URL }}js/jquery.fancybox.pack.js"></script>
23 <script src="{{ STATIC_URL }}js/jquery.fancybox.pack.js"></script>
24 <script type="text/javascript" src="{% url 'django.views.i18n.javascript_catalog' %}"></script>
24 <script src="{% url 'django.views.i18n.javascript_catalog' %}"></script>
25 <script src="{{ STATIC_URL }}js/refmaps.js"></script>
25 <script src="{{ STATIC_URL }}js/main.js"></script>
26 <script src="{{ STATIC_URL }}js/main.js"></script>
26 <div id="admin_panel">
27 <div id="admin_panel">
27
28
@@ -50,4 +51,4 b''
50 </div>
51 </div>
51
52
52 </body>
53 </body>
53 </html> No newline at end of file
54 </html>
@@ -23,9 +23,9 b''
23 {% for thread in threads %}
23 {% for thread in threads %}
24 <div class="thread">
24 <div class="thread">
25 {% if thread.can_bump %}
25 {% if thread.can_bump %}
26 <div class="post">
26 <div class="post" id=" {{thread.id}} ">
27 {% else %}
27 {% else %}
28 <div class="post dead_post">
28 <div class="post dead_post" id="{{ thread.id }}">
29 {% endif %}
29 {% endif %}
30 {% if thread.image %}
30 {% if thread.image %}
31 <div class="image">
31 <div class="image">
@@ -67,9 +67,9 b''
67 <div class="last-replies">
67 <div class="last-replies">
68 {% for post in thread.get_last_replies %}
68 {% for post in thread.get_last_replies %}
69 {% if thread.can_bump %}
69 {% if thread.can_bump %}
70 <div class="post">
70 <div class="post" id="{{ post.id }}">
71 {% else %}
71 {% else %}
72 <div class="post dead_post">
72 <div class="post dead_post id="{{ post.id }}"">
73 {% endif %}
73 {% endif %}
74 {% if post.image %}
74 {% if post.image %}
75 <div class="image">
75 <div class="image">
@@ -113,4 +113,4 b''
113 {% trans 'Last update: ' %}{{ posts.0.last_edit_time }}
113 {% trans 'Last update: ' %}{{ posts.0.last_edit_time }}
114 </span>
114 </span>
115
115
116 {% endblock %} No newline at end of file
116 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now