Commits

Takumi IINO committed 3e6a0d9 Draft

templates: replace YUI with jquery in kallithea/templates/summary/summary.html

  • Participants
  • Parent commits deeb6be

Comments (0)

Files changed (1)

kallithea/templates/summary/summary.html

 %endif
 
 <script type="text/javascript">
-var clone_url = 'clone_url';
-YUE.on(clone_url,'click',function(e){
-    if(YUD.hasClass(clone_url,'selected')){
+$('#clone_url').on('click', function(e){
+    var target = $(e.currentTarget)
+    if(target.hasClass('selected')){
         return
+    }else{
+        target.addClass('selected');
+        target.select();
     }
-    else{
-        YUD.addClass(clone_url,'selected');
-        YUD.get(clone_url).select();
-    }
-})
+});
 
-YUE.on('clone_by_name','click',function(e){
+$('#clone_by_name').on('click',function(e){
     // show url by name and hide name button
-    YUD.setStyle('clone_url','display','');
-    YUD.setStyle('clone_by_name','display','none');
+    $('#clone_url').css('display','');
+    $('#clone_by_name').css('display','none');
 
     // hide url by id and show name button
-    YUD.setStyle('clone_by_id','display','');
-    YUD.setStyle('clone_url_id','display','none');
+    $('#clone_by_id').css('display','');
+    $('#clone_url_id').css('display','none');
+});
 
-})
-YUE.on('clone_by_id','click',function(e){
-
+$('#clone_by_id').on('click',function(e){
     // show url by id and hide id button
-    YUD.setStyle('clone_by_id','display','none');
-    YUD.setStyle('clone_url_id','display','');
+    $('#clone_by_id').css('display','none');
+    $('#clone_url_id').css('display','');
 
     // hide url by name and show id button
-    YUD.setStyle('clone_by_name','display','');
-    YUD.setStyle('clone_url','display','none');
-})
+    $('#clone_by_name').css('display','');
+    $('#clone_url').css('display','none');
+});
 
 $(document).ready(function(){
     var cache = {}
 
 }
 
-YUD.get('lang_stats').appendChild(tbl);
-YUE.on('code_stats_show_more','click',function(){
-    l = YUD.getElementsByClassName('stats_hidden')
-    for (e in l){
-        YUD.setStyle(l[e],'display','');
-    };
-    YUD.setStyle(YUD.get('code_stats_show_more'),
-            'display','none');
+$('#lang_stats').appendChild(tbl);
+$('#code_status_show_more').on('click',function(){
+    $('.stats_hidden').each(function(){
+      $(this).css('display','');
+    });
+    $('#code_status_show_more').css('display','none');
 });
 </script>
 %endif