Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions app/views/wkexpense/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
Setting.plugin_redmine_wktime['wktime_enter_comment_in_row'].to_i == 1 %>
commentInRow = true;
<% end %>
withCommantImg = '<%= image_tag('withcommant.png', plugin: 'redmine_wktime') %>';
withoutcommantImg = '<%= image_tag('withoutcommant.png', plugin: 'redmine_wktime') %>';

</script>

<div id="comment-dlg">
Expand Down
2 changes: 0 additions & 2 deletions app/views/wktime/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
Setting.plugin_redmine_wktime['wktime_enter_comment_in_row'].to_i == 1 %>
commentInRow = true;
<% end %>
withCommantImg = '<%= image_tag('withcommant.png', plugin: 'redmine_wktime') %>';
withoutcommantImg = '<%= image_tag('withoutcommant.png', plugin: 'redmine_wktime') %>';
</script>

<div id="comment-dlg">
Expand Down
6 changes: 4 additions & 2 deletions assets/javascripts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ var minHourperWeekAlertMsg="";
var maxHourperWeekAlertMsg="";
var attachmentDiv = "";
var attachmentField = "";
var withCommantSrc = RAILS_ASSET_URL('/plugin_assets/redmine_wktime/withcommant.png');
var withoutCommantSrc = RAILS_ASSET_URL('/plugin_assets/redmine_wktime/withoutcommant.png');

$(document).ready(function() {
var e_comments = $( "#_edit_comments_" );
Expand Down Expand Up @@ -102,11 +104,11 @@ $(document).ready(function() {
var x = document.getElementsByName("custfield_img"+comment_row+"[]");
if( ((e_comments.val() != "" || custFldToolTip) && (!commentInRow || custFldToolTip )) || $("#attachment_" + comment_row + "_" + comment_col + " .attachments_fields").children().length > 0)
{
$(x[comment_col-1]).replaceWith(withCommantImg);
$(x[comment_col-1]).attr({src: withCommantSrc});
}
else
{
$(x[comment_col-1]).replaceWith(withoutcommantImg);
$(x[comment_col-1]).attr({src: withoutCommantSrc});
}
$(attachmentField).appendTo(attachmentDiv);
$( this ).dialog( "close" );
Expand Down