aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/navbar_default.tpl
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-08-04 14:13:28 +0000
committerMario <mario@mariovavti.com>2021-08-04 14:13:28 +0000
commitbd2270deb685c09808ce1f53653e4f3b73086645 (patch)
tree6503061d7d1dbd32a1560ecc2e153606138b9682 /view/tpl/navbar_default.tpl
parent5b72f6f09d1964223797b700cbcdbe664f6e24c6 (diff)
downloadvolse-hubzilla-bd2270deb685c09808ce1f53653e4f3b73086645.tar.gz
volse-hubzilla-bd2270deb685c09808ce1f53653e4f3b73086645.tar.bz2
volse-hubzilla-bd2270deb685c09808ce1f53653e4f3b73086645.zip
app-bin-ng: add a link to the bin for convenience and use the traditional ajax call instead of the post shortcut
Diffstat (limited to 'view/tpl/navbar_default.tpl')
-rw-r--r--view/tpl/navbar_default.tpl27
1 files changed, 18 insertions, 9 deletions
diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl
index 5e46c2263..ba297c9b6 100644
--- a/view/tpl/navbar_default.tpl
+++ b/view/tpl/navbar_default.tpl
@@ -392,16 +392,19 @@
if (papp === null)
return;
- $.post(
- 'appman',
- {
+ $.ajax({
+ type: 'post',
+ url: 'appman',
+ data: {
'aj' : 1,
'feature' : 'nav_pinned_app',
'papp' : papp
}
- );
+ })
+ .done( function() {
+ $('<li><a class="navbar-app nav-link" href="' + app_url + '"><i class="fa fa-fw fa-' + app_icon + '"></i></li>').insertBefore('#app-menu');
+ });
- $('<li><a class="navbar-app nav-link" href="' + app_url + '"><i class="fa fa-fw fa-' + app_icon + '"></i></li>').insertBefore('#app-menu');
});
$('#app-menu').on('dragover', function (e) {
@@ -423,14 +426,19 @@
if (papp === null)
return;
- $.post(
- 'appman',
- {
+ $.ajax({
+ type: 'post',
+ url: 'appman',
+ data: {
'aj' : 1,
'feature' : 'nav_featured_app',
'papp' : papp
}
- );
+ })
+ .done( function() {
+ $('<a class="dropdown-item" href="' + app_url + '"><i class="generic-icons-nav fa fa-fw fa-' + app_icon + '"></i>' + app_name + '</a>').appendTo('#app-bin-container');
+ });
+
});
var papp, app_icon, app_url;
@@ -438,6 +446,7 @@
papp = e.target.dataset.papp || null;
app_icon = e.target.dataset.icon || null;
app_url = e.target.dataset.url || null;
+ app_name = e.target.dataset.name || null;
});
</script>
{{/if}}