r1091 - in trunk: tests ui
Author: scott.gonzalez
Date: Wed Dec 10 18:45:42 2008
New Revision: 1091
Modified:
trunk/tests/dialog.js
trunk/ui/ui.dialog.js
Log:
Dialog: Partial fix for #3648: Use new CSS framework.
Modified: trunk/tests/dialog.js
==============================================================================
--- trunk/tests/dialog.js (original)
+++ trunk/tests/dialog.js Wed Dec 10 18:45:42 2008
@@ -300,7 +300,7 @@
i++;
});
- equals(btn.parent().attr('className'), 'ui-dialog-buttonpane', "buttons
in container");
+ ok(btn.parent().hasClass('ui-dialog-buttonpane'), "buttons in container");
btn.trigger("click");
var newButtons = {
Modified: trunk/ui/ui.dialog.js
==============================================================================
--- trunk/ui/ui.dialog.js (original)
+++ trunk/ui/ui.dialog.js Wed Dec 10 18:45:42 2008
@@ -38,7 +38,9 @@
uiDialogContent = this.element
.removeAttr('title')
- .addClass('ui-dialog-content')
+ .addClass(
+ 'ui-dialog-content ' +
+ 'ui-widget-content')
.wrap('<div/>')
.wrap('<div/>'),
@@ -51,18 +53,30 @@
}),
uiDialogTitlebar = (this.uiDialogTitlebar = $('<div/>'))
- .addClass('ui-dialog-titlebar')
+ .addClass(
+ 'ui-dialog-titlebar ' +
+ 'ui-widget-header ' +
+ 'ui-corner-all ' +
+ 'ui-helper-clearfix'
+ )
.mousedown(function() {
self.moveToTop();
})
.prependTo(uiDialogContainer),
uiDialogTitlebarClose = $('<a href="#"/>')
- .addClass('ui-dialog-titlebar-close')
+ .addClass(
+ 'ui-dialog-titlebar-close ' +
+ 'ui-corner-all'
+ )
.attr('role', 'button')
.appendTo(uiDialogTitlebar),
uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText =
$('<span/>'))
+ .addClass(
+ 'ui-icon ' +
+ 'ui-icon-closethick'
+ )
.text(options.closeText)
.appendTo(uiDialogTitlebarClose),
@@ -77,7 +91,12 @@
uiDialog = (this.uiDialog = uiDialogContainer.parent())
.appendTo(document.body)
.hide()
- .addClass('ui-dialog')
+ .addClass(
+ 'ui-dialog ' +
+ 'ui-widget ' +
+ 'ui-widget-content ' +
+ 'ui-corner-all'
+ )
.addClass(options.dialogClass)
.css({
position: 'absolute',
@@ -101,7 +120,11 @@
}),
uiDialogButtonPane = (this.uiDialogButtonPane = $('<div/>'))
- .addClass('ui-dialog-buttonpane')
+ .addClass(
+ 'ui-dialog-buttonpane ' +
+ 'ui-widget-content ' +
+ 'ui-helper-clearfix'
+ )
.css({
position: 'absolute',
bottom: 0
@@ -242,6 +265,10 @@
uiDialogButtonPane.show();
$.each(buttons, function(name, fn) {
$('<button type="button"></button>')
+ .addClass(
+ 'ui-state-default ' +
+ 'ui-corner-all'
+ )
.text(name)
.click(function() { fn.apply(self.element[0], arguments); })
.appendTo(uiDialogButtonPane);