Changeset - 523b1011a625
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 14 years ago 2011-12-29 05:59:07
marcin@python-works.com
- fixed issue with mark all read button for notifications and listeners on delete buttons
- hide mark all read if notification inbox is empty
1 file changed with 11 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/admin/notifications/notifications.html
Show inline comments
 
@@ -24,22 +24,30 @@
 
            </li>          
 
        </ul>            
 
    </div>
 
    %if c.notifications:
 
      <div style="padding:10px 15px;text-align: right">
 
      <span id='mark_all_read' class="ui-btn">${_('Mark all read')}</span>
 
  </div>
 
    %endif
 
  <div id='notification_data'>
 
    <%include file='notifications_data.html'/>
 
  </div>
 
</div>
 
<script type="text/javascript">
 
var url = "${url('notification', notification_id='__NOTIFICATION_ID__')}";
 
var url_del = "${url('notification', notification_id='__NOTIFICATION_ID__')}";
 
YUE.on(YUQ('.delete-notification'),'click',function(e){
 
 var notification_id = e.currentTarget.id;
 
 deleteNotification(url,notification_id)
 
 deleteNotification(url_del,notification_id)
 
})
 
 YUE.on('mark_all_read','click',function(e){
 
	    var url = "${h.url('notifications_mark_all_read')}";
 
	    ypjax(url,'notification_data',function(){YUD.get('notification_counter').innerHTML=0});
 
	    ypjax(url,'notification_data',function(){
 
	    	YUD.get('notification_counter').innerHTML=0;
 
	    	YUE.on(YUQ('.delete-notification'),'click',function(e){
 
	    		 var notification_id = e.currentTarget.id;
 
	    		 deleteNotification(url_del,notification_id)
 
	    	})	    	
 
	    });
 
 })
 
</script>
 
</%def>  
0 comments (0 inline, 0 general)