Bladeren bron

文章设置批量设置栏目

XMTT 7 jaren geleden
bovenliggende
commit
35bce0c6f4
4 gewijzigde bestanden met toevoegingen van 18 en 15 verwijderingen
  1. 1 1
      css/model/sys/article.css
  2. 1 1
      html/model/sys/article/index.html
  3. 1 2
      js/model/sys/article/colnum.js
  4. 15 11
      js/model/sys/article/index.js

+ 1 - 1
css/model/sys/article.css

@ -11,7 +11,7 @@
11 11
    table-layout: fixed;
12 12
}
13 13
14
.sys_article_index .orderBy .icon-close, .sys_article_colnum .banner .icon-close {
14
.sys_article_index .orderBy .icon-close {
15 15
    display: none;
16 16
}
17 17

+ 1 - 1
html/model/sys/article/index.html

@ -1,4 +1,4 @@
1
<div class="sys_article_index" loadUri="../ajax/article/pq" pageSize="10" pageNo="1" pageIndex="pi">
1
<div class="sys_article_index" loadUri="../ajax/article/pq" pageSize="20" pageNo="1" pageIndex="pi">
2 2
    <div class="modal-ctrl">
3 3
        <i class="icon icon-times"></i>
4 4
    </div>

+ 1 - 2
js/model/sys/article/colnum.js

@ -8,11 +8,10 @@ spa_define(function () {
8 8
            modal: function (data) {
9 9
                var root = spa.findInModal(".sys_article_colnum");
10 10
                var form = fb.build(root.find(".newForm"));
11
                form.val({colNum: data.data.colNum, id: data.data.id});
12 11
                var saveBtn = root.find(".opt-save"),
13 12
                    save = function () {
14 13
                        util.post("../ajax/article/colNum", {
15
                            articleId: data.data.articleId,
14
                            articleIds: data.data,
16 15
                            colNum: form.val().colNum
17 16
                        }, function () {
18 17
                            spa.closeModal();

+ 15 - 11
js/model/sys/article/index.js

@ -97,19 +97,23 @@ spa_define(function () {
97 97
                        util.alert("请选择一篇文章");
98 98
                    }
99 99
                });
100
                root.find(".opt-col-num").on("click", function() {
100
                root.find(".opt-col-num").on("click", function () {
101 101
                    var $article = root.find("td.opt-check>i.checked");
102
                    if($article.length) {
103
                        if($article.length > 1) {
104
                            util.alert("只能选择一篇文章");
105
                        } else {
106
                            $.util.get("../ajax/article/id/"+$article.attr("articleId"),null,function(rd){
107
                                if(rd){
108
                                    spa.showModal("sys_article_colnum", { data:rd, hand: function() { pdg.reload() } })
109
                                }else{
110
                                    util.alertMsg("文章不存在", function(){pdg.load();});
102
                    if ($article.length) {
103
                        var articles = [];
104
                        $article.each(function () {
105
                            articles.push($(this).attr("articleId"));
106
                        });
107
                        if (articles) {
108
                            spa.showModal("sys_article_colnum", {
109
                                data: articles, hand: function () {
110
                                    pdg.reload();
111 111
                                }
112
                            },{});
112
                            });
113
                        } else {
114
                            util.alertMsg("文章不存在", function () {
115
                                pdg.load();
116
                            });
113 117
                        }
114 118
                    } else {
115 119
                        util.alert("请选择一篇文章");