Robin Thoni пре 8 година
родитељ
комит
939dd24cca
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 2
    2
      public/app/controllers/upload.controller.js
  2. 1
    1
      public/app/views/upload.html

+ 2
- 2
public/app/controllers/upload.controller.js Прегледај датотеку

12
                 reader.onload = (function(file) {
12
                 reader.onload = (function(file) {
13
                     return function(e) {
13
                     return function(e) {
14
                         $scope.$apply(function() {
14
                         $scope.$apply(function() {
15
-                            $scope.fileDropped(e.target.result, file);
15
+                            $scope.fileLoaded(e.target.result, file);
16
                         });
16
                         });
17
                     };
17
                     };
18
                 })(f);
18
                 })(f);
19
             });
19
             });
20
 
20
 
21
-            $scope.fileDropped = function(content, file)
21
+            $scope.fileLoaded = function(content, file)
22
             {
22
             {
23
                 $scope.image = {
23
                 $scope.image = {
24
                     content: content,
24
                     content: content,

+ 1
- 1
public/app/views/upload.html Прегледај датотеку

1
 <div layout="column" layout-fill layout-align="top center">
1
 <div layout="column" layout-fill layout-align="top center">
2
 
2
 
3
     <h1>Upload</h1>
3
     <h1>Upload</h1>
4
-    <div image-dropzone="fileDropped(content, file)" class="dropzone">
4
+    <div image-dropzone="fileLoaded(content, file)" class="dropzone">
5
         <img ng-show="image != null" ng-src="{{ image.content | toDataUrl }}">
5
         <img ng-show="image != null" ng-src="{{ image.content | toDataUrl }}">
6
         <p ng-hide="image != null">
6
         <p ng-hide="image != null">
7
             Drag a file here or <a href="" ng-click="pickFile()">pick one</a>
7
             Drag a file here or <a href="" ng-click="pickFile()">pick one</a>

Loading…
Откажи
Сачувај