Author: david
Date: Tue Dec 8 16:55:43 2009
New Revision: 4122
Log:
Move dialog config settings to template.
Modified:
trunk/apps/qubit/modules/function/templates/_relationships.php
trunk/web/js/dialog.js
Modified: trunk/apps/qubit/modules/function/templates/_relationships.php
==============================================================================
--- trunk/apps/qubit/modules/function/templates/_relationships.php Tue Dec
8 16:42:00 2009 (r4121)
+++ trunk/apps/qubit/modules/function/templates/_relationships.php Tue Dec
8 16:55:43 2009 (r4122)
@@ -1,3 +1,20 @@
+<?php echo javascript_tag(<<<EOF
+// Bind submit behavior
+Drupal.behaviors.relationFormSubmit = {
+ attach: function (context)
+ {
+ $('form#editForm').submit(function ()
+ {
+ appendHiddenFields($(this), {
+ "inputNamePattern": /relation\[(\w+)\]/,
+ "outputNameFormat": "relations[%d][%s]"
+ } )
+ } );
+ }
+}
+EOF
+) ?>
+
<?php if(0 < count($relatedFunctions)): ?>
<div class="form-item">
<table class="inline" id="relatedFunctions">
Modified: trunk/web/js/dialog.js
==============================================================================
--- trunk/web/js/dialog.js Tue Dec 8 16:42:00 2009 (r4121)
+++ trunk/web/js/dialog.js Tue Dec 8 16:55:43 2009 (r4122)
@@ -149,14 +149,6 @@
} );
yuiDialog.render();
-
- // Bind addHiddenFields() to form submit
- thisForm.submit(function () {
- appendHiddenFields($(this), {
- "inputNamePattern": /relation\[(\w+)\]/,
- "outputNameFormat": "relations[%d][%s]"
- } )
- } );
})
}
}
--
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.