|
|
@@ -3810,14 +3810,13 @@ $('#share-confirm').click(function(){
|
|
|
$('#shareToInfo').height(tbodyTotalHeight);
|
|
|
$('#shareToInfo').append($tr);
|
|
|
//更新缓存
|
|
|
- // if (shareSeleted.data.shareInfo.length === 0) {
|
|
|
- shareSeleted.data.shareInfo = shareSeleted.data.shareInfo.concat(shareData);
|
|
|
- let sheet = projTreeObj.workBook.getSheet(0);
|
|
|
- projTreeObj.renderSheetFuc(sheet, function () {
|
|
|
- sheet.invalidateLayout();
|
|
|
- sheet.repaint();
|
|
|
- });
|
|
|
- // }
|
|
|
+ shareSeleted.data.shareInfo = shareSeleted.data.shareInfo.concat(shareData);
|
|
|
+ let sheet = projTreeObj.workBook.getSheet(0);
|
|
|
+ projTreeObj.renderSheetFuc(sheet, function () {
|
|
|
+ sheet.invalidateLayout();
|
|
|
+ sheet.repaint();
|
|
|
+ });
|
|
|
+ bindCancelShareCheck(shareSeleted);
|
|
|
$.bootstrapLoading.end();
|
|
|
$('#shareFindDiv').hide();
|
|
|
$('#share-confirm').addClass('disabled');
|
|
|
@@ -3826,16 +3825,6 @@ $('#share-confirm').click(function(){
|
|
|
$('#share-confirm').removeClass('disabled');
|
|
|
});
|
|
|
});
|
|
|
-//允许拷贝
|
|
|
-/*$('#allowCopy').change(function () {
|
|
|
- let checked = $(this).prop('checked');
|
|
|
- if(checked){
|
|
|
- $('#allowCopyHint').show();
|
|
|
- }
|
|
|
- else{
|
|
|
- $('#allowCopyHint').hide();
|
|
|
- }
|
|
|
-});*/
|
|
|
|
|
|
//批量替换文件,切换建设项目
|
|
|
$('#otherProject').change(function(){
|
|
|
@@ -3916,6 +3905,28 @@ function setShareToModal(selected){
|
|
|
$('#shareToInfo').height(tbodyTotalHeight);
|
|
|
let infoHtml = infoArr.join('');
|
|
|
$('#shareToInfo').html(infoHtml);
|
|
|
+ bindCancelShareCheck(selected);
|
|
|
+ });
|
|
|
+}
|
|
|
+//取消分享的勾选操作
|
|
|
+//@param {Object}selected(选中项目节点) @return {void}
|
|
|
+function bindCancelShareCheck(selected) {
|
|
|
+ $('#shareToInfo input[value="cancelShare"]').unbind('click');
|
|
|
+ $('#shareToInfo input[value="cancelShare"]').click(function () {
|
|
|
+ let index = $(this).parent().parent().index() - 1,
|
|
|
+ $coo = $(this).parent().prev().children(),
|
|
|
+ $copy = $(this).parent().prev().prev().children();
|
|
|
+ let isCancel = $(this).prop('checked');
|
|
|
+ if (isCancel) {//取消分享,取消拷贝、协作勾选
|
|
|
+ $coo.prop('checked', false);
|
|
|
+ $copy.prop('checked', false);
|
|
|
+ } else {//取消取消分享,恢复原本的拷贝、协作勾选状态
|
|
|
+ let shareData = selected.data.shareInfo[index];
|
|
|
+ if (shareData) {
|
|
|
+ $coo.prop('checked', shareData.allowCooperate);
|
|
|
+ $copy.prop('checked', shareData.allowCopy);
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
//更新项目分享信息
|