Ok, I think that web2py admin plugin is for web2py created plugin... For
the kind of plugin like Datatables you have to include it by your self like
this :
<style type="text/css" title="currentStyle">
@import "{{=URL('static',
'plugin_added/jquery-ui-1.8.17.custom/css/smoothness/jquery-ui-1.8.17.custom_DISPLAY_TWEAKS_RV.css')}}";
@import "{{=URL('static',
'plugin_added/jquery-ui-1.8.17.custom/development-bundle/themes/smoothness/jquery.ui.tabs.css')}}";
@import "{{=URL('static',
'plugin_added/DataTables-1.9.0/media/css/demo_page.css')}}";
@import "{{=URL('static',
'plugin_added/DataTables-1.9.0/extras/TableTools/media/css/TableTools.css')}}";
@import "{{=URL('static',
'plugin_added/DataTables-1.9.0/media/css/demo_table_jui.css')}}";
@import "{{=URL('static',
'plugin_added/DataTables-1.9.0/extras/TableTools/media/css/TableTools.css')}}";
/*
* Override styles needed due to the mix of three different CSS sources!
* For proper examples
* please see the themes example in the 'Examples' section of this site
*/
.dataTables_info { padding-top: 0; }
.dataTables_paginate { padding-top: 0; }
.css_right { float: right; }
#example_wrapper .fg-toolbar { font-size: 0.8em }
#theme_links span { float: left; padding: 2px 10px; }
</style>
Then HTML content like : {{=table}}
<script type="text/javascript" charset="utf-8" src="{{=URL('static',
'plugin_added/DataTables-1.9.0/media/js/jquery.dataTables.min.js')}}">
</script>
<script type="text/javascript" charset="utf-8" src="{{=URL('static',
'plugin_added/DataTables-1.9.0/extras/FixedHeader/js/FixedHeader.min.js')}}">
</script>
<script type="text/javascript" charset="utf-8" src="{{=URL('static',
'plugin_added/DataTables-1.9.0/extras/FixedColumns/media/js/FixedColumns.min.js')}}">
</script>
<script type="text/javascript" charset="utf-8" src="{{=URL('static',
'plugin_added/DataTables-1.9.0/extras/TableTools/media/js/ZeroClipboard.js')}}">
</script>
<script type="text/javascript" charset="utf-8" src="{{=URL('static',
'plugin_added/DataTables-1.9.0/extras/TableTools/media/js/TableTools.min.js')}}">
</script>
<script type="text/javascript" charset="utf-8"
src="{{=URL('static','plugin_added/jquery-ui-1.8.17.custom/development-bundle/ui/minified/jquery.ui.core.min.js')}}">
</script>
<script type="text/javascript" charset="utf-8"
src="{{=URL('static','plugin_added/jquery-ui-1.8.17.custom/development-bundle/ui/minified/jquery.ui.widget.min.js')}}">
</script>
<script type="text/javascript" charset="utf-8"
src="{{=URL('static','plugin_added/jquery-ui-1.8.17.custom/development-bundle/ui/minified/jquery.ui.tabs.min.js')}}">
</script>
<script type="text/javascript" charset="utf-8">
$(document).ready( function () {
var sSwfPath_location =
"{{=URL('static','plugin_added/DataTables-1.9.0/extras/TableTools/media/swf/copy_cvs_xls.swf')}}"
var filename_export =
"{{=request.args(0)+request.now.strftime('_%Y-%m-%d_%H-%M-%S-%f')}}"
TableTools.DEFAULTS.aButtons = [
{
"sExtends": "copy",
"sCharSet": "utf16le",
"bSelectedOnly": true
},
{
"sExtends": "csv",
"sFieldBoundary": '"',
"sCharSet": "utf16le",
"sFileName": filename_export + ".csv",
"bSelectedOnly": true
},
{
"sExtends": "xls",
"sFieldBoundary": '"',
"sCharSet": "utf16le",
"sFileName": filename_export + ".csv",
"bSelectedOnly": true
},
];
TableTools.DEFAULTS.sSwfPath = sSwfPath_location;
TableTools.DEFAULTS.sRowSelect = "multi";
if ($('#quality_control').length>0 && $('#characterization').length>0) {
var oTable1 = $('#quality_control').dataTable( {
"bJQueryUI": true,
"bAutoWidth": false,
"bScrollInfinite": true,
"sScrollY": "300px",
"sScrollX": "100%",
"bPaginate": false,
"bProcessing": true,
"bSortClasses" : false,
"sDom": '<"H"Tfr>t<"F"ip>',
} );
new FixedColumns( oTable1, {
"iLeftColumns": 1,
} );
var oTable2 = $('#characterization').dataTable( {
"bJQueryUI": true,
"bAutoWidth": false,
"bScrollInfinite": true,
"sScrollY": "300px",
"sScrollX": "100%",
"bPaginate": false,
"bProcessing": true,
"bSortClasses" : false,
"sDom": '<"H"Tfr>t<"F"ip>',
} );
new FixedColumns( oTable2, {
"iLeftColumns": 1,
} );
}else{
if ($('#quality_control').length>0) {
var oTable1 = $('#quality_control').dataTable( {
"bJQueryUI": true,
"bAutoWidth": false,
"bScrollInfinite": true,
"sScrollY": "300px",
"sScrollX": "100%",
"bPaginate": false,
"bProcessing": true,
"bSortClasses" : false,
"sDom": '<"H"Tfr>t<"F"ip>',
} );
new FixedColumns( oTable1, {
"iLeftColumns": 1,
} );
}else{
if ($('#characterization').length>0) {
var oTable2 = $('#characterization').dataTable( {
"bJQueryUI": true,
"bAutoWidth": false,
"bScrollInfinite": true,
"sScrollY": "300px",
"sScrollX": "100%",
"bPaginate": false,
"bProcessing": true,
"bSortClasses" : false,
"sDom": '<"H"Tfr>t<"F"ip>',
} );
new FixedColumns( oTable2, {
"iLeftColumns": 1,
} );
}
}
}
} );
</script>
On Wed, May 9, 2012 at 9:50 AM, Larry G. Wapnitsky <[email protected]>wrote:
> I installed the plugin directly through the admin interface. I never
> specified anything regarding interface, so I'm assuming that it's using the
> default settings.
>
> As for jQuery, I haven't had time to learn that yet, which is why I'm
> relying on the plugins that have been created already.
>
>
> On 5/9/2012 9:49 AM, Richard Vézina wrote:
>
> jQuery UI theme init :
>
> $(document).ready( function () {
> var oTable = $('#example').dataTable( {
> "sDom": 'R<"H"lfr>t<"F"ip<',
> "bJQueryUI": true,
> "sPaginationType": "full_numbers"
> } );
> } );
>
>
> http://www.datatables.net/release-datatables/extras/ColReorder/theme.html
>
> If you go in the datatables plugin and edit the html example, it is
> pretty instructive and you can see which css is needed for a given output
> of the plugin...
>
> Richard
>
> On Wed, May 9, 2012 at 9:46 AM, Richard Vézina <
> [email protected]> wrote:
>
>> Think that your css are not loaded, I mean the datatables css... Or you
>> didn't specified that you want to use the jQuery UI theme.
>>
>> But what you want exactly? Truncate switch from web2py allow to trunc
>> long text field at particular length, personnaly I don't truncate... For
>> example you have to manipulate the html select for the table if you want to
>> not allow text to spill over more then one line...
>>
>> I do that like that :
>>
>>
>> table = crud.select(db[request.args(0)],
>> query=query, _class='sortable',
>> _id='something')
>>
>> for th in table.elements('th'):
>> th.attributes['_style']='white-space:nowrap;'
>>
>> "white-space:nowrap" is prevent the return of the line if text lenght
>> is over a certain length.
>>
>> And for column width switch for DataTables here a thread :
>>
>> http://www.datatables.net/forums/discussion/3213/column-widths/p1
>>
>> And basic styling : http://www.datatables.net/styling/ids_classes
>>
>> Richard
>>
>>
>>
>>
>> On Wed, May 9, 2012 at 8:49 AM, Larry Wapnitsky <[email protected]>wrote:
>>
>>> OK. Here's the screenshot: shifted
>>> datatables<http://www.zimagez.com/zimage/screenshot-05092012-084338am.php>
>>>
>>>
>>> On Tuesday, May 8, 2012 5:16:48 PM UTC-4, Richard wrote:
>>>
>>>> Good, feel free to ask for DTs... I also have to leave :)
>>>>
>>>> Richard
>>>>
>>>> On Tue, May 8, 2012 at 4:43 PM, Larry G. Wapnitsky wrote:
>>>>
>>>>> i'm about to leave my office. I'll send you a screenshot of what
>>>>> I"m getting tomorrow.
>>>>>
>>>>>
>>>>>
>>>>> On 5/8/2012 4:42 PM, Richard Vézina wrote:
>>>>>
>>>>> What kind of table you need, I can help you initialise DataTables, the
>>>>> other one I don't use them. I know how to setup jqgrid with plugin_wiki,
>>>>> but I didn't touch it since a long time and to me it was so difficult to
>>>>> configure so I abandonned it. With DataTables, I definitely help set it
>>>>> up.
>>>>>
>>>>> Richard
>>>>>
>>>>> On Tue, May 8, 2012 at 4:36 PM, Larry G. Wapnitsky wrote:
>>>>>
>>>>> I tried those, but documentation seems to be missing as well.
>>>>>>
>>>>>>
>>>>>> On 5/8/2012 4:35 PM, Richard Vézina wrote:
>>>>>>
>>>>>> ho, I think those plugin could be quite outdated...
>>>>>>
>>>>>> If you really need a table plugin, look to Datatables or PowerTable
>>>>>> (or PowerGrid : http://labs.blouweb.com/PowerGrid/) form Bruno.
>>>>>>
>>>>>> There is also a plugin_wiki jqgrid coming pre-wrapped within web2py.
>>>>>>
>>>>>> Richard
>>>>>>
>>>>>> On Tue, May 8, 2012 at 3:36 PM, Larry Wapnitsky <[email protected]>wrote:
>>>>>>
>>>>>>> Also, I found the "truncate" switch, which is helping me, but my
>>>>>>> table is appearing on the right. Is there a list of the available
>>>>>>> "switches" for datatable?
>>>>>>>
>>>>>>>
>>>>>>> On Tuesday, May 8, 2012 11:58:28 AM UTC-4, Richard wrote:
>>>>>>>
>>>>>>>> Which plugin... Also if you use chrome rigth click and inspect
>>>>>>>> element can make it pretty easy to find a style and change the
>>>>>>>> properties.
>>>>>>>>
>>>>>>>> Richard
>>>>>>>>
>>>>>>>> On Tue, May 8, 2012 at 11:46 AM, Larry Wapnitsky wrote:
>>>>>>>>
>>>>>>>> I'm not a CSS guy (still learning), but need to be able to change
>>>>>>>>> the default column widths in the datatable plugin. Guidance?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Larry
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>> On Tuesday, May 8, 2012 5:16:48 PM UTC-4, Richard wrote:
>>>>
>>>> Good, feel free to ask for DTs... I also have to leave :)
>>>>
>>>> Richard
>>>>
>>>> On Tue, May 8, 2012 at 4:43 PM, Larry G. Wapnitsky
>>>> <[email protected]>wrote:
>>>>
>>>>> i'm about to leave my office. I'll send you a screenshot of what I"m
>>>>> getting tomorrow.
>>>>>
>>>>>
>>>>>
>>>>> On 5/8/2012 4:42 PM, Richard Vézina wrote:
>>>>>
>>>>> What kind of table you need, I can help you initialise DataTables, the
>>>>> other one I don't use them. I know how to setup jqgrid with plugin_wiki,
>>>>> but I didn't touch it since a long time and to me it was so difficult to
>>>>> configure so I abandonned it. With DataTables, I definitely help set it
>>>>> up.
>>>>>
>>>>> Richard
>>>>>
>>>>> On Tue, May 8, 2012 at 4:36 PM, Larry G. Wapnitsky
>>>>> <[email protected]>wrote:
>>>>>
>>>>>> I tried those, but documentation seems to be missing as well.
>>>>>>
>>>>>>
>>>>>> On 5/8/2012 4:35 PM, Richard Vézina wrote:
>>>>>>
>>>>>> ho, I think those plugin could be quite outdated...
>>>>>>
>>>>>> If you really need a table plugin, look to Datatables or PowerTable
>>>>>> (or PowerGrid : http://labs.blouweb.com/PowerGrid/) form Bruno.
>>>>>>
>>>>>> There is also a plugin_wiki jqgrid coming pre-wrapped within web2py.
>>>>>>
>>>>>> Richard
>>>>>>
>>>>>> On Tue, May 8, 2012 at 3:36 PM, Larry Wapnitsky <[email protected]>wrote:
>>>>>>
>>>>>>> Also, I found the "truncate" switch, which is helping me, but my
>>>>>>> table is appearing on the right. Is there a list of the available
>>>>>>> "switches" for datatable?
>>>>>>>
>>>>>>>
>>>>>>> On Tuesday, May 8, 2012 11:58:28 AM UTC-4, Richard wrote:
>>>>>>>
>>>>>>>> Which plugin... Also if you use chrome rigth click and inspect
>>>>>>>> element can make it pretty easy to find a style and change the
>>>>>>>> properties.
>>>>>>>>
>>>>>>>> Richard
>>>>>>>>
>>>>>>>> On Tue, May 8, 2012 at 11:46 AM, Larry Wapnitsky wrote:
>>>>>>>>
>>>>>>>> I'm not a CSS guy (still learning), but need to be able to change
>>>>>>>>> the default column widths in the datatable plugin. Guidance?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Larry
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>
>
>
>