aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-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}}