Last updated by alibasta 3 years ago
Abstract
This plugin adds the ModalBox to your Grails applications.ModalBox (http://code.google.com/p/modalbox/) is a JavaScript technique for creating modern (Web 2.0-style) modal dialogs or even wizards (sequences of dialogs) without using conventional popups and page reloads. It's inspired by Mac OS X modal dialogs. And yes, it may also be useful for showing larger versions of images. :-)http://www.wildbit.com/labs/modalbox/Current Version (0.3)
- You can open standard ModalBox dialogs.. ;-)
Installation
grails install-plugin modalboxConfiguration
ModalBox Plugin needs the following attributes:- controller/action/id/url (required - the url to open. Use parameters as per Tag - createLink)
- title (required - the title in the popup)
- width (required - the width of the popup)
- linkname (required - name of the link. Alternatively place complex markup in the body of the tag as per 2nd example)
- event (optional - the javascript event that triggers the dialog. Defaults to "onclick", but can be set to "onmouseover" etc)
Example:<g:javascript library="application" />
<modalbox:modalIncludes /><modalbox:createLink url="akopopup.gsp" title="Hello Grails!" width="600" linkname="This is the Link" />or (more dynamically)<modalbox:createLink controller="book" action="show" id="${book.id}" title="Show book!" width="500">Book Lorem ipsum</modalbox:createLink>
Screenshot



