提交 c04f346a 编写于 作者: C Catouse

* build for document.

上级 851f2e42
/*!
* ZUI - v1.3.2 - 2016-01-14
* ZUI - v1.4.0 - 2016-01-22
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2016 cnezsoft.com; Licensed MIT
......@@ -57,7 +57,9 @@
-webkit-transition: all .3s;
transition: all .3s;
}
.example:focus {
.example:focus,
.example [contenteditable]:focus {
outline: none;
box-shadow: 0 1px 15px rgba(0, 0, 0, .5);
-webkit-animation-name: glow;
-webkit-animation-duration: 1s;
......@@ -68,20 +70,38 @@
.example.no-padding {
padding: 0;
}
.example.borderless {
border: none;
}
.example > *:last-child {
margin-bottom: 0;
}
pre {
position: relative;
padding: 10px 20px;
margin-bottom: 15px;
border-color: #ddd;
border-radius: 0;
}
pre em {
display: inline-block;
font-weight: 700;
}
pre:hover em {
background-color: #ffe5e0;
}
pre.linenums {
padding: 10px;
}
.example + pre,
pre + pre {
padding: 10px 20px;
margin: -15px 0 15px;
border: 1px solid #ddd;
border-top: none;
border-radius: 0;
}
pre {
.copyable {
position: relative;
border-radius: 0;
}
.btn-copy-code {
position: absolute;
......@@ -104,7 +124,9 @@ pre {
background-color: #fff;
border-color: #3280fc;
}
pre:hover > .btn-copy-code {
pre:hover > .btn-copy-code,
.copyable:hover > .btn-copy-code,
.copyable.fixed-copy-btn > .btn-copy-code {
opacity: 1;
}
.nav-examples.nav-tabs > li > a {
......@@ -142,8 +164,8 @@ a.avatar:hover {
text-align: center;
filter: alpha(opacity=0);
opacity: 0;
-webkit-transition: all .5s cubic-bezier(.175, .885, .32, 1);
transition: all .5s cubic-bezier(.175, .885, .32, 1);
-webkit-transition: all .4s cubic-bezier(.175, .885, .32, 1);
transition: all .4s cubic-bezier(.175, .885, .32, 1);
-webkit-transform: scale(.5);
transform: scale(.5);
}
......@@ -344,8 +366,8 @@ body {
#navbar {
padding: 20px 0;
border-bottom: none;
-webkit-transition: padding-top .5s cubic-bezier(.175, .885, .32, 1);
transition: padding-top .5s cubic-bezier(.175, .885, .32, 1);
-webkit-transition: padding-top .4s cubic-bezier(.175, .885, .32, 1);
transition: padding-top .4s cubic-bezier(.175, .885, .32, 1);
}
#navbar > .container {
position: relative;
......@@ -654,6 +676,9 @@ body {
filter: alpha(opacity=100);
opacity: 1;
}
#grid .card-heading > .icon:before {
position: relative;
}
#grid .card-heading > h5 {
padding: 5px 0;
margin: 0;
......@@ -925,6 +950,9 @@ body {
#grid .chapter[data-accent="blue"] .card-heading > .icon:hover {
cursor: pointer;
}
#grid .chapter[data-accent="blue"] .card-heading > .icon.text-icon {
font-size: 12px;
}
#grid .chapter[data-accent="blue"] .card-heading.hover {
background-color: #ddf3f5;
}
......@@ -1030,6 +1058,9 @@ body {
#grid .chapter[data-accent="primary"] .card-heading > .icon:hover {
cursor: pointer;
}
#grid .chapter[data-accent="primary"] .card-heading > .icon.text-icon {
font-size: 12px;
}
#grid .chapter[data-accent="primary"] .card-heading.hover {
background-color: #ebf2f9;
}
......@@ -1135,6 +1166,9 @@ body {
#grid .chapter[data-accent="yellow"] .card-heading > .icon:hover {
cursor: pointer;
}
#grid .chapter[data-accent="yellow"] .card-heading > .icon.text-icon {
font-size: 12px;
}
#grid .chapter[data-accent="yellow"] .card-heading.hover {
background-color: #fff0d5;
}
......@@ -1240,6 +1274,9 @@ body {
#grid .chapter[data-accent="green"] .card-heading > .icon:hover {
cursor: pointer;
}
#grid .chapter[data-accent="green"] .card-heading > .icon.text-icon {
font-size: 12px;
}
#grid .chapter[data-accent="green"] .card-heading.hover {
background-color: #ddf4df;
}
......@@ -1345,6 +1382,9 @@ body {
#grid .chapter[data-accent="red"] .card-heading > .icon:hover {
cursor: pointer;
}
#grid .chapter[data-accent="red"] .card-heading > .icon.text-icon {
font-size: 12px;
}
#grid .chapter[data-accent="red"] .card-heading.hover {
background-color: #ffe5e0;
}
......@@ -1450,6 +1490,9 @@ body {
#grid .chapter[data-accent="brown"] .card-heading > .icon:hover {
cursor: pointer;
}
#grid .chapter[data-accent="brown"] .card-heading > .icon.text-icon {
font-size: 12px;
}
#grid .chapter[data-accent="brown"] .card-heading.hover {
background-color: #f7ebe1;
}
......@@ -1555,6 +1598,9 @@ body {
#grid .chapter[data-accent="purple"] .card-heading > .icon:hover {
cursor: pointer;
}
#grid .chapter[data-accent="purple"] .card-heading > .icon.text-icon {
font-size: 12px;
}
#grid .chapter[data-accent="purple"] .card-heading.hover {
background-color: #f5eeff;
}
......@@ -2045,8 +2091,8 @@ body.query-enabled[data-query='icons'] #grid .card.open.section-preview-show .se
display: block;
content: ' ';
background-color: #ddd;
-webkit-transition: background-color .5s cubic-bezier(.175, .885, .32, 1);
transition: background-color .5s cubic-bezier(.175, .885, .32, 1);
-webkit-transition: background-color .4s cubic-bezier(.175, .885, .32, 1);
transition: background-color .4s cubic-bezier(.175, .885, .32, 1);
}
#pageTogger:before {
left: 8px;
......@@ -2193,8 +2239,8 @@ body.page-show {
}
body.page-show #header {
box-shadow: none!important;
-webkit-transition: background-color .5s cubic-bezier(.175, .885, .32, 1);
transition: background-color .5s cubic-bezier(.175, .885, .32, 1);
-webkit-transition: background-color .4s cubic-bezier(.175, .885, .32, 1);
transition: background-color .4s cubic-bezier(.175, .885, .32, 1);
}
body.page-show #compactTogger:before {
content: '\e60b';
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
/*!
* ZUI - v1.3.2 - 2016-01-14
* ZUI - v1.4.0 - 2016-01-22
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2016 cnezsoft.com; Licensed MIT
......@@ -149,9 +149,9 @@
'color-primary': '#8D6E63',
'color-secondary': '#795548',
'color-pale': '#f7ebe1',
'border-radius-base': '4px',
'border-radius-large': '6px',
'border-radius-small': '2px'
'border-radius-base': '15px',
'border-radius-large': '15px',
'border-radius-small': '15px'
}
},
"yellow": {
......@@ -1481,7 +1481,7 @@
namesDot = name + 's.';
for(var i = 0; i < len; ++i) {
var item = libNames[i];
if(item === name || item === names || (lib && !lib.src && isInLib(name, lib.dpds))) {
if(item === name || item === names || item.startsWith(nameDot) || item.startsWith(namesDot)) {
return true;
}
}
......@@ -1556,7 +1556,7 @@
pkgLibs.separate = getBuildList(pkg, pkg.builds.separate, pkg.lib);
function getLibSource(lib, src, libName) {
if(lib.src && !lib.thirdpart) {
if(lib.src) {
['less', 'js', 'resource'].forEach(function(srcTypeName) {
if(lib.src[srcTypeName]) {
lib.src[srcTypeName].forEach(function(srcName) {
......@@ -1571,9 +1571,9 @@
}
});
}
if(lib.dpds && lib.dpds) {
if(lib.dpds) {
lib.dpds.forEach(function(dpdsName) {
if(dpdsName.startsWith(libName) && pkg.lib[dpdsName]) {
if(dpdsName.startsWith(libName) && pkg.lib[dpdsName] && !pkg.lib[dpdsName].thirdpart) {
getLibSource(pkg.lib[dpdsName], src, libName);
}
});
......@@ -1622,7 +1622,6 @@
}
lib.src = {};
getLibSource(pkgLib, lib.src, lib.code);
lib.srcCount = (lib.src.js ? lib.src.js.length : 0) + (lib.src.less ? lib.src.less.length : 0) + (lib.src.source ? lib.src.source.length : 0);
......@@ -1708,17 +1707,17 @@
$('#copyCodeTip').removeClass('tooltip-success tooltip-warning');
});
$(document).on('mouseenter', 'pre.prettyprint, pre.copyable', function() {
var $pre = $(this);
var $codes = $pre.children('code, .linenums');
if(!$codes.length) return;
$(document).on('mouseenter', 'pre.prettyprint, .copyable', function() {
var $copyable = $(this);
var $copyableTarget = $copyable.children('code, .linenums, .copyable-target');
if(!$copyableTarget.length) return;
if(!$codes.attr('id')) {
$codes.attr('id', 'code-' + $.zui.uuid())
if(!$copyableTarget.attr('id')) {
$copyableTarget.attr('id', 'code-' + $.zui.uuid())
}
$pre.prepend($copyCodeBtn);
$copyCodeBtn.attr('data-clipboard-target', '#' + $codes.attr('id'));
$pre.one('mouseleave', function() {
$copyable.prepend($copyCodeBtn);
$copyCodeBtn.attr('data-clipboard-target', '#' + $copyableTarget.attr('id'));
$copyable.one('mouseleave', function() {
$copyCodeBtn.detach();
});
});
......@@ -1800,8 +1799,10 @@
} else {
setTimeout(function() {
compileTheme(theme, null, function(style) {
theme.css = style.css;
readyChangeTheme(style.css);
if(style) {
theme.css = style.css;
}
readyChangeTheme(style ? style.css : '');
});
}, 500);
}
......
此差异已折叠。
/*!
* ZUI - v1.3.2 - 2016-01-14
* ZUI - v1.4.0 - 2016-01-22
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2016 cnezsoft.com; Licensed MIT
......@@ -323,6 +323,115 @@
}());
/* ========================================================================
* Bootstrap: button.js v3.0.3
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+ function($) {
'use strict';
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
var Button = function(element, options) {
this.$element = $(element)
this.options = $.extend({}, Button.DEFAULTS, options)
this.isLoading = false
}
Button.DEFAULTS = {
loadingText: 'loading...'
}
Button.prototype.setState = function(state) {
var d = 'disabled'
var $el = this.$element
var val = $el.is('input') ? 'val' : 'html'
var data = $el.data()
state = state + 'Text'
if(!data.resetText) $el.data('resetText', $el[val]())
$el[val](data[state] || this.options[state])
// push to event loop to allow forms to submit
setTimeout($.proxy(function() {
if(state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
} else if(this.isLoading) {
this.isLoading = false
$el.removeClass(d).removeAttr(d)
}
}, this), 0)
}
Button.prototype.toggle = function() {
var changed = true
var $parent = this.$element.closest('[data-toggle="buttons"]')
if($parent.length) {
var $input = this.$element.find('input')
if($input.prop('type') == 'radio') {
if($input.prop('checked') && this.$element.hasClass('active')) changed = false
else $parent.find('.active').removeClass('active')
}
if(changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
}
if(changed) this.$element.toggleClass('active')
}
// BUTTON PLUGIN DEFINITION
// ========================
var old = $.fn.button
$.fn.button = function(option) {
return this.each(function() {
var $this = $(this)
var data = $this.data('zui.button')
var options = typeof option == 'object' && option
if(!data) $this.data('zui.button', (data = new Button(this, options)))
if(option == 'toggle') data.toggle()
else if(option) data.setState(option)
})
}
$.fn.button.Constructor = Button
// BUTTON NO CONFLICT
// ==================
$.fn.button.noConflict = function() {
$.fn.button = old
return this
}
// BUTTON DATA-API
// ===============
$(document).on('click.zui.button.data-api', '[data-toggle^=button]', function(e) {
var $btn = $(e.target)
if(!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle')
e.preventDefault()
})
}(jQuery);
/* ========================================================================
* Bootstrap: alert.js v3.0.0
* http://twbs.github.com/bootstrap/javascript.html#alerts
......@@ -865,11 +974,10 @@
// The browser modal class
var Browser = function() {
var isIE = this.isIE;
var ie = isIE();
var ie = this.isIE() || this.isIE10() || false;
if(ie) {
for(var i = 10; i > 5; i--) {
if(isIE(i)) {
if(this.isIE(i)) {
ie = i;
break;
}
......@@ -899,21 +1007,19 @@
};
// Show browse happy tip
Browser.prototype.tip = function() {
if(this.ie && this.ie < 8) {
var $browseHappy = $('#browseHappyTip');
if(!$browseHappy.length) {
$browseHappy = $('<div id="browseHappyTip" class="alert alert-dismissable alert-danger alert-block" style="position: relative; z-index: 99999"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><div class="container"><div class="content text-center"></div></div></div>');
$browseHappy.prependTo('body');
}
$browseHappy.find('.content').html(this.browseHappyTip || browseHappyTip[$.zui.clientLang() || 'zh_cn']);
Browser.prototype.tip = function(showCoontent) {
var $browseHappy = $('#browseHappyTip');
if(!$browseHappy.length) {
$browseHappy = $('<div id="browseHappyTip" class="alert alert-dismissable alert-danger-inverse alert-block" style="position: relative; z-index: 99999"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><div class="container"><div class="content text-center"></div></div></div>');
$browseHappy.prependTo('body');
}
$browseHappy.find('.content').html(showCoontent || this.browseHappyTip || browseHappyTip[$.zui.clientLang() || 'zh_cn']);
};
// Detect it is IE, can given a version
Browser.prototype.isIE = function(version) {
// var ie = /*@cc_on !@*/false;
if(version === 10) return this.isIE10();
var b = document.createElement('b');
b.innerHTML = '<!--[if IE ' + (version || '') + ']><i></i><![endif]-->';
return b.getElementsByTagName('i').length === 1;
......@@ -921,7 +1027,7 @@
// Detect ie 10 with hack
Browser.prototype.isIE10 = function() {
return( /*@cc_on!@*/ false);
return (/*@cc_on!@*/false);
};
$.zui({
......@@ -930,7 +1036,9 @@
$(function() {
if(!$('body').hasClass('disabled-browser-tip')) {
$.zui.browser.tip();
if($.zui.browser.ie && $.zui.browser.ie < 8) {
$.zui.browser.tip();
}
}
});
}(jQuery));
......@@ -1490,7 +1598,7 @@
this.$element = $(element).is('body') ? $(window) : $(element)
this.$body = $('body')
this.$scrollElement = this.$element.on('scroll. ' + zuiname + ' .data-api', process)
this.$scrollElement = this.$element.on('scroll.' + zuiname + '.data-api', process)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
if(!this.selector) this.selector = (this.options.target || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
......@@ -2280,14 +2388,16 @@
Sortable.prototype.reset = function() {
var that = this,
order = 0;
var list = this.$.children(this.options.selector).not('.drag-shadow');
list.each(function() {
var $list = this.$.children(this.options.selector).not('.drag-shadow');
$list.each(function() {
var $this = $(this);
if($this.data('zui.droppable')) {
$this.data('zui.droppable').options.target = list;
$this.data('zui.droppable').options.target = $list;
$this.droppable('reset');
} else {
that.bindEventToList($this);
that.bindEventToList($list);
return false;
}
});
};
......@@ -2779,9 +2889,10 @@
// MODAL TRIGGER CLASS DEFINITION
// ======================
var ModalTrigger = function(options) {
options = $.extend({}, ModalTrigger.DEFAULTS, $.ModalTriggerDefaults, options);
var ModalTrigger = function(options, $trigger) {
options = $.extend({}, ModalTrigger.DEFAULTS, $.ModalTriggerDefaults, $trigger ? $trigger.data() : null, options);
this.isShown;
this.$trigger = $trigger;
this.options = options;
this.id = $.zui.uuid();
......@@ -2868,7 +2979,7 @@
};
ModalTrigger.prototype.show = function(option) {
var options = $.extend({}, this.options, option);
var options = $.extend({}, this.options, {url: this.$trigger ? (this.$trigger.attr('href') || this.$trigger.attr('data-url') || this.$trigger.data('url')) : this.options.url}, option);
this.init(options);
var that = this,
$modal = this.$modal,
......@@ -3077,7 +3188,7 @@
url: $this.attr('href'),
type: $this.hasClass('iframe') ? 'iframe' : ''
}, $this.data(), $.isPlainObject(option) && option);
if(!data) $this.data(NAME, (data = new ModalTrigger(options)));
if(!data) $this.data(NAME, (data = new ModalTrigger(options, $this)));
if(typeof option == STR_STRING) data[option](settings);
else if(options.show) data.show(settings);
......@@ -3146,7 +3257,7 @@
if(!$target || !$target.length) {
if(!$this.data(NAME)) {
$this.modalTrigger({
show: true
show: true,
});
} else {
$this.trigger('.toggle.' + NAME);
......@@ -4342,6 +4453,7 @@
.toggleClass('lightbox-with-caption', typeof caption == 'string')
.removeClass('lightbox-full');
modal.find('.lightbox-img').attr('src', image);
modal.find('.caption > .content').text(caption);
winWidth = $(window).width();
$.zui.imgReady(image, function() {
dialog.css({
......@@ -6073,7 +6185,10 @@
var options = this.options,
cols;
if($.isPlainObject(data)) {
if($.isFunction(data)) {
data = data(this.data, this);
data.keepSort = true;
} else if($.isPlainObject(data)) {
this.data = data;
} else if(typeof data === 'string') {
var $table = $(data);
......@@ -6720,11 +6835,13 @@
index;
sortUp = !$th.hasClass('sort-up');
if(data.keepSort) sortUp = !sortUp;
data.keepSort = null;
$headCells.removeClass('sort-up sort-down');
$th.addClass(sortUp ? 'sort-up' : 'sort-down');
index = $th.data('index');
sortUp = $th.hasClass('sort-up');
$.each(cols, function(idx, col) {
if(idx != index && (col.sort === 'up' || col.sort === 'down')) {
......@@ -6846,7 +6963,10 @@
if(!data) $this.data(name, (data = new DataTable(this, options)));
if(typeof option == 'string') data[option](newData);
if(typeof option == 'string') {
if(option === 'load' && $.isPlainObject(newData) && (newData.keepSort === undefined || newData.keepSort === null)) newData.keepSort = true;
data[option](newData);
}
});
};
......@@ -9843,7 +9963,7 @@ This file is generated by `grunt build`, do not edit it by hand.
/*!
* ZUI - v1.3.2 - 2016-01-14
* ZUI - v1.4.0 - 2016-01-22
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2016 cnezsoft.com; Licensed MIT
......
此差异已折叠。
/*!
* ZUI - v1.3.2 - 2016-01-12
* ZUI - v1.4.0 - 2016-01-22
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2016 cnezsoft.com; Licensed MIT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册