diff options
-rw-r--r-- | views/Anime_list/add.html.php | 19 | ||||
-rw-r--r-- | views/layouts/default.html.php | 8 |
2 files changed, 25 insertions, 2 deletions
diff --git a/views/Anime_list/add.html.php b/views/Anime_list/add.html.php index c5e2fea..913c333 100644 --- a/views/Anime_list/add.html.php +++ b/views/Anime_list/add.html.php @@ -1,3 +1,5 @@ +<?php $this->form->config(array('templates' => array( + 'error' => '<div class="notification error">{:content}</div>'))); ?> <?php if (empty($anime)): ?> <h2 class="ribbon full">Find an Anime:</h2> <div class="triangle-ribbon"></div> @@ -7,6 +9,21 @@ <div class="triangle-ribbon"></div> <br class="clear" /> <?php endif; ?> + +<script type="text/javascript"> + + function onAddTag(tag) { + alert("Added a tag: " + tag); + } + function onRemoveTag(tag) { + alert("Removed a tag: " + tag); + } + + $(function() { + $('#tags').tagsInput(); + }); +</script> + <?php echo $this->form->create($entry); @@ -34,7 +51,7 @@ echo $this->form->field('my_times_watched', array('label' => 'Times Watched')); echo $this->form->label('rewatch_value', 'Rewatch Value'); echo $this->form->select('rewatch_value', array('High', 'Medium', 'Low', 'None'), array('value' => 0)); - echo $this->form->field('tags', array('type' => 'textarea')); + echo $this->form->field('tags', array('type' => 'textarea', 'id' => 'tags')); echo $this->form->checkbox('rewatching', array('label' =>'Rewatching?', 'value' => false)); echo $this->form->submit('Save!'); ?>
\ No newline at end of file diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php index 30f38c6..f295caf 100644 --- a/views/layouts/default.html.php +++ b/views/layouts/default.html.php @@ -14,6 +14,10 @@ <?php echo $this->html->style(array('style', 'base', 'grid')); ?> <?php echo $this->html->style(array('themes/light', 'themes/green')); ?> <?php echo $this->html->style(array('prettyPhoto')); ?> + + <script src="/js/jquery-1.6.1.min.js" type="text/javascript"></script> + <?php echo $this->html->style(array('jquery.tagsinput')); ?> + <?= $this->html->script("/js/jquery.tagsinput.min.js"); ?> <script type="text/javascript" > @@ -94,8 +98,9 @@ </footer> <!-- footer end --> </div> + + <!-- Javascript at the bottom for fast page loading --> - <script src="/js/jquery-1.6.1.min.js" type="text/javascript"></script> <script src="/js/jquery.tools.min.js" type="text/javascript"></script> <script src="/js/jquery.lightbox-0.5.min.js" type="text/javascript"></script> <script src="/js/jquery.form.js" type="text/javascript"></script> @@ -106,6 +111,7 @@ <?= $this->html->script("/js/jquery.anchor.js"); ?> <?= $this->html->script("/js/jquery.prettyPhoto.js"); ?> + <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $("a[rel^='prettyPhoto']").prettyPhoto(); |