CRM-12124 in place edit option value, prepare being able to use action=create
authorXavier Dutoit <xavier@tttp.eu>
Wed, 20 Mar 2013 23:08:09 +0000 (00:08 +0100)
committerXavier Dutoit <xavier@tttp.eu>
Wed, 20 Mar 2013 23:08:09 +0000 (00:08 +0100)
js/jquery/jquery.crmeditable.js

index b437c36dcdf796bfc02b5d9ec7f306b6b794ba21..a963a36eabc4238ef10a1b6f1a205827dab7be47 100644 (file)
           return;
         }
 
-        if (this.nodeName = 'A') {
+        if (this.nodeName == 'A') {
           if (this.className.indexOf('crmf-') == -1) { // it isn't a jeditable field
             var formSettings= $.extend({}, editableSettings.form ,
               {source: $i.attr('href')
           }
 
           if ($i.data('action')) {
-            params[params['field']]=value;//format for create at least
-            action=$i.data('action');
+            var fieldName = params['field'];
             delete params['field'];
             delete params['value'];
+
+            params[fieldName]=value;//format for create at least
+            action=$i.data('action');
           } else {
             action="setvalue";
           }