diff options
author | rhenium <rhenium@rhe.jp> | 2014-07-14 05:15:38 +0900 |
---|---|---|
committer | rhenium <rhenium@rhe.jp> | 2014-07-14 05:15:38 +0900 |
commit | aea3df8df6afaf1ba869306a41e2c8c5fc595981 (patch) | |
tree | a66229a627df713a555a7bc9c3e27f71d5b22225 /app/assets/javascripts/application.js.erb | |
parent | 32bc75846278a5caceb00f3d12b53a1a442a7cf2 (diff) | |
download | aclog-aea3df8df6afaf1ba869306a41e2c8c5fc595981.tar.gz |
web: improve user jump form
Diffstat (limited to 'app/assets/javascripts/application.js.erb')
-rw-r--r-- | app/assets/javascripts/application.js.erb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/app/assets/javascripts/application.js.erb b/app/assets/javascripts/application.js.erb index ee046a4..9481858 100644 --- a/app/assets/javascripts/application.js.erb +++ b/app/assets/javascripts/application.js.erb @@ -7,34 +7,6 @@ //= require_tree . $(function() { - // Layout: User jump - $("#jump_to_dropdown_toggle").click(function() { - setTimeout(function() { $("#jump_to_textbox").focus(); }, 0); - }); - - var previous_jump_to_text; - $("#jump_to_textbox").on("keyup", function() { - if ($(this).val() != previous_jump_to_text) { - previous_jump_to_text = $(this).val(); - $("#jump_to_user .jump_to_user_suggestion").remove(); - if ($(this).val().length > 0) { - $.getJSON("/i/user_jump_suggest.json", { head: $(this).val() }, function(json) { - json.forEach(function(s) { - $("#jump_to_user").append($("<li />").addClass("jump_to_user_suggestion") - .append($("<a />").attr("href", "/" + s.screen_name).attr("title", s.name + " (@" + s.screen_name + ")") - .append($("<img />").addClass("twitter-icon").attr("src", s.profile_image_url).attr("alt", "@" + s.screen_name).attr("onerror", "this.src = '<%= image_path("profile_image_missing.png") %>'")) - .append($("<span />").text("@" + s.screen_name)))); - }); - }); - } - } - }); - $("#jump_to_form").on("submit", function() { - $(this).attr("action", "/" + $("#jump_to_textbox").val()); - }); -}); - -$(function() { var controller = $("body").data("controller"); var action = $("body").data("action"); |