diff options
author | NinaV <nina.vyedin@gmail.com> | 2012-12-14 18:51:17 +0400 |
---|---|---|
committer | Nina Vyedin <nina.vyedin@gmail.com> | 2013-03-05 07:57:11 +0400 |
commit | 55a628b1932335a3f54d3d1f5d82741fc10a0532 (patch) | |
tree | 9836333f4b21a6abe26d4c962a2cd1ab1382c810 /webdoc | |
parent | 62eb9f085e374eaf62dadb47efe7a4eecde5cbb0 (diff) |
[webdoc] some more work on views: move viewport sizing code into the sidebar plugin, edit sidebar css from a different spot
Diffstat (limited to 'webdoc')
-rw-r--r-- | webdoc/common.js | 8 | ||||
-rwxr-xr-x | webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.css | 3 | ||||
-rw-r--r-- | webdoc/plugins/sidebar-plugin/sidebar.css | 3 | ||||
-rw-r--r-- | webdoc/plugins/sidebar-plugin/viewport.js | 52 | ||||
-rw-r--r-- | webdoc/skins/mono-external/common-extension.css | 2 |
5 files changed, 60 insertions, 8 deletions
diff --git a/webdoc/common.js b/webdoc/common.js index f7acf251..887b731f 100644 --- a/webdoc/common.js +++ b/webdoc/common.js @@ -1,6 +1,6 @@ $(function () { //a hack for sizing our iframe correctly - var getHeight = function () { +/* var getHeight = function () { <!-- var viewportwidth; var viewportheight; @@ -31,8 +31,8 @@ $(function () { var main_part = $('#main_part'); var content_frame = main_part.find('#content_frame'); var resize_mainpart = function () { - main_part.height (getHeight() - 75); - main_part.children('#side').css ('height', '100%'); +// main_part.height (getHeight() - 75); +// main_part.children('#side').css ('height', '100%'); content_frame.css ('height', '97.5%'); } @@ -42,5 +42,5 @@ $(function () { resizeTimer = setTimeout(resize_mainpart, 100); }); - resize_mainpart (); + resize_mainpart ();*/ }); diff --git a/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.css b/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.css index d9259916..d2cf6310 100755 --- a/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.css +++ b/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.css @@ -27,7 +27,6 @@ .tree-label-selected a:hover { text-decoration: none; - background-color: #f2f2f2; color: #2a2c2f; } @@ -35,13 +34,11 @@ { text-decoration: none; color: #2a2c2f; - background: none repeat scroll 0 0 #f2f2f2;; } .tree-label a:hover { text-decoration: none; - background: none repeat scroll 0 0 #F7F7F7; color: #2a2c2f; } diff --git a/webdoc/plugins/sidebar-plugin/sidebar.css b/webdoc/plugins/sidebar-plugin/sidebar.css index 8ab184d2..97a5f115 100644 --- a/webdoc/plugins/sidebar-plugin/sidebar.css +++ b/webdoc/plugins/sidebar-plugin/sidebar.css @@ -1,3 +1,6 @@ +#side { + float: left; +} .tab { display: none !important; } diff --git a/webdoc/plugins/sidebar-plugin/viewport.js b/webdoc/plugins/sidebar-plugin/viewport.js new file mode 100644 index 00000000..2350601d --- /dev/null +++ b/webdoc/plugins/sidebar-plugin/viewport.js @@ -0,0 +1,52 @@ +$(function () { + + var sidebar_width = '251px'; +//a hack for sizing our iframe correctly + var getHeight = function () { + <!-- + var viewportwidth; + var viewportheight; + // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight + if (typeof window.innerWidth != 'undefined') + { + viewportwidth = window.innerWidth, + viewportheight = window.innerHeight + } + // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document) + else if (typeof document.documentElement != 'undefined' + && typeof document.documentElement.clientWidth != + 'undefined' && document.documentElement.clientWidth != 0) + { + viewportwidth = document.documentElement.clientWidth, + viewportheight = document.documentElement.clientHeight + } + // older versions of IE + else + { + viewportwidth = document.getElementsByTagName('body')[0].clientWidth, + viewportheight = document.getElementsByTagName('body')[0].clientHeight + } + return viewportheight; + //--> + } + + var main_part = $('#main_part'); + var content_frame = main_part.find('#content_frame'); + var content_frame_wrapper = main_part.find('#content_frame_wrapper'); + var resize_mainpart = function () { + main_part.height (getHeight() - 75); + main_part.children('#side').css ('height', '100%'); + main_part.children('#side').css ('width', sidebar_width); + content_frame.css ('height', '97.5%'); + content_frame_wrapper.css('margin-left', sidebar_width); + } + + var resizeTimer; + $(window).resize(function() { + clearTimeout(resizeTimer); + resizeTimer = setTimeout(resize_mainpart, 100); + }); + + resize_mainpart (); +}); + diff --git a/webdoc/skins/mono-external/common-extension.css b/webdoc/skins/mono-external/common-extension.css index 2a18e240..590f408e 100644 --- a/webdoc/skins/mono-external/common-extension.css +++ b/webdoc/skins/mono-external/common-extension.css @@ -295,7 +295,7 @@ html, body { } #content_frame { height: 94%; - width: 79.9%; + width: 99.8%; } #content_frame_wrapper { height: 100%; |