mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-18 03:11:40 +01:00
- Fix some namespace issues breaking custom filter header
- Fix some copy+paste errors
This commit is contained in:
parent
67b91a4989
commit
847abfb198
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* EGroupware - eTemplate serverside implementation of the nextmatch filter header widget
|
* EGroupware - eTemplate serverside implementation of the nextmatch account filter header widget
|
||||||
*
|
*
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* @package api
|
* @package api
|
||||||
@ -18,7 +18,7 @@ use EGroupware\Api\Etemplate\Widget;
|
|||||||
/**
|
/**
|
||||||
* Extend selectbox and change type so proper users / groups get loaded, according to preferences
|
* Extend selectbox and change type so proper users / groups get loaded, according to preferences
|
||||||
*/
|
*/
|
||||||
class AccountFilter extends Widget\Select
|
class Accountfilter extends Widget\Select
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Parse and set extra attributes from xml in template object
|
* Parse and set extra attributes from xml in template object
|
||||||
@ -32,4 +32,5 @@ class AccountFilter extends Widget\Select
|
|||||||
|
|
||||||
$this->attrs['type'] = 'select-account';
|
$this->attrs['type'] = 'select-account';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Customfilter::registerWidget(__NAMESPACE__.'\\Accountfilter', array('nextmatch-accountfilter'));
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* EGroupware - eTemplate serverside implementation of the nextmatch filter header widget
|
* EGroupware - eTemplate serverside implementation of the nextmatch custom filter header widget
|
||||||
*
|
*
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* @package api
|
* @package api
|
||||||
@ -18,7 +18,7 @@ use EGroupware\Api\Etemplate\Widget;
|
|||||||
/**
|
/**
|
||||||
* A filter widget that fakes another (select) widget and turns it into a nextmatch filter widget.
|
* A filter widget that fakes another (select) widget and turns it into a nextmatch filter widget.
|
||||||
*/
|
*/
|
||||||
class NextmatchCustomFilter extends Widget\Transformer
|
class Customfilter extends Widget\Transformer
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $legacy_options = 'type,widget_options';
|
protected $legacy_options = 'type,widget_options';
|
||||||
@ -40,7 +40,7 @@ class NextmatchCustomFilter extends Widget\Transformer
|
|||||||
list($type) = explode('-',$this->attrs['type']);
|
list($type) = explode('-',$this->attrs['type']);
|
||||||
if($type == 'select')
|
if($type == 'select')
|
||||||
{
|
{
|
||||||
if(in_array($this->attrs['type'], Select::$cached_types))
|
if(in_array($this->attrs['type'], Widget\Select::$cached_types))
|
||||||
{
|
{
|
||||||
$widget_type = $this->attrs['type'];
|
$widget_type = $this->attrs['type'];
|
||||||
}
|
}
|
||||||
@ -60,3 +60,4 @@ class NextmatchCustomFilter extends Widget\Transformer
|
|||||||
parent::beforeSendToClient($cname, $expand);
|
parent::beforeSendToClient($cname, $expand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Customfilter::registerWidget(__NAMESPACE__.'\\Customfilter', array('nextmatch-customfilter'));
|
@ -20,4 +20,6 @@ use EGroupware\Api\Etemplate\Widget;
|
|||||||
*/
|
*/
|
||||||
class Filterheader extends Widget\Select
|
class Filterheader extends Widget\Select
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Customfilter::registerWidget(__NAMESPACE__.'\\Filterheader', array('nextmatch-filterheader'));
|
Loading…
Reference in New Issue
Block a user