Explorar o código

行选择器优化

jqh %!s(int64=4) %!d(string=hai) anos
pai
achega
51d47ea8f9

+ 6 - 4
resources/assets/dcat/js/extensions/RowSelector.js

@@ -25,23 +25,25 @@ export default class RowSelector {
             $document = $(document),
             selectAll = options.selectAllSelector;
 
-        $document.on('change', selectAll, function() {
+        $(selectAll).on('change', function() {
             $(this).parents(options.container).find(checkboxSelector).prop('checked', this.checked).trigger('change');
         });
         if (options.clickRow) {
-            $document.on('click', checkboxSelector, function (e) {
+            $document.off('click', checkboxSelector).on('click', checkboxSelector, function (e) {
                 if (typeof e.cancelBubble != "undefined") {
                     e.cancelBubble = true;
                 }
                 if (typeof e.stopPropagation != "undefined") {
                     e.stopPropagation();
                 }
-            }).parents('tr').click(function (e) {
+            });
+
+            $document.off('click', options.container+' tr').on('click', options.container+' tr', function () {
                 $(this).find(checkboxSelector).click();
             });
         }
 
-        $document.on('change', checkboxSelector, function () {
+        $document.off('change', checkboxSelector).on('change', checkboxSelector, function () {
             var tr = $(this).closest('tr');
             if (this.checked) {
                 tr.css('background-color', options.background);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
resources/dist/dcat/js/dcat-app.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
resources/dist/dcat/js/dcat-app.js.map


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio