Author: humbedooh
Date: Sun Aug 4 07:44:50 2019
New Revision: 1864364
URL: http://svn.apache.org/viewvc?rev=1864364&view=rev
Log:
Make sure sections are not overflowing, before we will allow posting via whimsy
Modified:
comdev/reporter.apache.org/trunk/site/wizard/js/source/unified.js
comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/unified.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/unified.js?rev=1864364&r1=1864363&r2=1864364&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/unified.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/unified.js Sun Aug 4 07:44:50
2019
@@ -224,9 +224,13 @@ function UnifiedEditor_compile() {
this.compiles = false;
} else if (step.minchars && this.sections[n].text.length < step.minchars)
{
text += "<li><span style='display: inline-block; width: 20px; font-size:
18px; color: red;'>÷</span> <kbd>%s</kbd> MUST contain more
information!</li>".format(this.sections[n].title);
+ this.compiles = false;
}
else if (this.sections[n].text.length < 20) {
text += "<li><span style='display: inline-block; width: 20px; font-size:
18px; color: pink;'>‽</span> <kbd>%s</kbd> seems a tad short?</li>".format(this.sections[n].title);
+ } else if(should_reflow(this.sections[n].text)) {
+ text += "<li><span style='display: inline-block; width: 20px; font-size:
18px; color: red;'>÷</span> <kbd>%s</kbd> Needs to be reflowed,
some lines are > 80 chars!</li>".format(this.sections[n].title);
+ this.compiles = false;
} else {
text += "<li><span style='display: inline-block; width: 20px; font-size:
18px; color: green;'>✓</span> <kbd>%s</kbd> seems alright</li>".format(this.sections[n].title);
Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js?rev=1864364&r1=1864363&r2=1864364&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Sun Aug 4 07:44:50 2019
@@ -2237,9 +2237,13 @@ function UnifiedEditor_compile() {
this.compiles = false;
} else if (step.minchars && this.sections[n].text.length < step.minchars)
{
text += "<li><span style='display: inline-block; width: 20px; font-size:
18px; color: red;'>÷</span> <kbd>%s</kbd> MUST contain more
information!</li>".format(this.sections[n].title);
+ this.compiles = false;
}
else if (this.sections[n].text.length < 20) {
text += "<li><span style='display: inline-block; width: 20px; font-size:
18px; color: pink;'>‽</span> <kbd>%s</kbd> seems a tad short?</li>".format(this.sections[n].title);
+ } else if(should_reflow(this.sections[n].text)) {
+ text += "<li><span style='display: inline-block; width: 20px; font-size:
18px; color: red;'>÷</span> <kbd>%s</kbd> Needs to be reflowed,
some lines are > 80 chars!</li>".format(this.sections[n].title);
+ this.compiles = false;
} else {
text += "<li><span style='display: inline-block; width: 20px; font-size:
18px; color: green;'>✓</span> <kbd>%s</kbd> seems alright</li>".format(this.sections[n].title);
|