Browse Source

文件传输

dgf 8 years ago
parent
commit
8064416c30

+ 31 - 31
dist/bower.json

@@ -1,32 +1,32 @@
 {
-  "name": "talkview",
-  "description": "",
-  "main": "",
-  "authors": [
-    "lqq"
-  ],
-  "license": "MIT",
-  "homepage": "",
-  "private": true,
-  "ignore": [
-    "**/.*",
-    "node_modules",
-    "bower_components",
-    "test",
-    "tests"
-  ],
-  "dependencies": {
-    "angular-ui-router": "^0.3.1",
-    "bootstrap": "^3.3.7",
-    "angular": "^1.5.8",
-    "angular-scroll-glue": "^2.0.7",
-    "angular-animate": "^1.5.8",
-    "animate.css": "^3.5.2",
-    "angular-bootstrap": "^2.2.0",
-    "angular-sanitize": "^1.5.8",
-    "jquery-qrcode": "*",
-    "zTree": "^3.5.26",
-    "lodash": "^4.17.4",
-    "peerjs": "^0.3.14"
-  }
-}
+    "name": "talkview",
+    "description": "",
+    "main": "",
+    "authors": [
+        "lqq"
+    ],
+    "license": "MIT",
+    "homepage": "",
+    "private": true,
+    "ignore": [
+        "**/.*",
+        "node_modules",
+        "bower_components",
+        "test",
+        "tests"
+    ],
+    "dependencies": {
+        "angular-ui-router": "^0.3.1",
+        "bootstrap": "^3.3.7",
+        "angular": "^1.5.8",
+        "angular-scroll-glue": "^2.0.7",
+        "angular-animate": "^1.5.8",
+        "animate.css": "^3.5.2",
+        "angular-bootstrap": "^2.2.0",
+        "angular-sanitize": "^1.5.8",
+        "jquery-qrcode": "*",
+        "zTree": "^3.5.26",
+        "lodash": "^4.17.4",
+        "peerjs": "^0.3.14"
+    }
+}

+ 1 - 1
talkview/src/js/controller/transmitterController.js

@@ -37,7 +37,7 @@ angular.module('appMessage').controller('TransmitterController', ['$scope', '$in
             return (Math.round($scope.fileSize * 100 / 1024) / 100).toString() + 'KB';
     };
 
-    $scope.getProgress = function(item) {
+    $scope.getPercent = function(item) {
         return parseInt((item.completedLength / item.length) * 100).toString() + '%';
     };
 

+ 1 - 4
talkview/src/less/app.main.less

@@ -180,9 +180,6 @@
             color: #333;
             }
         }
-        #next{
-            margin-left: 10px;
-        }
     }
 }
 #fileInfo{
@@ -205,7 +202,7 @@
     height:3px;
     width:200px;
 }
-#progress{
+#percent{
     position: absolute;
     top: 28px;
     left: 257px;

+ 3 - 3
talkview/src/templates/transmitter.html

@@ -1,11 +1,11 @@
 <div ng-repeat="item in transmitters" id="transmitters">
     <p id="fileInfo"><img src="../img/unkown.png"><input type="text" readonly="readonly" value="{{getFileName(item)}}"><span>({{getFileSize(item)}})</span></p>
     <div class="progress">
-        <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="1" aria-valuemin="0" aria-valuemax="100" style="height:3px; width: {{getProgress(item)}};min-width: 0.1em;">
+        <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="1" aria-valuemin="0" aria-valuemax="100" style="height:3px; width: {{getPercent(item)}};min-width: 0.1em;">
         </div>
     </div>
-    <span id="progress">{{getProgress(item)}}</span>
+    <span id="percent">{{getPercent(item)}}</span>
     <span id="speed">{{getSpeed(item)}}&nbsp;&nbsp;{{getreTime(item)}}</span>
-    <span class="textion"><a ng-show="!item.status&&item.direction==1" ng-click="acception(item)">接收</a><a ng-show="!item.status&&item.direction==1" ng-click="saveAs(item)">另存为</a><a ng-show="!item.status&&item.direction==1" ng-click="decline(item)">拒绝</a><a ng-show="item.status&&item.direction==1" ng-click="cancel(item)">取消</a><a id="next" ng-click="decline(item)" ng-show="!item.status&&item.direction==1">下次接收</a></span>
+    <span class="textion"><a ng-show="!item.status&&item.direction==1" ng-click="acception(item)">接收</a><a ng-show="!item.status&&item.direction==1" ng-click="saveAs(item)">另存为</a><a ng-show="!item.status&&item.direction==1" ng-click="decline(item)">拒绝</a><a ng-show="item.status&&item.direction==1" ng-click="cancel(item)">取消</a></span>
     <span class="textion"><a ng-show="!item.status&&item.direction==0" ng-click="turnToOffline(item)">转为离线</a><a ng-show="item.direction==0" ng-click="cancel(item)">取消</a></span>
 </div>