Author: david
Date: Tue Dec 8 17:29:45 2009
New Revision: 4125
Log:
Cosmetic change, rename variable.
Modified:
trunk/web/js/dialog.js
Modified: trunk/web/js/dialog.js
==============================================================================
--- trunk/web/js/dialog.js Tue Dec 8 17:28:00 2009 (r4124)
+++ trunk/web/js/dialog.js Tue Dec 8 17:29:45 2009 (r4125)
@@ -95,14 +95,14 @@
{
$('table.dialog').each(function()
{
- var table = this;
- var label = $(table).children('caption').remove().text();
+ var dialog = this;
+ var label = $(dialog).children('caption').remove().text();
var thisForm = $(this).parents('form').eq(0);
// Create YUI container for dialog
var yuiDialogWrapper = $(
'<div class="yui-skin-sam">' +
- '<div id="' + $(table).attr('id') + '">' +
+ '<div id="' + $(dialog).attr('id') + '">' +
'<div class="hd">' + label + '</div>' +
'<div class="bd">' +
'<form action="" method="POST" style="border: none"></form>' +
@@ -111,7 +111,7 @@
'</div>');
// Replace dialog table with "add" link and move into dialog wrapper
- $(table)
+ $(dialog)
.removeClass('dialog')
.replaceWith('<a href="javascript:yuiDialog.show();">Add</a>')
.appendTo(yuiDialogWrapper.find('form'))
@@ -131,7 +131,7 @@
obj.id = null;
obj.fields = [];
- $(table).find(':input').each(function()
+ $(dialog).find(':input').each(function()
{
obj.fields[this.name] = { "type": this.type, "value": null }
} );
@@ -152,15 +152,15 @@
var handleSubmit = function() {
submitDialog(this.getData(), new DialogObject, counter++); // Save
the data to the main form
this.hide(); // Hide dialog
- clearDialog(table, new DialogObject); // Clear dialog values
+ clearDialog(dialog, new DialogObject); // Clear dialog values
};
var handleCancel = function() {
this.cancel();
- clearDialog(table, new DialogObject);
+ clearDialog(dialog, new DialogObject);
};
- yuiDialog = new YAHOO.widget.Dialog($(table).attr('id'),
+ yuiDialog = new YAHOO.widget.Dialog($(dialog).attr('id'),
{
width: "480px",
zIndex: "100",
--
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.