From 4d0312115a0effa23184daa14211a2f60fd369d1 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 25 Jan 2018 12:09:20 +0100 Subject: [PATCH] Add a link to the account server for subscribers in settings --- customize.dist/translations/messages.fr.js | 1 + customize.dist/translations/messages.js | 1 + www/settings/inner.js | 12 +++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index f28fdbbd9..83e652588 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -490,6 +490,7 @@ define(function () { out.settings_cat_code = "Code"; out.settings_cat_pad = "Documents texte"; out.settings_cat_creation = "Nouveau pad"; + out.settings_cat_subscription = "Abonnement"; out.settings_title = "Préférences"; out.settings_save = "Sauver"; diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index ffe96f79a..f096341b6 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -495,6 +495,7 @@ define(function () { out.settings_cat_code = "Code"; out.settings_cat_pad = "Rich text"; out.settings_cat_creation = "New pad"; + out.settings_cat_subscription = "Subscription"; out.settings_title = "Settings"; out.settings_save = "Save"; diff --git a/www/settings/inner.js b/www/settings/inner.js index b6a554b37..18aa90b04 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -64,7 +64,13 @@ define([ 'code': [ 'cp-settings-code-indent-unit', 'cp-settings-code-indent-type' - ] + ], + 'subscription': { + onClick: function () { + var urls = common.getMetadataMgr().getPrivateData().accounts; + window.open(urls.upgradeURL); + } + } }; if (!AppConfig.dislayCreationScreen) { @@ -786,12 +792,16 @@ define([ if (key === 'code') { $category.append($('', {'class': 'fa fa-file-code-o' })); } if (key === 'pad') { $category.append($('', {'class': 'fa fa-file-word-o' })); } if (key === 'creation') { $category.append($('', {'class': 'fa fa-plus-circle' })); } + if (key === 'subscription') { $category.append($('', {'class': 'fa fa-star-o' })); } if (key === active) { $category.addClass('cp-leftside-active'); } $category.click(function () { + if (!Array.isArray(categories[key]) && categories[key].onClick) { + categories[key].onClick(); + } active = key; $categories.find('.cp-leftside-active').removeClass('cp-leftside-active'); $category.addClass('cp-leftside-active');