$("tr.issue").click(quick_view_issue_click);
$("tr.issue").dblclick(quick_view_issue_dblclick);
-quick_view_work_time_extension_init();
-$(document).ajaxComplete(quick_view_work_time_extension_init);
+<% if Setting.plugin_quick_view['worktime_ext_enabled'] %>
+if ($("body").hasClass("controller-work_time")) {
+ quick_view_work_time_extension_init();
+
+ <% if Setting.plugin_quick_view['worktime_ext_tooltip_enabled'] %>
+ quick_view_work_time_extension_tooltip_init();
+ <% end %>
+}
function quick_view_work_time_extension_init(){
var links = $(".wt_iss_link");
$(anchor_html).insertAfter(insertTo);
link.addClass("has_quick_view_anchor");
});
+ $(document).ajaxComplete(quick_view_work_time_extension_init);
+}
+function quick_view_work_time_extension_tooltip_init() {
+ var links = $(".wt_iss_link");
links.mouseover(function(){
var link = $(this);
if (link.hasClass("has_tooltip")) return;
link.tooltip("open");
}});
});
+ $(document).ajaxComplete(quick_view_work_time_extension_tooltip_init);
}
-
+<% end %>
function quick_view_issue_click(event) {
quick_view_click_event_object = event;
--- /dev/null
+<table>
+ <tr>
+ <th>WorkTime Extension enabled:</th>
+ <td>
+ <input type="checkbox" id="settings_worktime_ext_enabled" name="settings[worktime_ext_enabled]" <%= settings['worktime_ext_enabled'] ? "checked" : "" %>></input>
+ </td>
+ <td>
+ </td>
+ </tr>
+ <tr>
+ <th>WorkTime Extension(tooltip) enabled:</th>
+ <td>
+ <input type="checkbox" id="settings_worktime_ext_tooltip_enabled" name="settings[worktime_ext_tooltip_enabled]" <%= settings['worktime_ext_tooltip_enabled'] ? "checked" : "" %>></input>
+ </td>
+ <td>
+ Note: there is a possibility that the server load is increase.
+ </td>
+ </tr>
+</table>
author 'Akira Saito'
description 'This plugin provides ability to view a details of the issue at the issues page.'
version '0.0.6'
+
+ settings :default => {'issue_tooltip_enabled'=>true,
+ 'worktime_ext_enabled'=>true,
+ 'worktime_ext_tooltip_enabled'=>false},
+ :partial => 'quick_view_issues/settings'
end