incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [16/17] git commit: [#5561] Added button to maximize commit view
Date Thu, 03 Oct 2013 18:05:26 GMT
[#5561] Added button to maximize commit view

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


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

Branch: refs/heads/cj/5561
Commit: c67d79ec2f6d7cb3cb561a890fb79db3bae41f9c
Parents: c14b91a
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Mon Sep 30 17:13:06 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Thu Oct 3 17:55:58 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/app_globals.py         |  2 ++
 Allura/allura/nf/allura/css/allura.css   | 14 ++++++++++++++
 Allura/allura/templates/repo/commit.html | 12 ++++++++++++
 3 files changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c67d79ec/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index e684383..0da0eee 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -163,6 +163,8 @@ class Globals(object):
             unsecure=Icon(')', 'ico-unlock'),
             star=Icon('S', 'ico-star'),
             watch=Icon('E', 'ico-watch'),
+            expand=Icon('`', 'ico-expand'),
+            restore=Icon('J', 'ico-restore'),
             # Permissions
             perm_read=Icon('E', 'ico-focus'),
             perm_update=Icon('0', 'ico-sync'),

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c67d79ec/Allura/allura/nf/allura/css/allura.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/allura.css b/Allura/allura/nf/allura/css/allura.css
index 38404f7..be450d6 100644
--- a/Allura/allura/nf/allura/css/allura.css
+++ b/Allura/allura/nf/allura/css/allura.css
@@ -227,3 +227,17 @@ tr.rev div.markdown_content p {
 #login_overlay iframe {
     width: 400px;
 }
+
+.content-maximized #page-body, .content-maximized #content_base>div:last-child {
+    width: 100%;
+}
+
+.content-maximized #sidebar,
+.content-maximized #maximize-content,
+#restore-content {
+    display: none;
+}
+
+.content-maximized #restore-content {
+    display: inline;
+}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c67d79ec/Allura/allura/templates/repo/commit.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/commit.html b/Allura/allura/templates/repo/commit.html
index a6f5179..daf5dc9 100644
--- a/Allura/allura/templates/repo/commit.html
+++ b/Allura/allura/templates/repo/commit.html
@@ -29,6 +29,12 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a>
{{commit_labels(
 {%- endblock %}
 
 {% block actions %}
+<a id="maximize-content" href="#">
+  <b data-icon="{{g.icons.expand.char}}" class="ico {{g.icons.expand.css}}" title="Maximize">
</b> Maximize
+</a>
+<a id="restore-content" href="#">
+  <b data-icon="{{g.icons.restore.char}}" class="ico {{g.icons.restore.css}}" title="Restore">
</b> Restore
+</a>
 <a href="{{commit.url()}}log/">
   <b data-icon="{{g.icons.history.char}}" class="ico {{g.icons.history.css}}" title="History">
</b> History
 </a>
@@ -97,6 +103,12 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a>
{{commit_labels(
         }
         return false;
       });
+
+      $('#maximize-content, #restore-content').click(function(e) {
+          $('body').toggleClass('content-maximized');
+          e.preventDefault();
+          return false;
+      });
     });
   </script>
 {% endblock %}


Mime
View raw message