From cdc86f76658f1e022b2ef0c73412ede8025fba8a Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 9 Jun 2015 17:28:03 -0700 Subject: [PATCH 1/3] fixes #2401 --- app/views/uploads/new.html.erb | 224 ++++++++++++++++----------------- 1 file changed, 112 insertions(+), 112 deletions(-) diff --git a/app/views/uploads/new.html.erb b/app/views/uploads/new.html.erb index 759a9d11e..de7c0af94 100644 --- a/app/views/uploads/new.html.erb +++ b/app/views/uploads/new.html.erb @@ -2,126 +2,126 @@

Upload

-
-

Before uploading, please read the <%= link_to "how to upload guide", wiki_pages_path(:title => "howto:upload") %>.

-
- - <% unless CurrentUser.user.can_upload? %> -

You <%= CurrentUser.user.upload_limited_reason %>

- <% end %> - - <%= render "image" %> - <%= render "post", :post => @post %> - <%= render "sources/info", :source => @source %> - - <%= error_messages_for "upload" %> - - <%= form_for(@upload, :html => {:multipart => true, :class => "simple_form", :id => "form"}) do |f| %> - <%= hidden_field_tag :normalized_url, @normalized_url %> - - <% if CurrentUser.is_contributor? %> -
- -
- <% end %> - -
- <%= f.label :file %> - <%= f.file_field :file, :size => 50 %> + <% if CurrentUser.user.can_upload? %> +
+

Before uploading, please read the <%= link_to "how to upload guide", wiki_pages_path(:title => "howto:upload") %>.

-
- <%= f.label :source %> - <% if params[:url].present? %> - <%= f.text_field :source, :size => 50, :value => params[:url] %> - <% else %> - <%= f.text_field :source, :size => 50 %> - <% end %> - <%= button_tag "Similar", :id => "similar-button", :type => "button" %> - <%= button_tag "Artist", :id => "find-artist-button", :type => "button" %> - You can enter a URL to have <%= Danbooru.config.app_name %> automatically download and process it -
+ <%= render "image" %> + <%= render "post", :post => @post %> + <%= render "sources/info", :source => @source %> -
- <%= f.label :rating %> + <%= error_messages_for "upload" %> -
- <%= f.radio_button :rating, :e %> - <%= f.label :rating_e, "Explicit", :title => "Hardcore porn, visible genitals" %> + <%= form_for(@upload, :html => {:multipart => true, :class => "simple_form", :id => "form"}) do |f| %> + <%= hidden_field_tag :normalized_url, @normalized_url %> - <%= f.radio_button :rating, :q %> - <%= f.label :rating_q, "Questionable", :title => "Nudity, anything erotic" %> - - <%= f.radio_button :rating, :s %> - <%= f.label :rating_s, "Safe", :title => "Everything else" %> -
-
- -
- <%= f.label :parent_id, "Parent ID" %> - <%= f.text_field :parent_id %> -
- - <% if @upload.has_artist_commentary? %> -
- <%= f.label :artist_commentary_title, "Artist Commentary Title" %> - <%= f.text_field :artist_commentary_title, :value => @upload.artist_commentary_title %> -
- -
- <%= f.label :artist_commentary_desc, "Artist Commentary" %> - <%= f.text_area :artist_commentary_desc, :value => @upload.artist_commentary_desc, :size => "60x5" %> -
- -
- -
- <% end %> - - <% if Danbooru.config.iqdb_hostname_and_port %> - <% if params[:url] %> -
-

Loading similar...

+ <% if CurrentUser.is_contributor? %> +
+
- <% else %> - <% end %> + +
+ <%= f.label :file %> + <%= f.file_field :file, :size => 50 %> +
+ +
+ <%= f.label :source %> + <% if params[:url].present? %> + <%= f.text_field :source, :size => 50, :value => params[:url] %> + <% else %> + <%= f.text_field :source, :size => 50 %> + <% end %> + <%= button_tag "Similar", :id => "similar-button", :type => "button" %> + <%= button_tag "Artist", :id => "find-artist-button", :type => "button" %> + You can enter a URL to have <%= Danbooru.config.app_name %> automatically download and process it +
+ +
+ <%= f.label :rating %> + +
+ <%= f.radio_button :rating, :e %> + <%= f.label :rating_e, "Explicit", :title => "Hardcore porn, visible genitals" %> + + <%= f.radio_button :rating, :q %> + <%= f.label :rating_q, "Questionable", :title => "Nudity, anything erotic" %> + + <%= f.radio_button :rating, :s %> + <%= f.label :rating_s, "Safe", :title => "Everything else" %> +
+
+ +
+ <%= f.label :parent_id, "Parent ID" %> + <%= f.text_field :parent_id %> +
+ + <% if @upload.has_artist_commentary? %> +
+ <%= f.label :artist_commentary_title, "Artist Commentary Title" %> + <%= f.text_field :artist_commentary_title, :value => @upload.artist_commentary_title %> +
+ +
+ <%= f.label :artist_commentary_desc, "Artist Commentary" %> + <%= f.text_area :artist_commentary_desc, :value => @upload.artist_commentary_desc, :size => "60x5" %> +
+ +
+ +
+ <% end %> + + <% if Danbooru.config.iqdb_hostname_and_port %> + <% if params[:url] %> +
+

Loading similar...

+
+ <% else %> + + <% end %> + <% end %> + +
+
+ <%= f.label :tag_string, "Tags" %> + <%= f.text_area :tag_string, :size => "60x5" %> +
+ + <%= button_tag "Related tags", :id => "related-tags-button", :type => "button" %> + <%= button_tag "Artists", :id => "related-artists-button", :type => "button" %> + <%= button_tag "Characters", :id => "related-characters-button", :type => "button" %> + <%= button_tag "Copyrights", :id => "related-copyrights-button", :type => "button" %> +
+ +
+ <%= submit_tag "Submit", :class => "large" %> +
+ +
+

Artist

+ +
+ + <% end %> - -
-
- <%= f.label :tag_string, "Tags" %> - <%= f.text_area :tag_string, :size => "60x5" %> -
- - <%= button_tag "Related tags", :id => "related-tags-button", :type => "button" %> - <%= button_tag "Artists", :id => "related-artists-button", :type => "button" %> - <%= button_tag "Characters", :id => "related-characters-button", :type => "button" %> - <%= button_tag "Copyrights", :id => "related-copyrights-button", :type => "button" %> -
- -
- <%= submit_tag "Submit", :class => "large" %> -
- -
-

Artist

- -
- - + <% else %> +

You <%= CurrentUser.user.upload_limited_reason %>

<% end %>
From 5c147aee04a2ffe27ea1819c035f3c1065586f53 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 9 Jun 2015 17:35:19 -0700 Subject: [PATCH 2/3] fixes #2399 --- app/assets/javascripts/notes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index f9aa45c1b..acaac6c35 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -315,7 +315,7 @@ Danbooru.Note = { set_text: function($note_body, $note_box, text) { Danbooru.Note.Body.display_text($note_body, text); if (Danbooru.Note.embed) { - Danbooru.Note.Body.display_text($note_box.children("div"), text); + Danbooru.Note.Body.display_text($note_box.children("div.note-box-inner-border"), text); } Danbooru.Note.Body.resize($note_body); Danbooru.Note.Body.bound_position($note_body); @@ -721,7 +721,7 @@ Danbooru.Note = { Danbooru.Note.Box.scale($note_box); Danbooru.Note.Body.display_text($note_body, text); if (Danbooru.Note.embed) { - Danbooru.Note.Body.display_text($note_box.children("div"), text); + Danbooru.Note.Body.display_text($note_box.children("div.note-box-inner-border"), text); } }, From c1d220e4228a6dcbb7bb941081e9397aac7d5c4b Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 9 Jun 2015 17:37:43 -0700 Subject: [PATCH 3/3] fixes #2388 --- app/assets/javascripts/notes.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index acaac6c35..3c7836271 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -475,6 +475,7 @@ Danbooru.Note = { Danbooru.Note.Body.set_text($note_body, $note_box, "Loading..."); $.get("/note_previews.json", {body: text}).success(function(data) { Danbooru.Note.Body.set_text($note_body, $note_box, data.body); + Danbooru.Note.Box.resize_inner_border($note_box); $note_body.show(); }); $this.dialog("close");