Browse Source

Fix short history move bug

master
Igor Zhukov 11 years ago
parent
commit
463f1d186e
  1. 2
      app/index.html
  2. 7
      app/js/directives.js

2
app/index.html

@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
<script type="text/javascript" src="js/services.js?3"></script>
<script type="text/javascript" src="js/controllers.js?2"></script>
<script type="text/javascript" src="js/filters.js?1"></script>
<script type="text/javascript" src="js/directives.js?2"></script>
<script type="text/javascript" src="js/directives.js?3"></script>
</body>
</html>

7
app/js/directives.js

@ -97,6 +97,7 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -97,6 +97,7 @@ angular.module('myApp.directives', ['myApp.filters'])
function link (scope, element, attrs) {
var historyWrap = $('.im_history_wrap')[0],
historyEl = $('.im_history')[0],
scrollableWrap = $('.im_history_scrollable_wrap')[0],
scrollable = $('.im_history_scrollable')[0],
panelWrap = $('.im_history_panel_wrap', element)[0],
@ -182,6 +183,9 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -182,6 +183,9 @@ angular.module('myApp.directives', ['myApp.filters'])
$(historyWrap).css({
height: $($window).height() - panelWrap.offsetHeight - sendFormWrap.offsetHeight - 90
});
$(historyEl).css({
minHeight: $($window).height() - panelWrap.offsetHeight - sendFormWrap.offsetHeight - 90 - 44
});
if (heightOnly) return;
if (atBottom) {
@ -329,10 +333,9 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -329,10 +333,9 @@ angular.module('myApp.directives', ['myApp.filters'])
};
function link (scope, element, attrs) {
scope.$watch('thumb.location', function (newVal) {
if (!scope.thumb || !scope.thumb.location) {
element.attr('src', scope.thumb.placeholder || '');
element.attr('src', scope.thumb && scope.thumb.placeholder || '');
return;
}

Loading…
Cancel
Save