Advertisement
Guest User

Untitled

a guest
Apr 18th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. propertyCards = retrievePropertyJobCards(propertyid);
  2. if(propertyCards){
  3. loadInCards(propertyCards);
  4. }
  5.  
  6. $.each(data, function(key,value){
  7.  
  8. //If its a plan card it will load the plan card
  9. if(value.property_cards_type == 'plan'){
  10.  
  11. //load plan template
  12. $('.generate-plan-cards').append(Mustache.render(cardPlanTemplate,value));
  13.  
  14. //Set the dropzone in the card
  15. Dropzone.options['plandropzone' + value.plan_details.plan_id] = {
  16. paramName: "file", // The name that will be used to transfer the file
  17. maxFilesize: 200, // MB
  18. parallelUploads: 100,
  19. addRemoveLinks: true,
  20. autoProcessQueue: true,
  21. createImageThumbnails: false,
  22. init: function() {
  23. existingPlanFiles(this, propertyid, value.plan_details.plan_id, plan_dir, global_dir);
  24. },
  25. sending: function(file, xhr, formData) {
  26. files = this.getUploadingFiles();
  27. formData.append("plan_dir", plan_dir); // Will send the correct folder structure for the job uploads as POST data.
  28. formData.append("plan_id", value.plan_details.plan_id); // Will send the correct Last plan id.
  29. }
  30.  
  31. };
  32.  
  33. }
  34. }
  35.  
  36. $(function() {
  37. cardPlanTemplate = $('#cardPlanTemplate').html();
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement