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
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;
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)
%>
<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>