diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/css/gallery.css | 9 | ||||
-rw-r--r-- | modules/tag/controllers/tags.php | 9 | ||||
-rw-r--r-- | modules/tag/helpers/tag_event.php | 3 | ||||
-rw-r--r-- | modules/tag/views/tag_block.html.php | 16 |
4 files changed, 21 insertions, 16 deletions
diff --git a/modules/gallery/css/gallery.css b/modules/gallery/css/gallery.css index 7e711156..d3f7dcca 100644 --- a/modules/gallery/css/gallery.css +++ b/modules/gallery/css/gallery.css @@ -149,6 +149,15 @@ text-align: center; } +/* Dialogs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +/** + * Newer Themeroller-based themes do this on their own, but older + * themes need help ensuring that dialogs and overlays are on top + */ +.ui-front { + z-index: 1000 +} + /** ******************************************************************* * 2) Admin **********************************************************************/ diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php index 77d45a95..32e857c6 100644 --- a/modules/tag/controllers/tags.php +++ b/modules/tag/controllers/tags.php @@ -48,18 +48,17 @@ class Tags_Controller extends Controller { public function autocomplete() { $tags = array(); - $tag_parts = explode(",", Input::instance()->get("q")); - $limit = Input::instance()->get("limit"); + $tag_parts = explode(",", Input::instance()->get("term")); $tag_part = ltrim(end($tag_parts)); $tag_list = ORM::factory("tag") ->where("name", "LIKE", Database::escape_for_like($tag_part) . "%") ->order_by("name", "ASC") - ->limit($limit) + ->limit(100) ->find_all(); foreach ($tag_list as $tag) { - $tags[] = html::clean($tag->name); + $tags[] = (string)html::clean($tag->name); } - ajax::response(implode("\n", $tags)); + ajax::response(json_encode($tags)); } } diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php index d62ae36e..79d6e0bc 100644 --- a/modules/tag/helpers/tag_event.php +++ b/modules/tag/helpers/tag_event.php @@ -72,8 +72,7 @@ class tag_event_Core { $url = url::site("tags/autocomplete"); $form->script("") ->text("$('form input[name=tags]').ready(function() { - $('form input[name=tags]').gallery_autocomplete( - '$url', {max: 30, multiple: true, multipleSeparator: ',', cacheLength: 1}); + $('form input[name=tags]').gallery_autocomplete('$url', {multiple: true}); });"); $tag_names = array(); diff --git a/modules/tag/views/tag_block.html.php b/modules/tag/views/tag_block.html.php index d25b8dcb..afa61b15 100644 --- a/modules/tag/views/tag_block.html.php +++ b/modules/tag/views/tag_block.html.php @@ -2,15 +2,13 @@ <script type="text/javascript"> $("#g-add-tag-form").ready(function() { var url = $("#g-tag-cloud-autocomplete-url").attr("href"); - $("#g-add-tag-form input:text").gallery_autocomplete( - url, { - max: 30, - multiple: true, - multipleSeparator: ',', - cacheLength: 1, - selectFirst: false - } - ); + function split(val) { + return val.split(/,\s*/); + } + function extract_last(term) { + return split(term).pop(); + } + $("#g-add-tag-form input:text").gallery_autocomplete(url, {multiple: true}); $("#g-add-tag-form").ajaxForm({ dataType: "json", success: function(data) { |