@ -160,6 +160,12 @@ angular.module('myApp.services', [])
function getUserPhoto ( id , placeholder ) {
function getUserPhoto ( id , placeholder ) {
var user = getUser ( id ) ;
var user = getUser ( id ) ;
if ( id == 333000 ) {
return {
placeholder : 'img/placeholders/DialogListAvatarSystem@2x.png'
}
} ;
return {
return {
placeholder : 'img/placeholders/' + placeholder + 'Avatar' + ( ( Math . abs ( id ) % 8 ) + 1 ) + '@2x.png' ,
placeholder : 'img/placeholders/' + placeholder + 'Avatar' + ( ( Math . abs ( id ) % 8 ) + 1 ) + '@2x.png' ,
location : user && user . photo && user . photo . photo _small
location : user && user . photo && user . photo . photo _small
@ -320,7 +326,7 @@ angular.module('myApp.services', [])
scope . chatID = chatID ;
scope . chatID = chatID ;
var modalInstance = $modal . open ( {
var modalInstance = $modal . open ( {
templateUrl : 'partials/chat_modal.html' ,
templateUrl : 'partials/chat_modal.html?1 ' ,
controller : 'ChatModalController' ,
controller : 'ChatModalController' ,
windowClass : 'chat_modal_window' ,
windowClass : 'chat_modal_window' ,
scope : scope ,
scope : scope ,
@ -1309,9 +1315,9 @@ angular.module('myApp.services', [])
scope . videoID = videoID ;
scope . videoID = videoID ;
scope . progress = { enabled : false } ;
scope . progress = { enabled : false } ;
scope . player = { } ;
scope . player = { } ;
scope . close = function ( ) {
// scope.close = function () {
modalInstance . close ( ) ;
// modalInstance.close();
}
// }
var modalInstance = $modal . open ( {
var modalInstance = $modal . open ( {
templateUrl : 'partials/video_modal.html' ,
templateUrl : 'partials/video_modal.html' ,
@ -1945,3 +1951,33 @@ angular.module('myApp.services', [])
notificationsShown = [ ] ;
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
}
} )