11 changed files with 87 additions and 18 deletions
After Width: | Height: | Size: 959 B |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 2.6 KiB |
@ -160,6 +160,12 @@ angular.module('myApp.services', [])
|
||||
function getUserPhoto(id, placeholder) { |
||||
var user = getUser(id); |
||||
|
||||
if (id == 333000) { |
||||
return { |
||||
placeholder: 'img/placeholders/[email protected]' |
||||
} |
||||
}; |
||||
|
||||
return { |
||||
placeholder: 'img/placeholders/' + placeholder + 'Avatar'+((Math.abs(id) % 8) + 1)+'@2x.png', |
||||
location: user && user.photo && user.photo.photo_small |
||||
@ -320,7 +326,7 @@ angular.module('myApp.services', [])
|
||||
scope.chatID = chatID; |
||||
|
||||
var modalInstance = $modal.open({ |
||||
templateUrl: 'partials/chat_modal.html', |
||||
templateUrl: 'partials/chat_modal.html?1', |
||||
controller: 'ChatModalController', |
||||
windowClass: 'chat_modal_window', |
||||
scope: scope, |
||||
@ -1309,9 +1315,9 @@ angular.module('myApp.services', [])
|
||||
scope.videoID = videoID; |
||||
scope.progress = {enabled: false}; |
||||
scope.player = {}; |
||||
scope.close = function () { |
||||
modalInstance.close(); |
||||
} |
||||
// scope.close = function () {
|
||||
// modalInstance.close();
|
||||
// }
|
||||
|
||||
var modalInstance = $modal.open({ |
||||
templateUrl: 'partials/video_modal.html', |
||||
@ -1945,3 +1951,33 @@ angular.module('myApp.services', [])
|
||||
notificationsShown = []; |
||||
} |
||||
}) |
||||
|
||||
|
||||
.service('ErrorService', function ($rootScope, $modal) { |
||||
|
||||
function showError (templateUrl, params, options) { |
||||
var scope = $rootScope.$new(); |
||||
angular.extend(scope, params); |
||||
|
||||
return $modal.open({ |
||||
templateUrl: templateUrl, |
||||
// controller: 'ErrorModalController',
|
||||
scope: scope, |
||||
windowClass: options.windowClass || '' |
||||
}); |
||||
} |
||||
|
||||
function showSimpleError (title, description) { |
||||
return showError ('partials/error_modal.html', { |
||||
title: title, |
||||
description: description |
||||
}, { |
||||
windowClass: 'error_modal_window' |
||||
}); |
||||
}; |
||||
|
||||
return { |
||||
showError: showError, |
||||
showSimpleError: showSimpleError |
||||
} |
||||
}) |
||||
|
@ -0,0 +1,17 @@
|
||||
<div class="error_modal_wrap"> |
||||
|
||||
<div class="modal-header"> |
||||
<a class="modal-close-link" ng-click="$close()">Close</a> |
||||
<h4 class="modal-title">{{title}}</h4> |
||||
</div> |
||||
|
||||
|
||||
<div class="modal-body"> |
||||
|
||||
<div class="error_modal_description"> |
||||
{{description}} |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
</div> |
Loading…
Reference in new issue