cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robpav...@apache.org
Subject cordova-plugin-test-framework git commit: CB-8973: Changed the functionality of making the log appear and disappear from modifying the #log class list, to modifying the body class list, and having the #middle and #log elements adjust their appearances ba
Date Wed, 16 Sep 2015 22:31:24 GMT
Repository: cordova-plugin-test-framework
Updated Branches:
  refs/heads/master e8567f0de -> 356aea5ea


CB-8973: Changed the functionality of making the log appear and disappear
from modifying the #log class list, to modifying the body class list, and
having the #middle and #log elements adjust their appearances based on
having body.expanded-log selector.. This closes #12


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/commit/356aea5e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/tree/356aea5e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/diff/356aea5e

Branch: refs/heads/master
Commit: 356aea5ea17d00e7fd67c069763d80faeec869b2
Parents: e8567f0
Author: Rob Paveza <Rob.Paveza@microsoft.com>
Authored: Wed May 6 16:36:23 2015 -0700
Committer: Rob Paveza <Rob.Paveza@microsoft.com>
Committed: Wed Sep 16 15:14:50 2015 -0700

----------------------------------------------------------------------
 www/assets/main.css |  6 +++++-
 www/main.js         | 16 ++++++++++------
 2 files changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/blob/356aea5e/www/assets/main.css
----------------------------------------------------------------------
diff --git a/www/assets/main.css b/www/assets/main.css
index 7665448..a03f4ba 100644
--- a/www/assets/main.css
+++ b/www/assets/main.css
@@ -64,7 +64,11 @@ html, body {
   transition: 0.25s ease;
 }
 
-#log.expanded {
+body.expanded-log #middle {
+  margin-bottom: 40%;
+}
+
+body.expanded-log #log {
   height: 40%;
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-test-framework/blob/356aea5e/www/main.js
----------------------------------------------------------------------
diff --git a/www/main.js b/www/main.js
index 351db63..04d5045 100644
--- a/www/main.js
+++ b/www/main.js
@@ -70,18 +70,22 @@ function setTitle(title) {
 
 function setLogVisibility(visible) {
   if (visible) {
-    document.getElementById('log').classList.add('expanded');
+    document.querySelector('body').classList.add('expanded-log');
   } else {
-    document.getElementById('log').classList.remove('expanded');
+    document.querySelector('body').classList.add('expanded-log');
   }
 }
 
+function getLogVisibility() {
+  var e = document.querySelector('body');
+  return e.classList.contains('expanded-log');
+}
+
 function toggleLogVisibility() {
-  var log = document.getElementById('log');
-  if (log.classList.contains('expanded')) {
-    log.classList.remove('expanded');
+  if (getLogVisibility()) {
+    setLogVisibility(false);
   } else {
-    log.classList.add('expanded');
+    setLogVisibility(true);
   }
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message