diff options
author | Git <git@what.cd> | 2013-04-30 18:18:07 +0000 |
---|---|---|
committer | Git <git@what.cd> | 2013-04-30 18:18:07 +0000 |
commit | b055e9c6f1189ea4f2b9649de1ce63548d2d1b2b (patch) | |
tree | cf5b4d9bf8b985adfb6923b737dc3929c0f66727 /static/functions/validate_upload.js | |
parent | 0a565870d9727b0913e9ec0775380d786fde418d (diff) | |
download | Gazelle-b055e9c6f1189ea4f2b9649de1ce63548d2d1b2b.zip Gazelle-b055e9c6f1189ea4f2b9649de1ce63548d2d1b2b.tar.gz Gazelle-b055e9c6f1189ea4f2b9649de1ce63548d2d1b2b.tar.bz2 |
Empty commit
Diffstat (limited to 'static/functions/validate_upload.js')
-rw-r--r-- | static/functions/validate_upload.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/static/functions/validate_upload.js b/static/functions/validate_upload.js index e464bd7..0694b04 100644 --- a/static/functions/validate_upload.js +++ b/static/functions/validate_upload.js @@ -2,9 +2,9 @@ $(document).ready(function () { // Upload button is clicked $("#post").click(function(e) { - // Make sure "Music" category is selected. - if($("#categories").find(":selected").val() == 0) { - checkHasMainArtist(e); + // Make sure "Music" category is selected. + if ($("#categories").find(":selected").val() == 0) { + checkHasMainArtist(e); } }); @@ -14,16 +14,15 @@ function checkHasMainArtist(e) { var has_main = false; $("select[id^=importance]").each(function() { - if($(this).find(":selected").val() == 1) { + if ($(this).find(":selected").val() == 1) { has_main = true; } }); - if(!has_main) { + if (!has_main) { alert('A "Main" artist is required'); // Don't POST the form. e.preventDefault(); } } }); - -})(jQuery);
\ No newline at end of file +})(jQuery); |