Changeset - 581013923784
[Not reviewed]
default
0 1 0
Takumi IINO - 11 years ago 2014-07-21 17:46:21
trot.thunder@gmail.com
templates: replace YUI with jquery in kallithea/templates/admin/notifications/notifications.html
1 file changed with 12 insertions and 14 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/admin/notifications/notifications.html
Show inline comments
 
@@ -37,27 +37,25 @@
 
    <%include file='notifications_data.html'/>
 
  </div>
 
</div>
 
<script type="text/javascript">
 
var url_action = "${url('notification', notification_id='__NOTIFICATION_ID__')}";
 
var run = function(){
 
  YUE.on(YUQ('.delete-notification'),'click',function(e){
 
   var notification_id = e.currentTarget.id;
 
   deleteNotification(url_action,notification_id)
 
  })
 
  YUE.on(YUQ('.read-notification'),'click',function(e){
 
     var notification_id = e.currentTarget.id;
 
     readNotification(url_action,notification_id)
 
  })
 
  $('.delete-notification').click(function(e){
 
    var notification_id = e.currentTarget.id;
 
    deleteNotification(url_action,notification_id);
 
  });
 
  $('.read-notification').click(function(e){
 
    var notification_id = e.currentTarget.id;
 
    readNotification(url_action,notification_id);
 
  });
 
}
 
run()
 
YUE.on('mark_all_read','click',function(e){
 
run();
 
$('#mark_all_read').click(function(){
 
    var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}";
 
    ypjax(url,'notification_data',function(){run()});
 
})
 
});
 

	
 
var current_filter = "${c.current_filter}";
 
if (YUD.get(current_filter)){
 
    YUD.addClass(current_filter, 'active');
 
}
 
$('#'+current_filter).addClass('active');
 
</script>
 
</%def>
0 comments (0 inline, 0 general)