Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

disable summary mode by default

  • Loading branch information...
commit f79428afb6c9a1ee1b682e7cdfb131aaefb8eab1 1 parent 6ae55f3
@moritz authored
Showing with 15 additions and 2 deletions.
  1. +4 −1 cgi/style.css
  2. +11 −1 cgi/summary.js
View
5 cgi/style.css
@@ -8,6 +8,10 @@ h1, h2, h3, #footer * {
clear: left;
}
+.summary {
+ width: 1em !important;
+ display: none;
+}
#footer {
background-color: #ececef;
@@ -217,4 +221,3 @@ abbr { cursor: help; }
text-align: left;
}
-.summary { width: 1em !important }
View
12 cgi/summary.js
@@ -1,8 +1,18 @@
var summary_filter_link = '<a href="javascript:hide_non_summary()">show only summary lines</a>';
+var enable_summary_mode_html = '<a href="javascript:enable_summary_mode()">Enable summary mode</a>';
$(document).ready(function() {
- $('#summary_container').html('<a href="javascript:save_summary_changes()">Save summary changes</a>, <span id="toggle_summary">' + summary_filter_link + '</span>');
+ disable_summary_mode();
});
+function enable_summary_mode() {
+ $('#summary_container').html('<a href="javascript:save_summary_changes()">Save summary changes</a>, <span id="toggle_summary">' + summary_filter_link + '</span> <a href="javascript:disable_summary_mode()">disable summary mode</a>');
+ $('.summary').show();
+}
+function disable_summary_mode() {
+ $('.summary').hide();
+ $('#summary_container').html(enable_summary_mode_html);
+}
+
function save_summary_changes() {
var newly_checked = [];
var was_checked = [];
Please sign in to comment.
Something went wrong with that request. Please try again.