Merge pull request #134 from YunoHost/app_list_raw_bool_only_for_multi_instance

[fix] api correctly returns boolean value now
This commit is contained in:
Laurent Peuch 2016-08-14 19:00:45 +02:00 committed by GitHub
commit e2c1a09d04

View file

@ -24,7 +24,7 @@
apps = [];
$.each(data['apps'], function(k, v) {
// Keep only uninstalled apps, or multi-instance apps
if ((!v['installed'] || dataraw[v['id']].manifest.multi_instance == "true") && !v['id'].match(/__[0-9]{1,5}$/)) {
if ((!v['installed'] || dataraw[v['id']].manifest.multi_instance) && !v['id'].match(/__[0-9]{1,5}$/)) {
// Check app source
dataraw[v['id']]['official'] = (dataraw[v['id']]['repository'] == 'yunohost');
@ -61,7 +61,7 @@
;
// Multi Instance settings
data.manifest.multi_instance = (data.manifest.multi_instance == 'true') ? y18n.t('yes') : y18n.t('no');
data.manifest.multi_instance = data.manifest.multi_instance ? y18n.t('yes') : y18n.t('no');
// Installation date
var d = new Date(data.settings.install_time * 1000);
@ -210,7 +210,7 @@
;
// Multi Instance settings boolean to text
data.manifest.multi_instance = (data.manifest.multi_instance == 'true') ? y18n.t('yes') : y18n.t('no');
data.manifest.multi_instance = data.manifest.multi_instance ? y18n.t('yes') : y18n.t('no');
// View app install form
c.view('app/app_install', data);