Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
唐斌 committed Dec 15, 2013
1 parent 8bb06e6 commit 61f2cda
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
15 changes: 8 additions & 7 deletions doc/css/doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
right: 5px;
z-index: 9;
}
h1 span[id],
h2 span[id],
h3 span[id],
h4 span[id],
h5 span[id],
h6 span[id] {
cursor: pointer;
}

/*避免对话框样式被工具生成的全局样式污染*/
.ui-dialog table,
Expand All @@ -21,13 +29,6 @@
}


.d-outer table,
.d-outer table tr,
.d-outer tr td,
.d-outer tr:nth-child(2n) {
border: 0 none;
}

code.sh_sourceCode { color: #000000; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_keyword { color: #009; font-weight: bold; font-style: normal; }
code.sh_sourceCode .sh_type { color: #0000ff; font-weight: normal; font-style: normal; }
Expand Down
7 changes: 4 additions & 3 deletions doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
<body>
<h1>artDialog<code>v6</code></h1>

<p><a href="http://aui.github.io/artDialog/">首页</a> &gt; <a href="http://aui.github.io/artDialog/">文档与示例</a></p>
<p><a href="http://aui.github.io/artDialog/">首页</a> &gt; <a href="http://aui.github.io/artDialog/doc/index.html">文档与示例</a></p>

<hr />

Expand Down Expand Up @@ -659,7 +659,7 @@ <h3><span id="quickref-iframe">创建 iframe 内容</span></h3>
dialog.close().remove();
</code></pre>

<h2>方法</h2>
<h2><span id="api">方法</span></h2>

<p>若无特别说明,方法均支持链式调用。</p>

Expand All @@ -684,6 +684,7 @@ <h4>示例</h4>

<pre><code>var d = dialog({
id: 'api-show-dialog',
quickClose: true,
content: '右键菜单'
});
$(document).on('contextmenu', function (event) {
Expand Down Expand Up @@ -832,7 +833,7 @@ <h3><span id="api-dialog-getCurrent">dialog.getCurrent()</span></h3>

<p><strong>注意</strong>:这是一个静态方法。</p>

<h2>配置参数</h2>
<h2><span id="option">配置参数</span></h2>

<h3><span id="option-content">content</span></h3>

Expand Down
7 changes: 4 additions & 3 deletions doc/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# artDialog``v6``

[首页](http://aui.github.io/artDialog/) &gt; [文档与示例](http://aui.github.io/artDialog/)
[首页](http://aui.github.io/artDialog/) &gt; [文档与示例](http://aui.github.io/artDialog/doc/index.html)

============================

Expand Down Expand Up @@ -300,7 +300,7 @@ dialog.height(400);
dialog.close().remove();
```

## 方法
## [方法](id:api)

若无特别说明,方法均支持链式调用。

Expand All @@ -324,6 +324,7 @@ d.show(document.getElementById('api-show'));
```
var d = dialog({
id: 'api-show-dialog',
quickClose: true,
content: '右键菜单'
});
$(document).on('contextmenu', function (event) {
Expand Down Expand Up @@ -480,7 +481,7 @@ dialog({

**注意**:这是一个静态方法。

## 配置参数
## [配置参数](id:option)

### [content](id:option-content)

Expand Down
4 changes: 3 additions & 1 deletion doc/js/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ $(document).on('click', 'button[data-code]', function () {
var id = $(this).data('code');
runCode(id);
return false;
}).on('click', 'h1 [id], h2 [id], h3 [id], h4 [id], h5 [id], h6 [id]', function () {
var id = this.id;
location.hash = id;
});


});
1 change: 1 addition & 0 deletions src/dialog-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ define({
quickClose: false,

// css 文件路径,留空则不会使用 js 自动加载样式
// 注意:css 只允许加载一个
cssUri: '../css/ui-dialog.css',

// 模板(使用 table 解决 IE7 宽度自适应的 BUG)
Expand Down

1 comment on commit 61f2cda

@fatesky
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

发现个严重bug,求解决
bug描述:
“content参数传入元素后不再自动显示隐藏元素,并且关闭对话框不再自动插入原来的位置,而是随着对话框删除。请用变量保存好元素的引用,以便下次对话框能传入该元素,示例:http://aui.github.io/artDialog/test/content.html ”文档如此这般提示,但实际是传入的元素就算用变量保存,当对话框关闭后,元素的内容依然被删除。要保存原来的元素唯有使用前clone,这点非常不好。传入的元素可能是个极其复杂且存在数据更新的容器,使用前每次clone开销太大,强烈希望保留老版本的“关闭对话框原来的元素自动插回原来的位置”功能。

Please sign in to comment.