From b9d8b159ac3c7fe3bee5a5fdd5a48d9b650f8a61 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 25 May 2018 11:21:10 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E5=9B=BE=E6=96=87=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/view/news/form.html | 56 +++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/application/wechat/view/news/form.html b/application/wechat/view/news/form.html index f2e2be00b..eeb5d065b 100644 --- a/application/wechat/view/news/form.html +++ b/application/wechat/view/news/form.html @@ -7,14 +7,18 @@
图文列表
-
- +
+ + +

-
- +
+ + +
@@ -143,7 +147,43 @@ $form.vali(); } - $rootScope.setItem = function (index) { + $rootScope.upItem = function (index, $event) { + $event.stopPropagation(); + var tmp = [], cur = $rootScope.list[index]; + if (index < 1) { + return false; + } + for (var i in $rootScope.list) { + (parseInt(i) === parseInt(index) - 1) && tmp.push(cur); + (parseInt(i) !== parseInt(index)) && tmp.push($rootScope.list[i]); + } + apply(tmp); + }; + + $rootScope.dnItem = function (index, $event) { + $event.stopPropagation(); + var tmp = [], cur = $rootScope.list[index]; + if (index > $rootScope.list.length - 2) { + return false; + } + for (var i in $rootScope.list) { + (parseInt(i) !== parseInt(index)) && tmp.push($rootScope.list[i]); + (parseInt(i) === parseInt(index) + 1) && tmp.push(cur); + } + apply(tmp); + }; + + $rootScope.delItem = function (index, $event) { + $event.stopPropagation(); + var list = $rootScope.list, temp = []; + for (var i in list) { + (parseInt(i) !== parseInt(index)) && temp.push(list[i]); + } + apply(temp); + }; + + $rootScope.setItem = function (index, $event) { + $event.stopPropagation(); $form.vali(); if ($form.find('.validate-error').size() > 0) { return 0; @@ -243,6 +283,10 @@ background-position: center center; } + .news-left .news-item:hover .upload-multiple-close { + display: inline-block !important; + } + .news-left .news-item.active { border: 1px solid #44b549 !important; } @@ -301,7 +345,7 @@ height: 30px; float: right; margin-top: -1px; - line-height: 30px; + line-height: 34px; text-align: center; margin-right: -1px; background-color: rgba(0, 0, 0, .5);