Merge branch 'support/3.0' into develop

This commit is contained in:
Stephen Abello
2022-08-10 14:09:50 +02:00
12 changed files with 71 additions and 17 deletions

View File

@@ -1207,6 +1207,7 @@ JS
$sTitle = Dict::Format($sFormat, $iTotalCount);
$oBlock = PanelUIBlockFactory::MakeForClass($aExtraParams["panel_class"], $aExtraParams["panel_title"]);
$oBlock->AddSubTitleBlock(new Html($sTitle));
$oBlock->AddCSSClass('ibo-datatable-panel');
if(isset($aExtraParams["panel_icon"]) && strlen($aExtraParams["panel_icon"]) > 0){
$oBlock->SetIcon($aExtraParams["panel_icon"]);
}

View File

@@ -125,4 +125,23 @@ $ibo-fieldsorter--selected--background-color: $ibo-color-blue-200 !default;
.ibo-datatable--selected-count, .ibo-datatable--result-count{
padding-right: 0.2em;
padding-left: 0.1em;
}
//
.ibo-datatable[data-status="loading"]{
margin-top: $ibo-datatable--toolbar--table-spacing;
td, th {
position: relative;
padding: $ibo-vendors-datatables--cell--padding-y $ibo-vendors-datatables--cell--padding-x;
}
td{
@extend %ibo-font-ral-med-100;
}
tr:nth-child(even){
background-color: $ibo-vendors-datatables--row--background-color--is-even;
}
th {
@extend %ibo-font-ral-sembol-100;
border-bottom: $ibo-vendors-datatables--columns-header--border-bottom;
}
}

View File

@@ -42,26 +42,26 @@ $ibo-vendors-datatables--row-highlight--first-cell--width: 3px !default;
$ibo-vendors-datatables--row-highlight--colors:(
'red': ($ibo-color-red-100),
'danger': ($ibo-color-red-200),
'danger': ($ibo-color-danger-200),
'alert': ($ibo-color-red-200),
'orange': ($ibo-color-orange-100),
'warning': ($ibo-color-orange-200),
'warning': ($ibo-color-warning-200),
'blue': ($ibo-color-blue-200),
'info': ($ibo-color-blue-200),
'info': ($ibo-color-information-200),
'green': ($ibo-color-green-100),
'success': ($ibo-color-green-200),
'success': ($ibo-color-success-200),
) !default;
$ibo-vendors-datatables--row-highlight--first-cell--colors:(
'red': ($ibo-color-red-300),
'danger': ($ibo-color-red-400),
'danger': ($ibo-color-danger-400),
'alert': ($ibo-color-red-400),
'orange': ($ibo-color-orange-300),
'warning': ($ibo-color-orange-400),
'warning': ($ibo-color-warning-400),
'blue': ($ibo-color-blue-400),
'info': ($ibo-color-blue-400),
'info': ($ibo-color-information-400),
'green': ($ibo-color-green-300),
'success': ($ibo-color-green-300),
'success': ($ibo-color-success-300),
) !default;
.dataTables_paginate {

View File

@@ -77,6 +77,7 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
'iTopUpdate:UI:CanCoreUpdate:No' => 'La aplicación no puede ser actualizada: %1$s',
'iTopUpdate:UI:CanCoreUpdate:Warning' => 'Advertencia: la actualización de la aplicación puede fallar: %1$s',
'iTopUpdate:UI:CannotUpdateUseSetup' => 'Debe usar <a href="%1$s">setup</a> para actualizar la aplicación.<br />Algunos archivos modificados fueron detectados, una actualización parcial no puede ser realizada.',
'iTopUpdate:UI:CheckInProgress' => 'Please wait during integrity check~~',
// Setup Messages
'iTopUpdate:UI:SetupMessage:Ready' => 'Listo para empezar',

View File

@@ -140,7 +140,8 @@ JS
//////////////////////////////////////////////////////////////////////////
$oFavoriteOrganizationsBlock = new Panel(Dict::S('UI:FavoriteOrganizations'), array(), 'grey', 'ibo-favorite-organizations');
$oFavoriteOrganizationsBlock->AddHtml(Dict::S('UI:FavoriteOrganizations+'));
$oFavoriteOrganizationsBlock->SetSubTitle(Dict::S('UI:FavoriteOrganizations+'));
$oFavoriteOrganizationsBlock->AddCSSClass('ibo-datatable-panel');
$oFavoriteOrganizationsForm = new Form();
$oFavoriteOrganizationsBlock->AddSubBlock($oFavoriteOrganizationsForm);
// Favorite organizations: the organizations listed in the drop-down menu
@@ -194,6 +195,8 @@ JS
//////////////////////////////////////////////////////////////////////////
$oShortcutsBlock = new BlockShortcuts(Dict::S('Menu:MyShortcuts'), array(), 'grey', 'ibo-shortcuts');
$oShortcutsBlock->AddCSSClass('ibo-datatable-panel');
$oShortcutsBlock->sIdShortcuts = 'shortcut_list';
$oShortcutsFilter = new DBObjectSearch('Shortcut');
$oShortcutsFilter->AddCondition('user_id', UserRights::GetUserId(), '=');

View File

@@ -12,7 +12,7 @@
{% endif %}
{% endif %}
<table id="{{ oUIBlock.GetId() }}" width="100%" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}" data-role="ibo-datatable">
<table id="{{ oUIBlock.GetId() }}" width="100%" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} {% if oUIBlock.IsHidden() %}ibo-is-hidden{% endif %}" data-role="ibo-datatable" data-status="loading">
<thead>
{% if oUIBlock.GetOption("select_mode") is not empty %}
<th></th>

View File

@@ -350,6 +350,10 @@ var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
{% endfor %}
{% endif %}
{% endif %}
// Set header and body datatables status as loaded
this.attr('data-status', 'loaded');
this.closest('.dataTables_scroll').find('.dataTables_scrollHead .ibo-datatable').attr('data-status', 'loaded');
}
});

View File

@@ -4,7 +4,7 @@
<input type="hidden" name="attr_{{ oUIBlock.GetRef() }}" value="">
{% set columns = oUIBlock.GetColumns() %}
<table id="{{ oUIBlock.GetId() }}" width="100%" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} listResults{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" data-role="ibo-datatable">
<table id="{{ oUIBlock.GetId() }}" width="100%" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} listResults{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" data-role="ibo-datatable" data-status="loading">
<thead>
<tr>
{% for column in columns %}

View File

@@ -57,6 +57,10 @@ var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
{
this.closest('.dataTables_wrapper').find('.dataTables_length').hide();
}
// Set header and body datatables status as loaded
this.attr('data-status', 'loaded');
this.closest('.dataTables_scroll').find('.dataTables_scrollHead .ibo-datatable').attr('data-status', 'loaded');
},
});

View File

@@ -2,7 +2,7 @@
{# @license http://opensource.org/licenses/AGPL-3.0 #}
{% set columns = oUIBlock.GetColumns() %}
<table id="{{ oUIBlock.GetId() }}" width="100%" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} listResults{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" data-role="ibo-datatable">
<table id="{{ oUIBlock.GetId() }}" width="100%" class="{{ oUIBlock.GetBlocksInheritanceCSSClassesAsString() }} {{ oUIBlock.GetAdditionalCSSClassesAsString() }} listResults{% if oUIBlock.IsHidden() %} ibo-is-hidden{% endif %}" data-role="ibo-datatable" data-status="loading">
<thead>
<tr>
{% for column in columns %}

View File

@@ -86,6 +86,10 @@ var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
{
this.closest('.dataTables_wrapper').find('.dataTables_length').hide();
}
// Set header and body datatables status as loaded
this.attr('data-status', 'loaded');
this.closest('.dataTables_scroll').find('.dataTables_scrollHead .ibo-datatable').attr('data-status', 'loaded');
}
});

View File

@@ -402,11 +402,29 @@ $oPage->AddUiBlock(DataTableUIBlockFactory::MakeForStaticData('Static datatable'
array(
array(
'a' => 'A1', 'b' => 'B1', 'c' => 'C1', 'd' => 'D1'
),array(
), array(
'a' => 'A2', 'b' => 'B2', 'c' => 'C2', 'd' => 'D2'
),
array(
'a' => 'A3', 'b' => 'B3', 'c' => 'C3', 'd' => 'D3'
))));
), array(
'a' => 'A3', 'b' => 'B3', 'c' => 'C3', 'd' => 'D3'
), array(
'a' => 'A4', 'b' => 'B4', 'c' => 'C4', 'd' => 'D4'
),array(
'@class' => 'ibo-is-red','a' => 'A5', 'b' => 'B5', 'c' => 'C5', 'd' => 'D5'
),array(
'@class' => 'ibo-is-danger','a' => 'A6', 'b' => 'B6', 'c' => 'C6', 'd' => 'D6'
),array(
'@class' => 'ibo-is-orange','a' => 'A7', 'b' => 'B7', 'c' => 'C7', 'd' => 'D7'
),array(
'@class' => 'ibo-is-warning','a' => 'A8', 'b' => 'B8', 'c' => 'C8', 'd' => 'D8'
),array(
'@class' => 'ibo-is-blue','a' => 'A9', 'b' => 'B9', 'c' => 'C9', 'd' => 'D9'
),array(
'@class' => 'ibo-is-info','a' => 'A10', 'b' => 'B10', 'c' => 'C10', 'd' => 'D10'
),array(
'@class' => 'ibo-is-green','a' => 'A11', 'b' => 'B11', 'c' => 'C11', 'd' => 'D11'
),array(
'@class' => 'ibo-is-success','a' => 'A12', 'b' => 'B12', 'c' => 'C12', 'd' => 'D12'
),
)));
$oPage->output();