mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Slide bugfix
This commit is contained in:
parent
65b0654f6c
commit
12abf226cf
2 changed files with 16 additions and 15 deletions
|
@ -44,11 +44,11 @@ body h5 {
|
||||||
}
|
}
|
||||||
|
|
||||||
.move {
|
.move {
|
||||||
-webkit-transition: margin-left 0.3s ease, margin-right 0.3s ease;
|
-webkit-transition: margin-left 0.4s ease, margin-right 0.4s ease;
|
||||||
-moz-transition: margin-left 0.3s ease, margin-right 0.3s ease;
|
-moz-transition: margin-left 0.4s ease, margin-right 0.4s ease;
|
||||||
-o-transition: margin-left 0.3s ease, margin-right 0.3s ease;
|
-o-transition: margin-left 0.4s ease, margin-right 0.4s ease;
|
||||||
-ms-transition: margin-left 0.3s ease, margin-right 0.3s ease;
|
-ms-transition: margin-left 0.4s ease, margin-right 0.4s ease;
|
||||||
transition: margin-left 0.3s ease, margin-right 0.3s ease;
|
transition: margin-left 0.4s ease, margin-right 0.4s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .form-control {
|
body .form-control {
|
||||||
|
|
21
js/app.js
21
js/app.js
|
@ -96,24 +96,27 @@ app = Sammy('#main', function (sam) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
blockSize = $('#slider').innerWidth()-20;
|
blockSize = $('#slider').width();
|
||||||
|
|
||||||
|
// Slide back effect
|
||||||
if (store.get('slide') == 'back') {
|
if (store.get('slide') == 'back') {
|
||||||
if ($('#slideBack').is(':visible')) $('#slideBack').hide();
|
store.clear('slide');
|
||||||
|
$('#slideBack').css('display', 'none');
|
||||||
$('#slider-container').removeClass('move').css('margin-left', '-'+ blockSize +'px');
|
$('#slider-container').removeClass('move').css('margin-left', '-'+ blockSize +'px');
|
||||||
$('#slideTo').show().html($('#main').html());
|
$('#slideTo').show().html($('#main').html());
|
||||||
leSwap();
|
leSwap();
|
||||||
$('#slider-container').addClass('move').css('margin-left', '0px');
|
$('#slider-container').addClass('move').css('margin-left', '0px');
|
||||||
|
|
||||||
store.clear('slide');
|
// Slide to effect
|
||||||
} else if (store.get('slide') == 'to') {
|
} else if (store.get('slide') == 'to') {
|
||||||
if ($('#slideTo').is(':visible')) $('#slideTo').hide();
|
store.clear('slide');
|
||||||
|
$('#slideTo').css('display', 'none');
|
||||||
|
$('#slider-container').removeClass('move').css('margin-left', '-'+ blockSize +'px');
|
||||||
$('#slider-container').removeClass('move').css('margin-left', '0px');
|
$('#slider-container').removeClass('move').css('margin-left', '0px');
|
||||||
$('#slideBack').show().html($('#main').html());
|
$('#slideBack').show().html($('#main').html());
|
||||||
leSwap();
|
leSwap();
|
||||||
$('#slider-container').addClass('move').css('margin-left', '-'+ ($('#slider').innerWidth()-10) +'px');
|
$('#slider-container').addClass('move').css('margin-left', '-'+ blockSize +'px');
|
||||||
|
|
||||||
store.clear('slide');
|
|
||||||
} else {
|
} else {
|
||||||
leSwap();
|
leSwap();
|
||||||
}
|
}
|
||||||
|
@ -335,10 +338,8 @@ app = Sammy('#main', function (sam) {
|
||||||
*/
|
*/
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
app.run('#/');
|
app.run('#/');
|
||||||
$('.block').width($('#slider').innerWidth()-20);
|
$('#slider-container').width(2*$('#slider').width() +'px');
|
||||||
$('#slider-container').width(3*$('#slider').innerWidth() +'px');
|
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
$('.block').width($('#slider').innerWidth()-20);
|
$('#slider-container').width(2*$('#slider').width() +'px');
|
||||||
$('#slider-container').width(3*$('#slider').innerWidth() +'px');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue