diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index 2fa7fe34b1..ca6d3d4a3a 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -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;
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 1ca28b20fe..99b0bf681b 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -65,28 +65,14 @@
<td width="*" style="min-width: 100px">
<input id="mainInput" ng-model="textInput" ng-enter="send()" ng-disabled="state.sending" ng-focus="true" auto-complete/>
</td>
- <td width="1">
+ <td width="150px">
<button ng-click="send()" ng-disabled="state.sending">Send</button>
+ <button m-file-input="imageFileToSend">Send Image</button>
</td>
<td width="1">
</td>
</tr>
- <tr>
- <td>
- </td>
- <td>
- <input id="mainInput" ng-model="imageURLToSend" ng-enter="sendImage(imageURLToSend)" placeholder="Image URL"/>
- </td>
- <td width="100px">
- <button ng-click="sendImage(imageURLToSend)" ng-disabled="state.sending">Send URL</button>
- </td>
- <!-- TODO: To enable once we have an upload server
- <td width="100px">
- <button m-file-input="imageFileToSend">Send Image</button>
- </td>
- -->
- </tr>
</table>
<span>
|