Merge remote-tracking branch 'origin/support/2.7' into develop

This commit is contained in:
Pierre Goiffon
2020-09-14 14:27:18 +02:00
3 changed files with 25 additions and 13 deletions

View File

@@ -846,13 +846,17 @@ abstract class DBObject implements iDisplay
}
/**
* @see \DBObject::ListPreviousValuesForUpdatedAttributes() to get previous values anywhere in the CRUD stack
* @see https://wiki.combodo.com/doku.php?id=latest:customization:sequence_crud iTop CRUD stack documentation
*
* @param string $sAttCode
*
* @return mixed|null the value as it was before changed with {@see DBObject::Set()}.
* Returns null if the attribute wasn't changed.
* Values are reset during {@see DBObject::DBUpdate()}
*
* @see DBObject::$m_aOrigValues
* @throws CoreException if the attribute is unknown for the current object
* @uses DBObject::$m_aOrigValues
*/
public function GetOriginal($sAttCode)
{
@@ -2365,14 +2369,16 @@ abstract class DBObject implements iDisplay
return $aDelta;
}
/**
* @api
* @api-advanced
*
* @return array attname => currentvalue List the attributes that have been changed using {@see DBObject::Set()}. Reset during {@see DBObject::DBUpdate()}
* @uses m_aCurrValues
* @see \DBObject::ListPreviousValuesForUpdatedAttributes()
* @throws Exception
/**
* @api
* @api-advanced
*
* @see \DBObject::ListPreviousValuesForUpdatedAttributes() to get previous values anywhere in the CRUD stack
* @see https://wiki.combodo.com/doku.php?id=latest:customization:sequence_crud iTop CRUD stack documentation
* @return array attname => currentvalue List the attributes that have been changed using {@see DBObject::Set()}.
* Reset during {@see DBObject::DBUpdate()}
* @throws Exception
* @uses m_aCurrValues
*/
public function ListChanges()
{
@@ -2392,10 +2398,10 @@ abstract class DBObject implements iDisplay
*
* To get values that were set to the changed fields, simply use {@link \DBObject::Get()}
*
* @see \DBObject::ListChanges() old method, but using data that are reset during DBObject::DBUpdate
* @return array attname => value : value that was present before the last {@see DBObject::Set()} call.
* This array is set at the beginning of {@see DBObject::DBpdate()} using {@see DBObject::InitPreviousValuesForUpdatedAttributes()}.
* @uses m_aPreviousValuesForUpdatedAttributes
* @see \DBObject::ListChanges()
* @since 2.7.0 N°2293
*/
public function ListPreviousValuesForUpdatedAttributes()

View File

@@ -231,6 +231,8 @@
css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
if (opts.onOverlayClick)
opts.overlayCSS.cursor = 'pointer';
if (opts.enableValidation)
opts.overlayCSS.cursor = 'not-allowed';
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
msg = msg === undefined ? opts.message : msg;
@@ -292,7 +294,12 @@
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
}
else {
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
if (opts.enableValidation) {
s = '<div class="blockUI blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
}
else{
s = '<div class="blockUI '+opts.blockMsgClass+' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
}
}
lyr3 = $(s);

View File

@@ -388,13 +388,12 @@ function ToggleField(value, field_id) {
*/
function BlockField(field_id, bBlocked) {
if (bBlocked) {
$('#'+field_id).block({message: ' ** disabled ** '});
$('#'+field_id).block({message: ' ** disabled ** ', enableValidation : true});
}
else {
$('#'+field_id).unblock();
}
}
/**
* Updates (enables/disables) a "duration" field
*/