mirror of
https://github.com/UndefinedOffset/SortableGridField.git
synced 2024-10-22 17:05:38 +02:00
Removed extra language that was not needed
Renamed some of the internal actions
This commit is contained in:
parent
8b10f39dce
commit
830115fa4f
@ -38,40 +38,36 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
||||
|
||||
|
||||
//Sort order toggle
|
||||
$sortOrderToggle = Object::create(
|
||||
'GridField_FormAction',
|
||||
$sortOrderToggle = GridField_FormAction::create(
|
||||
$gridField,
|
||||
'sortablerows-toggle',
|
||||
_t('GridFieldSortableRows.ALLOW_DRAG_DROP', '_Allow drag and drop re-ordering'),
|
||||
'saveGridRowSort',
|
||||
'sorttoggle',
|
||||
'sortableRowsToggle',
|
||||
null
|
||||
)->addExtraClass('sortablerows-toggle');
|
||||
|
||||
|
||||
//Disable Pagenator
|
||||
$disablePagenator = Object::create(
|
||||
'GridField_FormAction',
|
||||
$sortOrderSave = GridField_FormAction::create(
|
||||
$gridField,
|
||||
'sortablerows-disablepagenator',
|
||||
_t('GridFieldSortableRows.DISABLE_PAGINATOR', '_Disable Pagenator'),
|
||||
'sortableRowsDisablePaginator',
|
||||
'sortablerows-savesort',
|
||||
'savesort',
|
||||
'saveGridRowSort',
|
||||
null
|
||||
)->addExtraClass('sortablerows-disablepagenator');
|
||||
)->addExtraClass('sortablerows-savesort');
|
||||
|
||||
|
||||
//Disable Pagenator
|
||||
$sortToPage = Object::create(
|
||||
'GridField_FormAction',
|
||||
//Sort to Page Action
|
||||
$sortToPage = GridField_FormAction::create(
|
||||
$gridField,
|
||||
'sortablerows-sorttopage',
|
||||
_t('GridFieldSortableRows.SORT_TO_PAGE', '_Sort To Page'),
|
||||
'sorttopage',
|
||||
'sortToPage',
|
||||
null
|
||||
)->addExtraClass('sortablerows-sorttopage');
|
||||
|
||||
|
||||
$data = array('SortableToggle' => $sortOrderToggle,
|
||||
'PagenatorToggle' => $disablePagenator,
|
||||
'SortOrderSave' => $sortOrderSave,
|
||||
'SortToPage' => $sortToPage,
|
||||
'Checked' => ($state->sortableToggle == true ? ' checked = "checked"':''));
|
||||
|
||||
@ -226,7 +222,7 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
||||
* @return Array Array with action identifier strings.
|
||||
*/
|
||||
public function getActions($gridField) {
|
||||
return array('saveGridRowSort', 'sortableRowsDisablePaginator', 'sortToPage');
|
||||
return array('saveGridRowSort', 'sortableRowsToggle', 'sortToPage');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
var dataRows=[];
|
||||
var gridItems=gridField.getItems();
|
||||
var button=refCheckbox.parent().find('.sortablerows-toggle');
|
||||
var button=refCheckbox.parent().find('.sortablerows-savesort');
|
||||
|
||||
|
||||
for(var i=0;i<gridItems.length;i++) {
|
||||
@ -103,7 +103,7 @@
|
||||
gridField.setState('GridFieldSortableRows', {sortableToggle: $(this).is(':checked')});
|
||||
|
||||
|
||||
var button=$(this).parent().find('.sortablerows-disablepagenator');
|
||||
var button=$(this).parent().find('.sortablerows-toggle');
|
||||
gridField.reload({data: [{name: button.attr('name'), value: button.val()}]});
|
||||
},
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
de:
|
||||
GridFieldSortableRows:
|
||||
ALLOW_DRAG_DROP: "Drag & Drop neuordnen"
|
||||
DISABLE_PAGINATOR: "Paginator deaktivieren"
|
||||
SORT_TO_PAGE: "Seite zuordnen"
|
||||
EditPermissionsFailure: "Keine Berechtigung zu Editieren"
|
@ -1,6 +1,4 @@
|
||||
en:
|
||||
GridFieldSortableRows:
|
||||
ALLOW_DRAG_DROP: "Allow Drag and Drop"
|
||||
DISABLE_PAGINATOR: "Disable Paginator"
|
||||
SORT_TO_PAGE: "Sort To Page"
|
||||
EditPermissionsFailure: "No edit permissions"
|
@ -1,6 +1,4 @@
|
||||
es:
|
||||
GridFieldSortableRows:
|
||||
ALLOW_DRAG_DROP: "Permitir arrastrar y soltar"
|
||||
DISABLE_PAGINATOR: "Deshabilitar paginador"
|
||||
SORT_TO_PAGE: "Ordenar a la página"
|
||||
EditPermissionsFailure: "No tienes permisos de edición"
|
@ -1,6 +1,4 @@
|
||||
fi:
|
||||
GridFieldSortableRows:
|
||||
ALLOW_DRAG_DROP: "Salli raahaus ja pudotus"
|
||||
DISABLE_PAGINATOR: "Kytke sivutus pois"
|
||||
SORT_TO_PAGE: "Järjestä sivulle"
|
||||
EditPermissionsFailure: "Ei oikeuksia muokata"
|
@ -1,6 +1,4 @@
|
||||
it:
|
||||
GridFieldSortableRows:
|
||||
ALLOW_DRAG_DROP: "Consenti il trascinamento"
|
||||
DISABLE_PAGINATOR: "Disabilita impaginatore"
|
||||
SORT_TO_PAGE: "Ordina alla pagina"
|
||||
EditPermissionsFailure: "Non hai i permessi per modificare"
|
||||
|
@ -1,6 +1,4 @@
|
||||
nl:
|
||||
GridFieldSortableRows:
|
||||
ALLOW_DRAG_DROP: "Rangschikken met drag & drop toestaan"
|
||||
DISABLE_PAGINATOR: "Rangschikken uitzetten"
|
||||
SORT_TO_PAGE: "Sorteer op Pagina"
|
||||
EditPermissionsFailure: "Geen toegang"
|
@ -3,7 +3,7 @@
|
||||
<div class="gridfield-sortablerows">
|
||||
<input type="checkbox" id="{$ID}_AllowDragDropCheck" value="1" class="no-change-track"$Checked/> <label for="{$ID}_AllowDragDropCheck"><%t GridFieldSortableRows.ALLOW_DRAG_DROP "_Allow drag and drop re-ordering" %></label>
|
||||
$SortableToggle
|
||||
$PagenatorToggle
|
||||
$SortOrderSave
|
||||
$SortToPage
|
||||
</div>
|
||||
</th>
|
||||
|
Loading…
Reference in New Issue
Block a user