jQuery integration status
Hi all,
Just wanted to give you an update of the 2.0 status.
http://trac.qcu.be/projects/qcubed/query?status=infoneeded&status=in_wor...
Briefly, all examples are now working again.
If you take SVN 2.0 and apply all patches that are currently in Q_A (with exception of #142), all examples should be working, as well as all codegen and generated forms. Would love to see some feedback on this.
Next steps
- verify if plugins still work (would be great if they worked out of the box!)
- start converting the legacy javascript files to jQuery
- further integration of jQuery properties for the UI components (we now allow little control on how jQuery UI components such as the DialogBox can appear)
- integrate resizing on all controls
Any suggestions, let us know and create some tickets!
Regards,
Kristof
Integrating jQuery - part III: continuing the work
After the feedback received from my previous posts, I continued where I left of integrating all other events into qcubed.
For now, the following are done:
- Mouse Events: all with exception of toggle() and hover(): those events require 2 actions to be performed instead of 1. QCubed currently cannot handle this
- Keyboard Events: All integrated and removed some code for browser specific behaviour
- Form events: Form Events: all integrated, except onsubmit()
- Browser Events: error(), resize(), scroll(): not integrated
- Document Loading: load(), ready(), unload(): not integrated
- Event Object: not integrated
Q/A:
- toggle and hover can accept 2 parameters: should we support that through QCubed?
- How about integrating error(), resize() and scroll() ? Do we want/need this? Suggested approach?
- Should we initialize QCubed through ready() event instead of normal at the end of the page?
- Event object: I would love to be able to access the data on the server side! Can we somehow serialize (or json) this object and pass it in the form, so we can access the data on the server?
Kristof
Migrating QCubed javascript to jQuery - Part II: document.ready integration proposal
While waiting for feedback on Part I, let's get going with part II.
In this article, we will try to find out how we can replace the classical style of handling javascript events by the "jQuery" way of handling events.
Introduction
In normal javascript style, events are generally handled through an attribute inside the element.
For example, a click event will be handled by the onclick event handler of the element.
QCubed/Javascript way:
<button type="button" name="c2" id="c2" class="button" onclick="qc.pA('SampleForm', 'c2', 'QClickEvent', '', ''); return false;" > Click Me </button>jQuery way:
<script type="text/javascript">
$j(document).ready(function() {
$j("#c2").click(function(e){
qc.pA('SampleForm', 'c2', 'QClickEvent', '', '');
return false;
})
});
</script>How we do this?
Migrating QCubed javascript to jQuery - Part I: Ajax post through jQuery
Since the release of jQuery 1.4, I have been very eager to integrate jQuery into QCubed. Integrating a solid, cross browser javascript engine to QCubed could leverage the power, stability and growth of QCubed.
In these series, I'm taking a first step on integrating jQuery into QCubed. By writing these articles, my goal is to provide everyone with a (hopefully clear) view on the changes that are needed, have been-in order to become a full PHP jQuery framework, a possible way to integrate these changes and of course (and most important!) to receive feedback on the code changes, as well as a Q/A platform for me and the other developers on how to continue the integration.
To start, in this first part, we will replace the ajax post with the ajax post through jQuery. Sounds easy enough to begin with, doesn't it :)
Note: Baselius has already doen a lot of work on integrating jQuery (1.3.2), and has commited his work into the experimental branch of QCubed. During this series of articles, we will try understand the code that Baselius has commited, take the good bits and pieces from his work and integrate them where we can. Thanks a lot already to him!
Anyway, let's get started.
