more work on notification popup
This commit is contained in:
parent
0cda9601c6
commit
479541b5f8
16
js/main.js
16
js/main.js
@ -156,7 +156,6 @@
|
||||
|
||||
/* popup menus */
|
||||
function close_last_popup_menu() {
|
||||
|
||||
if(last_popup_menu) {
|
||||
last_popup_menu.hide();
|
||||
last_popup_button.removeClass("selected");
|
||||
@ -164,6 +163,7 @@
|
||||
last_popup_button = null;
|
||||
}
|
||||
}
|
||||
|
||||
$('a[rel^=#]').click(function(e){
|
||||
close_last_popup_menu();
|
||||
menu = $( $(this).attr('rel') );
|
||||
@ -171,6 +171,10 @@
|
||||
e.stopPropagation();
|
||||
if (menu.attr('popup')=="false") return false;
|
||||
$(this).parent().toggleClass("selected");
|
||||
var loader_source = $(menu).attr('rel');
|
||||
if(loader_source.length) {
|
||||
notify_popup_loader(loader_source);
|
||||
}
|
||||
menu.toggle();
|
||||
if (menu.css("display") == "none") {
|
||||
last_popup_menu = null;
|
||||
@ -181,6 +185,7 @@
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('html').click(function() {
|
||||
close_last_popup_menu();
|
||||
});
|
||||
@ -509,13 +514,7 @@ function updateConvItems(mode,data) {
|
||||
$(node).removeClass("drop").addClass("drophide");
|
||||
}
|
||||
|
||||
function notify_popup(notifyType) {
|
||||
|
||||
if($("#nav-notifications-menu").is(":visible")) {
|
||||
$("#nav-notifications-menu").hide();
|
||||
return;
|
||||
}
|
||||
|
||||
function notify_popup_loader(notifyType) {
|
||||
|
||||
/* notifications template */
|
||||
var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html());
|
||||
@ -549,7 +548,6 @@ function updateConvItems(mode,data) {
|
||||
}
|
||||
});
|
||||
|
||||
$("#nav-notifications-menu").show();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
function redbasic_init(&$a) {
|
||||
if($a->config['system']['theme_engine'])
|
||||
$a->set_template_engine($a->config['system']['theme_engine']);
|
||||
else
|
||||
$a->set_template_engine('smarty3');
|
||||
// head_add_js('redbasic.js');
|
||||
}
|
||||
|
@ -49,9 +49,10 @@
|
||||
|
||||
{{ if $nav.notifications }}
|
||||
|
||||
<li id="nav-notifications-linkmenu" class="nav-menu fakelink" onclick="notify_popup('notify'); return false;" title="$nav.notifications.1"><span class="icon s22 notify">$nav.notifications.1</span></a>
|
||||
<li id="nav-notifications-linkmenu" class="nav-menu fakelink">
|
||||
<a rel="#nav-notifications-menu" title="$nav.notifications.1"><span class="icon s22 notify">$nav.notifications.1</span></a>
|
||||
<span id="notify-update" class="nav-notify"></span>
|
||||
<ul id="nav-notifications-menu" class="menu-popup">
|
||||
<ul id="nav-notifications-menu" class="menu-popup" rel="notify">
|
||||
<li id="nav-notifications-see-all"><a href="$nav.notifications.all.0">$nav.notifications.all.1</a></li>
|
||||
<li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">$nav.notifications.mark.1</a></li>
|
||||
<li class="empty">$emptynotifications</li>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<script>
|
||||
$("#main-range").slider({ from: 0, to: 99, step: 1, scale: ['{{$me}}', '|', '{{$intimate}}', '|', '{{$friends}}', '|', '{{$oldfriends}}', '|', '{{$acquaintances}}', '|', '{{$world}}' ], onstatechange: function(v) {
|
||||
var carr = v.split(";");
|
||||
network_cmin = carr[0];
|
||||
network_cmax = carr[1];
|
||||
bParam_cmin = carr[0];
|
||||
bParam_cmax = carr[1];
|
||||
networkRefresh();
|
||||
} });
|
||||
|
||||
|
@ -49,9 +49,10 @@
|
||||
|
||||
{{if $nav.notifications}}
|
||||
|
||||
<li id="nav-notifications-linkmenu" class="nav-menu fakelink" onclick="notify_popup('notify'); return false;" title="{{$nav.notifications.1}}"><span class="icon s22 notify">{{$nav.notifications.1}}</span></a>
|
||||
<li id="nav-notifications-linkmenu" class="nav-menu fakelink">
|
||||
<a rel="#nav-notifications-menu" title="{{$nav.notifications.1}}"><span class="icon s22 notify">{{$nav.notifications.1}}</span></a>
|
||||
<span id="notify-update" class="nav-notify"></span>
|
||||
<ul id="nav-notifications-menu" class="menu-popup">
|
||||
<ul id="nav-notifications-menu" class="menu-popup" rel="notify">
|
||||
<li id="nav-notifications-see-all"><a href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a></li>
|
||||
<li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">{{$nav.notifications.mark.1}}</a></li>
|
||||
<li class="empty">{{$emptynotifications}}</li>
|
||||
|
Reference in New Issue
Block a user