Can't make the list.row.edit/view.close event triggered

lcollong

FabriKant d'applications web
Hi,

According to the wiki : http://fabrikar.com/forums/index.php?wiki/list-javascript/

I've created a "list_49.js" with the following :

JavaScript:
/**
* Ensure that Fabrik's loaded
*/
console.log('before');
requirejs(['fab/fabrik'], function () {
  // An edit window has been closed
  Fabrik.addEvent('fabrik.list.row.edit.close', function (listRef, rowid, k) {
    console.log('after');
    // Update the lists data
    Fabrik.getBlock(listRef).updateRows();
  });
});

The list #49 is ajaxified (both navigation and link).

On the console, I see the "before" on list load but when I open a record (shown in a popup) and close it (either with the "cross" on the upper right corner or the submit/close button), the "after" is never triggered.

Actually, I need the 'fabrik.list.row.view.close' event but I did test on both edit and view without success. I do not have js errors. I've tried on two different templates including the standard protostar and on the very last J/F version (3.9) and another one a bit older.

Did I miss something ?
 
Fixed. Thanks.

But my dev site was up to date. So I just changed the relevant lines in the window.js from the commit you've indicated and I've got a js error. So I did a full github update and everything went well. However I've noticed that the last line (fifth add) appearing to have been added in the github commit does not show in the complete file loaded from the full extract. And that was the line producing the error ;-)... Just to tell. So far so good.

Github commit was showing :

JavaScript:
                this.window.fadeOut({duration: 0});
            }
            Fabrik.tips.hideAll();
            this.fireEvent('onClose', [this]);
            //this.fireEvent('onClose', [this]);
            this.options.onClose.apply(this);
            Fabrik.fireEvent('fabrik.window.close', [this]);
        },
@@ -603,9 +604,10 @@ define(['jquery', 'fab/fabrik', 'jQueryUI', 'fab/utils'], function (jQuery, Fabr
            }
            //this.window.fadeIn({duration: 0});
            this.window.show();
            this.fireEvent('onOpen', [this]);
            //this.fireEvent('onOpen', [this]);
            this.options.onOpen.apply(this);
        }
             this.options.onClose.apply(this);     // <<<<<<< THIS LINE DOES NOT EXIST IN THE EXTRACTED FILE
    });
 
Hi Hugh,

from my developer:
after this commit, we are experiencing issue in file upload plugin. We are using AJAX enabled version

On page load all images of plugin are appearing within modal box(es) and these are not going away/closing automatically. If we revert the changes of this commit in file Windows.js everything works as expected.

Thanks in advance and let me know if you want to see it happen on our system.

so we are copying over this file with a back-version for now when we update fabrik, but of course would prefer it to be fixed in the code.
 
We are in need of some funding.
More details.

Thank you.
Back
Top