Sha256: 13074e9e5f4c2c3f2caeb50e4ba079d1e46f6d0c87dc9ec80c86f4e7f955b4fe
Contents?: true
Size: 1.2 KB
Versions: 19
Compression:
Stored size: 1.2 KB
Contents
var AdminData = AdminData || {}; AdminData.jsUtil = { // TODO since advance search was not working with util confirm , window.confirm is used directly // fix it later confirm: function(arg) { window.confirm(arg); }, buildOptionsFromArray: function(array, element) { element.append($('<option />')); for (i in array) { $('<option />').text(array[i][0]).attr('value', array[i][1]).appendTo(element); } element.attr('disabled', false); }, colorizeRows: function() { $('.colorize tr:odd').addClass('odd'); $('.colorize tr:even').addClass('even'); }, // returns date in string format. example: 07-September-2009 dateToString: function(date) { var month = (date.getMonth() + 1).toString(); var day = date.getDate().toString(); //days between 1 and 9 should have 0 before them if (day.length == 1) day = '0' + day; var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; return day + "-" + months[month - 1] + "-" + date.getFullYear(); }, randomNumber: function() { var maxVal = 100000000, minVal = 1; var randVal = minVal + (Math.random() * (maxVal - minVal)); return Math.round(randVal); } };
Version data entries
19 entries across 19 versions & 1 rubygems