Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialog-plus.js修改了109行 添加一个drag属性来控制拖拽的开启和关闭 #135

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dialog-plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ dialog.oncreate = function (api) {

// 拖拽支持
$(api.node).on(drag.types.start, '[i=title]', function (event) {
// 排除气泡类型的对话框
if (!api.follow) {
// 排除气泡类型的对话框 并且api.drag不是false
if (!api.follow && api.drag !== false) {
api.focus();
drag.create(api.node, event);
}
Expand Down
13 changes: 13 additions & 0 deletions src/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ var artDialog = function (options, ok, cancel) {
options.fixed = false;
}

// 自定义样式 在原有基本样式的基础上进行窗体风格的修改 最好配合skin属性使用
if(typeof options.cssUri === 'string' && options.cssUri !=='' && (options.cssUri !== css) ){
var fn = require[require.toUrl ? 'toUrl' : 'resolve'];
if (fn) {
var myCss = fn(options.cssUri);
myCss = '<link rel="stylesheet" href="' + myCss + '" />';
if ($('base')[0]) {
$('base').before(myCss);
} else {
$('head').append(myCss);
}
}
}

// 快捷关闭支持:点击对话框外快速关闭对话框
if (options.quickClose) {
Expand Down