openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit a0c9b1d7322ed4c75f797ecdadb50355014a88ab
parent 21581252c14e9439ad4e3bc4660e6071f780f607
Author: Jan Dankert <devnull@localhost>
Date:   Wed, 19 Sep 2012 00:21:18 +0200

Tab-Layout fertig gestellt.

Diffstat:
themes/default/css/layout.css | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
themes/default/js/openrat.js | 9++++++---
themes/default/layout/perspective/header.php | 14++++++--------
3 files changed, 67 insertions(+), 27 deletions(-)

diff --git a/themes/default/css/layout.css b/themes/default/css/layout.css @@ -566,8 +566,6 @@ div#title div.search input { margin:0px; padding:0px; - font-size:10px; - border:1px solid silver; } @@ -795,10 +793,7 @@ div.forward_link div.window > div.menu { - padding-top:20px; - padding-left:0px; - padding-right:0px; - border-bottom:2px solid grey; + padding:0px; } @@ -810,14 +805,56 @@ div.window div.menu ul.views white-space:nowrap; } -div.window ul.views li +img.icon { - padding-top:4px; + padding:4px; + width: 16px; + height: 16px; +} + + +ul.views span.tabname +{ + width:20px; + max-width:30px; + overflow: hidden; + white-space: nowrap; padding-bottom:4px; - padding-left:8px; - padding-right:8px; + padding-right:4px; + display: inline; + vertical-align: top; +} + +div.views div.icons +{ + float: right; +} + +div.window div.menu ul.views +{ + float:left; + height: 25px; +} + +div.window div.menu +{ + xborder-bottom: 1px solid grey; +} + + +div.content +{ + clear: both; +} +div.window ul.views li +{ + vertical-align: middle; + padding:0px; cursor:pointer; + + border-right: 1px solid grey; + -moz-border-radius-topleft:5px; /* Mozilla */ -webkit-border-radius-topleft:5px; /* Webkit */ -khtml-border-top-radius-topleft:5px; /* Konqui */ @@ -826,11 +863,13 @@ div.window ul.views li -webkit-border-radius-topright:5px; /* Webkit */ -khtml-border-top-radius-topright:5px; /* Konqui */ border-top-right-radius:5px; - border-top:1px solid gray; - border-left:1px solid gray; - border-right:1px solid gray; - margin-right:10px; - display: inline; + + xborder-top:1px solid gray; + xborder-left:1px solid gray; + xborder-right:1px solid gray; + xmargin-right:10px; + display: block; + float:left; } @@ -868,7 +907,7 @@ div.window { div.window { - margin:3px; + margin:0px; padding:0px; } diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js @@ -592,13 +592,16 @@ function openNewAction( name,action,id,extraId ) { // Neuen Tab in Hauptfenster anlegen $('div#content > div.window > div.menu > div.views > ul.views li.active').removeClass('active'); - $('div#content > div.window > div.menu > div.views > ul.views').append('<li class="action active '+action+' id'+id+'" data-method="'+DEFAULT_CONTENT_ACTION+'"><span><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+action+'.png" title="" />'+name+'<img class="close" src="'+OR_THEMES_EXT_DIR+'default/images/icon/close.gif" title="" /></span></li>'); + $('div#content > div.window > div.menu > div.views > ul.views').append('<li class="action active '+action+' id'+id+'" title="'+name+'" data-method="'+DEFAULT_CONTENT_ACTION+'"><img class="icon" src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+action+'.png" title="" /><span class="tabname">'+name+'</span><img class="close icon" src="'+OR_THEMES_EXT_DIR+'default/images/icon/close.gif" title="" /></li>'); $('div#content > div.window > div.menu > div.views > ul.views').scrollLeft(9999); $('div#content > div.window > div.menu > div.views > ul.views img.close').click( function() { // Schlie├čen - $(this).parent().parent().parent().parent().parent().parent().find('div.content').html(''); // Inhalt entfernen - $(this).parent().parent().remove(); // Tab entfernen + // Wenn aktiver Tab, dann den Inhalt loeschen + if ( $(this).closest('li.action').hasClass('active') ) + $(this).closest('div.window').find('div.content').html(''); // Inhalt entfernen + // Und jetzt den Tab entfernen + $(this).parent().remove(); // Tab entfernen } ); $('div#content > div.window > div.menu > div.views > ul.views li.active').click( function() { diff --git a/themes/default/layout/perspective/header.php b/themes/default/layout/perspective/header.php @@ -14,8 +14,10 @@ function view_header( $name ) <div class="menu"> <div class="views"> +<!-- <div class="backward_link"><img src="<?php echo OR_THEMES_EXT_DIR ?>default/images/icon/backward_nav.gif"/></div> <div class="forward_link"><img src="<?php echo OR_THEMES_EXT_DIR ?>default/images/icon/forward_nav.gif"/></div> + --> <ul class="views"> <?php @@ -28,8 +30,8 @@ function view_header( $name ) $liClass = 'action'.($vn==$v['default']?' active':''); $icon_url = OR_THEMES_EXT_DIR.'default/images/icon/'.$vn.'.png'; - ?><li data-method="<?php echo $vn ?>" class="<?php echo $liClass?>" title="<?php echo langHtml('menu_'.$vn.'_desc'); ?>"><?php - ?><span><img src="<?php echo $icon_url ?>" /><?php echo $tmp_text ?></span><?php + ?><li title="<?php echo $tmp_text ?>" data-method="<?php echo $vn ?>" class="<?php echo $liClass?>" title="<?php echo langHtml('menu_'.$vn.'_desc'); ?>"><?php + ?><img class="icon" src="<?php echo $icon_url ?>" /><span class="tabname"><?php echo $tmp_text ?></span><?php ?></li><?php } if ( /* Deaktiviert */ false && @$conf['help']['enabled'] ) @@ -42,13 +44,9 @@ function view_header( $name ) ?> </ul> -</div> - <div class="icons"> -<div class="icon"><a href="javascript:void(0);" class="fullscreen" onClick="javascript:fullscreen( $(this).parent().parent().parent().parent() );"><img src="<?php echo OR_THEMES_EXT_DIR.'default/images/icon/window/maximize.gif' ?>" title="<?php echo langHtml('window_fullscreen') ?>" /></a></div> -<!-- -<div><a href="javascript:void(0);" class="minimize" onClick="javascript:minimize($(this).parent().parent() );"><?php echo langHtml('fullscreen') ?></a></div> - --> +<div class="icon"><a href="javascript:void(0);" class="fullscreen" onClick="javascript:fullscreen( $(this).closest('div.window') );"><img class="icon" src="<?php echo OR_THEMES_EXT_DIR.'default/images/icon/window/maximize.gif' ?>" title="<?php echo langHtml('window_fullscreen') ?>" /></a></div> +</div> </div> </div>