From 600fe67444d8693591348085c904d45bcb3b29d6 Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 28 Sep 2011 18:02:41 -0400 Subject: [PATCH] renamed some flavor text --- app/assets/javascripts/uploads.js | 14 ++++++++++---- app/logical/sources/site.rb | 1 + app/logical/sources/strategies/tinami.rb | 2 ++ app/views/layouts/_main_links.html.erb | 2 +- app/views/sessions/_secondary_links.html.erb | 2 +- app/views/sessions/new.html.erb | 2 +- app/views/users/_secondary_links.html.erb | 2 +- app/views/users/new.html.erb | 4 +--- 8 files changed, 18 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/uploads.js b/app/assets/javascripts/uploads.js index 5cba9add9..91474106c 100644 --- a/app/assets/javascripts/uploads.js +++ b/app/assets/javascripts/uploads.js @@ -2,10 +2,18 @@ Danbooru.Upload = {}; Danbooru.Upload.initialize_all = function() { + this.initialize_tinami_urls(); this.initialize_image(); this.initialize_info(); } + Danbooru.Upload.initialize_tinami_urls = function() { + // var source = $("#upload_source").val(); + // if (source.match(/http:\/\/www\.tinami\.com\/view\/(\d+)/)) { + // console.log("source=%s", source); + // } + } + Danbooru.Upload.initialize_info = function() { $("#c-uploads #source-info ul").hide(); $("#c-uploads #fetch-data").click(function(e) { @@ -13,15 +21,13 @@ $.get(e.target.href).success(function(data) { var tag_html = ""; $.each(data.tags, function(i, v) { - var name = v[0]; - var url = v[1]; - tag_html += ('' + name + ' '); + tag_html += ('' + v[0] + ' '); }); $("#source-artist").html('' + data.artist_name + ''); $("#source-tags").html(tag_html); - var new_artist_link = 'new'; + var new_artist_link = 'new'; if (data.danbooru_id) { $("#source-record").html('' + data.danbooru_name + ' ' + new_artist_link); diff --git a/app/logical/sources/site.rb b/app/logical/sources/site.rb index 4f72b9a36..4c6c7520f 100644 --- a/app/logical/sources/site.rb +++ b/app/logical/sources/site.rb @@ -22,6 +22,7 @@ module Sources return { :artist_name => artist_name, :profile_url => profile_url, + :image_url => image_url, :tags => tags, :danbooru_name => artist_record.first.try(:name), :danbooru_id => artist_record.first.try(:id), diff --git a/app/logical/sources/strategies/tinami.rb b/app/logical/sources/strategies/tinami.rb index 9c8aa8efa..36c361fa7 100644 --- a/app/logical/sources/strategies/tinami.rb +++ b/app/logical/sources/strategies/tinami.rb @@ -21,6 +21,8 @@ module Sources end def normalized_url + # http://localhost:3000/uploads/new?url=http%3A%2F%2Fwww.tinami.com%2Fview%2F308872 + # http://img.tinami.com/illust2/img/259/4e82154d61e74.jpg url end diff --git a/app/views/layouts/_main_links.html.erb b/app/views/layouts/_main_links.html.erb index a30ae4119..1253e38aa 100644 --- a/app/views/layouts/_main_links.html.erb +++ b/app/views/layouts/_main_links.html.erb @@ -1,6 +1,6 @@ <% if CurrentUser.user.is_anonymous? %> - <%= nav_link_to("Login", new_session_path, :class => "login") %> + <%= nav_link_to("Sign in", new_session_path, :class => "login") %> <% else %> <%= nav_link_to("My Account", user_path(CurrentUser.user)) %> <% end %> diff --git a/app/views/sessions/_secondary_links.html.erb b/app/views/sessions/_secondary_links.html.erb index d96c21518..cdcc4365a 100644 --- a/app/views/sessions/_secondary_links.html.erb +++ b/app/views/sessions/_secondary_links.html.erb @@ -1,6 +1,6 @@ <% content_for(:secondary_links) do %> -
  • <%= link_to "Signup", new_user_path %>
  • +
  • <%= link_to "Sign up", new_user_path %>
  • <%= link_to "Reset Password", new_maintenance_user_password_reset_path %>
  • <%= link_to "Login Reminder", new_maintenance_user_login_reminder_path %>
  • diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 45b95dfb1..e3c484456 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -1,7 +1,7 @@
    -

    Login

    +

    Sign in

    <%= form_tag(session_path, :class => "simple_form") do %> <%= hidden_field_tag "url", params[:url] %> diff --git a/app/views/users/_secondary_links.html.erb b/app/views/users/_secondary_links.html.erb index 9ef03f038..e3c111709 100644 --- a/app/views/users/_secondary_links.html.erb +++ b/app/views/users/_secondary_links.html.erb @@ -8,7 +8,7 @@ <% end %> <% unless CurrentUser.user.is_anonymous? %>
  • |
  • -
  • <%= link_to "Logout", session_path, :method => :delete %>
  • +
  • <%= link_to "Sign out", session_path, :method => :delete %>
  • <% end %>
    <% end %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 9c3379793..000e9fe72 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -1,6 +1,6 @@
    -

    Signup

    +

    Sign up

    <% if @user.errors.empty? %>
    @@ -72,8 +72,6 @@ <%= f.button :submit %> <% end %>
    - - <%= render "secondary_links" %>