[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kronolith
Subject:    [kronolith] Little Patch...
From:       "W. Tasin" <tasin () fhm ! edu>
Date:       2004-04-06 17:49:13
Message-ID: 4072ED99.90301 () fhm ! edu
[Download RAW message or body]

Hi all,

here's another patch.
Problem: Adding an event and changing the calender causes to set the
category "New Category" inside the select box and doesn't reset to
"Unfiled".
Even the same to pressing "Reset" inside the form.
Ciao

Walter




["kronolith_edit.diff" (text/plain)]

--- kronolith/templates/edit/edit.inc	Sat Apr  3 05:40:07 2004
+++ kronolith/templates/edit/edit.inc	Tue Apr  6 19:24:16 2004
@@ -30,7 +30,7 @@
  <td align="right" colspan="5">
   <?php echo implode("\n", $buttons); ?>
   <input type="submit" name="cancel" class="button" value="<?php echo _("Cancel") \
                ?>" onclick="self.location = '<?php echo $cancelurl; ?>'; return \
                false;" />
-  <input type="button" name="resetButton" class="button" value="<?php echo _("Reset \
to Defaults") ?>" onclick="document.event.reset(); updateWday('start_wday'); \
updateWday('end_wday');" /> +  <input type="button" name="resetButton" class="button" \
value="<?php echo _("Reset to Defaults") ?>" onclick="document.event.reset(); \
changeCalendar(); updateWday('start_wday'); updateWday('end_wday');" />  </td>
 </tr>
 
@@ -423,7 +424,7 @@
  <td align="right" colspan="5">
   <?php echo implode("\n", $buttons); ?>
   <input type="submit" name="cancel" class="button" value="<?php echo _("Cancel") \
                ?>" onclick="self.location = '<?php echo $cancelurl; ?>'; return \
                false;" />
-  <input type="button" name="resetButton" class="button" value="<?php echo _("Reset \
to Defaults") ?>" onclick="document.event.reset(); updateWday('start_wday'); \
updateWday('end_wday');" /> +  <input type="button" name="resetButton" class="button" \
value="<?php echo _("Reset to Defaults") ?>" onclick="document.event.reset(); \
changeCalendar(); updateWday('start_wday'); updateWday('end_wday');" />  </td>
  </tr>
 </table>


["kronolith_editjs.diff" (text/plain)]

--- kronolith/templates/edit/javascript.inc	Sat Feb 14 05:02:15 2004
+++ kronolith/templates/edit/javascript.inc	Tue Apr  6 19:20:26 2004
@@ -36,7 +36,11 @@
 
     for (i = 0; i < categories[calendar].length; i++) {
         f.category.options[i + 2] = new Option(categories[calendar][i][0], categories[calendar][i][1]);
+        if (categories[calendar][i][1]==0) {
+          f.category.selectedIndex=i + 2;
+        }
     }
+        
 }
 
 function setInterval(field)



-- 
Kronolith mailing list - Join the hunt: http://horde.org/bounties/#kronolith
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: kronolith-unsubscribe@lists.horde.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic