Skip to content

Commit

Permalink
Add Dialog options
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyleung committed Nov 10, 2017
1 parent f5c1e4e commit 3545ff9
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 8 deletions.
5 changes: 3 additions & 2 deletions dist/jquery.bizui.js
Original file line number Diff line number Diff line change
Expand Up @@ -11857,7 +11857,8 @@
theme: window.bizui.theme,
title: '',
buttons: [],
destroyOnClose: false
destroyOnClose: false,
canClose: true
};
this.options = $.extend(defaultOption, options || {});
this.init(this.options);
Expand All @@ -11878,7 +11879,7 @@
'<span class="biz-dialog-title-text">',
this.$main.attr('data-title') || options.title,
'</span>',
'<i class="biz-dialog-close biz-icon">&#xe5cd;</i></div>',
options.canClose ? '<i class="biz-dialog-close biz-icon">&#xe5cd;</i></div>' : '</div>',
'<div class="biz-dialog-content"></div>',
'<div class="biz-dialog-bottom"></div>'
].join('')).on('click.bizDialog', '.biz-dialog-close', function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.bizui.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a href="#" class="active">BizUI</a>
<a href="pages/tutorial.html">起步</a>
<a href="pages/components.html">组件</a>
<a class="github" href="https://github.com/bizdevfe/biz-ui/releases" target="_blank">GitHub&nbsp;&nbsp;v1.6.2</a>
<a class="github" href="https://github.com/bizdevfe/biz-ui/releases" target="_blank">GitHub&nbsp;&nbsp;v1.6.3</a>
</nav>

<div class="container">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "biz-ui",
"version": "1.6.2",
"version": "1.6.3",
"description": "A jQuery plugin for business UI components",
"author": "BizFE",
"main": "dist/jquery.bizui.js",
Expand Down
2 changes: 1 addition & 1 deletion pages/components.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<a href="../index.html">BizUI</a>
<a href="tutorial.html">起步</a>
<a href="#" class="active">组件</a>
<a class="github" href="https://github.com/bizdevfe/biz-ui/releases" target="_blank">GitHub&nbsp;&nbsp;v1.6.2</a>
<a class="github" href="https://github.com/bizdevfe/biz-ui/releases" target="_blank">GitHub&nbsp;&nbsp;v1.6.3</a>
</nav>

<div class="container components">
Expand Down
5 changes: 5 additions & 0 deletions pages/src/components/Dialog/dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ <h4>Options</h4>
<td>Number</td>
<td>对话框 z-index</td>
</tr>
<tr>
<td>[canClose]</td>
<td>Boolean</td>
<td>显示对话框关闭按钮,默认 true</td>
</tr>
</table>

<h4>Methods</h4>
Expand Down
2 changes: 1 addition & 1 deletion pages/tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="../index.html">BizUI</a>
<a href="#" class="active">起步</a>
<a href="components.html">组件</a>
<a class="github" href="https://github.com/bizdevfe/biz-ui/releases" target="_blank">GitHub&nbsp;&nbsp;v1.6.2</a>
<a class="github" href="https://github.com/bizdevfe/biz-ui/releases" target="_blank">GitHub&nbsp;&nbsp;v1.6.3</a>
</nav>

<div class="container">
Expand Down
1 change: 1 addition & 0 deletions src/ui/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var Draggable = require('Draggable');
* @param {Number} [options.width] 对话框宽度,最小 320px
* @param {Function} [options.onBeforeClose] 关闭前回调,返回 false 则不关闭
* @param {Number} [options.zIndex] 对话框 z-index
* @param {Boolean} [options.canClose] 显示对话框关闭按钮,默认 true
*/
function Dialog(dialog, options) {
this.main = dialog;
Expand Down

0 comments on commit 3545ff9

Please sign in to comment.