]> git.mxchange.org Git - mailer.git/blobdiff - js/core-common.js
Updated TODOs.txt file.
[mailer.git] / js / core-common.js
index 77d08f337b936b3b17662e5ad2c32b3c9f0c0927..9d807a23a2a0b52de0af4f8816365237b93f0273 100644 (file)
@@ -1,13 +1,8 @@
 /**
  * JavaScript for core functions
  * --------------------------------------------------------------------
- * $Revision::                                                        $
- * $Date::                                                            $
- * $Tag:: 0.2.1-FINAL                                                 $
- * $Author::                                                          $
- * --------------------------------------------------------------------
  * Copyright (c) 2003 - 2009 by Roland Haeder
- * Copyright (c) 2009 - 2012 by Mailer Developer Team
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team
  * For more information visit: http://mxchange.org
  *
  * This program is free software; you can redistribute it and/or modify
@@ -34,7 +29,7 @@ function in_array (needle, heystack) {
        // Check all elements
        for (var i = 0; i < heystack.length; i++) {
                // Is the element found?
-               if (heystack[i] == needle) {
+               if (heystack[i] === needle) {
                        // Found it and abort
                        isInArray = true;
                        break;
@@ -56,3 +51,18 @@ function decodeUrlEncoding (content) {
        // Return it
        return decoded;
 }
+
+// "Getter" for total elements in given object
+function getTotalCountFromObject (object) {
+       // Default is zero
+       var total = 0;
+
+       // Start looping
+       $.each(object, function (i, j) {
+               // Add it
+               total++;
+       });
+
+       // Return total
+       return total;
+}