mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-07 15:31:52 +00:00
Formatting
This commit is contained in:
parent
0e6a2f87f9
commit
60a9f27edb
@ -16,30 +16,30 @@ limitations under the License.
|
|||||||
|
|
||||||
angular.module('RoomController', [])
|
angular.module('RoomController', [])
|
||||||
// FIXME move directives outta here!
|
// FIXME move directives outta here!
|
||||||
.directive("keepScroll", function(){
|
.directive("keepScroll", function() {
|
||||||
return {
|
return {
|
||||||
controller : function($scope){
|
controller : function($scope) {
|
||||||
var element = 0;
|
var element = 0;
|
||||||
this.setElement = function(el){
|
this.setElement = function(el){
|
||||||
element = el;
|
element = el;
|
||||||
}
|
}
|
||||||
this.addItem = function(item){
|
this.addItem = function(item){
|
||||||
element.scrollTop = (element.scrollTop+item.clientHeight+1); //1px for margin
|
element.scrollTop = (element.scrollTop + item.clientHeight);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
link : function(scope,el,attr, ctrl) {
|
link : function(scope, el, attr, ctrl) {
|
||||||
ctrl.setElement(el[0]);
|
ctrl.setElement(el[0]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
// FIXME move directives outta here!
|
// FIXME move directives outta here!
|
||||||
.directive("scrollItem", function(){
|
.directive("scrollItem", function(){
|
||||||
return{
|
return {
|
||||||
require : "^keepScroll",
|
require : "^keepScroll",
|
||||||
link : function(scope, el, att, scrCtrl){
|
link : function(scope, el, att, scrCtrl){
|
||||||
scrCtrl.addItem(el[0]);
|
scrCtrl.addItem(el[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.controller('RoomController', ['$scope', '$http', '$timeout', '$routeParams', '$location', 'matrixService', 'eventStreamService', 'eventHandlerService',
|
.controller('RoomController', ['$scope', '$http', '$timeout', '$routeParams', '$location', 'matrixService', 'eventStreamService', 'eventHandlerService',
|
||||||
function($scope, $http, $timeout, $routeParams, $location, matrixService, eventStreamService, eventHandlerService) {
|
function($scope, $http, $timeout, $routeParams, $location, matrixService, eventStreamService, eventHandlerService) {
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<button ng-click="send()">Send</button>
|
<button ng-click="send()">Send</button>
|
||||||
</td>
|
</td>
|
||||||
<td width="1">
|
<td width="1">
|
||||||
{{ feedback }}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -87,6 +87,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<button ng-click="leaveRoom()">Leave</button>
|
<button ng-click="leaveRoom()">Leave</button>
|
||||||
<button ng-click="loadMoreHistory()" ng-disabled="!state.can_paginate">Load more history</button>
|
<button ng-click="loadMoreHistory()" ng-disabled="!state.can_paginate">Load more history</button>
|
||||||
|
{{ feedback }}
|
||||||
<div ng-hide="!state.stream_failure">
|
<div ng-hide="!state.stream_failure">
|
||||||
{{ state.stream_failure.data.error || "Connection failure" }}
|
{{ state.stream_failure.data.error || "Connection failure" }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user