<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Erroneous Commit to be reverted or updated]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=5330&amp;type=atom" />
	<updated>2014-11-22T11:19:48Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=5330</id>
		<entry>
			<title type="html"><![CDATA[Re: Erroneous Commit to be reverted or updated]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21548#p21548" />
			<content type="html"><![CDATA[<p>This has now been <a href="http://devel.frontaccounting.com/git/?p=fa-stable.git;a=commitdiff;h=66b76b3be910e0f5dc5a26384c4cfce20579a70d;hp=f14d54f1294a8120fafc54bfb99d32cdcecb32a0">partially committed today</a>.</p><p>The balance of the diff needs to be committed as below:<br /></p><div class="codebox"><pre><code>--- old/js/inserts.js    Sat Nov 22 16:50:29 2014
+++ new/js/inserts.js    Sat Nov 22 16:54:09 2014
@@ -289,7 +289,7 @@
                       ev = ev||window.event;
                       key = ev.keyCode||ev.which;
                        if(key == 13) {
-                        if(e.className == &#039;searchbox&#039;) e.onblur();
+                        if(string_contains(e.className, &#039;searchbox&#039;)) e.onblur();
                         return false;
                     }
                     return true;
@@ -443,10 +443,10 @@
             }
         }
         // prevent unneeded transaction entry abortion
-        if (e.className == &#039;shortcut&#039;
-         || e.className == &#039;menu_option&#039;
-         || e.className == &#039;menu_tab&#039;
-          || e.className == &#039;selected&#039;)
+        if (string_contains(e.className, &#039;shortcut&#039;)
+         || string_contains(e.className, &#039;menu_option&#039;)
+         || string_contains(e.className, &#039;menu_tab&#039;)
+          || string_contains(e.className, &#039;selected&#039;))
             e.onclick = function(ev) {
                 if (_validate._processing
                  &amp;&amp; _validate._modified</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-11-22T11:19:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21548#p21548</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Erroneous Commit to be reverted or updated]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21543#p21543" />
			<content type="html"><![CDATA[<p>Attached is the fix for the Javascript commit done.<br /></p><div class="codebox"><pre><code>--- old/js/utils.js    Sat Nov 22 03:08:34 2014
+++ new/js/utils.js    Sat Nov 22 03:10:08 2014
@@ -356,5 +356,6 @@
 }
 
 function string_contains(haystack, needle) {
-  return haystack.indexOf(needle) &gt; -1;
+  var words = haystack.split(&#039; &#039;);
+  return words.indexOf(needle) &gt; -1;
 }
--- old/js/inserts.js    Sat Nov 22 03:07:55 2014
+++ new/js/inserts.js    Sat Nov 22 03:20:42 2014
@@ -162,7 +162,7 @@
                 event.returnValue = false;
                     return false;
               }
-            if (box &amp;&amp; (key == 32) &amp;&amp; (this.className == &#039;combo2&#039;)) {
+            if (box &amp;&amp; (key == 32) &amp;&amp; (string_contains(this.className, &#039;combo2&#039;))) {
                 this.style.display = &#039;none&#039;;
                 box.style.display = &#039;inline&#039;;
                 box.value=&#039;&#039;;
@@ -276,11 +276,11 @@
         if(e.onfocus==undefined) {
             e.onfocus = function() {
                 save_focus(this);
-                if (this.className == &#039;combo&#039; || this.className == &#039;combo3&#039;)
+                if (string_contains(this.className, &#039;combo&#039;) || string_contains(this.className, &#039;combo3&#039;))
                     this.select();
             };
         }
-        if (e.className == &#039;combo&#039; || e.className == &#039;combo2&#039; || e.className == &#039;combo3&#039;) {
+        if (string_contains(e.className, &#039;combo&#039;) || string_contains(e.className, &#039;combo2&#039;) || string_contains(e.className, &#039;combo3&#039;)) {
                 _set_combo_input(e);
         }
         else
@@ -289,7 +289,7 @@
                       ev = ev||window.event;
                       key = ev.keyCode||ev.which;
                        if(key == 13) {
-                        if(e.className == &#039;searchbox&#039;) e.onblur();
+                        if(string_contains(e.className, &#039;searchbox&#039;)) e.onblur();
                         return false;
                     }
                     return true;
@@ -443,10 +443,10 @@
             }
         }
         // prevent unneeded transaction entry abortion
-        if (e.className == &#039;shortcut&#039;
-         || e.className == &#039;menu_option&#039;
-         || e.className == &#039;menu_tab&#039;
-          || e.className == &#039;selected&#039;)
+        if (string_contains(e.className, &#039;shortcut&#039;)
+         || string_contains(e.className, &#039;menu_option&#039;)
+         || string_contains(e.className, &#039;menu_tab&#039;)
+          || string_contains(e.className, &#039;selected&#039;))
             e.onclick = function(ev) {
                 if (_validate._processing
                  &amp;&amp; _validate._modified</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-11-21T21:58:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21543#p21543</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Erroneous Commit to be reverted or updated]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=21537#p21537" />
			<content type="html"><![CDATA[<p>On 2014-11-13, a commit was made with the following title:<br /><strong><a href="http://devel.frontaccounting.com/git/?p=fa-stable.git;a=commit;h=44abddfd180ec27cbd889f4c8c8f8271f6d6d19d">Javascript now works with multiple classes on elements.</a></strong><br />This is erroneous as <br /></p><div class="quotebox"><blockquote><p><strong>indexOf on arrays</strong> uses &quot;==&quot; on each element where as <strong>indexOf on string</strong> will treat the string as an <strong>array of char</strong> which effectively will do <strong>substring</strong></p></blockquote></div><p>It has since been corrected by the author in his github repo along with other missing replacements.</p><p>Please revert the commit or update it with the authors corrected files.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2014-11-21T10:45:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=21537#p21537</id>
		</entry>
</feed>
