Browse Source

FIX: on peut desormais sélcetnionner le tete d'un e datatable sans que ce ne soit considéré comme un clic sur la ligne

olivier.massot 7 năm trước cách đây
mục cha
commit
93f091c1ea
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      CD67.FicheCollege.MVC/Scripts/cd67-main.js

+ 2 - 1
CD67.FicheCollege.MVC/Scripts/cd67-main.js

@@ -22,7 +22,8 @@
     });
 
     $('.datatable').on('click', 'tbody>tr', function () {
-        if ($(this).attr('data-url') !== undefined)
+        var sel = getSelection().toString(); // verifie qu'il ne s'agit pas d'une selection de texte
+        if (!sel && $(this).attr('data-url') !== undefined)
         {
             var url = $(this).data('url');
             window.location.href = url;