Skip to content

Commit d45e171

Browse files
committed
[UPDATE] notification dismiss motd/backend/lastlogin
1 parent c29bcf2 commit d45e171

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

public/include/smarty_globals.inc.php

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
if ($setting->getValue('maintenance'))
179179
$_SESSION['POPUP'][] = array('CONTENT' => 'This pool is currently in maintenance mode.', 'TYPE' => 'alert alert-warning');
180180
if ($motd = $setting->getValue('system_motd'))
181-
$_SESSION['POPUP'][] = array('CONTENT' => $motd, 'TYPE' => 'alert alert-info');
181+
$_SESSION['POPUP'][] = array('CONTENT' => $motd, 'DISMISS' => 'yes', 'ID' => 'motd', 'TYPE' => 'alert alert-info');
182182

183183
// So we can display additional info
184184
$smarty->assign('DEBUG', $config['DEBUG']);
@@ -213,7 +213,7 @@
213213
}
214214
}
215215
if ($bMessage)
216-
$_SESSION['POPUP'][] = array('CONTENT' => implode($aCronMessage, ''));
216+
$_SESSION['POPUP'][] = array('CONTENT' => implode($aCronMessage, ''), 'DISMISS' => 'yes', 'ID' => 'backend', 'TYPE' => 'alert alert-warning');
217217

218218
// Make it available in Smarty
219219
$smarty->assign('PATH', 'site_assets/' . THEME);

public/site_assets/bootstrap/js/mpos.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,26 @@ $(function() {
3131
if( $.cookie('lastlogin-box') === 'closed' ){
3232
$('#lastlogin').hide();
3333
}
34+
if( $.cookie('motd-box') === 'closed' ){
35+
$('#motd').hide();
36+
}
37+
if( $.cookie('backend-box') === 'closed' ){
38+
$('#backend').hide();
39+
}
3440

3541
// Grab your button (based on your posted html)
3642
$('.close').click(function( e ){
3743
e.preventDefault();
3844
//alert($(this).attr("id"));
39-
$.cookie('lastlogin-box', 'closed', { path: '/' });
45+
if ($(this).attr("id") === 'motd') {
46+
$.cookie('motd-box', 'closed', { path: '/' });
47+
} else if ($(this).attr("id") === 'lastlogin') {
48+
$.cookie('lastlogin-box', 'closed', { path: '/' });
49+
} else if ($(this).attr("id") === 'backend') {
50+
$.cookie('backend-box', 'closed', { path: '/' });
51+
} else {
52+
//alert($(this).attr("id"));
53+
}
4054
});
4155

4256
});

public/templates/bootstrap/global/header.tpl

100644100755
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
</button>
99
<a class="navbar-brand" href="{$smarty.server.SCRIPT_NAME}">{$GLOBAL.website.name}</a>
1010
</div>
11-
<!-- /.navbar-header -->
1211

1312
<ul class="nav navbar-top-links navbar-right">
1413
{if $smarty.session.AUTHENTICATED|default:"0" == 1 && $GLOBAL.userdata.lastnotifications|@count|default:"0" != 0}
@@ -43,10 +42,8 @@
4342
</a>
4443
</li>
4544
</ul>
46-
<!-- /.dropdown-alerts -->
4745
</li>
4846
{/if}
49-
<!-- /.dropdown -->
5047
<li class="dropdown">
5148
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
5249
<i class="fa fa-user fa-fw"></i> {if $GLOBAL.userdata.username|default}{$smarty.session.USERDATA.username|escape}{else}Guest{/if} <i class="fa fa-caret-down"></i>
@@ -65,11 +62,6 @@
6562
</li>
6663
{/if}
6764
</ul>
68-
<!-- /.dropdown-user -->
6965
</li>
70-
<!-- /.dropdown -->
7166
</ul>
72-
<!-- /.navbar-top-links -->
73-
7467
</nav>
75-
<!-- /.navbar-static-top -->

public/templates/bootstrap/global/pagination.tpl

Whitespace-only changes.

0 commit comments

Comments
 (0)