Merge pull request #2131 from bjarnef/dev-v7-U4-10281

U4-10281 - Fix maxchars javascript errors on macro parameter editors
This commit is contained in:
Sebastiaan Janssen
2017-08-29 11:23:16 +02:00
committed by GitHub
2 changed files with 24 additions and 2 deletions

View File

@@ -1,4 +1,15 @@
function textAreaController($rootScope, $scope, $log) {
function textAreaController($scope) {
// macro parameter editor doesn't contains a config object,
// so we create a new one to hold any properties
if (!$scope.model.config) {
$scope.model.config = {};
}
if (!$scope.model.config.maxChars) {
$scope.model.config.maxChars = false;
}
$scope.model.maxlength = false;
if($scope.model.config.maxChars) {
$scope.model.maxlength = true;

View File

@@ -1,4 +1,15 @@
function textboxController($rootScope, $scope, $log) {
function textboxController($scope) {
// macro parameter editor doesn't contains a config object,
// so we create a new one to hold any properties
if (!$scope.model.config) {
$scope.model.config = {};
}
if (!$scope.model.config.maxChars) {
$scope.model.config.maxChars = false;
}
$scope.model.maxlength = false;
if($scope.model.config.maxChars) {
$scope.model.maxlength = true;