From cf9f54f8a4d27e02aba3ea3163028175ef297480 Mon Sep 17 00:00:00 2001 From: Catouse Date: Thu, 5 Jun 2014 20:53:19 +0800 Subject: [PATCH] * updated documents and examples. --- assets/css/doc.css | 10 +++ assets/js/doc.js | 77 ++++++++++++++++++++ example/kindeditor.html | 23 +++--- javascript.html | 156 ++++++++++++++++++++++++++++++++++------ 4 files changed, 233 insertions(+), 33 deletions(-) diff --git a/assets/css/doc.css b/assets/css/doc.css index 6c2f1cac..6326bb87 100644 --- a/assets/css/doc.css +++ b/assets/css/doc.css @@ -145,3 +145,13 @@ a[target='_blank']:hover:after {content: '\e684'; opacity: 1; } { padding: 0; } + + +.popover-examples .popover +{ + position: relative; + display: block; + float: left; + width: 260px; + margin: 20px; +} diff --git a/assets/js/doc.js b/assets/js/doc.js index 24a8724d..a5560ee2 100644 --- a/assets/js/doc.js +++ b/assets/js/doc.js @@ -29,4 +29,81 @@ $(function() $nav.children('li:not(.nav-heading)').slideUp('fast', function(){$nav.addClass('collapsed')}); } }); + + // Chosen + $('.chosen-select').chosen(); + + // datetime picker + $('.form-datetime').datetimepicker( + { + weekStart: 1, + todayBtn: 1, + autoclose: 1, + todayHighlight: 1, + startView: 2, + forceParse: 0, + showMeridian: 1, + format: 'yyyy-mm-dd hh:ii' + }); + $('.form-date').datetimepicker( + { + language: 'zh-CN', + weekStart: 1, + todayBtn: 1, + autoclose: 1, + todayHighlight: 1, + startView: 2, + minView: 2, + forceParse: 0, + format: 'yyyy-mm-dd' + }); + $('.form-time').datetimepicker({ + language: 'zh-CN', + weekStart: 1, + todayBtn: 1, + autoclose: 1, + todayHighlight: 1, + startView: 1, + minView: 0, + maxView: 1, + forceParse: 0, + format: 'hh:ii' + }); + + KindEditor.ready(function(K) + { + K.create('textarea.kindeditor', + { + allowFileManager : true, + bodyClass : 'article-content', + cssPath: 'dist/css/zui.css', + afterBlur: function(){$('#content').prev('.ke-container').removeClass('focus');}, + afterFocus: function(){$('#content').prev('.ke-container').addClass('focus');} + }); + + K.create('textarea.kindeditorSimple', + { + bodyClass : 'article-content', + cssPath: 'dist/css/zui.css', + resizeType : 1, + allowPreviewEmoticons : false, + allowImageUpload : false, + items : [ + 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', + 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', + 'insertunorderedlist', '|', 'emoticons', 'image', 'link'], + afterBlur: function(){$('#contentSimple').prev('.ke-container').removeClass('focus');}, + afterFocus: function(){$('#contentSimple').prev('.ke-container').addClass('focus');} + }); + + K.create('textarea.customStyle', + { + themeType : 'simple', + bodyClass : 'article-content', + cssPath: 'dist/css/zui.css', + afterBlur: function(){$('#contentCustom').prev('.ke-container').removeClass('focus');}, + afterFocus: function(){$('#contentCustom').prev('.ke-container').addClass('focus');} + }); + + }); }); diff --git a/example/kindeditor.html b/example/kindeditor.html index c1861f3c..66284a53 100644 --- a/example/kindeditor.html +++ b/example/kindeditor.html @@ -112,18 +112,17 @@
-

富文本编辑器Kindeditor

- -

类型

-

默认模式

- -

简单模式

- - -

变化

-

简单风格

- - +

富文本编辑器Kindeditor

+ +

类型

+

默认模式

+ +

简单模式

+ + +

变化

+

简单风格

+
diff --git a/javascript.html b/javascript.html index b4063282..d09c0e23 100644 --- a/javascript.html +++ b/javascript.html @@ -17,8 +17,9 @@ base_url: "./" ZUI + + -
@@ -278,7 +287,6 @@ base_url: "./" show.bs.modal - 1 $('#myModal').on('show.bs.modal', functi'on () { // do something… }) @@ -1245,16 +1253,6 @@ base_url: "./" -

插件依赖

@@ -1357,7 +1355,7 @@ base_url: "./"

动态演示

- Click to toggle popover + 打开弹出框

不同方向

@@ -1369,7 +1367,7 @@ base_url: "./"

指定html元素作为弹出内容

- Click to toggle popover + 打开弹出框

Popover top

@@ -1397,7 +1395,6 @@ base_url: "./"

js$('#example').popover(options)

-

选项

@@ -1529,7 +1526,6 @@ base_url: "./"

js$('#element').popover('show')

-

.popover('hide')

@@ -1538,7 +1534,6 @@ base_url: "./"

js$('#element').popover('hide')

-

.popover('toggle')

@@ -1547,7 +1542,6 @@ base_url: "./"

js$('#element').popover('toggle')

-

.popover('destroy')

@@ -1556,8 +1550,8 @@ base_url: "./"

js$('#element').popover('destroy')

- +

事件

@@ -1597,10 +1591,9 @@ base_url: "./"
-
$('#myPopover').on('hidden.bs.popover', function () {
+
$('#myPopover').on('hidden.bs.popover', function () {
   // do something…
 })
-
@@ -1985,10 +1978,131 @@ base_url: "./"
+ +
+ + +

日期选择插件可以帮助用户更方便准确的选择日期和时间。

+

在ZUI中包含的日期选择控件基于开源项目 DateTime Picker 定制开发。

+ +

类型

+

日期选择

+
+ +
+ +

时间选择

+
+ +
+ +

日期+时间选择

+
+ +
+ +

变化

+

禁用输入

+

只允许用户选择一个日期或时间,只需要给input加上readonly属性。

+
+
+
+
+
+
+
+ +

使用输入框组

+

输入框组可以添加额外的按钮来操作日期选择插件。

+

按钮中的.icon-remove用来移除输入的日期。.icon-th,.icon-calendar,.icon-time用来激活日期选择框。

+
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+
+ +
+ + +

Chosen是用来增强单选列表和多选列表的更佳选择。

+
+
+
+ +
+
+ +
+
+ +
+
+ +
+ + +

类型

+

默认模式

+
+ +
+

简单模式

+
+ +
+

变化

+

简单风格

+
+ +
+
+ + + -- GitLab