Author: jablko
Date: Thu Oct 21 22:14:36 2010
New Revision: 8371
Log:
Cosmetic change
Modified:
trunk/js/dialog.js
Modified: trunk/js/dialog.js
==============================================================================
--- trunk/js/dialog.js Thu Oct 21 22:01:50 2010 (r8370)
+++ trunk/js/dialog.js Thu Oct 21 22:14:36 2010 (r8371)
@@ -64,9 +64,9 @@
+ ' <div class="hd">'
+ ' ' + this.label
+ ' </div><div class="bd">'
- + ' <form action="" method="post" style="border: none"></form>'
+ + ' <form action="" method="post" style="border: none"/>'
+ ' </div>'
- + '</div>');
+ + '</div>').appendTo('body');
// Bind click event to "Add" link
var $addLink = $('<a href="#">Add new</a>').click(function (event)
@@ -99,9 +99,6 @@
$yuiDialogWrapper.find('.description').hide();
});
- // Prepend $yuiDialogWrapper to document body
- $('body').prepend($yuiDialogWrapper);
-
// Submit dialog data
var handleYuiSubmit = function ()
{
@@ -115,30 +112,27 @@
thisDialog.clear(); // Clear dialog fields
}
- this.yuiDialog = new YAHOO.widget.Dialog(this.table.id, {
- width: '480px',
- zIndex: '100',
- fixedcenter: true,
+ this.yuiDialog = new YAHOO.widget.Dialog(this.table, {
+ buttons: [{ text: 'Submit', handler: handleYuiSubmit, isDefault:
true },
+ { text: 'Cancel', handler: handleYuiCancel }],
+ constraintoviewport: true,
draggable: true,
- visible: false,
+ fixedcenter: true,
modal: true,
- constraintoviewport: true,
postmethod: 'none',
- buttons: [{ text: 'Submit', handler: handleYuiSubmit, isDefault:
true },
- { text: 'Cancel', handler: handleYuiCancel }] });
+ visible: false,
+ width: '480px',
+ zIndex: '100' });
- var keyListener_Esc = new YAHOO.util.KeyListener(document, { keys: 27
}, {
+ this.yuiDialog.cfg.queueProperty('keylisteners', new
YAHOO.util.KeyListener(document, { keys: 27 }, {
fn: handleYuiCancel,
scope: this.yuiDialog,
- correctScope: true });
+ correctScope: true }).enable());
- var keyListener_Enter = new YAHOO.util.KeyListener(document, { keys:
13 }, {
+ this.yuiDialog.cfg.queueProperty('keylisteners', new
YAHOO.util.KeyListener(document, { keys: 13 }, {
fn: handleYuiSubmit,
scope: this.yuiDialog,
- correctScope: true });
-
- this.yuiDialog.cfg.queueProperty('keylisteners',
keyListener_Enter.enable());
- this.yuiDialog.cfg.queueProperty('keylisteners',
keyListener_Esc.enable());
+ correctScope: true }).enable());
this.yuiDialog.render();
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.