diff --git a/css/app/eventdialog.css b/css/app/eventdialog.css index 37b8b53faa..a74188b259 100644 --- a/css/app/eventdialog.css +++ b/css/app/eventdialog.css @@ -120,6 +120,11 @@ width: 60px; } +.events--textarea, +.advanced--textarea { + resize: none; +} + .advanced .events--time { width: 100%; } @@ -164,11 +169,6 @@ width: 100%; } -.advanced .advanced--fieldset textarea { - height: 4.5em; - resize: vertical; -} - .advanced .tabHeaders { margin: 0 0 15px; float: left; diff --git a/js/.jshintrc b/js/.jshintrc index 203c65df3e..dd0ee725f8 100644 --- a/js/.jshintrc +++ b/js/.jshintrc @@ -38,6 +38,7 @@ "escapeHTML": true, "possible": true, "dav": true, - "hslToRgb": true + "hslToRgb": true, + "autosize": true } } diff --git a/js/app/controllers/editorcontroller.js b/js/app/controllers/editorcontroller.js index 0970fc9e03..4902b7ff51 100644 --- a/js/app/controllers/editorcontroller.js +++ b/js/app/controllers/editorcontroller.js @@ -26,8 +26,8 @@ * Description: Takes care of anything inside the Events Modal. */ -app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletionService', '$window', '$uibModalInstance', 'vevent', 'simpleEvent', 'calendar', 'isNew', 'emailAddress', - function($scope, TimezoneService, AutoCompletionService, $window, $uibModalInstance, vevent, simpleEvent, calendar, isNew, emailAddress) { +app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletionService', '$timeout', '$window', '$uibModalInstance', 'vevent', 'simpleEvent', 'calendar', 'isNew', 'emailAddress', + function($scope, TimezoneService, AutoCompletionService, $timeout, $window, $uibModalInstance, vevent, simpleEvent, calendar, isNew, emailAddress) { 'use strict'; $scope.properties = simpleEvent; @@ -77,6 +77,14 @@ app.controller('EditorController', ['$scope', 'TimezoneService', 'AutoCompletion $scope.properties.dtend.value = moment($scope.properties.dtend.value.subtract(1, 'days')); } + autosize($('.advanced--textarea')); + autosize($('.events--textarea')); + + $timeout(() => { + autosize.update($('.advanced--textarea')); + autosize.update($('.events--textarea')); + }, 50); + angular.forEach($scope.preEditingHooks, function(callback) { callback(); }); diff --git a/templates/editor.popover.php b/templates/editor.popover.php index 7473ea309b..5e3e6cc772 100644 --- a/templates/editor.popover.php +++ b/templates/editor.popover.php @@ -1,13 +1,14 @@