mirror of
https://github.com/e107inc/e107.git
synced 2025-01-29 10:38:08 +01:00
Sort now functioning across pages
This commit is contained in:
parent
3b78d19acb
commit
68f949ec7b
@ -1879,7 +1879,8 @@ class e_form
|
||||
if(vartrue($parms['sort']))//FIXME use a global variable such as $fieldpref
|
||||
{
|
||||
$mode = preg_replace('/[^\w]/', '', vartrue($_GET['mode'], ''));
|
||||
$value .= "<a class='e-sort' style='cursor:move' href='".e_SELF."?mode={$mode}&action=sort&ajax_used=1' title='Re-order'>".ADMIN_SORT_ICON."</a> ";
|
||||
$from = intval(vartrue($_GET['from'],0));
|
||||
$value .= "<a class='e-sort' style='display:inline-block;vertical-align:middle;cursor:move' href='".e_SELF."?mode={$mode}&action=sort&ajax_used=1&from={$from}' title='Re-order'>".ADMIN_SORT_ICON."</a> ";
|
||||
}
|
||||
|
||||
$cls = false;
|
||||
|
@ -75,7 +75,7 @@ class faq_cat_ui extends e_admin_ui
|
||||
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||
'faq_info_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '5%', 'thclass' => 'left' ),
|
||||
'faq_info_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE),
|
||||
'faq_info_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left'),
|
||||
'faq_info_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readParms'=>'editable=1'),
|
||||
'faq_info_about' => array('title'=> LAN_DESCRIPTION, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'), // Display name
|
||||
'faq_info_parent' => array('title'=> LAN_CATEGORY, 'type' => 'text', 'width' => '5%'),
|
||||
'faq_info_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'width' => 'auto', 'data' => 'int'),
|
||||
@ -159,8 +159,9 @@ class faq_main_ui extends e_admin_ui
|
||||
protected $editQry = "SELECT * FROM #faqs WHERE faq_id = {ID}";
|
||||
|
||||
protected $pid = "faq_id";
|
||||
protected $perPage = 10;
|
||||
protected $perPage = 5;
|
||||
protected $batchDelete = true;
|
||||
protected $batchCopy = true;
|
||||
protected $listOrder = 'faq_order ASC';
|
||||
protected $sortField = 'faq_order';
|
||||
|
||||
@ -172,11 +173,11 @@ class faq_main_ui extends e_admin_ui
|
||||
'faq_answer' => array('title'=> "Answer", 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'),
|
||||
'faq_parent' => array('title'=> "Category", 'type' => 'method', 'data'=> 'int','width' => '5%', 'filter'=>TRUE, 'batch'=>TRUE),
|
||||
'faq_comment' => array('title'=> "Comment", 'type' => 'userclass', 'data' => 'int', 'width' => 'auto'), // User id
|
||||
'faq_datestamp' => array('title'=> "datestamp", 'type' => 'datestamp', 'data'=> 'int','width' => 'auto', 'noedit' => false),
|
||||
'faq_datestamp' => array('title'=> "Datestamp", 'type' => 'datestamp', 'data'=> 'int','width' => 'auto', 'noedit' => false),
|
||||
'faq_author' => array('title'=> LAN_USER, 'type' => 'user', 'data'=> 'int', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center', 'writeParms' => 'currentInit=1', 'filter' => true, 'batch' => true, 'nolist' => true ), // Photo
|
||||
'u.user_name' => array('title'=> "User name", 'type' => 'user', 'width' => 'auto', 'noedit' => true, 'readParms'=>'idField=faq_author&link=1'), // User name
|
||||
'u.user_loginname' => array('title'=> "User login", 'type' => 'user', 'width' => 'auto', 'noedit' => true, 'readParms'=>'idField=faq_author&link=1'), // User login name
|
||||
'faq_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'data'=> 'int','width' => '5%', 'thclass' => 'center','nolist' => false, 'noedit'=>false),
|
||||
'faq_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'data'=> 'int','width' => '5%', 'thclass' => 'center','nolist' => false, 'noedit'=>false, 'readParms'=>'editable=1'),
|
||||
'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center','readParms'=>'sort=1')
|
||||
);
|
||||
|
||||
|
@ -366,7 +366,7 @@ i.s-message-debug { background-position: -1480px 0; width: 32px; height: 32px;
|
||||
background-color: #408140 \9;
|
||||
}
|
||||
|
||||
|
||||
tr.e-sort { box-shadow: 0 5px 8px #cccccc; -webkit-box-shadow: 0 5px 8px #cccccc; -moz-box-shadow: 0 5px 8px #cccccc;}
|
||||
|
||||
/* ****************************** ICONS ************************************* */
|
||||
|
||||
|
@ -128,8 +128,8 @@ $(document).ready(function()
|
||||
|
||||
// Sorting
|
||||
var fixHelper = function(e, ui) {
|
||||
ui.closest("tr").switchClass( "odd", "highlight-odd", 0 );
|
||||
ui.closest("tr").switchClass( "even", "highlight-even", 0 );
|
||||
ui.closest("tr").switchClass( "odd", "highlight-odd e-sort", 0 );
|
||||
ui.closest("tr").switchClass( "even", "highlight-even e-sort", 0 );
|
||||
ui.children().each(function() {
|
||||
$(this).width($(this).width());
|
||||
// $(this).closest("tr").switchClass( "odd", "highlight-odd", 0 );
|
||||
@ -150,7 +150,9 @@ $(document).ready(function()
|
||||
var newSortValue = allItems.indexOf( $(ui.item).attr("id") );
|
||||
// alert($(ui.item).attr("id") + " was moved to index " + newSortValue);
|
||||
$(".highlight-even").switchClass( "highlight-even", "even", 600 );
|
||||
$(".highlight-odd").switchClass( "highlight-odd", "odd", 600 );
|
||||
$(".highlight-odd").switchClass( "highlight-odd", "odd", 600 );
|
||||
$("tr.e-sort").removeClass( "e-sort");
|
||||
|
||||
},
|
||||
|
||||
update: function(event, ui) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user