From ab07892bfcfc8fe120a5062517bf17db50a76f8d Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Tue, 25 Mar 2014 20:33:23 +0400 Subject: [PATCH] Supported send_call_timeout --- app/js/controllers.js | 2 +- app/js/directives.js | 9 +++------ app/partials/head.html | 2 +- app/partials/login.html | 6 +++--- webogram.sublime-project | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index 0ed16438..2274e4b7 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -86,7 +86,7 @@ angular.module('myApp.controllers', []) $scope.credentials.phone_occupied = sentCode.phone_registered; $scope.error = {}; - $scope.callPending.remaining = 60; + $scope.callPending.remaining = sentCode.send_call_timeout; callCheck(); }, function (error) { diff --git a/app/js/directives.js b/app/js/directives.js index 70f17ef4..86753fa3 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -1001,13 +1001,10 @@ angular.module('myApp.directives', ['myApp.filters']) var updateMargin = function () { var height = element[0].offsetHeight, contHeight = $($window).height(), - ratio = attrs.myVerticalPosition && parseFloat(attrs.myVerticalPosition) || 0.5; + ratio = attrs.myVerticalPosition && parseFloat(attrs.myVerticalPosition) || 0.5, + margin = height < contHeight ? parseInt((contHeight - height) * ratio) : ''; - if (height < contHeight) { - element.css('marginTop', parseInt((contHeight - height) * ratio)); - } else { - element.css('marginTop', ''); - } + element.css({marginTop: margin, marginBottom: margin}); }; onContentLoaded(updateMargin); diff --git a/app/partials/head.html b/app/partials/head.html index 519473f2..668a54be 100644 --- a/app/partials/head.html +++ b/app/partials/head.html @@ -13,7 +13,7 @@ -