fixed exportTo for form submissions

This commit is contained in:
David Baldwynn 2016-05-16 17:47:34 -07:00
parent ac73db734b
commit f8f934f7b0
6 changed files with 58 additions and 21 deletions

View file

@ -32,7 +32,8 @@
"v-button": "^1.1.1", "v-button": "^1.1.1",
"angular-busy": "^4.1.3", "angular-busy": "^4.1.3",
"angular-input-stars": "https://github.com/whitef0x0/angular-input-stars.git#master", "angular-input-stars": "https://github.com/whitef0x0/angular-input-stars.git#master",
"raven-js": "^3.0.4" "raven-js": "^3.0.4",
"tableExport.jquery.plugin": "^1.5.1"
}, },
"resolutions": { "resolutions": {
"angular-bootstrap": "^0.14.0", "angular-bootstrap": "^0.14.0",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -109,11 +109,15 @@ angular.module('forms').directive('editSubmissionsFormDirective', ['$rootScope',
}; };
console.log($scope.table.rows); console.log($scope.table.rows);
angular.element('#table-submission-data').tableExport({type: type, escape:false});
/*
var blob = new Blob([$scope.table.rows], { var blob = new Blob([$scope.table.rows], {
type: 'application/'+fileMIMETypeMap[type]+';charset=utf-8' type: 'application/'+fileMIMETypeMap[type]+';charset=utf-8'
}); });
saveAs(blob, $scope.myform.title+'_sumbissions_export_'+Date.now()+'.'+type); saveAs(blob, $scope.myform.title+'_sumbissions_export_'+Date.now()+'.'+type);
*/
}; };
} }

View file

@ -178,11 +178,8 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter'
}, 500); }, 500);
}; };
//Load our form when the page is ready //Reload our form
//angular.element(document).ready(function() { $scope.reloadForm();
$scope.reloadForm();
//});
} }
}; };
} }

View file

@ -7,7 +7,7 @@
</button> </button>
</div> </div>
<div class="col-xs-2 col-xs-offset-4 text-right"> <div class="col-xs-2 col-xs-offset-4 text-right">
<button class="btn btn-default" ng-click="exportSubmissions('xls')"> <button class="btn btn-default" ng-click="exportSubmissions('xml')">
<small>Export to Excel</small> <small>Export to Excel</small>
</button> </button>
</div> </div>
@ -103,4 +103,4 @@
</table> </table>
</div> </div>
</div> </div>
</div> </div>