Browse Source

活动发起提示修改。

dongbw 8 years ago
parent
commit
813d10dda4

+ 1 - 1
donate-console/src/main/java/com/uas/console/donate/model/Activity.java

@@ -360,7 +360,7 @@ public class Activity implements Serializable{
         if (null != joinAmount) {
             return joinAmount;
         }
-        return (long) this.getActivityRecords().size();
+        return !CollectionUtils.isEmpty(this.getActivityRecords()) ? (long) this.getActivityRecords().size() : 0L;
     }
 
     public void setJoinAmount(Long joinAmount) {

+ 1 - 0
donate-console/src/main/webapp/resources/js/index/app.js

@@ -2411,6 +2411,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
 
         // 清空内容
         $scope.clearActivity = function() {
+            $scope.submited = false;
             $scope.activity = {
                 awards:[],
                 projects: []

+ 0 - 11
donate-console/src/main/webapp/resources/lib/rangy/.npmignore

@@ -1,11 +0,0 @@
-roadmap.txt
-release_process.txt
-/.idea
-/builder
-/dist
-/demos
-/external
-/fiddlings
-/spec
-/src
-/test

+ 0 - 21
donate-console/src/main/webapp/resources/lib/rangy/LICENSE

@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Tim Down
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 0 - 24
donate-console/src/main/webapp/resources/lib/rangy/README.md

@@ -1,24 +0,0 @@
-Rangy
-=====
-
-A cross-browser JavaScript range and selection library.
-
-The current version is version 1.3.0.
-
-The latest source code and releases are on [GitHub](../../releases).
-
-## Bower
-
-There is now an official Rangy package for Bower with Rangy 1.2 and 1.3 versions, called `rangy`.
-
-## AMD
-
-Rangy 1.3 has AMD support.
-
-## NPM
-
-There is an official Rangy module on NPM called [`rangy`](https://www.npmjs.org/package/rangy).
-
-## Documentation
-
-Documentation is in [the GitHub wiki](https://github.com/timdown/rangy/wiki). 

+ 0 - 31
donate-console/src/main/webapp/resources/lib/rangy/package.json

@@ -1,31 +0,0 @@
-{
-    "name": "rangy",
-    "description": "A cross-browser DOM range and selection library",
-    "version": "1.3.0",
-    "author": {
-        "name": "Tim Down",
-        "email": "tim@timdown.co.uk",
-        "url": "http://timdown.co.uk/"
-    },
-    "keywords": ["range", "selection", "caret", "DOM"],
-    "homepage": "https://github.com/timdown/rangy",
-    "bugs": {
-        "url": "https://github.com/timdown/rangy/issues"
-    },
-    "licenses": [
-        {
-            "type": "MIT",
-            "url": "http://www.opensource.org/licenses/mit-license.php"
-        }
-    ],
-    "repository": {
-        "type": "git",
-        "url": "https://github.com/timdown/rangy.git"
-    },
-    "main": "lib/rangy-core.js",
-    "directories": {
-        "lib": "./lib"
-    },
-    "dependencies": {},
-    "devDependencies": {}
-}

+ 2 - 3
donate-console/src/main/webapp/resources/view/activity/activity_launch.html

@@ -715,7 +715,6 @@
                             <summernote lang="zh-CN" ng-model="activity.summary" height="300px" maxlength="3500">
                             </summernote>
                         </div>
-
                         <span class="error" ng-show="submited && activity.summary == null">*请填写活动介绍</span>
                     </div>
                     <div class="form-group clearfix">
@@ -807,7 +806,7 @@
                             </div>
                         </div>
 
-                        <span class="error" ng-show="submited && awards.length == 0">*请添加活动奖品</span>
+                        <span class="error" ng-show="submited && !awards.length">*请添加活动奖品</span>
                     </div>
                     <div class="form-group clearfix" style="height:auto;">
                         <label class="control-label fl">活动项目</label>
@@ -826,7 +825,7 @@
                                 <span style="color: #5078cb;" class="clear" ng-click="clearActivity()">清空内容</span>
                             </div>
                         </div>
-                        <span class="error" ng-show="submited && selectedProjects.length == 0">*请添加活动项目</span>
+                        <span class="error" ng-show="submited && !selectedProjects.length">*请添加活动项目</span>
                     </div>
                 </div>
             </form>