* [task#133225,doing,1h] compatible pop-ups.

This commit is contained in:
tianshujie
2024-12-30 09:51:11 +08:00
committed by 刘刚
parent be0fcfacee
commit c02ed6b0ca
3 changed files with 8 additions and 15 deletions
-1
View File
@@ -1210,7 +1210,6 @@ class project extends control
$execution = $this->execution->getByID($executionID);
if($executionID) $this->execution->manageMembers($execution, $members);
}
return $this->send(array('message' => $this->lang->saveSuccess, 'result' => 'success', 'load' => $this->createLink('project', 'team', "projectID=$projectID")));
}
+6 -4
View File
@@ -87,7 +87,7 @@ window.setDeptUsers = function(e)
{
const dept = $(e.target).val(); // Get dept ID.
const link = $.createLink('project', 'manageMembers', 'projectID=' + projectID + '&dept=' + dept + '&copyProjectID=' + copyProjectID); // Create manageMembers link.
loadPage(link);
isInModal ? loadModal(link) : loadPage(link);
}
/**
@@ -102,7 +102,7 @@ function choseTeam2Copy(e)
const copyProjectID = $(e.target).val();
const dept = $('input[name=dept]').val();
const link = $.createLink('project', 'manageMembers', 'projectID=' + projectID + '&dept=' + dept + '&copyProjectID=' + copyProjectID);
loadPage(link);
isInModal ? loadModal(link) : loadPage(link);
}
window.changeProjectMembers = function()
@@ -126,7 +126,8 @@ window.changeProjectMembers = function()
if(!isDeleted)
{
const formData = new FormData($("#teamForm")[0]);
$.ajaxSubmit({url: $('#teamForm').attr('action'), data: formData});
const options = isInModal ? {url: $('#teamForm').attr('action'), data: formData, callback: `renderTaskAssignedTo(${projectID})`, 'load': false, 'closeModal': true} : {url: $('#teamForm').attr('action'), data: formData};
$.ajaxSubmit(options);
}
else
{
@@ -136,7 +137,8 @@ window.changeProjectMembers = function()
{
$('#removeExecution').val('yes');
const formData = new FormData($("#teamForm")[0]);
$.ajaxSubmit({url: $('#teamForm').attr('action'), data: formData});
const options = isInModal ? {url: $('#teamForm').attr('action'), data: formData, callback: `renderTaskAssignedTo(${projectID})`, 'load': false, 'closeModal': true} : {url: $('#teamForm').attr('action'), data: formData};
$.ajaxSubmit(options);
}
});
}
+2 -10
View File
@@ -17,6 +17,7 @@ jsVar('copyProjectID', $copyProjectID);
jsVar('oldAccountList', array_keys($currentMembers));
jsVar('unlinkExecutionMembers', $lang->project->unlinkExecutionMembers);
jsVar('executionMembers', array_values($executionMembers));
jsVar('isInModal', isInModal());
/* zin: Define the set::module('team') feature bar on main menu. */
$copyTeamBox = '';
@@ -232,6 +233,7 @@ div
(
setClass('main-form'),
set::id('teamForm'),
commonModel::isTutorialMode() ? null : set::ajax(array('beforeSubmit' => jsRaw("changeProjectMembers"))),
h::table
(
set::className('table table-form'),
@@ -282,16 +284,6 @@ div
)
)
),
set::actions(array(
array(
'id' => 'saveButton',
'text' => $lang->save,
'type' => 'primary',
'btnType' => 'button',
'onclick' => commonModel::isTutorialMode() ? '' : 'changeProjectMembers()'
),
'cancel'
))
)
);