Removed extra language that was not needed

Renamed some of the internal actions
This commit is contained in:
Ed 2013-07-18 20:54:33 -03:00
parent 8b10f39dce
commit 830115fa4f
9 changed files with 16 additions and 32 deletions

View File

@ -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');
}
/**

View File

@ -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()}]});
},

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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>