From c7bae9b6385e744f7c77a3f68b4d934bf590f8fb Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Tue, 31 Jan 2012 16:59:55 +0000 Subject: [PATCH] first impl. of RHS sidebar --- Netdisco/bin/netdisco-web.pl | 5 ++ Netdisco/public/css/netdisco.css | 65 +++++++++--------- Netdisco/public/images/diagona_settings.png | Bin 0 -> 819 bytes .../public/images/dusseldorf_settings.png | Bin 0 -> 671 bytes Netdisco/public/javascripts/netdisco.js | 4 +- Netdisco/views/device.tt | 9 +-- Netdisco/views/search.tt | 15 ++-- Netdisco/views/sidebar/device/ports.tt | 8 +-- Netdisco/views/sidebar/search/device.tt | 16 ++--- 9 files changed, 64 insertions(+), 58 deletions(-) create mode 100644 Netdisco/public/images/diagona_settings.png create mode 100644 Netdisco/public/images/dusseldorf_settings.png diff --git a/Netdisco/bin/netdisco-web.pl b/Netdisco/bin/netdisco-web.pl index 114ae861..68be4634 100755 --- a/Netdisco/bin/netdisco-web.pl +++ b/Netdisco/bin/netdisco-web.pl @@ -1,4 +1,9 @@ #!/usr/bin/env perl + +# use lib '/root/perl-profiles/netdisco-web/lib/perl5'; +use local::lib '/srv/www/vhosts/netdisco.ecmwf.int/perl-profiles/netdisco-web'; +use lib '/srv/www/vhosts/netdisco.ecmwf.int/Netdisco/lib'; + use Dancer; use Netdisco::Web; dance; diff --git a/Netdisco/public/css/netdisco.css b/Netdisco/public/css/netdisco.css index e0f98a54..5cec14ae 100644 --- a/Netdisco/public/css/netdisco.css +++ b/Netdisco/public/css/netdisco.css @@ -35,20 +35,6 @@ form .clearfix.success input { background-color: #A9DBA9; } -/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -/* right hand side device label */ - -.device_label_right { - float: right !important; - margin-bottom: -7px !important; - display: none; -} - -/* take a block element and force it inline */ -.inline { - display: inline !important; -} - /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* results table links */ @@ -200,13 +186,28 @@ h3.device_label { color: #660033; } +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +/* right hand side device label */ + +.device_label_right { + float: right !important; + margin-bottom: -7px !important; + display: none; +} + +/* take a block element and force it inline */ +.inline { + display: inline !important; +} + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* sidebar collapser */ /* for placing the sidebar toggle icons */ #sidebar_toggle_img_in { - margin-top: -10px; - margin-left: 164px; + float: right; + margin-top: -7px; + margin-right: -16px; cursor: pointer; } @@ -214,7 +215,7 @@ h3.device_label { #sidebar_toggle_img_out { position: fixed; top: 60px; - left: 4px; + right: 7px; z-index: 1; cursor: pointer; display: none; @@ -224,19 +225,25 @@ h3.device_label { /* sidebar placement and sizing */ /* make the sidebar fixed on the screen */ -.sidebar { - position: fixed !important; +.container-fluid > .sidebar { + position: fixed; margin-top: 50px; -} - -/* make the sidebar less wide */ -.well { - margin-right: 15px; + right: 20px; + width: 200px; + left: auto; } /* make the content start more to the left now the sidebar is narrower */ -.nd_content { - margin-left: 225px !important; +.container-fluid > .content { + margin-right: 220px; + margin-left: 0px; +} + +/* nudge content in the sidebar closer to the left */ +.nd_sidesearchform { + padding-left: 0px; + margin-top: -7px; + margin-bottom: 0px; } /* nudge content closer to the header labels in the sidebar */ @@ -244,10 +251,4 @@ h3.device_label { padding-top: 4px !important; } -/* nudge content in the sidebar closer to the left */ -.nd_sidesearchform { - padding-left: 0px; - margin-bottom: 0px; -} - /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ diff --git a/Netdisco/public/images/diagona_settings.png b/Netdisco/public/images/diagona_settings.png new file mode 100644 index 0000000000000000000000000000000000000000..6587d5bc382a253d526c8cc0668ddefc275e87cc GIT binary patch literal 819 zcmV-31I+x1P)jF|8&l+T}r%g=FYv}`Of{$Irnnke2cJllowYR)k*3lffpbei$XXQP9L8b zn_ug6{pU7w4(| zo@kY2d4T76Lo62CyYg#gK$0XNLlXG?{u;zP5#OrBl!NGRLq#7G0W!^*mr$l5Nlb!B zB(lZp^)^VN1Q-l>j)#SXg<}{1)M_<^f+2%$gRTu}2Z+nl=fNZUO4jBqP^nZ*HW|lr zEC9{4CN+fPVPJoF-yctbGn>sOYq52kwZ!^#cyL&cGC^<9!^u-8Am5S?(^J!M_s%_7 z_ARr3He2P-Pm`0?&N1h-$K#pja&mGMQ4&FutN|%mVo@)&p8t-8JdVF3XnRISM(x+y zuBQ?f2n47m5DWyt<#KVnMymm>RtthkU?+q^AuyRtMD9oP(k$!bX4)rQ5CrB=JXQnB zi;SdWi>Qcjy7A0^{l0SfD%&TV{Nfx|1GmSm%*}m;!B<1j*W1S&!{P9v&+9w-Ve0+M z9hRc~##G~DB%~3k=1>jTswyEPBNMXC*&Hv+TK(#(zsm8#;Uh8)JZTeF-BD6hs$g9l zC_Rn#34h-I%uD{nV+!ah?<(Kjh0*I-`?x>ti$9*rMdQSE!!uY{5o#7>k=*Y8;p9jD#3M!V$Mn`xVA+Ru7XO=2w-xhkAo-Lxwzvmd*VuZo x^)}+2pf>2Mzp1W*6C>LKIh*83;@qaL3_RFF0%jt002ovPDHLkV1n@Liedl& literal 0 HcmV?d00001 diff --git a/Netdisco/public/images/dusseldorf_settings.png b/Netdisco/public/images/dusseldorf_settings.png new file mode 100644 index 0000000000000000000000000000000000000000..92692173f2f90048e34c576185e563e8bae76cf8 GIT binary patch literal 671 zcmV;Q0$}}#P)qI7`QZu3L-RuilCqkhUWf&m>L?Y|6pR+p_zf9;0y|_C`e=Gnkb07 zk+@Hthsq2y9nFJVb?V-8Ufp`<7FQ?~=$n=0BXh^O`}1E*aJ^nB8jTWv&+<_PzCUNa z!BueYn7DjC|9qRz=cD0pNE(fX)M_-A-b$ zm<2F$sDT46G|-C9=QDeYLZP7fd`^13o?c#FsL^Opy!!*xH42Q#6 z{+@&1Z*Om$#bSZ?>}Np$BZnF|;NCUFC6mej`kj9XFaSwhX{AU2>Rtc<002ovPDHLk FV1ixiH`D+C literal 0 HcmV?d00001 diff --git a/Netdisco/public/javascripts/netdisco.js b/Netdisco/public/javascripts/netdisco.js index 25cc2a5d..7ae94887 100644 --- a/Netdisco/public/javascripts/netdisco.js +++ b/Netdisco/public/javascripts/netdisco.js @@ -120,7 +120,7 @@ $(document).ready(function() { $('.sidebar').toggle( function() { $('#sidebar_toggle_img_out').toggle(); - $('.nd_content').animate({'margin-left': '5px !important'}, 100); + $('.content').animate({'margin-right': '10px !important'}, 100); $('.device_label_right').toggle(); } ); @@ -129,7 +129,7 @@ $(document).ready(function() { $('#sidebar_toggle_img_out').click( function() { $('#sidebar_toggle_img_out').toggle(); - $('.nd_content').animate({'margin-left': '225px !important'}, 200, + $('.content').animate({'margin-right': '220px !important'}, 200, function() { $('.device_label_right').toggle(); $('.sidebar').toggle(200); diff --git a/Netdisco/views/device.tt b/Netdisco/views/device.tt index a072abe7..ac78aad8 100644 --- a/Netdisco/views/device.tt +++ b/Netdisco/views/device.tt @@ -1,11 +1,12 @@ + src="[% uri_base %]/images/dusseldorf_settings.png" + rel="twipsy" data-placement="left" data-offset="5" title="Show Options"/>
-
+
    [% FOREACH tab IN vars.tabs %] [% tab.label %] diff --git a/Netdisco/views/search.tt b/Netdisco/views/search.tt index 1c092c4f..17183a31 100644 --- a/Netdisco/views/search.tt +++ b/Netdisco/views/search.tt @@ -1,24 +1,23 @@ + src="[% uri_base %]/images/dusseldorf_settings.png" + rel="twipsy" data-placement="left" data-offset="5" title="Show Search Options"/>