PKP Bugzilla – Bug 6294
Last modified: 2011-03-18 00:56:12 PDT
We currently have several different approaches to handle forms. The ones I could identify are:
- ad-hoc form handling in the templates
- several methods in modal.js
- jquery's form plugin (look out for ajaxForm() and ajaxSubmit())
The same is true for modal handling:
- ad-hoc modals
- different modal types created via the functions in modal.js
Both, form handling code and modal handling code seems repetitive and inconsistent (e.g. sometimes client-side validation is integrated, sometimes not). I think there's quite some potential for refactoring here. I propose that we divide the existing approaches into smaller standardized building blocks (function-based or object-oriented) and then re-assemble them into larger units to avoid code duplication and present a more consistent and easier to use interface to client code.
This also includes better standardization of LinkActions. The different link action types and modes are not very well thought out and grew quite wildly.
I think that we should create a close link between standard UI design elements and standardized implementation alternatives. We also should decide whether we want to use the form plug-in either everywhere or nowhere. Same for the validation plug-in.
Basic infrastructure, see:
Standard widget library, see:
Reference implementation, see commits in bug #6125
bug fixes and improvements: https://github.com/pkp/pkp-lib/commit/a0cd22de80a865aa0704e3d4a78fa958cb2216f3
A few fixes and enhancements:
Remote operations for confirmation modal:
Improved event handling capabilities:
Distinct externals for checking and compiling:
Fixed a small compilation error:
Fixed bugs in the grid handler and in the event publication logic:
Fix a bug introduced by the OS-X version of buildjs.sh:
Introduced an ajax link action request that does not break encapsulation: