aboutsummaryrefslogtreecommitdiffstats
path: root/view/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
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')
-rw-r--r--view/tpl/app.tpl2
-rw-r--r--view/tpl/navbar_default.tpl27
2 files changed, 19 insertions, 10 deletions
diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl
index 597e38637..b5957a373 100644
--- a/view/tpl/app.tpl
+++ b/view/tpl/app.tpl
@@ -1,7 +1,7 @@
{{if ! ($navapps || $order)}}
<div class="app-container">
<div class="app-detail{{if $deleted}} app-deleted{{/if}}">
- <a class="app-link" href="{{$app.url}}"{{if $app.target}} target="{{$app.target}}"{{/if}}{{if $app.desc}} title="{{$app.desc}}{{if $app.price}} ({{$app.price}}){{/if}}"{{else}}title="{{$app.name}}"{{/if}}{{if $installed}} data-papp="{{$app.papp}}" data-icon="{{$icon}}" data-url="{{$app.url}}"{{/if}}>{{if $icon}}<i class="app-icon fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="80" height="80" />{{/if}}
+ <a class="app-link" href="{{$app.url}}"{{if $app.target}} target="{{$app.target}}"{{/if}}{{if $app.desc}} title="{{$app.desc}}{{if $app.price}} ({{$app.price}}){{/if}}"{{else}}title="{{$app.name}}"{{/if}}{{if $installed}} data-papp="{{$app.papp}}" data-icon="{{$icon}}" data-url="{{$app.url}}" data-name="{{$app.name}}"{{/if}}>{{if $icon}}<i class="app-icon fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="80" height="80" />{{/if}}
<div class="app-name" style="text-align:center;">{{$app.name}}</div>
</a>
</div>
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}}