end
end
+ def conflict
+ Issue.where('(start_date >= ? and (due_date <= ? or due_date is null)', @issue.start_date, @issue.due_date)
+ respond_to do |format|
+ format.html {
+ render :template => 'quick_view_issues/quick_view_portrait',
+ :layout => false,
+ :issue => @issue
+ }
+ end
+ end
+
private
def find_issue
logger.info "issue_id => #{params[:id]}"
<%
+ issue_dialog_limit = Setting.plugin_quick_view['issue_dialog_limit'] || ''
+ issue_dialog_limit = 9 unless issue_dialog_limit.match(/^\d+{1,5}$/)
+ issue_dialog_limit = issue_dialog_limit.to_i
+ issue_dialog_limit = 1 if issue_dialog_limit == 0
+ #logger.info "### limit = "+ issue_dialog_limit.inspect
+
issue_dialog_size = Setting.plugin_quick_view['issue_dialog_size'].split(",")
issue_dialog_size[0] = 640 if issue_dialog_size.length != 2 || !issue_dialog_size[0].match(/\d{3,4}/)
issue_dialog_size[1] = 600 if issue_dialog_size.length != 2 || !issue_dialog_size[1].match(/\d{3,4}/)
}
quick_view_dialog_open_queue = arguments.length;
+ var issue_dialog_limit = <%= issue_dialog_limit %>;
+ var open_capacity = issue_dialog_limit - $('.quick_view_dialog').length;
for (var i = 0; i < arguments.length; ++i) {
var issue_id = arguments[i];
already_exists.dialog("moveToTop");
continue;
}
+
+ if (open_capacity-- == 0) {
+ alert('The maximum number that can be opened has been limited.\nThis limitaion can be changed on the plugin setting page.');
+ return;
+ }
+
<%# Issueの中で特殊な処理を行うその他のプラグインのために、先行で通常のIssueにアクセスする %>
var open_dialog = quick_view_dialog_open;
var open = function () {
</td>
</tr>
<tr>
+ <th>Maximum number of issue dialog:</th>
+ <td>
+ <input type="text" id="settings_issue_dialog_limit" name="settings[issue_dialog_limit]" value="<%= settings['issue_dialog_limit'] %>"></input>
+ </td>
+ <td>
+ </td>
+ </tr>
+ <tr>
<th>Disable call_hook:</th>
<td>
<input type="checkbox" id="settings_disable_call_hook" name="settings[disable_call_hook]" value="<%= settings['disable_call_hook'] %>"></input>
version '0.2.0'
settings :default => {'issue_dialog_size'=>'640,600',
+ 'issue_dialog_limit'=>9,
'issue_tooltip_enabled'=>'on',
'tooltip_attributes'=>[
'avatar',