Add link to default notification settings.
authorJan Schneider <jan@horde.org>
Mon, 12 Apr 2010 12:04:33 +0000 (13:04 +0100)
committerJan Schneider <jan@horde.org>
Mon, 12 Apr 2010 14:28:26 +0000 (16:28 +0200)
kronolith/js/kronolith.js
kronolith/templates/index/edit.inc
kronolith/templates/index/task.inc

index a57a2d8..ecbf958 100644 (file)
@@ -477,12 +477,15 @@ KronolithCore = {
             break;
 
         case 'options':
+            var url = Kronolith.conf.prefs_url;
+            if (data) {
+                url += (url.include('?') ? '&' : '?') + $H(data).toQueryString();
+            }
             this.closeView('iframe');
-            this.iframeContent(Kronolith.conf.prefs_url);
+            this.iframeContent(url);
             this.setTitle(Kronolith.text.prefs);
             this.updateMinical(this.date);
             this.addHistory(loc);
-            this.view = 'iframe';
             break;
 
         case 'app':
@@ -3342,6 +3345,20 @@ KronolithCore = {
                 this.disableAlarmMethods();
                 break;
 
+            case 'kronolithEventAlarmPrefs':
+                this.closeRedBox();
+                window.history.back();
+                this.go('options', { app: 'kronolith', group: 'notification' });
+                e.stop();
+                break;
+
+            case 'kronolithTaskAlarmPrefs':
+                this.closeRedBox();
+                window.history.back();
+                this.go('options', { app: 'nag', group: 'notification' });
+                e.stop();
+                break;
+
             case 'kronolithEventLinkNone':
             case 'kronolithEventLinkDaily':
             case 'kronolithEventLinkWeekly':
index 21d9870..bb5d8e5 100644 (file)
@@ -89,6 +89,7 @@
 </div>
 
 <div id="kronolithEventTabReminder" class="kronolithTabsOption" style="display:none">
+  <div class="kronolithDialogInfo"><?php printf(_("You can change the default settings in the %sNotification options%s"), '<a id="kronolithEventAlarmPrefs" href="#">', '</a>') ?></div>
   <?php printf(_("%s Don't set %s or %s set %s before the event %s"),
   '<label for="kronolithEventAlarmOff"><input type="radio" name="alarm" id="kronolithEventAlarmOff" value="0" checked="checked" />', '</label>',
   '<label for="kronolithEventAlarmOn"><input type="radio" name="alarm" id="kronolithEventAlarmOn" value="1" />', '</label>
index 2141499..3a6310e 100644 (file)
@@ -55,6 +55,7 @@
 </div>
 
 <div id="kronolithTaskTabReminder" class="kronolithTabsOption" style="display:none">
+  <div class="kronolithDialogInfo"><?php printf(_("You can change the default settings in the %sNotification options%s"), '<a id="kronolithTaskAlarmPrefs" href="#">', '</a>') ?></div>
   <?php printf(_("%s don't set %s or %s set %s before due date"),
   '<label><input type="radio" name="task[alarm][on]" id="kronolithTaskAlarmOff" value="0" checked="checked" />', '</label>',
   '<label><input type="radio" name="task[alarm][on]" id="kronolithTaskAlarmOn" value="1" />', '</label>