Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 058aeed

Browse files
Added option corners for dialogs
1 parent 07aa6a8 commit 058aeed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/widgets/dialog.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ $.widget( "mobile.dialog", $.mobile.widget, {
1313
options: {
1414
closeBtnText: "Close",
1515
overlayTheme: "a",
16+
corners: true,
1617
initSelector: ":jqmData(role='dialog')"
1718
},
1819
_create: function() {
1920
var self = this,
2021
$el = this.element,
2122
headerCloseButton = $( "<a href='#' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" ),
23+
cornerClass = !!this.options.corners ? " ui-corner-all" : "",
2224
dialogWrap = $( "<div/>", {
2325
"role" : "dialog",
24-
"class" : "ui-dialog-contain ui-corner-all ui-overlay-shadow"
26+
"class" : "ui-dialog-contain ui-overlay-shadow" + cornerClass
2527
});
2628

2729
$el.addClass( "ui-dialog ui-overlay-" + this.options.overlayTheme );

0 commit comments

Comments
 (0)