diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-01-10 18:05:34 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2014-01-10 18:05:34 +0100 |
commit | 6efebec0f97a6126660901cfd639590a73ac04ff (patch) | |
tree | a6dd24648cd0f523a446c4f4ad0b4cf30c7539e8 | |
parent | d658070b873f2f0cf8e35ea73cfa1e39e05e6750 (diff) |
Some doc update
-rw-r--r-- | framework/3rdParty/readme.html | 19 | ||||
-rw-r--r-- | jQuery-PORTING.txt | 66 | ||||
-rw-r--r-- | jQuery-WIP.txt | 5 |
3 files changed, 65 insertions, 25 deletions
diff --git a/framework/3rdParty/readme.html b/framework/3rdParty/readme.html index d4a2b83f..5889a943 100644 --- a/framework/3rdParty/readme.html +++ b/framework/3rdParty/readme.html @@ -22,9 +22,26 @@ projects. <td><a href="jQuery">jQuery</a></td>
<td><a href="http://jquery.com/">jQuery - Write less, do more</a></td>
<td><a href="http://jquery.org/license/">MIT License</a></td>
- <td>System.Web.UI.JuiControls</td>
+ <td></td>
<td>Core of Prado javascript library.</td>
</tr>
+
+<tr>
+ <td><a href="jQueryUI">jQuery UI</a></td>
+ <td><a href="http://jqueryui.com/">jQuery user interface</a></td>
+ <td><a href="http://jquery.org/license/">MIT License</a></td>
+ <td>System.Web.UI.JuiControls</td>
+ <td>jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.</td>
+</tr>
+
+<tr>
+ <td><a href="Low Pro JQ">Low Pro JQ</a></td>
+ <td><a href="http://github.com/danwrong/low-pro-for-jquery">jQuery - Write less, do more</a></td>
+ <td><a href="http://github.com/danwrong/low-pro-for-jquery/blob/master/MIT-LICENCE">MIT License</a></td>
+ <td></td>
+ <td> A jQuery port of the Low Pro behavior framework that was originally written for Prototype. Prado actually uses it as a base to emulate OOP subclassing, inheritance and contructor events.</td>
+</tr>
+
<tr>
<td><a href="ReCaptcha">ReCaptcha</a></td>
<td><a href="http://www.google.com/recaptcha">ReCaptcha - Stop spam, read books</a></td>
diff --git a/jQuery-PORTING.txt b/jQuery-PORTING.txt index 16b32769..7737e38d 100644 --- a/jQuery-PORTING.txt +++ b/jQuery-PORTING.txt @@ -1,5 +1,6 @@ -JAVASCRIPT - +BASIC PROTOTYPE->JQUERY JAVASCRIPT +Rule #1: look up the jQuery documentation at http://api.jquery.com/ +--- Get element by id OLD: $('element_id') NEW: $('#element_id') // for the extended element @@ -14,7 +15,6 @@ OLD: $$('.class').each(Element.remove); NEW: $('.class').remove(); --- Class creation/extension - OLD: Class.create(Prado.WebUI.TActiveImageButton, { ... }) OLD: Class.extend(Prado.WebUI.TActiveImageButton, { ... }) NEW: jQuery.klass(Prado.WebUI.TActiveImageButton, { ... }) @@ -39,11 +39,7 @@ Detect keypress event: use the numeric codes OLD: if(kc == Event.KEY_RETURN || kc == Event.KEY_SPACEBAR || kc == Event.KEY_TAB) NEW: if(kc == 13 || kc == 32 || kc == 9) --- -Implementing the postback handler for a PostBackControl; the function signature has changed (parameters are inverted): -OLD: onPostBack : function(event, options) -NEW: onPostBack : function(options, event) ---- -Execute a function when the pagfe has finished loading +Execute a function when the page has finished loading OLD: document.observe("dom:loaded", function(event) { ... }); NEW: $( document ).ready(function() { ... }); --- @@ -71,33 +67,61 @@ Fire events OLD: Event.fireEvent(this.control, "change"); NEW: $(element).trigger("change"); --- -Test browser +Get element size +OLD: element.getWidth(), element.getHeight() +NEW: element.width, element.height +--- +Hook on ajax events +OLD: Ajax.Responders.register({"onLoading" : my_function }); +OLD: Ajax.Responders.register({"onSuccess" : my_function }); +NEW: $( document ).ajaxSend(my_function); +NEW: $( document ).ajaxSuccess(my_function); + + + +PRADO SPECIFIC CHANGES +--- +Implementing the postback handler for a PostBackControl; the function signature has changed (parameters are inverted): +OLD: onPostBack : function(event, options) +NEW: onPostBack : function(options, event) +--- +Execute a postback: you need to create a new object +OLD: Prado.PostBack(options, event); +NEW: new Prado.PostBack(options, event); +--- +Test browser: removed. Test for browser support for specific capabilities instead OLD: Prado.Browser().ie NEW: jQuery.support --- Focus an element OLD: Prado.Element.focus(element); NEW: $(element).focus(); ---- -Get element size -OLD: element.getWidth(), element.getHeight() -NEW: element.width, element.height -CONTROLS +SPECIFIC CONTROLS + +Some Prado controls were based on specific extensions of the prototype+scriptaculous javascript framework, and they have been deprecated now that jQuery has become the primary js framework in prado. +While we provide the jQuery-based counterpart for these controls and encourage everyone to port their code, the old controls are still supposed to work with some minor annoyance: + * prototype and scriptaculous will be loaded along jQuery; + * jQuery will be put in "no conflict" mode, so the $() helper won't call anymore jQuery but prototype. -TAutoCompleter doesn't exists anymore, use TJuiAutoComplete instead, upgrading the code: +Following is the list of deprecated controls. +--- +TAutoCompleter is deprecated, use TJuiAutoComplete instead. +In the case you want to update your code: * No more Frequency property. - * minChars property is now minLength - * only the ItemTemplate is supported for the Suggestions repeater; + * minChars property is now minLength + * only the ItemTemplate is supported for the Suggestions repeater (no HeaderTemplate, FooterTemplate, ...); * in the ItemTemplate you don't need to render the <li/> anymore, but only the content itself * No Multiple selection support (by now, can be added in the future) --- -TDraggable doesn't exists anymore, use TJuiDraggable instead, upgrading the code: - * Use jQuery-ui's Draggable options. +TDraggable is deprecated, use TJuiDraggable instead. +In the case you want to update your code: + * Check jQuery-ui's Draggable options. --- -TDropContainer doesn't exists anymore, use TJuiDroppable instead, upgrading the code: - * Use jQuery-ui's Droppable options. +TDropContainer is deprecated, use TJuiDroppable instead. +In the case you want to update your code: + * Check jQuery-ui's Droppable options. * The event parameter format has changed a bit. --- diff --git a/jQuery-WIP.txt b/jQuery-WIP.txt index 3589b161..12f98f94 100644 --- a/jQuery-WIP.txt +++ b/jQuery-WIP.txt @@ -11,7 +11,7 @@ Targets: * create substitutes for exotic standard controls (date picker, accordion, colorpicker, slider, ..) (done) * port exotic active controls (autocomplete, ...) (wip, using jquery-ui) * get tests running (started, wip) - * ensure jQuery's compatibility mode with prototype (support old third party components from users? (wip, using jQuery.noConflict() we can import the old prototype + scripaculous stack) + * ensure jQuery's compatibility mode with prototype (support old third party components from users? (done) * fix debug components (TJavascriptLogger) (done, but maybe dropping it is a good idea) * implement some Jui components (deprecate old scriptculous, create substituted based on jquery-ui) (wip) * port demos @@ -20,7 +20,7 @@ Targets: DONE Basic postback controls (TButton, TCheckBox, TLinkButton, TRadioButton, TTextBox, ..) -Js-based controls (TTabPanel, TDatePicker, TColorPicker, TSlider, THtmlArea, TAccordion) +Js-based controls (TTabPanel, TDatePicker, TColorPicker, TSlider, THtmlArea, TAccordion, TRatingList) List, Data controls *Validators Ajax queue @@ -32,7 +32,6 @@ TJuiAutoComplete TJuiDraggable,TJuiDroppable TBD -Port *ratings Add JQuery-ui-Effects: clip, explode, transfer, switchclass Add JQuery-ui-Methods: show, hide, toggle? Add JQuery-ui-controls |