Replaced the image URL text input by a file selector button: "Send Image"

This commit is contained in:
Emmanuel ROHEE 2014-08-20 14:09:55 +02:00
parent 955662d64c
commit d6a3639269
2 changed files with 5 additions and 18 deletions

View file

@ -15,8 +15,8 @@ limitations under the License.
*/
angular.module('RoomController', ['ngSanitize'])
.controller('RoomController', ['$scope', '$http', '$timeout', '$routeParams', '$location', 'matrixService', 'eventStreamService', 'eventHandlerService',
function($scope, $http, $timeout, $routeParams, $location, matrixService, eventStreamService, eventHandlerService) {
.controller('RoomController', ['$scope', '$http', '$timeout', '$routeParams', '$location', 'matrixService', 'eventStreamService', 'eventHandlerService', 'mFileUpload',
function($scope, $http, $timeout, $routeParams, $location, matrixService, eventStreamService, eventHandlerService, mFileUpload) {
'use strict';
var MESSAGES_PER_PAGINATION = 30;
@ -372,6 +372,7 @@ angular.module('RoomController', ['ngSanitize'])
matrixService.sendImageMessage($scope.room_id, url).then(
function() {
console.log("Image sent");
$scope.state.sending = false;
},
function(error) {
$scope.feedback = "Failed to send image: " + error.data.error;