Limit selection of files to csv and txt (Fixed #2133)

agenda, motions, users csv import
This commit is contained in:
Sean Engelhardt 2016-06-02 13:01:12 +02:00
parent 6aeba88f09
commit 62310c83ae
8 changed files with 11 additions and 1 deletions

View File

@ -19,3 +19,4 @@ Authors of OpenSlides in chronological order of first contribution:
Jörn Bensch <bensch@triagonale.de> (Template design) Jörn Bensch <bensch@triagonale.de> (Template design)
John Felipe Urrego Mejia <ingenierofelipeurrego@gmail.com> (Spanish translation) John Felipe Urrego Mejia <ingenierofelipeurrego@gmail.com> (Spanish translation)
Erik Steenman <eriksteenman@gmail.com> Erik Steenman <eriksteenman@gmail.com>
Sean Engelhardt <sean.f.t.engelhardt@gmail.com>

View File

@ -8,7 +8,7 @@
"angular-bootstrap": "~0.14.3", "angular-bootstrap": "~0.14.3",
"angular-bootstrap-colorpicker": "~3.0.24", "angular-bootstrap-colorpicker": "~3.0.24",
"angular-chosen-localytics": "~1.4.0", "angular-chosen-localytics": "~1.4.0",
"angular-csv-import": "~0.0.27", "angular-csv-import": "~0.0.29",
"angular-formly": "~7.3.9", "angular-formly": "~7.3.9",
"angular-formly-templates-bootstrap": "~6.2.0", "angular-formly-templates-bootstrap": "~6.2.0",
"angular-gettext": "~2.2.0", "angular-gettext": "~2.2.0",

View File

@ -417,6 +417,7 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda'])
$scope.separator = ','; $scope.separator = ',';
$scope.encoding = 'UTF-8'; $scope.encoding = 'UTF-8';
$scope.encodingOptions = ['UTF-8', 'ISO-8859-1']; $scope.encodingOptions = ['UTF-8', 'ISO-8859-1'];
$scope.accept = '.csv, .txt';
$scope.csv = { $scope.csv = {
content: null, content: null,
header: true, header: true,
@ -425,6 +426,7 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda'])
separatorVisible: false, separatorVisible: false,
encoding: $scope.encoding, encoding: $scope.encoding,
encodingVisible: false, encodingVisible: false,
accept: $scope.accept,
result: null result: null
}; };
// set csv file encoding // set csv file encoding

View File

@ -59,6 +59,7 @@ Keep each item in a single line.</p>
separator-visible="csv.separatorVisible" separator-visible="csv.separatorVisible"
result="csv.result" result="csv.result"
encoding="csv.encoding" encoding="csv.encoding"
accept="csv.accept"
encoding-visible="csv.encodingVisible"></ng-csv-import> encoding-visible="csv.encodingVisible"></ng-csv-import>
</div> </div>
</div> </div>

View File

@ -824,6 +824,7 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions'])
$scope.separator = ','; $scope.separator = ',';
$scope.encoding = 'UTF-8'; $scope.encoding = 'UTF-8';
$scope.encodingOptions = ['UTF-8', 'ISO-8859-1']; $scope.encodingOptions = ['UTF-8', 'ISO-8859-1'];
$scope.accept = '.csv, .txt';
$scope.csv = { $scope.csv = {
content: null, content: null,
header: true, header: true,
@ -832,6 +833,7 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions'])
separatorVisible: false, separatorVisible: false,
encoding: $scope.encoding, encoding: $scope.encoding,
encodingVisible: false, encodingVisible: false,
accept: $scope.accept,
result: null result: null
}; };
// set csv file encoding // set csv file encoding

View File

@ -31,6 +31,7 @@
separator-visible="csv.separatorVisible" separator-visible="csv.separatorVisible"
result="csv.result" result="csv.result"
encoding="csv.encoding" encoding="csv.encoding"
accept="csv.accept"
encoding-visible="csv.encodingVisible"></ng-csv-import> encoding-visible="csv.encodingVisible"></ng-csv-import>
</div> </div>
</div> </div>

View File

@ -688,6 +688,7 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
$scope.separator = ','; $scope.separator = ',';
$scope.encoding = 'UTF-8'; $scope.encoding = 'UTF-8';
$scope.encodingOptions = ['UTF-8', 'ISO-8859-1']; $scope.encodingOptions = ['UTF-8', 'ISO-8859-1'];
$scope.accept = '.csv, .txt';
$scope.csv = { $scope.csv = {
content: null, content: null,
header: true, header: true,
@ -696,6 +697,7 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
separatorVisible: false, separatorVisible: false,
encoding: $scope.encoding, encoding: $scope.encoding,
encodingVisible: false, encodingVisible: false,
accept: $scope.accept,
result: null result: null
}; };
// set csv file encoding // set csv file encoding

View File

@ -59,6 +59,7 @@
separator="csv.separator" separator="csv.separator"
separator-visible="csv.separatorVisible" separator-visible="csv.separatorVisible"
result="csv.result" result="csv.result"
accept="csv.accept"
encoding="csv.encoding" encoding="csv.encoding"
encoding-visible="csv.encodingVisible"></ng-csv-import> encoding-visible="csv.encodingVisible"></ng-csv-import>
</div> </div>