summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-05-13 09:34:26 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-05-13 09:34:26 +0000
commit4cd1a8899994ab0dac7d1233df0b538ff89d223e (patch)
tree02207af5e44f38150f88bf8990bfc42372eb8348 /templates
parente6f76a711c16a69143940a49f50a905e8c925741 (diff)
downloadmessages-4cd1a8899994ab0dac7d1233df0b538ff89d223e.tar.gz
messages-4cd1a8899994ab0dac7d1233df0b538ff89d223e.tar.bz2
messages-4cd1a8899994ab0dac7d1233df0b538ff89d223e.zip
fix the message alert and store it's state in a cookie
Diffstat (limited to 'templates')
-rw-r--r--templates/header_inc.tpl6
-rw-r--r--templates/messages_preferences_inc.tpl2
2 files changed, 3 insertions, 5 deletions
diff --git a/templates/header_inc.tpl b/templates/header_inc.tpl
index 8a3644d..655e267 100644
--- a/templates/header_inc.tpl
+++ b/templates/header_inc.tpl
@@ -1,9 +1,9 @@
-{if $unreadMsgs and $gBitUser->getPreference('messages_alert')}
+{if $unreadMsgs and $gBitUser->getPreference('messages_alert') and !$smarty.cookies.messages_alert_sent}
<script type="text/javascript">
var redirect = confirm( '{tr}You have {$unreadMsgs} message(s) waiting for you in your personal message box. Click OK to view your messages.{/tr}' );
- if( redirect == true && !getCookie( 'message_alert_sent' ) ) {ldelim}
- setCookie( 'message_alert_sent', true, 600 );
+ if( redirect == true ) {ldelim}
window.location="{$smarty.const.MESSAGES_PKG_URL}message_box.php";
{rdelim}
+ setCookie( 'messages_alert_sent', true );
</script>
{/if}
diff --git a/templates/messages_preferences_inc.tpl b/templates/messages_preferences_inc.tpl
index 13522ff..ff5af53 100644
--- a/templates/messages_preferences_inc.tpl
+++ b/templates/messages_preferences_inc.tpl
@@ -33,7 +33,6 @@
{/forminput}
</div>
- {* the header_inc.tpl file needs some better js for this to work - xing
<div class="row">
{formlabel label="Message Alert" for="messages_alert"}
{forminput}
@@ -41,7 +40,6 @@
{formhelp note="Whenever you have new messages, a popup will apear and take you directly to your message box."}
{/forminput}
</div>
- *}
<div class="row">
{formlabel label="Send an email" for="messages_min_priority"}