DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:summary_enforcement

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tips:summary_enforcement [2011-12-02 03:35] – Updated to use jQuery, for Angua. samwilsontips:summary_enforcement [2012-12-29 12:22] lupo49
Line 13: Line 13:
  
 It's possible to modify the code so that a summary is always required, as explained below. It's possible to modify the code so that a summary is always required, as explained below.
 +
 +===== Plugin available =====
 +
 +There's also a plugin available, which provides the function: [[:plugin:enforcesummary|enforcesummary]]
  
 ===== Dokuwiki 2011-11-10 “Angua” ===== ===== Dokuwiki 2011-11-10 “Angua” =====
Line 31: Line 35:
 }); });
 function enforceSummary() { function enforceSummary() {
- if ($summary.val().length < minSummaryLength && !$minorEdit.is(':checked')) {+ if ($summary.val() && $summary.val().length < minSummaryLength && !$minorEdit.is(':checked')) {
  $summary.addClass("missing");  $summary.addClass("missing");
  $editButton.attr("disabled", true).css("color", "#999");  $editButton.attr("disabled", true).css("color", "#999");
tips/summary_enforcement.txt · Last modified: 2023-06-19 15:20 by asheenlevrai

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki