Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Pierre Goiffon
2019-07-01 17:30:21 +02:00
35 changed files with 81 additions and 49 deletions

View File

@@ -2,7 +2,7 @@
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'itop-portal-base/'.ITOP_VERSION,
'itop-portal-base/2.6.2',
array(
// Identification
'label' => 'Portal Development Library',

View File

@@ -815,7 +815,7 @@ class ObjectFormManager extends FormManager
}
}
// - BlobField
if (in_array(get_class($oField), array('Combodo\\iTop\\Form\\Field\\BlobField')))
if (in_array(get_class($oField), array('Combodo\\iTop\\Form\\Field\\BlobField', 'Combodo\\iTop\\Form\\Field\\ImageField')))
{
// - Overriding attributes to display
if ($this->oApp !== null)

View File

@@ -2,18 +2,20 @@
* Patches for bootstrap 3 as it is no longer maintained by its editor
*/
//N°2166: Fix a boostrap/CKeditor incompatibility with their respective modals (source: https://stackoverflow.com/a/23667151)
$.fn.modal.Constructor.prototype.enforceFocus = function () {
var $modalElement = this.$element;
$(document).on('focusin.modal', function (e) {
var $parent = $(e.target.parentNode);
if ($modalElement[0] !== e.target && !$modalElement.has(e.target).length
// add whatever conditions you need here:
&&
!$parent.hasClass('cke_dialog_ui_input_select') && !$parent.hasClass('cke_dialog_ui_input_text')) {
$modalElement.focus()
}
})
//N°2166: Fix a boostrap/CKeditor incompatibility with their respective modals (source: https://stackoverflow.com/a/31679096)
$.fn.modal.Constructor.prototype.enforceFocus = function() {
$( document )
.off( 'focusin.bs.modal' ) // guard against infinite focus loop
.on( 'focusin.bs.modal', $.proxy( function( e ) {
if (
this.$element[ 0 ] !== e.target && !this.$element.has( e.target ).length
// CKEditor compatibility fix start.
&& !$( e.target ).closest( '.cke_dialog, .cke' ).length
// CKEditor compatibility fix end.
) {
this.$element.trigger( 'focus' );
}
}, this ) );
};
// Hack to enable multiple modals by making sure the .modal-open class is set to the <body> when there is at least one modal open left