Skip to content

Commit

Permalink
Fix #682 - Updated buttons and data loading
Browse files Browse the repository at this point in the history
*Buttons show now only show what is visible (this means the checkbox, checkin and actions for now)
*Changed from setUrl to ajax for loading the data
  • Loading branch information
madd15 committed Mar 21, 2015
1 parent 75d5f49 commit 2d9e49f
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions app/views/backend/hardware/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,50 @@
Lang::get('admin/hardware/table.checkout_date'),
Lang::get('admin/hardware/table.change'),
Lang::get('table.actions'))
->setUrl(route('api.hardware.list', Input::get('status'))) // this is the route where data will be retrieved
->setOptions(
array(
'ajax'=> route('api.hardware.list', Input::get('status')),
'deferRender'=> true,
'stateSave'=> true,
'stateDuration'=> -1,
'dom' =>'CT<"clear">lfrtip',
'tableTools' => array(
'sSwfPath'=> Config::get('app.url').'/assets/swf/copy_csv_xls_pdf.swf',
'aButtons'=>array(
'copy',
'print',
array(
'sExtends'=>'copy',
'sButtonText'=>'Copy',
'mColumns'=>'visible',
'bFooter'=>false,
),
array(
'sExtends'=>'print',
'sButtonText'=>'Print',
'mColumns'=>'visible',
'bShowAll'=>false,
),
array(
'sExtends'=>'collection',
'sButtonText'=>'Export',
'aButtons'=>array(
'csv',
'xls',
'pdf'
array(
'sExtends'=>'csv',
'sButtonText'=>'csv',
'mColumns'=>'visible',
'bFooter'=>false,
),
array(
'sExtends'=>'xls',
'sButtonText'=>'XLS',
'mColumns'=>'visible',
'bFooter'=>false,
),
array(
'sExtends'=>'pdf',
'sButtonText'=>'PDF',
'mColumns'=>'visible',
'bFooter'=>false,
)
)
)
)
Expand All @@ -96,8 +121,8 @@
'order'=>array(array(1,'asc')),
'bProcessing'=>true,
'oLanguage'=>array(
'sProcessing'=>'<i class="fa fa-spinner fa-spin"></i> Loading...'
),
'sProcessing'=>'<i class="fa fa-spinner fa-spin"></i> Loading...'
),
)
)
->render('backend/hardware/datatable') }}
Expand Down

0 comments on commit 2d9e49f

Please sign in to comment.