Aligned the main menu to the right of the jsoneditor instead of the right of the page (so the menu is not located above the ad).
This commit is contained in:
parent
d3f604a790
commit
d9a561b695
|
@ -185,11 +185,11 @@ a.header {
|
|||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.footer, a.adInfo {
|
||||
a.footer {
|
||||
color: #BFBFBF;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.footer:hover, a.adInfo:hover {
|
||||
a.footer:hover {
|
||||
color: red;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* Copyright (C) 2011-2013 Jos de Jong, http://jsoneditoronline.org
|
||||
*
|
||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||
* @date 2013-02-20
|
||||
* @date 2013-02-21
|
||||
*/
|
||||
|
||||
|
||||
|
@ -291,11 +291,11 @@ app.clearFile = function () {
|
|||
};
|
||||
|
||||
app.resize = function() {
|
||||
var domMenu = document.getElementById('menu');
|
||||
var domEditor = document.getElementById('jsoneditor');
|
||||
var domFormatter = document.getElementById('jsonformatter');
|
||||
var domSplitter = document.getElementById('splitter');
|
||||
var domAd = document.getElementById('ad');
|
||||
var domAdInfo = document.getElementById('adInfo');
|
||||
|
||||
var width = window.innerWidth || document.body.offsetWidth || document.documentElement.offsetWidth;
|
||||
var height = window.innerHeight || document.body.offsetHeight || document.documentElement.offsetHeight;
|
||||
|
@ -318,9 +318,13 @@ app.resize = function() {
|
|||
domEditor.style.width = Math.round(width - splitterLeft - splitterWidth - 1) + 'px';
|
||||
}
|
||||
|
||||
// resize ad text
|
||||
if (domAdInfo && domAd) {
|
||||
var infoHeight = domAdInfo.clientHeight;
|
||||
domAd.style.paddingTop = infoHeight + 'px';
|
||||
// align main menu with ads
|
||||
if (domMenu) {
|
||||
if (adWidth) {
|
||||
domMenu.style.right = (15 + (adWidth + 15)) + 'px';
|
||||
}
|
||||
else {
|
||||
domMenu.style.right = 15 + 'px';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
Copyright (C) 2011-2013 Jos de Jong, http://jsoneditoronline.org
|
||||
|
||||
@author Jos de Jong, <wjosdejong@gmail.com>
|
||||
@date 2013-02-20
|
||||
@date 2013-02-21
|
||||
-->
|
||||
|
||||
<meta name="description" content="JSON Editor Online is a web-based tool to view, edit, and format JSON. It shows your data side by side in a clear, editable treeview and in formatted plain text.">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
http://jsoneditoronline.org
|
||||
|
||||
|
||||
## 2013-02-20, version 2.0.1
|
||||
## 2013-02-21, version 2.0.1
|
||||
|
||||
- Fixed undefined variable in the redo method.
|
||||
- Removed the "hide ads" button. Not allowed by Google AdSense, sorry.
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* Copyright (c) 2011-2013 Jos de Jong, http://jsoneditoronline.org
|
||||
*
|
||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||
* @date 2013-02-20
|
||||
* @date 2013-02-21
|
||||
*/
|
||||
|
||||
(function () {
|
||||
|
|
Loading…
Reference in New Issue