# HG changeset patch # User edogawaconan # Date 1381844408 -32400 # Node ID f057e8c78e505006b9b05a6eb9b71a4a97641869 # Parent c4aba8990c5e7597c8665c98d383e2ec9ca052c4 Fix /show. diff -r c4aba8990c5e -r f057e8c78e50 app/assets/javascripts/boot.js --- a/app/assets/javascripts/boot.js Tue Oct 15 21:52:08 2013 +0900 +++ b/app/assets/javascripts/boot.js Tue Oct 15 22:40:08 2013 +0900 @@ -1,9 +1,11 @@ //= require zp.init +//= require zp.emul_radio //= require zp.formatter //= require zp.viewer_width //= require zp.hash_magic //= require zp.new $(document).ready(function() { + zp.emul_radio.init() zp.formatter.init() zp.viewer_width.init() zp.hash_magic.init() diff -r c4aba8990c5e -r f057e8c78e50 app/assets/javascripts/zp.emul_radio.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/assets/javascripts/zp.emul_radio.js Tue Oct 15 22:40:08 2013 +0900 @@ -0,0 +1,10 @@ +(function($) { + window.zp.emul_radio = { + do_switch: function(e) { + $(e.target).siblings().removeClass("active") + }, + init: function() { + $(".emul-radio > a").click(this.do_switch) + } + } +})(jQuery) diff -r c4aba8990c5e -r f057e8c78e50 app/assets/javascripts/zp.viewer_width.js --- a/app/assets/javascripts/zp.viewer_width.js Tue Oct 15 21:52:08 2013 +0900 +++ b/app/assets/javascripts/zp.viewer_width.js Tue Oct 15 22:40:08 2013 +0900 @@ -6,7 +6,8 @@ var paste = $("#paste"), title = $("#paste-resize .btn") - title.text(title.data("base").replace(":size:", width)) + title_span = $("#width-text") + title_span.text(title.data("base").replace(":size:", width)) this.current = width if (width == "auto") { paste.css("width", "") diff -r c4aba8990c5e -r f057e8c78e50 app/assets/stylesheets/pastes.css --- a/app/assets/stylesheets/pastes.css Tue Oct 15 21:52:08 2013 +0900 +++ b/app/assets/stylesheets/pastes.css Tue Oct 15 22:40:08 2013 +0900 @@ -9,3 +9,7 @@ #pl > pre { word-break: normal; } + +.row { + margin-bottom: 20px; +} diff -r c4aba8990c5e -r f057e8c78e50 app/views/pastes/show.html.erb --- a/app/views/pastes/show.html.erb Tue Oct 15 21:52:08 2013 +0900 +++ b/app/views/pastes/show.html.erb Tue Oct 15 22:40:08 2013 +0900 @@ -10,27 +10,29 @@

<%= content_for :title %>

-
-
-
- <%= link_to 'Plain', '#pl', :data => { :toggle => 'tab' }, :class => 'btn active' %> - <%= link_to 'Highlight', '#hl', :data => { :toggle => 'tab' }, :class => 'btn' %> - <%= link_to 'Markdown', '#md', :data => { :toggle => 'tab' }, :class => 'btn' %> +
+
+
+
+ <%= link_to 'Plain', '#pl', :data => { :toggle => 'tab' }, :class => 'btn btn-default active' %> + <%= link_to 'Highlight', '#hl', :data => { :toggle => 'tab' }, :class => 'btn btn-default' %> + <%= link_to 'Markdown', '#md', :data => { :toggle => 'tab' }, :class => 'btn btn-default' %> +
+
- -
-
+
+
<%= @paste.paste %>
@@ -40,15 +42,19 @@
-
+
-
+
<%= form_for @paste, :method => :delete do |f| %> - <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :autofocus => !flash[:error].blank? %> - <%= f.submit 'Delete this paste', :class => 'btn btn-danger' %> +
+ <%= f.text_field :key, :value => nil, :placeholder => 'Deletion key', :class => "form-control", :autofocus => !flash[:error].blank? %> + + <%= f.submit 'Delete this paste', :class => 'btn btn-danger' %> + +
<% end %> -
+