[Jifty-commit] r4319 - in jifty/trunk: share/plugins/Jifty/Plugin/AutoReference/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Oct 26 17:06:40 EDT 2007


Author: sterling
Date: Fri Oct 26 17:06:39 2007
New Revision: 4319

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/share/plugins/Jifty/Plugin/AutoReference/web/static/js/autoreference.js

Log:
 r13664 at riddle:  andrew | 2007-10-26 16:06:06 -0500
 Modified the JS to ignore the [id:1] text at the end of the references.


Modified: jifty/trunk/share/plugins/Jifty/Plugin/AutoReference/web/static/js/autoreference.js
==============================================================================
--- jifty/trunk/share/plugins/Jifty/Plugin/AutoReference/web/static/js/autoreference.js	(original)
+++ jifty/trunk/share/plugins/Jifty/Plugin/AutoReference/web/static/js/autoreference.js	Fri Oct 26 17:06:39 2007
@@ -50,7 +50,8 @@
         request['actions'][this.action.moniker]['active']  = 0;
 
         // Fix up the field to use the real field instead of the hidden one
-        request['actions'][this.action.moniker]['fields'][a['fields']['argument']]['value'] = this.field.value;
+        var value = this.field.value.replace(/\s*\[(?:i(?:d(?::(?:\s*(?:\d+\]?)?)?)?)?)?$/, '')
+        request['actions'][this.action.moniker]['fields'][a['fields']['argument']]['value'] = value;
 
         var options = { postBody: JSON.stringify(request),
             onComplete: this.onComplete.bind(this),


More information about the Jifty-commit mailing list