Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OK Button Does Nothing. #14

Open
qops1981 opened this issue Feb 9, 2015 · 3 comments
Open

OK Button Does Nothing. #14

qops1981 opened this issue Feb 9, 2015 · 3 comments
Assignees

Comments

@qops1981
Copy link

qops1981 commented Feb 9, 2015

I got everything set up but when I click the OK button. Nothing happens. I don't go to a different page or anything.

I can say I only copied the two JS files from the Build folder over to my sites _js directory. I'm not sure if there were other important files that I missed.

Using FireFox 32.0.3
In Head:

<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel='icon' href='//favicon.ico' type='image/x-icon' sizes='16x16'>
<script src='_inc/foundation/js/vendor/jquery.js'></script>
<link rel='stylesheet' href='_inc/foundation/css/foundation.css' />
<script src='_inc/foundation/js/vendor/modernizr.js'></script>
<script src='_inc/foundation/js/foundation/foundation.js'></script>
<script src='_inc/foundation/js/foundation/foundation.reveal.js'></script>

In Body:

<form action="anotherpage.php" method="post">
<!-- Selections  -->
        <input id="commit" class="button alert" data-confirm type="submit" name="submit" value="Apply Change" />
<!-- Other Buttons -->
</form>

in Footer:

<script src="_js/confirm_with_reveal.js"></script>
<script> 
$(document).confirmWithReveal();
</script>
@qops1981
Copy link
Author

qops1981 commented Feb 9, 2015

P.S. Cancel Button Works Fine.

@jletourneau jletourneau self-assigned this Feb 24, 2015
@jletourneau
Copy link
Contributor

Taking a look at this. The first thing that I'd note is that you don't need both confirm_with_reveal.js and confirm_with_reveal.min.js to be included, just one or the other. Those are two versions of the same file (the latter is minified ahead of time for people who can't or don't want to use Rails' asset pipeline or Grunt or Gulp or whatever to do that for them).

@MandicaAtSupsi
Copy link

MandicaAtSupsi commented Jul 11, 2016

Fixed with this in code on 49 line, before:
if ($el.is('form, :input')) {
return $el.closest('form').removeAttr('data-confirm').submit();
}

After:
if ($el.is('form, :input')) {
modal.foundation('reveal', 'close');
return $el.closest('form').removeAttr('data-confirm').submit();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants