- Added support for textarea and HTMLarea fields + i18n additional labels
(editor Save/Cancel, YUI Datatable Loading/Error messages, and also column sort tooltips (new in YUI 29.0). - Added CSS files for the existing two DataTable Templates. Each file should be added to the corresponding template as a CSS Attachment. - Avoid terminating the editor on Enter. - Arrange for TAB to save and move editor for next cell also for HTMLarea editor. - Define classes "wg-dt-textarea" and "wg-dt-htmlarea" + styling for the corresponding cells. - Commented out handleTableKeyEvent() (reason in the code). - Implemented a simple workaround to restore the "editor" field (not preserved due to an unknown reason).
This commit is contained in:
parent
1fd29bf2a1
commit
5aa0835649
5 changed files with 293 additions and 38 deletions
60
www/extras/css/wg-datatable-html.css
Normal file
60
www/extras/css/wg-datatable-html.css
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/**
|
||||
* wg-datatable-html.css
|
||||
* CSS rules for DataTable assets
|
||||
*
|
||||
* Add as attachment to Default DetaTable template (HTML)
|
||||
*/
|
||||
|
||||
|
||||
/* start content at top of cells */
|
||||
.dataTable table>tbody>tr>td {
|
||||
vertical-align: 0;
|
||||
}
|
||||
.dataTable>table>tbody>tr>td>p:first-child { /* for htmlarea, but really applies to the starting p of any cell */
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* padding in all data cells */
|
||||
.dataTable table>tbody>tr>td {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* examples of further styles */
|
||||
|
||||
/* limited textarea/htmlarea cells, show vertical scrollbar if needed */
|
||||
/*
|
||||
.dataTable table>tbody>tr>td {
|
||||
height: 70px;
|
||||
width: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
*/
|
||||
|
||||
/* styling a particular DataTable in the page, by assetId */
|
||||
/*
|
||||
#dataTablesrvp2vk8QJqY5E0imSRQag.dataTable table>tbody>tr>td {
|
||||
color:red;
|
||||
height:auto;
|
||||
width:150px;
|
||||
overflow-y: visible
|
||||
}
|
||||
*/
|
||||
|
||||
/* minimum row height */
|
||||
/*
|
||||
.dataTable table>tbody>tr>td {
|
||||
min-height:70px;
|
||||
height:auto !important;
|
||||
height:70px;
|
||||
}
|
||||
*/
|
||||
|
||||
/* styling a particular column (e.g column 2), by assetId */
|
||||
/*
|
||||
#dataTablesvE67R6JQfmEI__T9pIAkQ.dataTable table>tbody>tr>td:first-child+td {
|
||||
color:blue;
|
||||
}
|
||||
*/
|
||||
|
||||
59
www/extras/css/wg-datatable-yui.css
Normal file
59
www/extras/css/wg-datatable-yui.css
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/**
|
||||
* wg-datatable-yui.css
|
||||
* CSS rules for DataTable assets
|
||||
*
|
||||
* Add as attachment to Default DetaTable template (YUI)
|
||||
*/
|
||||
|
||||
|
||||
/* start content at top of cells */
|
||||
.yui-dt-editable {
|
||||
vertical-align: 0;
|
||||
}
|
||||
.wg-dt-htmlarea>p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* padding in all data cells */
|
||||
td.yui-dt-editable .yui-dt-liner {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
/* examples of further styles */
|
||||
|
||||
/* limited textarea/htmlarea cells, show vertical scrollbar if needed */
|
||||
/*
|
||||
.wg-dt-textarea, .wg-dt-htmlarea {
|
||||
height: 70px;
|
||||
width: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/* styling a particular DataTable in the page */
|
||||
/*
|
||||
#dataTablesrvp2vk8QJqY5E0imSRQag .wg-dt-textarea, #dataTablesrvp2vk8QJqY5E0imSRQag .wg-dt-htmlarea {
|
||||
color:red;
|
||||
height:auto;
|
||||
width:150px;
|
||||
overflow:visible;
|
||||
}
|
||||
*/
|
||||
|
||||
/* minimum row height */
|
||||
/*
|
||||
td.yui-dt-editable .yui-dt-liner {
|
||||
min-height:70px;
|
||||
height:auto !important;
|
||||
height:70px;
|
||||
}
|
||||
*/
|
||||
|
||||
/* styling a particular column */
|
||||
/*
|
||||
#dataTablesrvp2vk8QJqY5E0imSRQag .yui-dt-col-col1 .yui-dt-liner {
|
||||
color:blue;
|
||||
}
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue