SHARE
TWEET

Untitled

a guest Dec 22nd, 2014 157 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div class="md-modal md-effect-7" id="modal-7">
  2.         <div class="md-content">
  3.                 <div>
  4.                         <h3>Upload A Logo</h3>
  5.                         <div>
  6.                                 <form method="get" action="upload.php" class="dropzone" id="my-awesome-dropzone">
  7.                                         <div class="uploadInstruct"></div>
  8.                                 </form>
  9.                                 <div class="uploadedCon dropzone">
  10.                                         <div>Preview</div>
  11.                                         <div class="dz-preview dz-processing dz-image-preview dz-success" ng-repeat="uImg in uImgs">
  12.                                                 <div data-dz-thumbnail style="background-image: url();">{{uImg.src}}</div>
  13.                                         </div>
  14.                                 </div>
  15.                                 <button ng-click="checkEnter(-1)" class="md-close">Go</button>
  16.                         </div>
  17.                 </div>
  18.         </div>
  19. </div>
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. .directive('mdContent', function($rootScope, $timeout) {
  32.         return {
  33.                 restrict: 'C',
  34.                 link: function(scope, element, attrs) {
  35.                         scope.uImgs = [];
  36.                        
  37.                         $('.md-modal').addClass('md-show');
  38.                                
  39.                         $timeout(function(){
  40.                                 if ($('#my-awesome-dropzone').length) {
  41.                                 scope.uImgs.push({name: 'myname', status: 'done', width: 520, height: 200});
  42.                                         var myAwesomeDropzone = new Dropzone("#my-awesome-dropzone");
  43.                                         myAwesomeDropzone.on("addedfile", function(file) {
  44.                                                 scope.uImgs.push({name: 'name', status: 'donetoo', width: 220, height: 100});
  45.                                                 console.log(scope);
  46.                                                 console.log(scope.uImgs);
  47.                                         });
  48.                                 }
  49.                         },500);
  50.                        
  51.                        
  52.                         scope.$watch('uImgs', function(newValue, oldValue) {
  53.                                 console.log(oldValue);
  54.                                 console.log(newValue);
  55.                         });
  56.                 }
  57.         };
  58. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top