From 5f349787202bec614910e88888ba4ceb54399ea4 Mon Sep 17 00:00:00 2001 From: "geunhui.lim" Date: Thu, 14 May 2015 16:17:35 +0900 Subject: [PATCH] [js script] layout modification script is modified(about toc-modification) Change-Id: I0000123400000000000000000000000000007800 Signed-off-by: geunhui.lim --- org.tizen.devtools/html/scripts/showhide.js | 16 +++++++++++++--- org.tizen.gettingstarted/html/scripts/showhide.js | 15 +++++++++++++-- org.tizen.guides/html/scripts/showhide.js | 15 +++++++++++++-- org.tizen.tutorials/html/scripts/showhide.js | 15 +++++++++++++-- org.tizen.web.apireference/html/scripts/showhide.js | 18 +++++++++++++++--- 5 files changed, 67 insertions(+), 12 deletions(-) diff --git a/org.tizen.devtools/html/scripts/showhide.js b/org.tizen.devtools/html/scripts/showhide.js index 460630c..aed9d55 100644 --- a/org.tizen.devtools/html/scripts/showhide.js +++ b/org.tizen.devtools/html/scripts/showhide.js @@ -131,8 +131,12 @@ $(document).ready(function(){ } $('#contents').css('padding-top', $('.help_breadcrumbs').outerHeight()*(7/6)); $('a.top').css('bottom', $('#footer').outerHeight()); - $('a.top').css('left', $('#toc-navigation').position()['left'] + (($('#toc-navigation').outerWidth() - $('a.top').outerWidth())/2)); - + + if($('#navigation').length) { + $('a.top').css('left', $('#navigation').position()['left'] + (($('#navigation').outerWidth() - $('a.top').outerWidth())/2)); + } else { + $('a.top').css('left', $('#toc-navigation').position()['left'] + (($('#toc-navigation').outerWidth() - $('a.top').outerWidth())/2)); + } $('#toc').css('top', $('#toc_border').position()['top'] + 7); if ($('a.top').is(':visible')) @@ -147,8 +151,14 @@ $(document).ready(function(){ $('#container #contents').css('margin-bottom', $('#footer').outerHeight()); //$('#toc').css('top', $('#toc_border').position()['top'] + 2); $('#toc').css('top', $('#toc_border').position()['top'] + 7); - $('#contents').css('right', $(window).width() - $('#toc-navigation').position()['left'] + 5); + + if($('#navigation').length) { + $('#contents').css('right', $(window).width() - $('#navigation').position()['left'] + 5); //$('#toc').css('width', $('#toc_border').width() - 40); + } else { + $('#contents').css('right', $(window).width() - $('#toc-navigation').position()['left'] + 5); + } + $('#toc').css('width', $('#toc_border').width() - 49); }; diff --git a/org.tizen.gettingstarted/html/scripts/showhide.js b/org.tizen.gettingstarted/html/scripts/showhide.js index 460630c..7b3255f 100644 --- a/org.tizen.gettingstarted/html/scripts/showhide.js +++ b/org.tizen.gettingstarted/html/scripts/showhide.js @@ -131,7 +131,12 @@ $(document).ready(function(){ } $('#contents').css('padding-top', $('.help_breadcrumbs').outerHeight()*(7/6)); $('a.top').css('bottom', $('#footer').outerHeight()); - $('a.top').css('left', $('#toc-navigation').position()['left'] + (($('#toc-navigation').outerWidth() - $('a.top').outerWidth())/2)); + + if($('#navigation').length) { + $('a.top').css('left', $('#navigation').position()['left'] + (($('#navigation').outerWidth() - $('a.top').outerWidth())/2)); + } else { + $('a.top').css('left', $('#toc-navigation').position()['left'] + (($('#toc-navigation').outerWidth() - $('a.top').outerWidth())/2)); + } $('#toc').css('top', $('#toc_border').position()['top'] + 7); @@ -147,8 +152,14 @@ $(document).ready(function(){ $('#container #contents').css('margin-bottom', $('#footer').outerHeight()); //$('#toc').css('top', $('#toc_border').position()['top'] + 2); $('#toc').css('top', $('#toc_border').position()['top'] + 7); - $('#contents').css('right', $(window).width() - $('#toc-navigation').position()['left'] + 5); + + if($('#navigation').length) { + $('#contents').css('right', $(window).width() - $('#navigation').position()['left'] + 5); //$('#toc').css('width', $('#toc_border').width() - 40); + } else { + $('#contents').css('right', $(window).width() - $('#toc-navigation').position()['left'] + 5); + } + $('#toc').css('width', $('#toc_border').width() - 49); }; diff --git a/org.tizen.guides/html/scripts/showhide.js b/org.tizen.guides/html/scripts/showhide.js index 460630c..7b3255f 100644 --- a/org.tizen.guides/html/scripts/showhide.js +++ b/org.tizen.guides/html/scripts/showhide.js @@ -131,7 +131,12 @@ $(document).ready(function(){ } $('#contents').css('padding-top', $('.help_breadcrumbs').outerHeight()*(7/6)); $('a.top').css('bottom', $('#footer').outerHeight()); - $('a.top').css('left', $('#toc-navigation').position()['left'] + (($('#toc-navigation').outerWidth() - $('a.top').outerWidth())/2)); + + if($('#navigation').length) { + $('a.top').css('left', $('#navigation').position()['left'] + (($('#navigation').outerWidth() - $('a.top').outerWidth())/2)); + } else { + $('a.top').css('left', $('#toc-navigation').position()['left'] + (($('#toc-navigation').outerWidth() - $('a.top').outerWidth())/2)); + } $('#toc').css('top', $('#toc_border').position()['top'] + 7); @@ -147,8 +152,14 @@ $(document).ready(function(){ $('#container #contents').css('margin-bottom', $('#footer').outerHeight()); //$('#toc').css('top', $('#toc_border').position()['top'] + 2); $('#toc').css('top', $('#toc_border').position()['top'] + 7); - $('#contents').css('right', $(window).width() - $('#toc-navigation').position()['left'] + 5); + + if($('#navigation').length) { + $('#contents').css('right', $(window).width() - $('#navigation').position()['left'] + 5); //$('#toc').css('width', $('#toc_border').width() - 40); + } else { + $('#contents').css('right', $(window).width() - $('#toc-navigation').position()['left'] + 5); + } + $('#toc').css('width', $('#toc_border').width() - 49); }; diff --git a/org.tizen.tutorials/html/scripts/showhide.js b/org.tizen.tutorials/html/scripts/showhide.js index 460630c..7b3255f 100644 --- a/org.tizen.tutorials/html/scripts/showhide.js +++ b/org.tizen.tutorials/html/scripts/showhide.js @@ -131,7 +131,12 @@ $(document).ready(function(){ } $('#contents').css('padding-top', $('.help_breadcrumbs').outerHeight()*(7/6)); $('a.top').css('bottom', $('#footer').outerHeight()); - $('a.top').css('left', $('#toc-navigation').position()['left'] + (($('#toc-navigation').outerWidth() - $('a.top').outerWidth())/2)); + + if($('#navigation').length) { + $('a.top').css('left', $('#navigation').position()['left'] + (($('#navigation').outerWidth() - $('a.top').outerWidth())/2)); + } else { + $('a.top').css('left', $('#toc-navigation').position()['left'] + (($('#toc-navigation').outerWidth() - $('a.top').outerWidth())/2)); + } $('#toc').css('top', $('#toc_border').position()['top'] + 7); @@ -147,8 +152,14 @@ $(document).ready(function(){ $('#container #contents').css('margin-bottom', $('#footer').outerHeight()); //$('#toc').css('top', $('#toc_border').position()['top'] + 2); $('#toc').css('top', $('#toc_border').position()['top'] + 7); - $('#contents').css('right', $(window).width() - $('#toc-navigation').position()['left'] + 5); + + if($('#navigation').length) { + $('#contents').css('right', $(window).width() - $('#navigation').position()['left'] + 5); //$('#toc').css('width', $('#toc_border').width() - 40); + } else { + $('#contents').css('right', $(window).width() - $('#toc-navigation').position()['left'] + 5); + } + $('#toc').css('width', $('#toc_border').width() - 49); }; diff --git a/org.tizen.web.apireference/html/scripts/showhide.js b/org.tizen.web.apireference/html/scripts/showhide.js index 460630c..90d2f35 100644 --- a/org.tizen.web.apireference/html/scripts/showhide.js +++ b/org.tizen.web.apireference/html/scripts/showhide.js @@ -131,8 +131,13 @@ $(document).ready(function(){ } $('#contents').css('padding-top', $('.help_breadcrumbs').outerHeight()*(7/6)); $('a.top').css('bottom', $('#footer').outerHeight()); - $('a.top').css('left', $('#toc-navigation').position()['left'] + (($('#toc-navigation').outerWidth() - $('a.top').outerWidth())/2)); - + + if($('#navigation').length) { + $('a.top').css('left', $('#navigation').position()['left'] + (($('#navigation').outerWidth() - $('a.top').outerWidth())/2)); + } else { + $('a.top').css('left', $('#toc-navigation').position()['left'] + (($('#toc-navigation').outerWidth() - $('a.top').outerWidth())/2)); + } + $('#toc').css('top', $('#toc_border').position()['top'] + 7); if ($('a.top').is(':visible')) @@ -147,7 +152,14 @@ $(document).ready(function(){ $('#container #contents').css('margin-bottom', $('#footer').outerHeight()); //$('#toc').css('top', $('#toc_border').position()['top'] + 2); $('#toc').css('top', $('#toc_border').position()['top'] + 7); - $('#contents').css('right', $(window).width() - $('#toc-navigation').position()['left'] + 5); + + if($('#navigation').length) { + $('#contents').css('right', $(window).width() - $('#navigation').position()['left'] + 5); + //$('#toc').css('width', $('#toc_border').width() - 40); + } else { + $('#contents').css('right', $(window).width() - $('#toc-navigation').position()['left'] + 5); + } + //$('#toc').css('width', $('#toc_border').width() - 40); $('#toc').css('width', $('#toc_border').width() - 49); }; -- 2.7.4