Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleaned up js in local files. started on DialogTaglib
- Loading branch information
Showing
16 changed files
with
115 additions
and
148 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...i-widget-testApp/grails-app/controllers/grails/yui/widget/testApp/DialogController.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package grails.yui.widget.testApp | ||
|
||
class DialogController { | ||
|
||
def index = { } | ||
|
||
def toolTip = {} | ||
|
||
def simpleDialog = {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
grails-yui-widget-testApp/grails-app/views/dialog/index.gsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<%-- | ||
Created by IntelliJ IDEA. | ||
User: swestfall | ||
Date: 6/9/11 | ||
Time: 5:38 PM | ||
To change this template use File | Settings | File Templates. | ||
--%> | ||
|
||
<%@ page contentType="text/html;charset=UTF-8" %> | ||
<html> | ||
<head> | ||
<title>Collection of Dialog Example Pages</title> | ||
<meta name="layout" content="main"/> | ||
</head> | ||
<body> | ||
<a href="${createLink(controller: 'dialog', action: 'toolTip')}">Example of YUI ToolTip</a> | ||
</body> | ||
</html> |
31 changes: 31 additions & 0 deletions
31
grails-yui-widget-testApp/grails-app/views/dialog/simpleDialog.gsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<%-- | ||
Created by IntelliJ IDEA. | ||
User: swestfall | ||
Date: 6/9/11 | ||
Time: 5:38 PM | ||
To change this template use File | Settings | File Templates. | ||
--%> | ||
|
||
<%@ page contentType="text/html;charset=UTF-8" %> | ||
<html> | ||
<head> | ||
<title>Example of YUI Simple Dialog</title> | ||
<meta name="layout" content="main"/> | ||
|
||
<style> | ||
#ctx { | ||
background: orange; | ||
width: 200px; | ||
height: 200px; | ||
} | ||
</style> | ||
|
||
</head> | ||
<body> | ||
|
||
<div>Example of a YUI Simple Dialog</div> | ||
<a href="http://developer.yahoo.com/yui/examples/container/simpledialog-quickstart.html">YUI Simple Dialog Sample Page</a> | ||
|
||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,7 @@ AutoComplete | |
|
||
|
||
Dialog | ||
1. Dialog | ||
2. SimpleDialog | ||
3. ToolTip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
grails-yui-widget/grails-app/taglib/grails/yui/widget/DialogTagLib.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package grails.yui.widget | ||
|
||
class DialogTagLib { | ||
|
||
static namespace = "yuiWidget"; | ||
|
||
def util = GrailsYuiWidgetUtil.getInstance(); | ||
|
||
def yuiToolTip = { attrs, body -> | ||
|
||
//pull the config properties and set defaults | ||
def id = attrs.remove('id') | ||
def events = attrs.remove('events') ?: [] | ||
def config = attrs.remove('config') ?: [:] | ||
def namespace = attrs.remove('namespace') ?: 'grails.yui.components' | ||
def props = attrs.remove('props') ?: [] | ||
|
||
//set ids | ||
def elementID = "grailsYuiToolTipEl_${id}" | ||
def toolTipID = "${namespace}.grailsYuiToolTip_${id}" | ||
|
||
out << """ | ||
<script type="text/javascript"> | ||
YAHOO.util.Event.onDOMReady(function(){ | ||
${toolTipID} = new YAHOO.widget.Tooltip("${elementID}", ${util.toJSON(config)}); | ||
grails.yui.util.applyConfig(${toolTipID}, ${util.toJSON(props)}); | ||
${util.buildEventStrings(toolTipID, events).join()} | ||
}); | ||
</script> | ||
""" | ||
} | ||
|
||
def yuiSimpleDialog = { attrs, body -> | ||
|
||
} | ||
} |