diff --git a/template/app/control/admin/SystemGroupForm.class.php b/template/app/control/admin/SystemGroupForm.class.php
index 3febdfca..38e0d321 100644
--- a/template/app/control/admin/SystemGroupForm.class.php
+++ b/template/app/control/admin/SystemGroupForm.class.php
@@ -44,20 +44,20 @@ function __construct()
$this->form->addFields( [new TLabel('ID')], [$id]);
$this->form->addFields( [new TLabel(_t('Name'))], [$name]);
- $search_program = new TEntry('search');
- $search_program->placeholder = _t('Search');
- $search_program->style = 'margin-left: 4px; border-radius: 4px';
-
$this->program_list = new TCheckList('program_list');
$this->program_list->setIdColumn('id');
$this->program_list->addColumn('id', 'ID', 'center', '10%');
- $this->program_list->addColumn('name', _t('Name') . $search_program->getContents(), 'left', '30%');
- $col_program = $this->program_list->addColumn('controller', _t('Menu path'), 'left', '30%');
- $this->program_list->addColumn('controller', _t('Controller'), 'left', '20%');
+ $col_name = $this->program_list->addColumn('name', _t('Name'), 'left', '50%');
+ $col_program = $this->program_list->addColumn('controller', _t('Menu path'), 'left', '40%');
$col_program->enableAutoHide(500);
$this->program_list->setHeight(350);
$this->program_list->makeScrollable();
+ $col_name->enableSearch();
+ $search_program = $col_name->getInputSearch();
+ $search_program->placeholder = _t('Search');
+ $search_program->style = 'margin-left: 4px; border-radius: 4px';
+
$col_program->setTransformer( function($value, $object, $row) {
$menuparser = new TMenuParser('menu.xml');
$paths = $menuparser->getPath($value);
@@ -68,23 +68,19 @@ function __construct()
}
});
- $this->program_list->enableSearch($search_program, 'name');
-
- $search_user = new TEntry('search');
- $search_user->placeholder = _t('Search');
- $search_user->style = 'margin-left: 4px; border-radius: 4px';
-
$this->user_list = new TCheckList('user_list');
$this->user_list->setIdColumn('id');
$this->user_list->addColumn('id', 'ID', 'center', '10%');
- $this->user_list->addColumn('name', _t('Name') . $search_user->getContents(), 'left', '90%');
+ $col_user = $this->user_list->addColumn('name', _t('Name'), 'left', '90%');
$this->user_list->setHeight(350);
$this->user_list->makeScrollable();
- $this->user_list->enableSearch($search_user, 'name');
+ $col_user->enableSearch();
+ $search_user = $col_user->getInputSearch();
+ $search_user->placeholder = _t('Search');
+ $search_user->style = 'margin-left: 4px; border-radius: 4px';
$subform = new BootstrapFormBuilder;
- //$subform->setFieldSizes('100%');
$subform->setProperty('style', 'border:none; box-shadow:none');
$subform->appendPage( _t('Programs') );
diff --git a/template/app/control/admin/SystemGroupList.class.php b/template/app/control/admin/SystemGroupList.class.php
index 09edecc4..f269eeab 100644
--- a/template/app/control/admin/SystemGroupList.class.php
+++ b/template/app/control/admin/SystemGroupList.class.php
@@ -18,9 +18,6 @@ class SystemGroupList extends TStandardList
protected $deleteButton;
protected $transformCallback;
- // trait com onReload, onSearch, onDelete...
- use Adianti\Base\AdiantiStandardListTrait;
-
/**
* Page constructor
*/
@@ -55,7 +52,6 @@ public function __construct()
// add the search form actions
$btn = $this->form->addAction(_t('Find'), new TAction(array($this, 'onSearch')), 'fa:search');
$btn->class = 'btn btn-sm btn-primary';
- $this->form->addActionLink(_t('Clear'), new TAction([$this, 'clear']), 'fa:eraser red');
$this->form->addAction(_t('New'), new TAction(array('SystemGroupForm', 'onEdit')), 'fa:plus green');
// creates a DataGrid
@@ -159,13 +155,4 @@ public function onClone($param)
TTransaction::rollback();
}
}
-
- /**
- * Clear filters
- */
- public function clear()
- {
- $this->clearFilters();
- $this->onReload();
- }
}
diff --git a/template/app/control/admin/SystemProgramList.class.php b/template/app/control/admin/SystemProgramList.class.php
index 804b0eb5..3cd97374 100644
--- a/template/app/control/admin/SystemProgramList.class.php
+++ b/template/app/control/admin/SystemProgramList.class.php
@@ -18,9 +18,6 @@ class SystemProgramList extends TStandardList
protected $deleteButton;
protected $transformCallback;
- // trait com onReload, onSearch, onDelete...
- use Adianti\Base\AdiantiStandardListTrait;
-
/**
* Page constructor
*/
@@ -58,7 +55,6 @@ public function __construct()
// add the search form actions
$btn = $this->form->addAction(_t('Find'), new TAction(array($this, 'onSearch')), 'fa:search');
$btn->class = 'btn btn-sm btn-primary';
- $this->form->addActionLink(_t('Clear'), new TAction([$this, 'clear']), 'fa:eraser red');
$this->form->addAction(_t('New'), new TAction(array('SystemProgramForm', 'onEdit')), 'fa:plus green');
// creates a DataGrid
@@ -177,13 +173,4 @@ public function displayBuilderActions($object)
{
return ( (strpos($object->controller, 'System') === false) and !in_array($object->controller, ['CommonPage', 'WelcomeView']));
}
-
- /**
- * Clear filters
- */
- public function clear()
- {
- $this->clearFilters();
- $this->onReload();
- }
}
diff --git a/template/app/control/admin/SystemUnitList.class.php b/template/app/control/admin/SystemUnitList.class.php
index fe203de3..5e7185cc 100644
--- a/template/app/control/admin/SystemUnitList.class.php
+++ b/template/app/control/admin/SystemUnitList.class.php
@@ -18,9 +18,6 @@ class SystemUnitList extends TStandardList
protected $deleteButton;
protected $transformCallback;
- // trait com onReload, onSearch, onDelete...
- use Adianti\Base\AdiantiStandardListTrait;
-
/**
* Page constructor
*/
@@ -55,7 +52,6 @@ public function __construct()
// add the search form actions
$btn = $this->form->addAction(_t('Find'), new TAction(array($this, 'onSearch')), 'fa:search');
$btn->class = 'btn btn-sm btn-primary';
- $this->form->addActionLink(_t('Clear'), new TAction([$this, 'clear']), 'fa:eraser red');
$this->form->addAction(_t('New'), new TAction(array('SystemUnitForm', 'onEdit')), 'fa:plus green');
// creates a DataGrid
@@ -121,14 +117,4 @@ public function __construct()
parent::add($container);
}
-
- /**
- * Clear filters
- */
- public function clear()
- {
- $this->clearFilters();
- $this->onReload();
- }
-
-}
\ No newline at end of file
+}
diff --git a/template/app/control/admin/SystemUserForm.class.php b/template/app/control/admin/SystemUserForm.class.php
index 1b29a4e5..39e99c4b 100644
--- a/template/app/control/admin/SystemUserForm.class.php
+++ b/template/app/control/admin/SystemUserForm.class.php
@@ -89,20 +89,20 @@ function __construct()
$this->form->addFields( [new TFormSeparator(_t('Groups'))] );
$this->form->addFields( [$groups] );
- $search = new TEntry('search');
- $search->placeholder = _t('Search');
- $search->style = 'width:50%;margin-left: 4px; border-radius: 4px';
-
$this->program_list = new TCheckList('program_list');
$this->program_list->setIdColumn('id');
$this->program_list->addColumn('id', 'ID', 'center', '10%');
- $this->program_list->addColumn('name', _t('Name') . $search->getContents(), 'left', '40%');
- $col_program = $this->program_list->addColumn('controller', _t('Menu path'), 'left', '30%');
- $this->program_list->addColumn('controller', _t('Controller'), 'left', '20%');
+ $col_name = $this->program_list->addColumn('name', _t('Name'), 'left', '50%');
+ $col_program = $this->program_list->addColumn('controller', _t('Menu path'), 'left', '40%');
$col_program->enableAutoHide(500);
$this->program_list->setHeight(150);
$this->program_list->makeScrollable();
+ $col_name->enableSearch();
+ $search_name = $col_name->getInputSearch();
+ $search_name->placeholder = _t('Search');
+ $search_name->style = 'width:50%;margin-left: 4px; border-radius: 4px';
+
$col_program->setTransformer( function($value, $object, $row) {
$menuparser = new TMenuParser('menu.xml');
$paths = $menuparser->getPath($value);
@@ -113,8 +113,6 @@ function __construct()
}
});
- $this->program_list->enableSearch($search, 'name');
-
$this->form->addFields( [new TFormSeparator(_t('Programs'))] );
$this->form->addFields( [$this->program_list] );
diff --git a/template/app/control/admin/SystemUserList.class.php b/template/app/control/admin/SystemUserList.class.php
index cbbe179d..9b4525d2 100644
--- a/template/app/control/admin/SystemUserList.class.php
+++ b/template/app/control/admin/SystemUserList.class.php
@@ -18,9 +18,6 @@ class SystemUserList extends TStandardList
protected $deleteButton;
protected $transformCallback;
- // trait com onReload, onSearch, onDelete...
- use Adianti\Base\AdiantiStandardListTrait;
-
/**
* Page constructor
*/
@@ -66,7 +63,6 @@ public function __construct()
// add the search form actions
$btn = $this->form->addAction(_t('Find'), new TAction(array($this, 'onSearch')), 'fa:search');
$btn->class = 'btn btn-sm btn-primary';
- $this->form->addActionLink(_t('Clear'), new TAction([$this, 'clear']), 'fa:eraser red');
$this->form->addAction(_t('New'), new TAction(array('SystemUserForm', 'onEdit')), 'fa:plus green');
// creates a DataGrid
@@ -262,13 +258,4 @@ public function onImpersonation($param)
TTransaction::rollback();
}
}
-
- /**
- * Clear filters
- */
- public function clear()
- {
- $this->clearFilters();
- $this->onReload();
- }
}
diff --git a/template/app/database/log.db b/template/app/database/log.db
index 8dbf3001..905bfe9a 100644
Binary files a/template/app/database/log.db and b/template/app/database/log.db differ
diff --git a/template/app/lib/include/application.js b/template/app/lib/include/application.js
index f820d75d..81019fea 100644
--- a/template/app/lib/include/application.js
+++ b/template/app/lib/include/application.js
@@ -1,5 +1,18 @@
loading = true;
+Application = {};
+Application.translation = {
+ 'en' : {
+ 'loading' : 'Loading'
+ },
+ 'pt' : {
+ 'loading' : 'Carregando'
+ },
+ 'es' : {
+ 'loading' : 'Cargando'
+ }
+};
+
Adianti.onClearDOM = function(){
/* $(".select2-hidden-accessible").remove(); */
$(".colorpicker-hidden").remove();
@@ -13,11 +26,12 @@ Adianti.onClearDOM = function(){
$("#window-resizer-tooltip").remove();
};
+
function showLoading()
{
if(loading)
{
- __adianti_block_ui('Carregando');
+ __adianti_block_ui(Application.translation[Adianti.language]['loading']);
}
}
@@ -33,7 +47,7 @@ Adianti.onBeforeLoad = function(url)
Adianti.onAfterLoad = function(url, data)
{
loading = false;
- __adianti_unblock_ui();
+ __adianti_unblock_ui( true );
};
// set select2 language
diff --git a/template/app/lib/util/AdiantiRouteTranslator.php b/template/app/lib/util/AdiantiRouteTranslator.php
index 2aeac294..3e1f5e0d 100644
--- a/template/app/lib/util/AdiantiRouteTranslator.php
+++ b/template/app/lib/util/AdiantiRouteTranslator.php
@@ -85,7 +85,9 @@ public static function parseHtAccess()
$rules = file('.htaccess');
foreach ($rules as $rule)
{
+ $rule = preg_replace('/\s+/', ' ',$rule);
$rule_parts = explode(' ', $rule);
+
if ($rule_parts[0] == 'RewriteRule')
{
$source = $rule_parts[1];
diff --git a/template/app/resources/styles-print.html b/template/app/resources/styles-print.html
index bdadc595..6b5bf88c 100644
--- a/template/app/resources/styles-print.html
+++ b/template/app/resources/styles-print.html
@@ -1,6 +1,6 @@
-
-
-
+
+
+