X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=js%2Fcore-common.js;h=460a503cc670d672af113261bd3cdbe41e6216a1;hb=987bf5583fce2696a1c6b2b72b123747b4cd4536;hp=77d08f337b936b3b17662e5ad2c32b3c9f0c0927;hpb=a69c86b3a0a158a46a3df6d63cc27be7bf0e6dc9;p=mailer.git diff --git a/js/core-common.js b/js/core-common.js index 77d08f337b..460a503cc6 100644 --- a/js/core-common.js +++ b/js/core-common.js @@ -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 - 2015 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; +}