Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- propertyCards = retrievePropertyJobCards(propertyid);
- if(propertyCards){
- loadInCards(propertyCards);
- }
- $.each(data, function(key,value){
- //If its a plan card it will load the plan card
- if(value.property_cards_type == 'plan'){
- //load plan template
- $('.generate-plan-cards').append(Mustache.render(cardPlanTemplate,value));
- //Set the dropzone in the card
- Dropzone.options['plandropzone' + value.plan_details.plan_id] = {
- paramName: "file", // The name that will be used to transfer the file
- maxFilesize: 200, // MB
- parallelUploads: 100,
- addRemoveLinks: true,
- autoProcessQueue: true,
- createImageThumbnails: false,
- init: function() {
- existingPlanFiles(this, propertyid, value.plan_details.plan_id, plan_dir, global_dir);
- },
- sending: function(file, xhr, formData) {
- files = this.getUploadingFiles();
- formData.append("plan_dir", plan_dir); // Will send the correct folder structure for the job uploads as POST data.
- formData.append("plan_id", value.plan_details.plan_id); // Will send the correct Last plan id.
- }
- };
- }
- }
- $(function() {
- cardPlanTemplate = $('#cardPlanTemplate').html();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement