mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 05:57:57 +01:00
#117: more logs + possible fix
This commit is contained in:
parent
18f37ec2a8
commit
a055b3ff5c
@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Document edition controller.
|
||||
*/
|
||||
angular.module('docs').controller('DocumentEdit', function($rootScope, $scope, $q, $http, $state, $stateParams, Restangular) {
|
||||
angular.module('docs').controller('DocumentEdit', function($rootScope, $scope, $q, $http, $state, $stateParams, Restangular, $translate) {
|
||||
// Alerts
|
||||
$scope.alerts = [];
|
||||
|
||||
@ -120,7 +120,7 @@ angular.module('docs').controller('DocumentEdit', function($rootScope, $scope, $
|
||||
});
|
||||
};
|
||||
|
||||
if (_.size($scope.newFiles) == 0) {
|
||||
if ($scope.newFiles.length === 0) {
|
||||
navigateNext();
|
||||
} else {
|
||||
$scope.fileIsUploading = true;
|
||||
|
@ -12,6 +12,8 @@ angular.module('docs').directive('file', function() {
|
||||
link: function(scope, element, attr, ctrl) {
|
||||
element.bind('change', function() {
|
||||
scope.$apply(function() {
|
||||
console.log('is multiple?', attr.multiple);
|
||||
console.log('setting file directive value', attr.multiple ? element[0].files : element[0].files[0]);
|
||||
attr.multiple ? ctrl.$setViewValue(element[0].files) : ctrl.$setViewValue(element[0].files[0]);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user