##// END OF EJS Templates
Added dynamic followers counter change after toggle following action
marcink -
r1070:f52aab02 beta
parent child Browse files
Show More
@@ -264,7 +264,7 b''
264 264 <span class="icon_short">
265 265 <img src="${h.url("/images/icons/heart.png")}" alt="${_('Followers')}" />
266 266 </span>
267 <span class="short">${c.repository_followers}</span>
267 <span id="current_followers_count" class="short">${c.repository_followers}</span>
268 268 </a>
269 269 </li>
270 270 <li>
@@ -351,13 +351,25 b' var YUE = YAHOO.util.Event;'
351 351 function onSuccess(target){
352 352
353 353 var f = YUD.get(target.id);
354 var f_cnt = YUD.get('current_followers_count');
355
354 356 if(f.getAttribute('class')=='follow'){
355 357 f.setAttribute('class','following');
356 358 f.setAttribute('title',"${_('Stop following this repository')}");
359
360 if(f_cnt){
361 var cnt = Number(f_cnt.innerHTML)+1;
362 f_cnt.innerHTML = cnt;
363 }
364
357 365 }
358 366 else{
359 367 f.setAttribute('class','follow');
360 368 f.setAttribute('title',"${_('Start following this repository')}");
369 if(f_cnt){
370 var cnt = Number(f_cnt.innerHTML)+1;
371 f_cnt.innerHTML = cnt;
372 }
361 373 }
362 374 }
363 375
General Comments 0
You need to be logged in to leave comments. Login now