You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ro...@apache.org on 2015/09/17 00:31:24 UTC
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
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 <Ro...@microsoft.com>
Authored: Wed May 6 16:36:23 2015 -0700
Committer: Rob Paveza <Ro...@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