Permalink
Browse files

title_visible change to title_visiable, fix default value when page h…

…ave diffent style jDialog
  • Loading branch information...
1 parent ba949e2 commit c7a5aafa9326c6bed215ae164abfd7118d2df3dd @huacnlee committed Mar 23, 2011
Showing with 13 additions and 6 deletions.
  1. +7 −3 index.html
  2. +6 −3 jquery.jdialog.js
View
@@ -28,15 +28,19 @@
<a href="http://www.rubyonrails.org">Rails 官方</a> <a href="http://ruby-lang.org">Ruby</a>\
</div>\
',
- width : 200
+ width : 200,
+ left_offset : -4,
+ top_offset : 6,
+ title_visiable : false
});
return false;
}
function showSearchPanel(el){
$(el).jDialog({
- title : "快速切换",
+ title : "搜索",
content : $("#hide_contexts .search_box").clone().html(),
+ close_on_body_click : false,
width : 300
});
return false;
@@ -57,4 +61,4 @@
<a href="#" onclick="return showSearchPanel(this);">搜索</a>
</div>
</body>
-</html>
+</html>
View
@@ -47,7 +47,7 @@ var jDialog = {
/**
* 是否隐藏 title 栏,包括关闭图标
*/
- title_visible : true,
+ title_visiable : true,
/**
* 顶端坐标偏移几个像素,单位 px
@@ -62,7 +62,7 @@ var jDialog = {
/*
* 版本号
*/
- version : "0.4"
+ version : "0.4.1"
},
/**
@@ -72,6 +72,9 @@ var jDialog = {
var pos = jDialog.getPos();
// 恢复默认的设置,因为多个jDialog窗口的时候会出现冲突(由于使用的静态类)
jDialog.settings.close_on_body_click = true;
+ jDialog.settings.title_visiable = true;
+ jDialog.settings.top_offset = 1;
+ jDialog.settings.left_offset = 1;
jDialog.settings.width = 250;
jDialog.settings.content = "";
jDialog.settings.title = "Notice";
@@ -104,7 +107,7 @@ var jDialog = {
html += ' <div class="'+ cssArrow +'"></div>';
html += ' <div class="contextual_dialog_shadow">'
html += ' <div class="contextual_dialog_content">';
- if(jDialog.settings.title_visible){
+ if(jDialog.settings.title_visiable){
html += ' <h2><span>'+jDialog.settings.title+'</span></h2>';
html += ' <div class="jdialog_close" onclick="jDialog.close();" title="关闭"></div>';
}

0 comments on commit c7a5aaf

Please sign in to comment.