|
|
@ -1411,6 +1411,9 @@ angular.module('myApp.services', []) |
|
|
|
if (message.action._ == 'messageActionChatEditPhoto') { |
|
|
|
if (message.action._ == 'messageActionChatEditPhoto') { |
|
|
|
message.action.photo = AppPhotosManager.wrapForHistory(message.action.photo.id); |
|
|
|
message.action.photo = AppPhotosManager.wrapForHistory(message.action.photo.id); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (message.action._ == 'messageActionChatEditTitle') { |
|
|
|
|
|
|
|
message.action.rTitle = RichTextProcessor.wrapRichText(message.action.title, {noLinks: true, noLinebreaks: true}) || 'DELETED'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (message.action.user_id) { |
|
|
|
if (message.action.user_id) { |
|
|
|
message.action.user = AppUsersManager.getUser(message.action.user_id); |
|
|
|
message.action.user = AppUsersManager.getUser(message.action.user_id); |
|
|
@ -1759,19 +1762,25 @@ angular.module('myApp.services', []) |
|
|
|
|
|
|
|
|
|
|
|
function wrapForFull (photoID) { |
|
|
|
function wrapForFull (photoID) { |
|
|
|
var photo = wrapForHistory(photoID), |
|
|
|
var photo = wrapForHistory(photoID), |
|
|
|
fullWidth = Math.min($(window).width() - 60, 542), |
|
|
|
fullWidth = $(window).width() - 36, |
|
|
|
fullHeight = $($window).height() - 150, |
|
|
|
fullHeight = $($window).height() - 150, |
|
|
|
fullPhotoSize = choosePhotoSize(photo, fullWidth, fullHeight), |
|
|
|
fullPhotoSize = choosePhotoSize(photo, fullWidth, fullHeight), |
|
|
|
full = { |
|
|
|
full = { |
|
|
|
placeholder: 'img/placeholders/PhotoThumbModal.gif', |
|
|
|
placeholder: 'img/placeholders/PhotoThumbModal.gif' |
|
|
|
width: fullWidth, |
|
|
|
|
|
|
|
height: fullHeight |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (fullWidth > 800) { |
|
|
|
|
|
|
|
fullWidth -= 200; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
full.width = fullWidth; |
|
|
|
|
|
|
|
full.height = fullHeight; |
|
|
|
|
|
|
|
|
|
|
|
if (fullPhotoSize && fullPhotoSize._ != 'photoSizeEmpty') { |
|
|
|
if (fullPhotoSize && fullPhotoSize._ != 'photoSizeEmpty') { |
|
|
|
if (fullPhotoSize.w > fullPhotoSize.h) { |
|
|
|
if ((fullPhotoSize.w / fullPhotoSize.h) > (fullWidth / fullHeight)) { |
|
|
|
full.height = parseInt(fullPhotoSize.h * fullWidth / fullPhotoSize.w); |
|
|
|
full.height = parseInt(fullPhotoSize.h * fullWidth / fullPhotoSize.w); |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
full.width = parseInt(fullPhotoSize.w * fullHeight / fullPhotoSize.h); |
|
|
|
full.width = parseInt(fullPhotoSize.w * fullHeight / fullPhotoSize.h); |
|
|
|
if (full.width > fullWidth) { |
|
|
|
if (full.width > fullWidth) { |
|
|
|
full.height = parseInt(full.height * fullWidth / full.width); |
|
|
|
full.height = parseInt(full.height * fullWidth / full.width); |
|
|
@ -1779,6 +1788,11 @@ angular.module('myApp.services', []) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (full.width >= fullPhotoSize.w && full.height >= fullPhotoSize.h) { |
|
|
|
|
|
|
|
full.width = fullPhotoSize.w; |
|
|
|
|
|
|
|
full.height = fullPhotoSize.h; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
full.location = fullPhotoSize.location; |
|
|
|
full.location = fullPhotoSize.location; |
|
|
|
full.size = fullPhotoSize.size; |
|
|
|
full.size = fullPhotoSize.size; |
|
|
|
} |
|
|
|
} |
|
|
@ -1796,7 +1810,8 @@ angular.module('myApp.services', []) |
|
|
|
var modalInstance = $modal.open({ |
|
|
|
var modalInstance = $modal.open({ |
|
|
|
templateUrl: 'partials/photo_modal.html', |
|
|
|
templateUrl: 'partials/photo_modal.html', |
|
|
|
controller: 'PhotoModalController', |
|
|
|
controller: 'PhotoModalController', |
|
|
|
scope: scope |
|
|
|
scope: scope, |
|
|
|
|
|
|
|
windowClass: 'photo_modal_window' |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|