[*] IN : removed timezones selection for countries that have only one

This commit is contained in:
Damien Metzger
2013-06-24 14:41:59 +02:00
parent 24d5be445b
commit ec426f170f
3 changed files with 18 additions and 6 deletions
+16 -3
View File
@@ -14,15 +14,28 @@ $(document).ready(function()
data: 'timezoneByIso=true&iso='+iso,
dataType: 'json',
cache: true,
success: function(json)
{
if (json.success)
success: function(json) {
if (json.success) {
$('#infosTimezone').val(json.message).trigger("liszt:updated");
if (in_array(iso, ['us','ca','ru','me','au','id']))
$('#timezone_div').show();
else
$('#timezone_div').hide();
}
}
});
});
});
function in_array(needle, haystack) {
var length = haystack.length;
for (var i = 0; i < length; i++) {
if (haystack[i] == needle)
return true;
}
return false;
}
/**
* Upload a new logo
*/