Pageslide fix for error message and focused element

This commit is contained in:
chris 2013-10-20 20:54:23 +08:00
parent 4403ca3504
commit 606ac05563
2 changed files with 20 additions and 8 deletions

View File

@ -53,6 +53,7 @@ function customOpenSlide() {
.addClass('active');
},
closeFn: function(pageslide, element) {
$('.item-menu').removeAttr('style');
element.removeClass('active')
.closest('.navbar-inner')
.removeClass('active');
@ -60,7 +61,12 @@ function customOpenSlide() {
loadComplete: function(pageslide, element) {
$openSlide.removeClass('active');
$('.navbar-inner').removeClass('active');
element.addClass('active').closest('.navbar-inner').addClass('active');
$('.item-menu').removeAttr('style');
element.addClass('active')
.closest('.item-menu')
.css('display', 'inline-block')
.closest('.navbar-inner')
.addClass('active');
var _id = element.data('id'),
_type = element.hasClass('page') ? 'page' : 'link',
_edit = element.hasClass('edit') ? true : false;
@ -85,6 +91,7 @@ function customOpenSlide() {
.addClass('active');
},
closeFn: function(pageslide, element) {
$('.item-menu').removeAttr('style');
element.removeClass('active')
.closest('.navbar-inner')
.removeClass('active');
@ -93,7 +100,12 @@ function customOpenSlide() {
loadComplete: function(pageslide, element) {
$openSlide.removeClass('active');
$('.navbar-inner').removeClass('active');
element.addClass('active').closest('.navbar-inner').addClass('active');
$('.item-menu').removeAttr('style');
element.addClass('active')
.closest('.item-menu')
.css('display', 'inline-block')
.closest('.navbar-inner')
.addClass('active');
pageslide.find('.content').css('padding', 0);
}
});
@ -153,7 +165,7 @@ function pageSetting(id, edit) {
})
.fail(function(jqXHR, textStatus) {
console.log(jqXHR.status, textStatus)
var $errorMsg = '<div class="error"><div class="msg"><i class="icons-warning"></i><p>Sorry! Something is wrong</p></div></div>'
var $errorMsg = '<div class="error-cover"><div class="msg"><i class="icons-warning"></i><p>Sorry! Something is wrong</p></div></div>'
$('#pageslide .view-page').append($errorMsg);
});
} else {

View File

@ -88,7 +88,7 @@
#pageslide .groups {
margin-bottom: 10px;
}
#pageslide .error {
#pageslide .error-cover {
position: absolute;
top: 0;
bottom: 0;
@ -100,19 +100,19 @@
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=95);
opacity: .95;
}
#pageslide .error .msg {
#pageslide .error-cover .msg {
position: absolute;
top: 50%;
margin-top: -55px;
height: 110px;
width: 100%;
}
#pageslide .error i {
#pageslide .error-cover i {
font-size: 6em;
}
#pageslide .error p {
#pageslide .error-cover p {
font-size: 1.3em;
}
#pageslide .suckIE {
color: #EE4545;
}
}