OSDN Git Service

design adjust
authorakira saito <akrst@users.osdn.me>
Wed, 29 Jul 2015 13:19:51 +0000 (22:19 +0900)
committerakira saito <akrst@users.osdn.me>
Wed, 29 Jul 2015 13:19:51 +0000 (22:19 +0900)
app/controllers/quick_edit_issues_controller.rb
app/views/hooks/_quick_edit_base_head.html.erb
app/views/quick_edit_issues/_input_dialog.html.erb
app/views/quick_edit_issues/_replace_preview.html.erb

index b2f42a5..2e40a50 100644 (file)
@@ -27,8 +27,8 @@ class QuickEditIssuesController < ApplicationController
   def replace_preview
     @replaced_issues = @issues.map do |issue|
       { :id  => issue.id,
-        :old => issue[@attribute_name],
-        :new => issue[@attribute_name].gsub(@find_regexp, @replace) }
+        :before => issue[@attribute_name],
+        :after => issue[@attribute_name].gsub(@find_regexp, @replace) }
     end
   end
 
index 565ddbf..9f19058 100644 (file)
   padding-bottom: 7px;
 }
 
-#quick_edit_input_dialog .old, #quick_edit_input_dialog .new {
+#quick_edit_input_dialog #preview_area {
+  padding-bottom: 6px;
+}
+
+#quick_edit_input_dialog #preview_area table {
+  margin-bottom: 0px;
+}
+
+#quick_edit_input_dialog #preview_area .id {
+  text-align: middle;
+}
+
+#quick_edit_input_dialog #preview_area .before, #quick_edit_input_dialog #preview_area .after {
   text-align: left;
+  width: 45%;
+  white-space: pre-wrap;
+  word-wrap: break-word;
+  word-break: break-all;
 }
 
 #quick_edit_input_dialog .footer {
-  color:#a0a0a0;
+  color: #a0a0a0;
   text-align: right;
   margin-top: 3px;
   padding-top: 12px;
index 7546534..c9d27aa 100644 (file)
@@ -4,7 +4,7 @@
   dialog_size[1] += 134 if @dialog_params[:field_type] == :text
   dialog_size[1] += 31 if @dialog_params[:attribute_name]==:description
   dialog_size[1] += 50 unless @dialog_params[:description].nil?
-  dialog_size[1] += 140 if @dialog_params[:replacable]
+  dialog_size[1] += 170 if @dialog_params[:replacable]
 
   textarea_size = parse_size(Setting.plugin_quick_edit['textarea_size'], 10...256, 80, 10...256, 10)
 %>
index 0768b51..791095d 100644 (file)
@@ -1,14 +1,14 @@
 <table class="list issues">
 <thead>
 <tr>
-  <th>#</th><th>OLD</th><th>NEW</th>
+  <th class="id">#</th><th class="before">Before</th><th class="after">After</th>
 </tr>
 </thead>
 <tbody>
 <% @replaced_issues.each do |issue| %>
 <% cycle_class = cycle(:odd, :even) %>
 <tr class="issue">
-  <td class="id <%= cycle_class %>"><%= issue[:id] %></td><td class="old <%= cycle_class %>"><%= issue[:old] %></td><td class="new <%= cycle_class %>"><%= issue[:new] %></td>
+  <td class="id <%= cycle_class %>"><%= issue[:id] %></td><td class="before <%= cycle_class %>"><%= issue[:before] %></td><td class="after <%= cycle_class %>"><%= issue[:after] %></td>
 </tr>
 <% end %>
 </tbody>