Skip to content

Commit

Permalink
🔨 #12 update to adianit 7.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
reinaldo.junior committed Jun 7, 2020
1 parent e8bdb01 commit ab445b2
Show file tree
Hide file tree
Showing 70 changed files with 546 additions and 283 deletions.
28 changes: 12 additions & 16 deletions template/app/control/admin/SystemGroupForm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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') );
Expand Down
13 changes: 0 additions & 13 deletions template/app/control/admin/SystemGroupList.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ class SystemGroupList extends TStandardList
protected $deleteButton;
protected $transformCallback;

// trait com onReload, onSearch, onDelete...
use Adianti\Base\AdiantiStandardListTrait;

/**
* Page constructor
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -159,13 +155,4 @@ public function onClone($param)
TTransaction::rollback();
}
}

/**
* Clear filters
*/
public function clear()
{
$this->clearFilters();
$this->onReload();
}
}
13 changes: 0 additions & 13 deletions template/app/control/admin/SystemProgramList.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ class SystemProgramList extends TStandardList
protected $deleteButton;
protected $transformCallback;

// trait com onReload, onSearch, onDelete...
use Adianti\Base\AdiantiStandardListTrait;

/**
* Page constructor
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();
}
}
16 changes: 1 addition & 15 deletions template/app/control/admin/SystemUnitList.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ class SystemUnitList extends TStandardList
protected $deleteButton;
protected $transformCallback;

// trait com onReload, onSearch, onDelete...
use Adianti\Base\AdiantiStandardListTrait;

/**
* Page constructor
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -121,14 +117,4 @@ public function __construct()

parent::add($container);
}

/**
* Clear filters
*/
public function clear()
{
$this->clearFilters();
$this->onReload();
}

}
}
16 changes: 7 additions & 9 deletions template/app/control/admin/SystemUserForm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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] );

Expand Down
13 changes: 0 additions & 13 deletions template/app/control/admin/SystemUserList.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ class SystemUserList extends TStandardList
protected $deleteButton;
protected $transformCallback;

// trait com onReload, onSearch, onDelete...
use Adianti\Base\AdiantiStandardListTrait;

/**
* Page constructor
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -262,13 +258,4 @@ public function onImpersonation($param)
TTransaction::rollback();
}
}

/**
* Clear filters
*/
public function clear()
{
$this->clearFilters();
$this->onReload();
}
}
Binary file modified template/app/database/log.db
Binary file not shown.
18 changes: 16 additions & 2 deletions template/app/lib/include/application.js
Original file line number Diff line number Diff line change
@@ -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();
Expand All @@ -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']);
}
}

Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions template/app/lib/util/AdiantiRouteTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
6 changes: 3 additions & 3 deletions template/app/resources/styles-print.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<link href="lib/bootstrap/css/bootstrap-print.min.css?afver=701b" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/adianti/include/adianti.min.css?afver=701" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/adianti/include/components.min.css?afver=701" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/bootstrap/css/bootstrap-print.min.css?afver=702b" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/adianti/include/adianti.min.css?afver=702" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/adianti/include/components.min.css?afver=702" rel="stylesheet" type="text/css" media="screen" />

<style>
.col-sm-6 {
Expand Down
4 changes: 3 additions & 1 deletion template/app/service/log/SystemSqlLogService.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public function write($message)
// avoid log of log
if ($dbname !== 'log' AND (in_array(substr($message,0,6), array('INSERT', 'UPDATE', 'DELETE') ) ) )
{
$time = date("Y-m-d H:i:s");
$info = TTransaction::getDatabaseInfo();
$date_mask = (in_array($info['type'], ['sqlsrv', 'dblib', 'mssql'])) ? 'Ymd H:i:s' : 'Y-m-d H:i:s';
$time = date($date_mask);

if ($open_transaction)
{
Expand Down
6 changes: 3 additions & 3 deletions template/app/templates/theme3/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Adianti Template III</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="manifest" href="manifest.json?appver=701">
<link rel="manifest" href="manifest.json?appver=702">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="apple-touch-icon" sizes="180x180" href="app/images/icon.png">
Expand All @@ -14,8 +14,8 @@
{LIBRARIES}
{HEAD}

<script src="app/lib/include/admin-all.min.js?appver=701" type="text/javascript"></script>
<link href="app/lib/include/admin.min.css?appver=701" rel="stylesheet" type="text/css" media="screen">
<script src="app/lib/include/admin-all.min.js?appver=702" type="text/javascript"></script>
<link href="app/lib/include/admin.min.css?appver=702" rel="stylesheet" type="text/css" media="screen">

<link href="app/templates/{template}/css/AdminLTE.min.css" rel="stylesheet" type="text/css" media="screen">
<link href="app/templates/{template}/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" media="screen">
Expand Down
44 changes: 22 additions & 22 deletions template/app/templates/theme3/libraries.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@

<!-- Third part libraries required by Adianti Framework -->
<script src="lib/jquery/js/jquery.min.js?afver=701" type="text/javascript"></script>
<script src="lib/bootstrap/js/bootstrap.bundle.min.js?afver=701"></script>
<script src="lib/bootstrap/js/bootstrap-plugins.min.js?afver=701" type="text/javascript"></script>
<script src="lib/bootstrap/js/locales/bootstrap-datepicker.pt.js?afver=701" type="text/javascript"></script>
<script src="lib/bootstrap/js/locales/bootstrap-datetimepicker.pt.js?afver=701" type="text/javascript"></script>
<script src="lib/bootstrap/js/lang/summernote-pt-BR.min.js?afver=701" type="text/javascript"></script>
<script src="lib/jquery/js/jquery-ui.min.js?afver=701" type="text/javascript"></script>
<script src="lib/jquery/js/jquery-plugins.min.js?afver=701" type="text/javascript"></script>
<script src="lib/jquery/js/select2_locale_pt.js?afver=701" type="text/javascript"></script>
<script src="lib/independent/js/independent-plugins.min.js?afver=701" type="text/javascript"></script>
<script src="lib/independent/js/fullcalendar-pt.js?afver=701" type="text/javascript"></script>
<script src="lib/jquery/js/jquery.min.js?afver=702" type="text/javascript"></script>
<script src="lib/bootstrap/js/bootstrap.bundle.min.js?afver=702"></script>
<script src="lib/bootstrap/js/bootstrap-plugins.min.js?afver=702" type="text/javascript"></script>
<script src="lib/bootstrap/js/locales/bootstrap-datepicker.pt.js?afver=702" type="text/javascript"></script>
<script src="lib/bootstrap/js/locales/bootstrap-datetimepicker.pt.js?afver=702" type="text/javascript"></script>
<script src="lib/bootstrap/js/lang/summernote-pt-BR.min.js?afver=702" type="text/javascript"></script>
<script src="lib/jquery/js/jquery-ui.min.js?afver=702" type="text/javascript"></script>
<script src="lib/jquery/js/jquery-plugins.min.js?afver=702" type="text/javascript"></script>
<script src="lib/jquery/js/select2_locale_pt.js?afver=702" type="text/javascript"></script>
<script src="lib/independent/js/independent-plugins.min.js?afver=702" type="text/javascript"></script>
<script src="lib/independent/js/fullcalendar-pt.js?afver=702" type="text/javascript"></script>

<!-- Adianti Framework core and components -->
<script src="lib/adianti/include/adianti.min.js?afver=701" type="text/javascript"></script>
<script src="lib/adianti/include/components.min.js?afver=701" type="text/javascript"></script>
<script src="lib/adianti/include/adianti.min.js?afver=702" type="text/javascript"></script>
<script src="lib/adianti/include/components.min.js?afver=702" type="text/javascript"></script>

<!-- Application custom Javascript (Optional) -->
<script src="app/lib/include/application.js?appver=701" type="text/javascript"></script>
<script src="app/lib/include/application.js?appver=702" type="text/javascript"></script>

<!-- Third part CSS required by Adianti Framework -->
<link href="lib/jquery/css/jquery-ui.min.css?afver=701" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/jquery/css/jquery-plugins.min.css?afver=701" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/bootstrap/css/bootstrap.min.css?afver=701" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/bootstrap/css/boostrap-plugins.min.css?afver=701" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/independent/css/independent-plugins.min.css?afver=701" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/jquery/css/jquery-ui.min.css?afver=702" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/jquery/css/jquery-plugins.min.css?afver=702" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/bootstrap/css/bootstrap.min.css?afver=702" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/bootstrap/css/boostrap-plugins.min.css?afver=702" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/independent/css/independent-plugins.min.css?afver=702" rel="stylesheet" type="text/css" media="screen" />

<!-- Adianti Framework Components CSS -->
<link href="lib/adianti/include/adianti.min.css?afver=701" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/adianti/include/components.min.css?afver=701" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/adianti/include/adianti.min.css?afver=702" rel="stylesheet" type="text/css" media="screen" />
<link href="lib/adianti/include/components.min.css?afver=702" rel="stylesheet" type="text/css" media="screen" />

<!-- Application custom CSS -->
<link href="app/templates/{template}/application.css?appver=701" rel="stylesheet" type="text/css" media="screen">
<link href="app/templates/{template}/application.css?appver=702" rel="stylesheet" type="text/css" media="screen">
6 changes: 3 additions & 3 deletions template/app/templates/theme3/public.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Adianti Template III</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="manifest" href="manifest.json?appver=701">
<link rel="manifest" href="manifest.json?appver=702">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="apple-touch-icon" sizes="180x180" href="app/images/icon.png">
Expand All @@ -14,8 +14,8 @@
{LIBRARIES}
{HEAD}

<script src="app/lib/include/admin-all.min.js?appver=701" type="text/javascript"></script>
<link href="app/lib/include/admin.min.css?appver=701" rel="stylesheet" type="text/css" media="screen">
<script src="app/lib/include/admin-all.min.js?appver=702" type="text/javascript"></script>
<link href="app/lib/include/admin.min.css?appver=702" rel="stylesheet" type="text/css" media="screen">

<link href="app/templates/{template}/css/AdminLTE.min.css" rel="stylesheet" type="text/css" media="screen">
<link href="app/templates/{template}/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" media="screen">
Expand Down
Loading

0 comments on commit ab445b2

Please sign in to comment.