aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/main.js34
-rw-r--r--view/theme/redbasic/php/theme.php5
-rw-r--r--view/tpl/nav.tpl5
-rw-r--r--view/tpl/smarty3/main_slider.tpl4
-rw-r--r--view/tpl/smarty3/nav.tpl5
5 files changed, 28 insertions, 25 deletions
diff --git a/js/main.js b/js/main.js
index 67105bd16..356efcf79 100644
--- a/js/main.js
+++ b/js/main.js
@@ -155,22 +155,26 @@
setupFieldRichtext();
/* popup menus */
- function close_last_popup_menu() {
-
- if(last_popup_menu) {
- last_popup_menu.hide();
- last_popup_button.removeClass("selected");
- last_popup_menu = null;
- last_popup_button = null;
- }
- }
- $('a[rel^=#]').click(function(e){
+ function close_last_popup_menu() {
+ if(last_popup_menu) {
+ last_popup_menu.hide();
+ last_popup_button.removeClass("selected");
+ last_popup_menu = null;
+ last_popup_button = null;
+ }
+ }
+
+ $('a[rel^=#]').click(function(e){
close_last_popup_menu();
menu = $( $(this).attr('rel') );
e.preventDefault();
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();
}
diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php
index 52e571f0a..3d69a7e22 100644
--- a/view/theme/redbasic/php/theme.php
+++ b/view/theme/redbasic/php/theme.php
@@ -1,6 +1,9 @@
<?php
function redbasic_init(&$a) {
- $a->set_template_engine('smarty3');
+ 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');
}
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index f8f9e1c06..57af0fa36 100644
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -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>
diff --git a/view/tpl/smarty3/main_slider.tpl b/view/tpl/smarty3/main_slider.tpl
index 04ce72733..7fa812ada 100644
--- a/view/tpl/smarty3/main_slider.tpl
+++ b/view/tpl/smarty3/main_slider.tpl
@@ -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();
} });
diff --git a/view/tpl/smarty3/nav.tpl b/view/tpl/smarty3/nav.tpl
index 6fb0343bc..8fa24d614 100644
--- a/view/tpl/smarty3/nav.tpl
+++ b/view/tpl/smarty3/nav.tpl
@@ -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>