allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject [17/20] allura git commit: [#7310] "Maxmize view" setting now persists
Date Mon, 29 Jun 2015 20:23:21 GMT
[#7310] "Maxmize view" setting now persists


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/fbb8da9e
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/fbb8da9e
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/fbb8da9e

Branch: refs/heads/hs/7894
Commit: fbb8da9ea2dca83652faf4a61a8ad99b44e26ffb
Parents: 7020430
Author: Heith Seewald <hseewald@slashdotmedia.com>
Authored: Thu Jun 25 15:36:54 2015 -0400
Committer: Heith Seewald <hseewald@slashdotmedia.com>
Committed: Thu Jun 25 15:36:54 2015 -0400

----------------------------------------------------------------------
 Allura/allura/public/nf/js/maximize-content.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/fbb8da9e/Allura/allura/public/nf/js/maximize-content.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/maximize-content.js b/Allura/allura/public/nf/js/maximize-content.js
index f985741..7202125 100644
--- a/Allura/allura/public/nf/js/maximize-content.js
+++ b/Allura/allura/public/nf/js/maximize-content.js
@@ -17,9 +17,16 @@
        under the License.
 */
 
-$(document).ready(function() {
-    $('#maximize-content, #restore-content').click(function(e) {
+$(document).ready(function () {
+    if ($.cookie('maximizeView') === 'true') {
+        $('body').addClass('content-maximized');
+    }
+    $(".content-maximized").toggle($.cookie('maximizeView') != 'false');
+    $('#maximize-content, #restore-content').click(function (e) {
         $('body').toggleClass('content-maximized');
+        var is_visible = $(".content-maximized").is(":visible") ? 'true' : 'false';
+        $.cookie('maximizeView', is_visible);
+
         e.preventDefault();
         return false;
     });


Mime
View raw message