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",
"angular-busy": "^4.1.3",
"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": {
"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);
angular.element('#table-submission-data').tableExport({type: type, escape:false});
/*
var blob = new Blob([$scope.table.rows], {
type: 'application/'+fileMIMETypeMap[type]+';charset=utf-8'
});
saveAs(blob, $scope.myform.title+'_sumbissions_export_'+Date.now()+'.'+type);
*/
};
}

View file

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

View file

@ -7,7 +7,7 @@
</button>
</div>
<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>
</button>
</div>
@ -103,4 +103,4 @@
</table>
</div>
</div>
</div>
</div>