From cbb02de464860008483398bafb03e405aa54331b Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Thu, 19 May 2016 22:01:09 +0200 Subject: [PATCH] Add first character to no photo mode. If no number # is the character --- js/public/app.js | 11 +++++++++++ templates/main.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/js/public/app.js b/js/public/app.js index 081b0f0..e8e0dfb 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -50,6 +50,17 @@ app.filter('peerColor', function() { }; }); +app.filter('firstCharacter', function() { + return function(input) { + if (input.charAt(0) == '+') { + return '#'; + } + + return input.charAt(0); + }; + }); + + app.controller('OcSmsController', ['$scope', '$interval', '$timeout', '$compile', function ($scope, $interval, $timeout, $compile) { $scope.buttons = [ diff --git a/templates/main.php b/templates/main.php index fd8584d..0563ac6 100644 --- a/templates/main.php +++ b/templates/main.php @@ -11,7 +11,7 @@ use \OCA\OcSms\Lib\CountryCodes;