From 6afe897884b4e5c4e77e42abb51fb2fcecb3d99e Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Thu, 10 Oct 2013 21:27:19 +0300 Subject: [PATCH] Fix switching to unstable mode --- index.php | 3 +++ js/documents.js | 1 + templates/documents.php | 11 ++++++----- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index d85a57e4..0cd0392b 100755 --- a/index.php +++ b/index.php @@ -40,9 +40,12 @@ namespace OCA\Documents; $tmpl = new \OCP\Template('documents', 'documents', 'user'); +$unstable = \OCP\Config::getAppValue('documents', 'unstable', 'false'); $maxUploadFilesize = \OCP\Util::maxUploadFilesize("/"); $savePath = \OCP\Config::getUserValue(\OCP\User::getUser(), 'documents', 'save_path', '/'); + +$tmpl->assign('useUnstable', $unstable); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign('uploadMaxHumanFilesize', \OCP\Util::humanFileSize($maxUploadFilesize)); $tmpl->assign('savePath', $savePath); diff --git a/js/documents.js b/js/documents.js index ba30ca63..7754254c 100644 --- a/js/documents.js +++ b/js/documents.js @@ -88,6 +88,7 @@ var documentsMain = { onStartup: function() { "use strict"; + documentsMain.useUnstable = $('#webodf-unstable').val()==='true'; documentsMain.UI.init(); if (!OC.currentUser){ diff --git a/templates/documents.php b/templates/documents.php index f55a71d2..536ea0f4 100755 --- a/templates/documents.php +++ b/templates/documents.php @@ -14,15 +14,15 @@ target="file_upload_target_1"> = 0):?> + value="" /> - + - - + value="(max )" /> + + @@ -33,3 +33,4 @@ +