Created
July 17, 2017 13:23
-
-
Save ddavison/326678d59a201c0f28f6d81a3c4def02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Place all the behaviors and hooks related to the matching controller here. | |
# All this logic will automatically be available in application.js. | |
# You can use CoffeeScript in this file: http://coffeescript.org/ | |
$(document).ready -> | |
$('#btn-submit-bundle').click (e) -> | |
e.preventDefault() | |
vals = [] | |
$("select[name^='component_bundle'].select2-package").toArray().forEach((e) -> vals.append(e.value)) | |
if vals.length < 1 | |
portal.showDialog("Errors", "Please select at least one component to put inside this bundle.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment