From 3ee191bd66566b654435206d94655e2cbb572d27 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 14 Apr 2023 09:49:37 +0800 Subject: [PATCH] * remove save path when create doc. --- module/doc/control.php | 1 - module/doc/css/create.css | 2 -- module/doc/css/edit.css | 2 -- module/doc/js/common.js | 41 ------------------------- module/doc/js/create.js | 2 -- module/doc/js/edit.js | 3 -- module/doc/view/createtexttype.html.php | 1 - module/doc/view/edittexttype.html.php | 1 - 8 files changed, 53 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index f55e249c5b..9629204ec6 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -395,7 +395,6 @@ class doc extends control $this->action->create('doc', $docID, $actionType, $fileAction); if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $docID)); - $objectID = zget($lib, $lib->type, 0); $params = "docID=" . $docResult['id']; $link = isonlybody() ? 'parent' : $this->createLink('doc', 'view', $params); $response = array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link); diff --git a/module/doc/css/create.css b/module/doc/css/create.css index b1190926be..10ceb9708d 100644 --- a/module/doc/css/create.css +++ b/module/doc/css/create.css @@ -1,10 +1,8 @@ body {overflow: hidden;} -.doc-title {width:400px;} .doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;} .doc-title .form-control:focus {border: unset; box-shadow: unset;} .doc-title input::-webkit-input-placeholder {color: #D8DBDE;} .doc-title.required:after {top: 4px; right: 0; left: 12px; display: inline-table;} -#savePath {display:inline-block; width:320px; overflow:hidden; white-space: nowrap; padding-right:8px; position: relative; top:7px;} #headerBox {border-bottom: 1px solid #e3e3e3;} #headerBox td:last-child {padding-right: 24px;} .contentmarkdown.required:after, .contenthtml.required:after {right:3px;} diff --git a/module/doc/css/edit.css b/module/doc/css/edit.css index fe41bdb93b..cc929ee0b3 100644 --- a/module/doc/css/edit.css +++ b/module/doc/css/edit.css @@ -1,10 +1,8 @@ body {overflow: hidden;} -.doc-title {width:400px;} .doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;} .doc-title .form-control:focus {border: unset; box-shadow: unset;} .doc-title input::-webkit-input-placeholder {color: #D8DBDE;} .doc-title.required:after {top: 4px; right: 0; left: 12px; display: inline-table;} -#savePath {display:inline-block; width:320px; overflow:hidden; white-space: nowrap; height: 19px; padding-top: 4px; padding-right:8px;} .contenthtml.required:after {right:3px;} #headerBox {border-bottom: 1px solid #e3e3e3;} #headerBox td:last-child {padding-right: 24px;} diff --git a/module/doc/js/common.js b/module/doc/js/common.js index f087b145cd..9272c42771 100644 --- a/module/doc/js/common.js +++ b/module/doc/js/common.js @@ -347,47 +347,6 @@ function locateNewLib(type, objectID, libID) location.href = createLink('doc', method, params); } -/** - * Set save path. - * - * @access public - * @return void - */ -function setSavePath() -{ - var getSubPath = function($obj) - { - var $td = $obj.parent(); - var usePicker = $td.find('.picker').length == 1; - var subPath = $obj.find('option:checked').text(); - if(usePicker) subPath = $td.find('.picker .picker-selection-text').text(); - return subPath; - } - - savePath = defaultSave; - if($('#modalBasicInfo #product').length == 1) - { - savePath += getSubPath($('#modalBasicInfo #product')) + '/'; - } - else if($('#modalBasicInfo #project').length == 1 && $('#modalBasicInfo #execution').length == 0) - { - savePath += getSubPath($('#modalBasicInfo #project')) + '/'; - } - else if($('#modalBasicInfo #project').length == 1 && $('#modalBasicInfo #execution').length == 1) - { - var executionID = $('#modalBasicInfo #execution').val(); - if(executionID == '0' || executionID == '') savePath += getSubPath($('#modalBasicInfo #project')) + '/'; - if(executionID != '0' && executionID != '') savePath += getSubPath($('#modalBasicInfo #execution')) + '/'; - } - else if($('#modalBasicInfo #execution').length == 1) - { - savePath += getSubPath($('#modalBasicInfo #execution')) + '/'; - } - savePath += getSubPath($('#modalBasicInfo #module')); - - $('#savePath').html(savePath).attr('title', savePath); -} - /** * Submit form. * diff --git a/module/doc/js/create.js b/module/doc/js/create.js index 68a32ef56a..a25fb96dae 100644 --- a/module/doc/js/create.js +++ b/module/doc/js/create.js @@ -7,7 +7,6 @@ $(function() $('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px'); if(objectType == 'project') loadExecutions($('#project').val()); - setSavePath(); /* Change for show create error. */ $('#contentBox #content').attr('id', 'contentHTML'); @@ -16,7 +15,6 @@ $(function() { $('#modalBasicInfo #copyTitle').html($('.doc-title #editorTitle').val().replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'")); }); - $('#modalBasicInfo').on('hide.zui.modal', function(){setSavePath();}); $('#saveDraft').click(function() { diff --git a/module/doc/js/edit.js b/module/doc/js/edit.js index 6e91b9a86e..d5243dc2e0 100644 --- a/module/doc/js/edit.js +++ b/module/doc/js/edit.js @@ -6,9 +6,6 @@ $(function() setTimeout(function(){$('.CodeMirror').height($(document).height() - 112);}, 100); $('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px'); - setSavePath(); - $('#modalBasicInfo').on('hide.zui.modal', function(){setSavePath();}); - $('#saveDraft').click(function() { if($('#editorTitle').val() == '') diff --git a/module/doc/view/createtexttype.html.php b/module/doc/view/createtexttype.html.php index 730b6f140e..f513b092ce 100644 --- a/module/doc/view/createtexttype.html.php +++ b/module/doc/view/createtexttype.html.php @@ -29,7 +29,6 @@ " . $lang->goback, "id='backBtn'", 'btn btn-secondary');?> doc->titlePlaceholder}' id='editorTitle' class='form-control' required");?> - doc->saveDraft, "id='saveDraft' data-placement='bottom'", "btn btn-secondary");?> release->common, '', "data-toggle='modal' id='basicInfoLink' class='btn btn-primary'");?> diff --git a/module/doc/view/edittexttype.html.php b/module/doc/view/edittexttype.html.php index 89cba4226b..d306c347f5 100644 --- a/module/doc/view/edittexttype.html.php +++ b/module/doc/view/edittexttype.html.php @@ -28,7 +28,6 @@ title, "placeholder='{$lang->doc->titlePlaceholder}'' id='editorTitle' class='form-control' required");?> status == 'draft'):?> - doc->saveDraft, "id='saveDraft'", "btn btn-secondary");?> release->common, "id='saveRelease'", "btn btn-primary");?>