changeset 4480:581013923784

templates: replace YUI with jquery in kallithea/templates/admin/notifications/notifications.html
author Takumi IINO <trot.thunder@gmail.com>
date Tue, 22 Jul 2014 00:46:21 +0900
parents a0e39c81efc1
children 5a2357a2b824
files kallithea/templates/admin/notifications/notifications.html
diffstat 1 files changed, 12 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/admin/notifications/notifications.html	Tue Jul 22 00:46:23 2014 +0900
+++ b/kallithea/templates/admin/notifications/notifications.html	Tue Jul 22 00:46:21 2014 +0900
@@ -40,24 +40,22 @@
 <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>