<button ng-click="i.show=1">button</button>
<span class="elem_list--descr--footer--item foot1"
ng-if="i.show==1">
<i class="icon clock"></i>
<span>{{::i.remain}}</span> {{::i._remain}} осталось
</span>
<div id="wrapper">
<aside id="sidebar-wrapper">
<menu-toggle close="1" class="sidebar_navigation">
<a ui-sref="projects" ui-sref-active="current" class="sidebar_navigation--link">
<span class="sidebar_navigation--icon icon1"></span>Проекты</a>
<a ui-sref="users" ui-sref-active="current" class="sidebar_navigation--link">
<span class="sidebar_navigation--icon icon2"></span>Пользователи
</a>
<a ui-sref="help({'id':'a1'})" class="sidebar_navigation--link">
<span class="sidebar_navigation--icon icon4"></span>
О CONSTART
</a>
<!--<a ui-sref="help({'id':'a3'})" class="sidebar_navigation--link">
<span class="sidebar_navigation--icon icon6"></span>
Стоимость услуг
</a>-->
<a ui-sref="help" class="sidebar_navigation--link">
<span class="sidebar_navigation--icon icon5"></span>
Помощь
</a>
</menu-toggle>
<div class="sidebar--footer">
<div class="social">
<a href="https://vk.com/constartru" target="_blank" class="vk"><i class="fa fa-vk"></i></a>
<a href="https://www.instagram.com/constart.ru/" target="_blank" class="in"><i class="fa fa-instagram"></i></a>
<a href="https://www.youtube.com/channel/UCOxuxxrAhiKB1U0RYQPB5FA" target="_blank"><i class="fa fa-youtube"></i></a>
</div>
<div class="copyright">© 2016 CONSTART <br> ООО "Констарт"</div>
</div>
</aside>
<nav-bar class="navigation"></nav-bar>
<section id="page-content-wrapper">
<ui-view></ui-view>
</section>
<footer>
<div class="footer_wrap">
<div class="footer--links">
<p><a ui-sref="help({'id':'a1'})">О CONSTART</a></p>|
<p><a ui-sref="help({'id':'a8'})">Контакты</a></p>|
<!--<p><a ui-sref="help({'id':'a3'})">Цены на услуги</a></p>|-->
<p><a ui-sref="help">Помощь</a></p>|
<p><a ui-sref="help({'id':'u1'})">Правила пользования платформой</a></p>|
<p><a ui-sref="help({'id':'a64'})">Пользовательское соглашение</a></p>
</div>
<div class="social">
<a href="https://vk.com/constartru" target="_blank" class="vk"><i class="fa fa-vk"></i></a>
<a href="https://www.instagram.com/constart.ru/" target="_blank" class="in"><i class="fa fa-instagram"></i></a>
<a href="https://www.youtube.com/channel/UCOxuxxrAhiKB1U0RYQPB5FA" target="_blank"><i class="fa fa-youtube"></i></a>
</div>
</div>
</footer>
</div>
<toast></toast>
<scroll-up class="btn_up"></scroll-up>
<form name="rl.form">
<div class="form-group">
<label for="">Введите email :</label>
<input type="email" class="form-control" required name="email"
ng-change="rl.check()"
ng-cut="$event.preventDefault()"
ng-copy="$event.preventDefault()"
ng-paste="$event.preventDefault()"
ng-model="rl.email">
</div>
<div class="alert alert-danger"
ng-if="rl.form.email.$touched && (rl.form.email.$error.required ||
rl.form.email.$error.email)">Введите правильный E-Mail
</div>
<div class="form-group">
<label for="">Введите повторно e-mail (во избежание ошибки или опечатки):</label>
<input type="email" class="form-control" required name="emailTwo"
ng-change="rl.check()"
ng-cut="$event.preventDefault()"
ng-copy="$event.preventDefault()"
ng-paste="$event.preventDefault()"
ng-model="rl.emailTwo">
</div>
<div class="alert alert-danger"
ng-if="rl.form.emailTwo.$touched && (rl.form.emailTwo.$error.required ||
rl.form.emailTwo.$error.email)">Введите правильный E-Mail
</div>
<div class="alert alert-danger" ng-if="rl.emailNotEqual">
Почтовые ящики не идентичны
</div>
<div class="alert alert-danger" ng-if="rl.emailOccupied">
Такой пользователь уже зарегистрирован
</div>
<div class="alert alert-success" ng-show="rl.allOk">
Почтовые ящики идентичны
</div>
</form>
$qProvider.errorOnUnhandledRejections(false);//for fix 4 errors in angular 1.6
$compileProvider.commentDirectivesEnabled(false);//for angular 1.6
$compileProvider.cssClassDirectivesEnabled(false);// надо сначала удалить директиву ui-view в классе
$compileProvider.preAssignBindingsEnabled(true); //todo for angular 1.6
html:
<foto-editor
foto-emit-callback="ctrl.setFotoUrl(id,url)"
modal-parent-id="{{$ctrl.idCroppedImg}}"
area-type='circle'
foto-w='{{$ctrl.widthFromParentCtrl}}'
foto-h='{{$ctrl.heightFromParentCtrl}}'
>
</foto-editor>
js
var fotoeditorComponent = {
bindings: {
fotoEmitCallback: '&',
modalParentId: '@',
fotoW: '@',
fotoH: '@',
areaType: '@?'
},...
};
function scrollTo (id) {
var y = $('#'+id).position().top;
y = y+30;
scrollTo(y, 800);
//тут клик по табу $('a[href=\'#specification\']').trigger('click');
};
Math.easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) {
return c/2*t*t + b
}
t--;
return -c/2 * (t*(t-2) - 1) + b;
};
var requestAnimFrame = (function(){
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function( callback ){ window.setTimeout(callback, 1000 / 60); };
})();
function offsetPosition(element) {
var offsetLeft = 0, offsetTop = 0;
do {
offsetLeft += element.offsetLeft;
offsetTop += element.offsetTop
} while (element = element.offsetParent);
return [offsetLeft, offsetTop]
}
function scrollTo(to, duration, callback) {
if(!to) return;
// если передаю ид элемента а не число
if(typeof to === 'string') {
to = offsetPosition(document.querySelector(to))[1]
}
// because it's so fucking difficult to detect the scrolling element, just move them all
function move(amount) {
document.documentElement.scrollTop = amount;
document.body.parentNode.scrollTop = amount;
document.body.scrollTop = amount;
}
function position() {
return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop;
}
var start = position(),
change = to - start,
currentTime = 0,
increment = 20;
duration = (typeof(duration) === 'undefined') ? 500 : duration;
var animateScroll = function() {
// increment the time
currentTime += increment;
// find the value with the quadratic in-out easing function
var val = Math.easeInOutQuad(currentTime, start, change, duration);
// move the document.body
move(val);
// do the animation unless its over
if (currentTime < duration) {
requestAnimFrame(animateScroll);
} else {
if (callback && typeof(callback) === 'function') {
// the animation is done so lets callback
callback();
}
}
};
animateScroll();
}