summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/html.php6
-rw-r--r--script.js16
-rw-r--r--style.css23
3 files changed, 35 insertions, 10 deletions
diff --git a/inc/html.php b/inc/html.php
index 6da31045a..0255670e3 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1044,7 +1044,7 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed?
</tr>
<tr>
<td colspan="3">
- <textarea name="wikitext" id="wikitext" <?=$ro?> cols="80" rows="10" class="edit" onchange="textChanged = true;" tabindex="1"><?="\n".formText($text)?></textarea>
+ <textarea name="wikitext" id="wikitext" <?=$ro?> cols="80" rows="10" class="edit" onchange="textChanged = true;" onkeyup="summaryCheck();" tabindex="1"><?="\n".formText($text)?></textarea>
</td>
</tr>
<tr>
@@ -1058,7 +1058,7 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed?
<td>
<?if($wr){?>
<?=$lang['summary']?>:
- <input type="text" class="edit" name="summary" size="50" value="<?=formText($SUM)?>" tabindex="2" />
+ <input type="text" class="edit" name="summary" id="summary" size="50" onkeyup="summaryCheck();" value="<?=formText($SUM)?>" tabindex="2" />
<?}?>
</td>
<td align="right">
@@ -1153,4 +1153,4 @@ function html_debug(){
print '</body></html>';
}
-?>
+?> \ No newline at end of file
diff --git a/script.js b/script.js
index 239f94b07..db22d32b1 100644
--- a/script.js
+++ b/script.js
@@ -31,6 +31,22 @@ function escapeQuotes(text) {
}
/**
+ * Checks if a summary was entered - if not the style is changed
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function summaryCheck(){
+ if(document.getElementById){
+ var sum = document.getElementById('summary');
+ if(sum.value == ''){
+ sum.className='missing';
+ }else{
+ sum.className='edit';
+ }
+ }
+}
+
+/**
* This function generates the actual toolbar buttons with localized text
* we use it to avoid creating the toolbar where javascript is not enabled
*/
diff --git a/style.css b/style.css
index ab730dbdc..93c7c3341 100644
--- a/style.css
+++ b/style.css
@@ -1,4 +1,3 @@
-
body {
font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
background-color: White;
@@ -89,6 +88,19 @@ input.edit {
display: inline;
}
+input.missing {
+ font-size: 100%;
+ border: 1px solid #8cacbb;
+ height: 22px ! important;
+ max-height: 22px ! important;
+ min-height: 22px ! important;
+ color: Black;
+ background-color: #ffcccc;
+ vertical-align: middle;
+ padding: 1px;
+ display: inline;
+}
+
input.button {
border: 1px solid #8cacbb;
color: Black;
@@ -153,24 +165,21 @@ span.user{
}
div.error{
- background: transparent url(images/error.png) 0.5em 0px no-repeat;
- background-color: #ff6666;
+ background: #ff6666; url(images/error.png) 0.5em 0px no-repeat;
font-size: 90%;
margin: 0px;
padding-left: 3em;
}
div.info{
- background: transparent url(images/info.png) 0.5em 0px no-repeat;
- background-color: #ffff66;
+ background: #ffff66; url(images/info.png) 0.5em 0px no-repeat;
font-size: 90%;
margin: 0;
padding-left: 3em;
}
div.success{
- background: transparent url(images/thumbup.gif) 0.5em 0px no-repeat;
- background-color: #66ff66;
+ background: #66ff66; url(images/thumbup.gif) 0.5em 0px no-repeat;
font-size: 90%;
margin: 0;
padding-left: 3em;