1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

[repo setting] bugfix for transfer

This commit is contained in:
llj
2015-05-22 15:01:38 +08:00
parent 02ab013dd6
commit 6630cade24
6 changed files with 26 additions and 19 deletions

View File

@@ -133,7 +133,7 @@ define([
feedback: function(con, type, time) {
var time = time || 5000;
if ($('.messages')[0]) {
if ($('.messages').length > 0) {
$('.messages').html('<li class="' + type + '">' + con + '</li>');
} else {
var html = '<ul class="messages"><li class="' + type + '">' + con + '</li></ul>';
@@ -143,6 +143,15 @@ define([
setTimeout(function() { $('.messages').addClass('hide'); }, time);
},
// for '{% if messages %}'
showMsg: function() {
var msg = $('.messages');
if (msg.length > 0) {
msg.css({'left':($(window).width() - msg.width())/2, 'top':10}).removeClass('hide');
setTimeout(function() { msg.addClass('hide'); }, 5000);
}
},
showFormError: function(formid, error_msg) {
$("#" + formid + " .error").html(error_msg).removeClass('hide');
$("#simplemodal-container").css({'height':'auto'});