mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 15:52:24 +02:00
(retrofit from trunk) N. 533: when reloading the ticket form (due to an alternate initial state path)
1) the value of some controls (non-text inputs in n:n links) was not preserved, 2) popup dialogs and CKEditor instances were not properly destroyed and re-created. SVN:2.3[4516]
This commit is contained in:
@@ -16,6 +16,11 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH
|
|||||||
$('#linkedset_'+this.id+' .selection').each( function() { this.checked = false; });
|
$('#linkedset_'+this.id+' .selection').each( function() { this.checked = false; });
|
||||||
$('#'+this.id+'_btnRemove').attr('disabled','disabled');
|
$('#'+this.id+'_btnRemove').attr('disabled','disabled');
|
||||||
$('#'+this.id+'_linksToRemove').val('');
|
$('#'+this.id+'_linksToRemove').val('');
|
||||||
|
|
||||||
|
$('#linkedset_'+me.id).on('remove', function() {
|
||||||
|
// prevent having the dlg div twice
|
||||||
|
$('#dlg_'+me.id).remove();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.RemoveSelected = function()
|
this.RemoveSelected = function()
|
||||||
@@ -294,7 +299,7 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH
|
|||||||
|
|
||||||
this.GetUpdatedValue = function()
|
this.GetUpdatedValue = function()
|
||||||
{
|
{
|
||||||
var sSelector = '#linkedset_'+me.id+' input[name^=attr_'+me.id+']';
|
var sSelector = '#linkedset_'+me.id+' :input[name^=attr_'+me.id+']';
|
||||||
var aIndexes = [];
|
var aIndexes = [];
|
||||||
var aValues = [];
|
var aValues = [];
|
||||||
$(sSelector).each(function() {
|
$(sSelector).each(function() {
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ function WizardHelper(sClass, sFormPrefix, sState)
|
|||||||
$('#'+sFormId).find('.htmlEditor').each(function() {
|
$('#'+sFormId).find('.htmlEditor').each(function() {
|
||||||
var sId = $(this).attr('id');
|
var sId = $(this).attr('id');
|
||||||
var editorInst = CKEDITOR.instances[sId];
|
var editorInst = CKEDITOR.instances[sId];
|
||||||
if (editorInst)
|
if (editorInst.status == 'ready')
|
||||||
{
|
{
|
||||||
editorInst.destroy(true);
|
editorInst.destroy(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user