提交 b0c69d46 编写于 作者: C Catouse

* updated documents and rebuilt dist.

上级 caf2d58e
/*!
* ZUI - v1.2.0 - 2014-11-11
* ZUI - v1.2.0 - 2014-11-13
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2014 cnezsoft.com; Licensed MIT
......@@ -4333,11 +4333,33 @@
that.$.data('zui.messager', that);
};
Messager.prototype.show = function()
Messager.prototype.show = function(message)
{
var that = this, options = this.options;
if(lastMessager && lastMessager.isShow) lastMessager.hide();
if(lastMessager)
{
if(lastMessager.id == that.id)
{
that.$.removeClass('in');
}
else if(lastMessager.isShow)
{
lastMessager.hide();
}
}
if(that.hiding)
{
clearTimeout(that.hiding);
that.hiding = null;
}
if(message)
{
that.message = (options.icon ? '<i class="icon-' + options.icon + ' icon"></i> ' : '') + message;
that.$.find('.messager-content').html(that.message);
}
that.$.appendTo(options.parent).show();
......@@ -4355,7 +4377,7 @@
if(options.time)
{
setTimeout(function(){that.hide();}, options.time);
that.hiding = setTimeout(function(){that.hide();}, options.time);
}
that.isShow = true;
......
/*!
* ZUI - v1.2.0 - 2014-11-10
* ZUI - v1.2.0 - 2014-11-13
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2014 cnezsoft.com; Licensed MIT
......
/*!
* ZUI - v1.2.0 - 2014-11-10
* ZUI - v1.2.0 - 2014-11-13
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2014 cnezsoft.com; Licensed MIT
......
此差异已折叠。
......@@ -3079,8 +3079,19 @@ msg.hide();
{
$('.show-messager').on('click', function()
{
var options = $(this).data();
$.messager.show(options.content, options);
var $this = $(this);
var data = $this.data('zui.messager');
if(data)
{
console.log('show exist');
data.show(new Date());
}
else
{
console.log('show new');
var options = $this.data();
$this.data('zui.messager', $.messager.show(options.content, options));
}
});
$('.messager-example').click(function()
......
/*!
* ZUI - v1.2.0 - 2014-11-11
* ZUI - v1.2.0 - 2014-11-13
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2014 cnezsoft.com; Licensed MIT
......@@ -4333,11 +4333,33 @@
that.$.data('zui.messager', that);
};
Messager.prototype.show = function()
Messager.prototype.show = function(message)
{
var that = this, options = this.options;
if(lastMessager && lastMessager.isShow) lastMessager.hide();
if(lastMessager)
{
if(lastMessager.id == that.id)
{
that.$.removeClass('in');
}
else if(lastMessager.isShow)
{
lastMessager.hide();
}
}
if(that.hiding)
{
clearTimeout(that.hiding);
that.hiding = null;
}
if(message)
{
that.message = (options.icon ? '<i class="icon-' + options.icon + ' icon"></i> ' : '') + message;
that.$.find('.messager-content').html(that.message);
}
that.$.appendTo(options.parent).show();
......@@ -4355,7 +4377,7 @@
if(options.time)
{
setTimeout(function(){that.hide();}, options.time);
that.hiding = setTimeout(function(){that.hide();}, options.time);
}
that.isShow = true;
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册