Browse Source

修改bug 2023/10/17

Xiahai 11 months ago
parent
commit
c5c5622149

+ 2 - 3
application/admin/lang/zh-cn/cms/conference.php

@@ -27,11 +27,10 @@ return [
     'Person num'                    => '人数',
     'Topics'                        => '话题',
     'Email'                         => '邮箱',
-    'Affiliation address'           => '附属机构地址',
+    'Affiliate'                     => '附属机构地址',
     'First name'                    => '姓',
     'Middle name'                   => '中间名',
     'Last name'                     => '名',
     'Is email'                      => '是否邮箱',
-    'Is correspondsing author'      => '是否通讯作者',
-    ''
+    'Is author'                     => '是否通讯作者',
 ];

+ 1 - 0
application/admin/lang/zh-cn/cms/email.php

@@ -5,4 +5,5 @@ return [
     'Email'                         => '邮箱',
     'value'                         => '内容',
     'Type'                          => '类型',
+    'Detail'                        => '详情',
 ];

+ 1 - 0
application/admin/lang/zh-cn/cms/fields.php

@@ -70,4 +70,5 @@ return [
     'Bigint'                            => '整型(最大)',
     'Decimal'                           => '小数',
     'Mediumtext'                        => '文本',
+    'longtext'                          => '长文本',
 ];

+ 1 - 0
application/admin/lang/zh-cn/cms/special_issue.php

@@ -14,4 +14,5 @@ return [
     'conflict of interest declaration' => '利益冲突声明',
     'I declare that no guest editor has a conflict of interest'  => '我声明没有任何客座编辑存在利益冲突',
     'One or more editors have conflicts' => '一个或多个编辑器存在冲突',
+    'Detaile'                       => '详情',
 ];

+ 1 - 1
application/admin/view/auth/admin/add.html

@@ -4,7 +4,7 @@
     }
     .msg-wrap {
         width:100px;
-        overflow: hidden;
+        /*overflow: hidden;*/
     }
     .n-msg {
         word-wrap: break-word;

+ 0 - 3
application/admin/view/cms/email/index.html

@@ -7,12 +7,9 @@
                 <div class="widget-body no-padding">
                     <div id="toolbar" class="toolbar">
                         <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
-<!--                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('cms/email/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
-                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('cms/email/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
                         <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('cms/email/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
                     </div>
                     <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
-                           data-operate-edit="{:$auth->check('cms/email/edit')}"
                            data-operate-del="{:$auth->check('cms/email/del')}"
                            width="100%">
                     </table>

+ 0 - 3
application/admin/view/cms/special_issue/index.html

@@ -7,12 +7,9 @@
                 <div class="widget-body no-padding">
                     <div id="toolbar" class="toolbar">
                         <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
-<!--                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('cms/manuscript/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
-                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('cms/conference/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
                         <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('cms/conference/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
                     </div>
                     <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
-                           data-operate-edit="{:$auth->check('cms/conference/edit')}"
                            data-operate-del="{:$auth->check('cms/conference/del')}"
                            width="100%">
                     </table>

+ 4 - 4
application/api/controller/User.php

@@ -819,11 +819,11 @@ class User extends Api
         }
 
         // 校验时间
-        if ($params['start_time'] < $params['end_time']) {
-            $this->error('The start time cannot be less than the end time');
+        if ($params['start_time'] > $params['end_time']) {
+            $this->error('The start time cannot be greater than the end time');
         }
-        if ($params['end_time'] > $params['start_time']) {
-            $this->error('The end time cannot be greater than the start time');
+        if ($params['end_time'] == $params['start_time']) {
+            $this->error('End time cannot be equal to start time');
         }
 
         $model = new Conference();

+ 1 - 0
application/common/model/Config.php

@@ -64,6 +64,7 @@ class Config extends Model
             'bigint'        => __('Bigint'),
             'decimal'       => __('Decimal'),
             'mediumtext'    => __('Mediumtext'),
+            'longtext'      => __('Longtext'),
         ];
         return $typeList;
     }

+ 7 - 6
application/index/controller/User.php

@@ -288,25 +288,25 @@ class User extends Frontend
                 '__token__'     => $token,
             ];
             $field = [
-                'oldpassword'   => __('Old password'),
-                'newpassword'   => __('New password'),
-                'renewpassword' => __('Renew password')
+                'oldpassword'   => 'Old password',
+                'newpassword'   => 'New password',
+                'renewpassword' => 'Renew password'
             ];
             $validate = new Validate($rule, $msg, $field);
             $result = $validate->check($data);
             if (!$result) {
-                $this->error(__($validate->getError()), null, ['token' => $this->request->token()]);
+                $this->error($validate->getError(), null, ['token' => $this->request->token()]);
                 return false;
             }
 
             $ret = $this->auth->changepwd($newpassword, $oldpassword);
             if ($ret) {
-                $this->success(__('Reset password successful'), url('user/login'));
+                $this->success('Reset password successful', url('user/login'));
             } else {
                 $this->error($this->auth->getError(), null, ['token' => $this->request->token()]);
             }
         }
-        $this->view->assign('title', __('Change password'));
+        $this->view->assign('title', 'Change password');
         return $this->view->fetch();
     }
 
@@ -795,6 +795,7 @@ class User extends Frontend
     public function special_issue($id = null)
     {
         $special_issue = [
+            'id' => '',
             'image' => '',
             'journal' => '',
             'issue_name' => '',

+ 2 - 2
application/index/view/user/send_email.html

@@ -1,7 +1,7 @@
 <link href="__CDN__/assets/css/user/reviewer_information.css?v={$Think.config.site.version|htmlentities}" rel="stylesheet">
 <div class="common-bg">
     <div class="common-font">
-        Review comments
+        Send Email
     </div>
 </div>
 <div id="content-container" class="container">
@@ -12,7 +12,7 @@
         <div class="col-md-9">
             <div class="panel panel-default">
                 <div class="panel-body">
-                    <h2 class="page-header">Review comments</h2>
+                    <h2 class="page-header">Send Email</h2>
                     <form id="send-email-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('api/user/send_email')}">
                         {:token()}
 

+ 9 - 9
application/index/view/user/submit_manuscript.html

@@ -27,15 +27,15 @@
         position:absolute;
         top:0;left:0;width:100px;height:100px;opacity: 0;
     }
-    .msg-wrap {
-        width:100px;
-        overflow: hidden;
-    }
-    .n-msg {
-        word-wrap: break-word;
-        word-break: break-all;
-        white-space: pre-wrap;
-    }
+    /*.msg-wrap {*/
+    /*    width:100px;*/
+    /*    !*overflow: hidden;*!*/
+    /*}*/
+    /*.n-msg {*/
+    /*    word-wrap: break-word;*/
+    /*    word-break: break-all;*/
+    /*    white-space: pre-line;*/
+    /*}*/
 </style>
 <link href="__CDN__/assets/css/user/submit_manuscript.css?v={$Think.config.site.version|htmlentities}" rel="stylesheet">
 <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

+ 12 - 0
public/assets/js/backend/cms/archives.js

@@ -368,6 +368,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
                         "data": Config.channelList
                     }
                 });
+
+                // 为 jstree 节点设置文字溢出样式
+                $(".jstree-node").css("text-overflow", "ellipsis");
+
+                // 为 jstree 节点添加鼠标悬浮事件
+                $(".jstree-node").hover(function() {
+                    // 将文字设置为显示全部
+                    $(this).text($(this).html());
+                }, function() {
+                    // 鼠标离开时恢复原样
+                    $(this).text($(this).text().substr(0, 100) + "...");
+                });
             });
 
             $(document).on('click', '.btn-copyselected', function () {

+ 2 - 2
public/assets/js/backend/cms/conference.js

@@ -43,7 +43,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'topics', title: __('Topics'), operate: 'like'},
                         {field: 'name', title: __('Name'), operate: 'like'},
                         {field: 'email', title: __('Email'), operate: 'like'},
-                        {field: 'affiliation_address', title: __('Affiliation address'), operate: 'like'},
+                        {field: 'affiliation_address', title: __('Affiliate'), operate: 'like'},
                         {field: 'status', title: __('Status'), searchList: {"review": __('Review'), "Fault": __('Fault'), "Correct": __('Correct')}, formatter: Table.api.formatter.status},
                         {field: 'createtime', title: __('Createtime'), sortable: true, operate: 'RANGE', addclass: 'datetimerange', formatter: Table.api.formatter.datetime},
                         {
@@ -150,7 +150,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'middle_name', title: __('Middle name'), operate: 'like'},
                         {field: 'last_name', title: __('Last name'), operate: 'like'},
                         {field: 'is_email', title: __('Is email'), searchList: {"yes": __('Yes'), "no": __('No')}, formatter: Table.api.formatter.status},
-                        {field: 'is_correspondsing_author', title: __('Is correspondsing author'), searchList: {"yes": __('Yes'), "no": __('No')}, formatter: Table.api.formatter.status},
+                        {field: 'is_correspondsing_author', title: __('Is author'), searchList: {"yes": __('Yes'), "no": __('No')}, formatter: Table.api.formatter.status},
                         {field: 'affiliation', title: __('Affiliation'), operate: 'like'},
                         {field: 'country', title: __('Country'), operate: 'like'},
                         {field: 'createtime', title: __('Createtime'), sortable: true, operate: 'RANGE', addclass: 'datetimerange', formatter: Table.api.formatter.datetime},

+ 21 - 3
public/assets/js/backend/cms/email.js

@@ -10,7 +10,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 extend: {
                     index_url: 'cms/email/index',
                     add_url: '',
-                    edit_url: 'cms/email/edit',
+                    edit_url: '',
                     del_url: 'cms/email/del',
                     multi_url: 'cms/email/multi',
                     table: 'cms_email',
@@ -38,10 +38,28 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {
                             field: 'operate',
                             title: __('Operate'),
+                            clickToSelect: false,
                             table: table,
                             events: Table.api.events.operate,
-                            formatter: Table.api.formatter.operate
-                        }
+                            formatter: function (value, row, index) {
+                                var that = $.extend({}, this);
+                                var table = $(this.table).clone(true);
+                                that.table = table;
+                                return Table.api.formatter.operate.call(that, value, row, index);
+                            },
+                            buttons:[
+                                {
+                                    name: 'detail',
+                                    classname: 'btn btn-xs btn-warning btn-dialog',
+                                    icon: 'fa fa-list',
+                                    title: __('Detail'),
+                                    text: __('Detail'),
+                                    url: function (row) {
+                                        return 'cms/email/edit?ids=' + row.id;
+                                    },
+                                },
+                            ]
+                        },
                     ]
                 ]
             });

+ 10 - 0
public/assets/js/backend/cms/special_issue.js

@@ -53,6 +53,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                             },
                             buttons:[
                                 {
+                                    name: 'detail',
+                                    classname: 'btn btn-xs btn-warning btn-dialog',
+                                    icon: 'fa fa-list',
+                                    title: __('Detail'),
+                                    text: __('Detail'),
+                                    url: function (row) {
+                                        return 'cms/special_issue/edit?ids=' + row.id;
+                                    },
+                                },
+                                {
                                     name: 'pass',
                                     text: __('Correct'),
                                     title: __('Correct'),

+ 1 - 1
public/assets/js/frontend/user.js

@@ -2262,7 +2262,7 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template'], function ($, und
             //为表单绑定事件
             Form.api.bindevent($("#send-email-form"), function (data, ret) {
                 setTimeout(function () {
-                    location.href = window.history.go(-1);
+                    location.href = '/index/user/inbox';
                 }, 2000);
             }, function (data) {