incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [47/50] git commit: [#5561] Added button to maximize commit view
Date Fri, 04 Oct 2013 16:31:15 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/af52e5fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/af52e5fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/af52e5fe

Branch: refs/heads/cj/5561
Commit: af52e5fec447c9162697b3b2e74cdc10ebc88ea0
Parents: 74b7854
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Mon Sep 30 17:13:06 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Fri Oct 4 15:00:11 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/af52e5fe/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/af52e5fe/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/af52e5fe/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