InstallationTo install the Mootools plugin type this command from your project's root folder:
The complete core Mootools distribution is downloaded and installed under your project's /web-app/js/mootools folder.
grails install-plugin mootools
Plugin version history2009-06-22 0.1.3
- upgrade mootools to 1.2.3
- upgrade grails to 1.1
- upgrade mootools to 1.2.1
- Basic Usage
- More Usage
Ajax via MootoolsTo have the Grails' adaptive AJAX support adapt itself to Mootools (rather than the default of Prototype), add the following line in the head section of every GSP that needs it. (Note: you can not add it only to main.gsp in layouts.,see http://jira.codehaus.org/browse/GRAILS-2766)
Thereafter the <g:remoteField>, <g:remoteLink>, and <g:formRemote> tags will utilize Mootools for the ajax calls. (See the Grails documentation, or "The Definitive Guide to Grails" chapter 9, etc.)
that code will include mootools-1.2-more-nc.js(in Develepment) or mootools-1.2-more-yc.js
Calendarprovide a basic calendar UI based on Mootools,basic usage:
in the html header,and
in the html body.more calendar parameters:
- format:default is "Y-m-d",more format see Calendar's Multi-lingual and fancy date formatting
- value: a java Date value,default is current time
- localeDays: the locale week days,default is
"['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']"
- localeMonths: the locale months,default is:
"['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']"
- offset: the first day of week,default is 0(means Sunday is the first)