diff options
author | Malf Furious <m@lfurio.us> | 2016-04-30 20:18:10 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-05-01 01:34:23 -0400 |
commit | 519035a6eb28dd36ce898a80d652c08138b110c5 (patch) | |
tree | 3dabf1a9c67e4058271bcd254503e9c34a9f838a /app | |
parent | ed2af3a874417b8317bb6def9b40189b1d5d05e8 (diff) | |
download | scrott-519035a6eb28dd36ce898a80d652c08138b110c5.tar.gz scrott-519035a6eb28dd36ce898a80d652c08138b110c5.zip |
Add global javascript file scrott.js
Included initial function assertConfirm(), function to present user an
"Are you sure?" prompt before submitting a web form.
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/js/scrott.js | 8 | ||||
-rw-r--r-- | app/view/master/foot.view.php | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/js/scrott.js b/app/assets/js/scrott.js new file mode 100644 index 0000000..675597b --- /dev/null +++ b/app/assets/js/scrott.js @@ -0,0 +1,8 @@ +/* + * Common Javascript logic for the Scrott application + */ + +function assertConfirm() +{ + return confirm("Are you sure?"); +} diff --git a/app/view/master/foot.view.php b/app/view/master/foot.view.php index 6220f89..c749ad0 100644 --- a/app/view/master/foot.view.php +++ b/app/view/master/foot.view.php @@ -1,5 +1,6 @@ <script type="text/javascript" src="<?=$mod->ar()?>/assets/js/jquery.min.js"></script> <script type="text/javascript" src="<?=$mod->ar()?>/assets/js/bootstrap.min.js"></script> +<script type="text/javascript" src="<?=$mod->ar()?>/assets/js/scrott.js"></script> <?php if ($mod->isError() || $mod->isWarning() || $mod->isNotice()) { ?> <script type="text/javascript"> |