From daa5fbcfdbb5cea9aec47671eb941dbd3ef71e2c Mon Sep 17 00:00:00 2001 From: Stephen Westfall Date: Thu, 16 Jun 2011 07:42:10 -0500 Subject: [PATCH] cleaned up js in local files. started on DialogTaglib --- .../widget/testApp/DialogController.groovy | 10 ++++++ .../views/autoComplete/localData.gsp | 6 ---- .../views/autoComplete/remoteJSONData.gsp | 6 ---- .../views/autoComplete/remoteXMLData.gsp | 6 ---- .../views/dataTable/editableGrid.gsp | 24 +------------ .../grails-app/views/dataTable/localData.gsp | 30 ++-------------- .../views/dataTable/remoteJSONData.gsp | 28 +-------------- .../dataTable/remoteJSONDataWithSorting.gsp | 28 +-------------- .../views/dataTable/scrollingGrid.gsp | 23 +----------- .../grails-app/views/dialog/index.gsp | 18 ++++++++++ .../grails-app/views/dialog/simpleDialog.gsp | 31 ++++++++++++++++ .../grails-app/views/layouts/main.gsp | 9 ++++- .../views/local/liquidDataTable.gsp | 2 +- grails-yui-widget/grails-app/conf/ReadMe.txt | 4 +++ .../grails/yui/widget/DataTableTagLib.groovy | 2 +- .../grails/yui/widget/DialogTagLib.groovy | 36 +++++++++++++++++++ 16 files changed, 115 insertions(+), 148 deletions(-) create mode 100644 grails-yui-widget-testApp/grails-app/controllers/grails/yui/widget/testApp/DialogController.groovy create mode 100644 grails-yui-widget-testApp/grails-app/views/dialog/index.gsp create mode 100644 grails-yui-widget-testApp/grails-app/views/dialog/simpleDialog.gsp create mode 100644 grails-yui-widget/grails-app/taglib/grails/yui/widget/DialogTagLib.groovy diff --git a/grails-yui-widget-testApp/grails-app/controllers/grails/yui/widget/testApp/DialogController.groovy b/grails-yui-widget-testApp/grails-app/controllers/grails/yui/widget/testApp/DialogController.groovy new file mode 100644 index 0000000..c176c43 --- /dev/null +++ b/grails-yui-widget-testApp/grails-app/controllers/grails/yui/widget/testApp/DialogController.groovy @@ -0,0 +1,10 @@ +package grails.yui.widget.testApp + +class DialogController { + + def index = { } + + def toolTip = {} + + def simpleDialog = {} +} diff --git a/grails-yui-widget-testApp/grails-app/views/autoComplete/localData.gsp b/grails-yui-widget-testApp/grails-app/views/autoComplete/localData.gsp index 5609abb..8b9e2be 100644 --- a/grails-yui-widget-testApp/grails-app/views/autoComplete/localData.gsp +++ b/grails-yui-widget-testApp/grails-app/views/autoComplete/localData.gsp @@ -11,12 +11,6 @@ Example of YUI AutoComplete with Local Data - diff --git a/grails-yui-widget-testApp/grails-app/views/autoComplete/remoteJSONData.gsp b/grails-yui-widget-testApp/grails-app/views/autoComplete/remoteJSONData.gsp index 266dc3e..2df6f60 100644 --- a/grails-yui-widget-testApp/grails-app/views/autoComplete/remoteJSONData.gsp +++ b/grails-yui-widget-testApp/grails-app/views/autoComplete/remoteJSONData.gsp @@ -11,12 +11,6 @@ Example of YUI AutoComplete with Local Data - diff --git a/grails-yui-widget-testApp/grails-app/views/autoComplete/remoteXMLData.gsp b/grails-yui-widget-testApp/grails-app/views/autoComplete/remoteXMLData.gsp index c968dad..13392fa 100644 --- a/grails-yui-widget-testApp/grails-app/views/autoComplete/remoteXMLData.gsp +++ b/grails-yui-widget-testApp/grails-app/views/autoComplete/remoteXMLData.gsp @@ -11,12 +11,6 @@ Example of YUI AutoComplete with Local Data - diff --git a/grails-yui-widget-testApp/grails-app/views/dataTable/editableGrid.gsp b/grails-yui-widget-testApp/grails-app/views/dataTable/editableGrid.gsp index 829cab5..ded3a98 100644 --- a/grails-yui-widget-testApp/grails-app/views/dataTable/editableGrid.gsp +++ b/grails-yui-widget-testApp/grails-app/views/dataTable/editableGrid.gsp @@ -11,24 +11,6 @@ Example of YUI DataTable with Scrolling Enabled - @@ -45,17 +27,13 @@ [key: "lastChange", sortable: true, resizeable: true, formatter: '@grails.yui.formatters.formatDate'] ] - def events = [ - [type: 'cellMousedownEvent', fn: 'window.cellMousedownEvent_Handler', obj: '{}', scope: 'this'], - [type: 'cellMouseoutEvent', fn: 'window.cellMouseoutEvent_Handler', obj: '{}', scope: 'this'] - ] + def events = [] %>
Example of YUI DataTable with Local Data - - + s @@ -49,11 +27,7 @@ [key: "lastChange", sortable: true, resizeable: true, formatter: '@grails.yui.formatters.formatDate'] ] - //grails.yui.components.grailsYuiDataTable_testTable - def events = [ - [type: 'cellMousedownEvent', fn: 'window.cellMousedownEvent_Handler', obj: '{}', scope: 'this'], - [type: 'cellMouseoutEvent', fn: 'window.cellMouseoutEvent_Handler', obj: '{}', scope: 'this'] - ] + def events = [] %>
diff --git a/grails-yui-widget-testApp/grails-app/views/dataTable/remoteJSONData.gsp b/grails-yui-widget-testApp/grails-app/views/dataTable/remoteJSONData.gsp index 85971d0..186f453 100644 --- a/grails-yui-widget-testApp/grails-app/views/dataTable/remoteJSONData.gsp +++ b/grails-yui-widget-testApp/grails-app/views/dataTable/remoteJSONData.gsp @@ -11,28 +11,6 @@ Example of YUI DataTable with Local Data - @@ -49,11 +27,7 @@ [key: "lastChange", sortable: true, resizeable: true, formatter: '@grails.yui.formatters.formatDate'] ] - //grails.yui.components.grailsYuiDataTable_testTable - def events = [ - [type: 'cellMousedownEvent', fn: 'window.cellMousedownEvent_Handler', obj: '{}', scope: 'this'], - [type: 'cellMouseoutEvent', fn: 'window.cellMouseoutEvent_Handler', obj: '{}', scope: 'this'] - ] + def events = [] %>
diff --git a/grails-yui-widget-testApp/grails-app/views/dataTable/remoteJSONDataWithSorting.gsp b/grails-yui-widget-testApp/grails-app/views/dataTable/remoteJSONDataWithSorting.gsp index 87a14f6..dc8e23d 100644 --- a/grails-yui-widget-testApp/grails-app/views/dataTable/remoteJSONDataWithSorting.gsp +++ b/grails-yui-widget-testApp/grails-app/views/dataTable/remoteJSONDataWithSorting.gsp @@ -11,28 +11,6 @@ Example of YUI DataTable with Local Data - @@ -49,11 +27,7 @@ [key: "lastChange", sortable: true, resizeable: true, formatter: '@grails.yui.formatters.formatDate'] ] - //grails.yui.components.grailsYuiDataTable_testTable - def events = [ - [type: 'cellMousedownEvent', fn: 'window.cellMousedownEvent_Handler', obj: '{}', scope: 'this'], - [type: 'cellMouseoutEvent', fn: 'window.cellMouseoutEvent_Handler', obj: '{}', scope: 'this'] - ] + def events = [] %>
diff --git a/grails-yui-widget-testApp/grails-app/views/dataTable/scrollingGrid.gsp b/grails-yui-widget-testApp/grails-app/views/dataTable/scrollingGrid.gsp index 05692b6..18db45f 100644 --- a/grails-yui-widget-testApp/grails-app/views/dataTable/scrollingGrid.gsp +++ b/grails-yui-widget-testApp/grails-app/views/dataTable/scrollingGrid.gsp @@ -11,24 +11,6 @@ Example of YUI DataTable with Scrolling Enabled - @@ -45,10 +27,7 @@ [key: "lastChange", sortable: true, resizeable: true, formatter: '@grails.yui.formatters.formatDate'] ] - def events = [ - [type: 'cellMousedownEvent', fn: 'window.cellMousedownEvent_Handler', obj: '{}', scope: 'this'], - [type: 'cellMouseoutEvent', fn: 'window.cellMouseoutEvent_Handler', obj: '{}', scope: 'this'] - ] + def events = [] %>
diff --git a/grails-yui-widget-testApp/grails-app/views/dialog/index.gsp b/grails-yui-widget-testApp/grails-app/views/dialog/index.gsp new file mode 100644 index 0000000..659dda2 --- /dev/null +++ b/grails-yui-widget-testApp/grails-app/views/dialog/index.gsp @@ -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" %> + + + Collection of Dialog Example Pages + + + + Example of YUI ToolTip + + \ No newline at end of file diff --git a/grails-yui-widget-testApp/grails-app/views/dialog/simpleDialog.gsp b/grails-yui-widget-testApp/grails-app/views/dialog/simpleDialog.gsp new file mode 100644 index 0000000..51a68e3 --- /dev/null +++ b/grails-yui-widget-testApp/grails-app/views/dialog/simpleDialog.gsp @@ -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" %> + + + Example of YUI Simple Dialog + + + + + + + +
Example of a YUI Simple Dialog
+ YUI Simple Dialog Sample Page + + + + \ No newline at end of file diff --git a/grails-yui-widget-testApp/grails-app/views/layouts/main.gsp b/grails-yui-widget-testApp/grails-app/views/layouts/main.gsp index e6cfd31..a325404 100644 --- a/grails-yui-widget-testApp/grails-app/views/layouts/main.gsp +++ b/grails-yui-widget-testApp/grails-app/views/layouts/main.gsp @@ -31,11 +31,18 @@ + + + + + + + - + diff --git a/grails-yui-widget-testApp/grails-app/views/local/liquidDataTable.gsp b/grails-yui-widget-testApp/grails-app/views/local/liquidDataTable.gsp index ac5ef89..c3a1489 100644 --- a/grails-yui-widget-testApp/grails-app/views/local/liquidDataTable.gsp +++ b/grails-yui-widget-testApp/grails-app/views/local/liquidDataTable.gsp @@ -33,7 +33,7 @@ + + //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 << """ + + """ + } + + def yuiSimpleDialog = { attrs, body -> + + } +}