From 27d5559b0c046b8eefcadd44a48e70dcee413b00 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 3 Jan 2017 12:17:17 +0100 Subject: [PATCH] define and use flags to enable the home page table --- customize.dist/application_config.js | 3 +++ customize.dist/main.js | 15 +++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/customize.dist/application_config.js b/customize.dist/application_config.js index 0e3f88f88..8a0e4caa4 100644 --- a/customize.dist/application_config.js +++ b/customize.dist/application_config.js @@ -12,5 +12,8 @@ define(function() { */ config.notificationTimeout = 5000; + config.USE_FS_STORE = false; + config.USE_HOMEPAGE_TABLE = true; + return config; }); diff --git a/customize.dist/main.js b/customize.dist/main.js index 227fa2df3..1b9ae83ab 100644 --- a/customize.dist/main.js +++ b/customize.dist/main.js @@ -1,6 +1,5 @@ define([ '/customize/messages.js', - //'/customize/DecorateToolbar.js', '/customize/application_config.js', '/common/cryptpad-common.js', '/bower_components/lil-uri/uri.min.js', @@ -9,6 +8,9 @@ define([ ], function (Messages, Config, Cryptpad, LilUri, LS) { var $ = window.$; + var USE_TABLE = Config.USE_HOMEPAGE_TABLE; + var USE_FS_STORE = Config.USE_FS_STORE; + var APP = window.APP = { Cryptpad: Cryptpad, }; @@ -139,20 +141,22 @@ define([ $('iframe').attr('style', ''); $tryit.removeAttr('data-localization'); $tryit.text(Messages.recentPadsIframe); - //makeRecentPadsTable(recentPads); + + if (USE_TABLE) { + makeRecentPadsTable(recentPads); + } } - /*if (hasRecent) { + if (USE_TABLE && hasRecent) { $('table').attr('style', ''); // Race condition here, this is triggered before the localization in HTML // so we have to remove the data-localization attr $tryit.removeAttr('data-localization'); $tryit.text(Messages.recentPads); - }*/ + } }); }; - displayCreateButtons(); Cryptpad.ready(function () { console.log("ready"); @@ -161,7 +165,6 @@ define([ $tbody = $table.find('tbody'); $tryit = $('#tryit'); - DecorateToolbar.main($('#bottom-bar')); Cryptpad.styleAlerts(); refreshTable();