Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Table Builder
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @since 18 Feb 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\Helpers\Table;
|
||||
@@ -86,6 +85,11 @@ abstract class _Table
|
||||
*/
|
||||
public $showAdvancedSearch = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Whether to use the placeholder loading style with this table
|
||||
*/
|
||||
public $dummyLoading = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Fields to enable advanced sarch on
|
||||
* @note Keys are the field names. Values are a IPS\Helpers\Table\SEARCH_* constant
|
||||
@@ -113,6 +117,11 @@ abstract class _Table
|
||||
*/
|
||||
protected $paginationKey = 'page';
|
||||
|
||||
/**
|
||||
* @brief Use simple pagination
|
||||
*/
|
||||
public $simplePagination = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Table resort parameter
|
||||
*/
|
||||
@@ -149,9 +158,14 @@ abstract class _Table
|
||||
public $mainColumn = NULL;
|
||||
|
||||
/**
|
||||
* @brief Additional CSS classes to apply to columns
|
||||
* @brief Additional CSS classes to apply to the table
|
||||
*/
|
||||
public $classes = array();
|
||||
|
||||
/**
|
||||
* @brief Additional CSS classes to apply to individual columns
|
||||
*/
|
||||
public $rowClasses = array();
|
||||
|
||||
/**
|
||||
* @brief Buttons to show on the "root row"
|
||||
@@ -502,7 +516,16 @@ abstract class _Table
|
||||
$resortKey = $this->resortKey;
|
||||
if( \IPS\Request::i()->isAjax() and \IPS\Request::i()->$resortKey )
|
||||
{
|
||||
\IPS\Output::i()->json( array( 'rows' => call_user_func( $this->rowsTemplate, $this, $headers, $rows, $this->mainColumn, $this->rootButtons, array() ), 'pagination' => \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->pagination( $this->baseUrl, $this->pages, $this->page, $this->limit, TRUE, $this->paginationKey ), 'extraHtml' => $this->extraHtml ) );
|
||||
if ( count( $rows ) )
|
||||
{
|
||||
$rowHtml = call_user_func( $this->rowsTemplate, $this, $headers, $rows, $this->mainColumn, $this->rootButtons, array() );
|
||||
}
|
||||
else
|
||||
{
|
||||
$rowHtml = \IPS\Theme::i()->getTemplate( 'tables', 'core', 'front' )->noRows();
|
||||
}
|
||||
|
||||
\IPS\Output::i()->json( array( 'rows' => $rowHtml, 'pagination' => \IPS\Theme::i()->getTemplate( 'global', 'core', 'global' )->pagination( $this->baseUrl, $this->pages, $this->page, $this->limit, TRUE, $this->paginationKey, $this->simplePagination ), 'extraHtml' => $this->extraHtml ) );
|
||||
}
|
||||
/* Otherwise, show the full table */
|
||||
else
|
||||
@@ -608,7 +631,7 @@ abstract class _Table
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !empty( $advancedSearchValues ) )
|
||||
if( !empty( $advancedSearchValues ) AND !isset( \IPS\Request::i()->noColumn ) )
|
||||
{
|
||||
$headers = array_combine( $this->include, $this->include );
|
||||
|
||||
|
||||
Reference in new issue
Block a user