Browse Source

Fixed no message photo modal

master
Igor Zhukov 11 years ago
parent
commit
b6aea55826
  1. 8
      app/js/controllers.js
  2. 2
      app/partials/photo_modal.html
  3. 2
      app/partials/video_modal.html

8
app/js/controllers.js

@ -871,6 +871,13 @@ angular.module('myApp.controllers', [])
$scope.photo = AppPhotosManager.wrapForFull($scope.photoID); $scope.photo = AppPhotosManager.wrapForFull($scope.photoID);
$scope.nav = {}; $scope.nav = {};
if (!$scope.messageID) {
$scope.nav.next = function () {
$modalInstance.close();
}
return;
}
var peerID = AppMessagesManager.getMessagePeer(AppMessagesManager.getMessage($scope.messageID)), var peerID = AppMessagesManager.getMessagePeer(AppMessagesManager.getMessage($scope.messageID)),
inputPeer = AppPeersManager.getInputPeerByID(peerID), inputPeer = AppPeersManager.getInputPeerByID(peerID),
inputQuery = '', inputQuery = '',
@ -996,6 +1003,7 @@ angular.module('myApp.controllers', [])
$scope.progress = {enabled: false}; $scope.progress = {enabled: false};
$scope.player = {}; $scope.player = {};
$scope.forward = function () { $scope.forward = function () {
var messageID = $scope.messageID; var messageID = $scope.messageID;
PeersSelectService.selectPeer().then(function (peerString) { PeersSelectService.selectPeer().then(function (peerString) {

2
app/partials/photo_modal.html

@ -4,7 +4,7 @@
<div class="photo_modal_image_wrap" my-load-full-photo full-photo="photo.full" thumb-location="photo.thumb.location" ng-click="nav.next()"> </div> <div class="photo_modal_image_wrap" my-load-full-photo full-photo="photo.full" thumb-location="photo.thumb.location" ng-click="nav.next()"> </div>
<div class="media_modal_actions pull-right"> <div class="media_modal_actions pull-right" ng-if="messageID">
<a href="" class="media_modal_action_link" ng-click="forward()">Forward</a> <a href="" class="media_modal_action_link" ng-click="forward()">Forward</a>
<a href="" class="media_modal_action_link" ng-click="delete()">Delete</a> <a href="" class="media_modal_action_link" ng-click="delete()">Delete</a>
</div> </div>

2
app/partials/video_modal.html

@ -4,7 +4,7 @@
<div class="video_modal_image_wrap" my-load-video video="video"></div> <div class="video_modal_image_wrap" my-load-video video="video"></div>
<div class="media_modal_actions pull-right"> <div class="media_modal_actions pull-right" ng-if="messageID">
<a href="" class="media_modal_action_link" ng-click="forward()">Forward</a> <a href="" class="media_modal_action_link" ng-click="forward()">Forward</a>
<a href="" class="media_modal_action_link" ng-click="delete()">Delete</a> <a href="" class="media_modal_action_link" ng-click="delete()">Delete</a>
</div> </div>

Loading…
Cancel
Save