web/data/cubicweb.css
author Aurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 07 Dec 2010 12:18:20 +0100
brancholdstable
changeset 7078 bad26a22fe29
parent 6892 e73245c14516
child 6950 8a17e6e34f0f
permissions -rw-r--r--
[test] New Handling of database for test. This patch adds a new TestDataBaseHandler class. TestDataBaseHandler are in charge of Setup, backup, restore, connection, repository caching and cleanup for database used during the test. TestDataBaseHandler reuse code and logic previously found in cubicweb.devtools functions and devtools.testlib.CubicwebTC. TestDataBaseHandler is an abstract class and must be subclassed to implement functionalities specific to each driver. TestDataBaseHandler can store and restore various database setups. devtools.testlib.CubicwebTC gains a test_db_id class attribute to specify that its TestCase uses a specific database that should be cached. The pre_setup_database class method is used to setup the database that will be cached. The setup_database method is kept uncached. The same TestDataBaseHandler are reused for every test using the same config object. TestDataBaseHandler try to reuse Repository objects as much as possible. All cubicweb test have been updated.

/*
 *  :organization: Logilab
 *  :copyright: 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 *  :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 */

/***************************************/
/* xhtml tags                          */
/***************************************/

/* scale and rhythm cf http://lamb.cc/typograph/ */
body {
  font-family:  %(defaultFontFamily)s;
  font-size: %(defaultSize)s;
  line-height: %(defaultLineHeight)s;
  color: %(defaultColor)s;
}
h1, h2, h3 { margin-top:0; margin-bottom:0; }

/* got rhythm ? beat of 12*1.25 = 15 px */
.rhythm_bg { background: url("%(baseRhythmBg)s") repeat ! important; }

/* scale 3:5 stranded */
/* h1 { font-size:2em; } */
/* h2 { font-size:1.61538em; } */
/* h3 { font-size:1.23077em; } */

/* scale le corbusier */
/* h1 { font-size:2.11538em; } */
/* h2 { font-size:1.61538em; } */
/* h3 { font-size:1.30769em; } */

/* scale traditional */
h1,
.vtitle { font-size: %(h1FontSize)s; }
h2 { font-size: %(h2FontSize)s; }
h3 { font-size: %(h3FontSize)s; }

/* paddings */
h1,
.vtitle {
  border-bottom: %(h1BorderBottomStyle)s;
  padding: %(h1Padding)s;
  margin: %(h1Margin)s;
  color: %(h1Color)s;
}

div.tabbedprimary + h1,
h1.plain {
 border-bottom: none;
}

h2 { padding: %(h2Padding)s; }
h3 { padding: %(h3Padding)s; }

html, body {
  background: %(pageBgColor)s;
}

a, a:active, a:visited, a:link {
  color: %(aColor)s;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

table {
  border: none;
}

table th, table td {
  vertical-align: top;
}

label, .label {
  font-weight: bold;
}

pre {
  clear: both;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.015em;
  padding: 0.6em;
  margin: 0 2em 1.7em;
  background-color: %(listingHihligthedBgColor)s;
  border: 1px solid %(listingBorderColor)s;
}

p {
  text-align: justify;
  margin-bottom: %(defaultLineHeightEm)s;
}

ul {
  margin-bottom: %(defaultLineHeightEm)s;
}

ol {
  list-style-type: decimal;
 /* margin-bottom: %(defaultLineHeightEm)s; */
}

ol ol,
ul ul {
  margin-left: 8px;
  margin-bottom : 0px;
}

/* p + ul { */
/*   margin-top: -%(defaultLineHeightEm)s; */
/* } */

li {
  margin-left: 1.5em;
}

img {
  border: none;
}

fieldset {
  border: none;
}

h1 a, h1 a:active, h1 a:visited, h1 a:link,
h2 a, h2 a:active, h2 a:visited, h2 a:link,
h3 a, h3 a:active, h3 a:visited, h3 a:link {
  color: inherit;
  text-decoration: none;
}

input, textarea {
  padding: 0.1em 0.2em;
  vertical-align: bottom;
  border: 1px solid %(pageContentBorderColor)s;

}

input:focus {
  border: 1px inset %(headerBgColor)s;
}

hr {
  border: none;
  border-bottom: 1px solid %(defaultColor)s;
  height: 1px;
}

/***************************************/
/* generic classes                     */
/***************************************/

h1 a:hover {
 text-decoration: none;
}

.odd {
  background-color: #f7f6f1;
}

.even {
  background-color: transparent;
}

.hr {
  border-bottom: 1px dotted %(pageContentBorderColor)s;
  height: 17px;
}

hr.boxSeparator{
  border: none;
  border-bottom: 1px solid %(listingBorderColor)s;
  height: 1px;
}

.left {
  float: left;
}

.right {
  float: right;
}

.clear {
  clear: both;
}

.hidden {
  display: none;
  visibility: hidden;
}

li.invisible {
  background: none;
  padding: 0px 0px 1px 1px;
}

li.invisible div{
  display: inline;
}

.caption {
    font-weight: bold;
}

.legend{
    font-style: italic;
}

.align-center{
    text-align: center;
}

/***************************************/
/*   LAYOUT                            */
/***************************************/

/* header */

table#header {
  background: %(headerBgColor)s url("banner.png") repeat-x top left;
  width: 100%;
}

table#header td {
  vertical-align: middle;
}

table#header a {
  color: %(defaultColor)s;
}

table#header td#header-right {
  padding-top: 1em;
  float: right;
}

table#header img#logo{
  vertical-align: middle;
}

span#appliName {
  font-weight: bold;
  color: %(defaultColor)s;
  white-space: nowrap;
}

/* Popup on login box and userActionBox */
div.popup {
  position: absolute;
  background: #fff;
  border: 1px solid %(listingBorderColor)s;
  border-top: none;
  text-align: left;
  z-index: 400;
}

div.popup ul li a {
  text-decoration: none;
  color: #000;
}

/* main zone */

div#page {
  margin: %(defaultLayoutMargin)s;
}

table#mainLayout td#navColumnLeft {
  width: 16em;
  padding-right: %(defaultLayoutMargin)s;

}

table#mainLayout td#navColumnRight {
  width: 16em;
  padding-left: %(defaultLayoutMargin)s;
}

div#pageContent {
  clear: both;
  /* margin-top:-1px; *//* enable when testing rhythm */
  background: %(pageContentBgColor)s;
  border: 1px solid %(pageContentBorderColor)s;
  padding: 0 %(pageContentPadding)s %(pageContentPadding)s;
}

div#pageContent #contentmain .pagination {
  margin-top: 0;
}

div#pageContent .pagination{
  margin-top: 1.5em;
}

div#contentmain{
  margin-top: %(pageContentPadding)s
}

/*FIXME */
#contentheader {
  margin: 0px;
  padding: 0.2em 0.5em 0.5em 0.5em;
}

#contentheader a {
  color: %(defaultColor)s;
}

/* XXX old boxes, deprecated */

div.boxFrame {
  width: 100%;
}

div.boxTitle {
  color: #fff;
  background: %(contextualBoxTitleBgColor)s;
}

div.boxTitle span,
div.sideBoxTitle span {
  padding: 0px 0.5em;
  white-space: nowrap;
}

div.sideBoxTitle span {
  color: %(defaultColor)s;
}

.boxFrame a {
  color: %(defaultColor)s;
}

div.boxContent {
  padding: 3px 0px;
  background: #fff;
  border-top: none;
}

div.shadow{
  height: 14px;
  background: url("shadow.gif") no-repeat top right;
}

div.sideBoxTitle {
  background: %(incontextBoxBodyBg)s;
  display: block;
  font-weight: bold;
}

div.sideBox {
  margin-bottom: 1em;
}

ul.sideBox,
ul.sideBox ul {
  margin-bottom: 0px;
}

ul.sideBox li {
 padding: 0px 0px 1px 1px;
 margin: 1px 0 1px 4px;
}

div.sideBoxBody {
  padding: 0.2em 5px;
  background: %(incontextBoxBodyBg)s;
}

div.sideBoxBody a {
  color: %(incontextBoxBodyColor)s;
}

div.sideBoxBody a:hover {
  text-decoration: underline;
}

div.sideBox table td {
  padding-right: 1em;
}

/* boxes */

div.boxTitle {
  overflow: hidden;
  font-weight: bold;
}

div.boxTitle span {
  padding: 0px 0.5em;
  white-space: nowrap;
}

div.boxBody {
  padding: 5px;
  border-top: none;
  background-color: %(leftrightBoxBodyBgColor)s;
}

div.boxBody a {
  color: %(leftrightBoxBodyColor)s;
}

div.boxBody a:hover {
  text-decoration: none;
  cursor: pointer;
  background-color: %(leftrightBoxBodyHoverBgColor)s;
}

hr.boxSeparator {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* boxes contextual customization */

.contextFreeBox div.boxTitle {
  background: %(contextFreeBoxTitleBg)s;
  color: %(contextFreeBoxTitleColor)s;
}

.contextualBox div.boxTitle {
  background: %(contextualBoxTitleBg)s;
  color: %(contextualBoxTitleColor)s;
}

.primaryRight div.boxTitle {
  background: %(incontextBoxTitleBg)s;
  color: %(incontextBoxTitleColor)s;
}

.primaryRight div.boxBody {
  padding: 0.2em 5px;
  background: %(incontextBoxBodyBgColor)s;
}

.primaryRight div.boxBody a {
  color: %(incontextBoxBodyColor)s;
}

.primaryRight div.boxBody a:hover {
  background-color: %(incontextBoxBodyHoverBgColor)s;
}

.primaryRight div.boxFooter {
  margin-bottom: 1em;
}

#navColumnLeft div.boxFooter, #navColumnRight div.boxFooter{
  height: 14px;
  background: url("shadow.gif") no-repeat top right;
}

/* boxes lists and menus */

ul.boxListing {
  margin: 0;
  padding: 0;
}

ul.boxListing ul {
  padding: 1px 3px;
}

ul.boxListing a {
  color: %(defaultColor)s;
  padding: 1px 9px 1px 3px;
  display: block; /* necessary to get links across all width available (see on mouse over) */
}

ul.boxListing a.action {
  padding: 0;
  display: inline;
}

ul.boxListing a.action + a{
  display: inline;
}

ul.boxListing li {
  margin: 0px;
  padding: 0px;
  background-image: none;
}

ul.boxListing ul li {
  margin: 0px;
  padding-left: 8px;
}

ul.boxListing ul li a {
  padding-left: 10px;
  background-image: url("bullet_orange.png");
  background-repeat: no-repeat;
  background-position: 0 6px;
}

ul.boxListing .selected {
  color: %(aColor)s;
  font-weight: bold;
}

ul.boxListing a.boxMenu:hover {
  border-top: medium none;
  background: %(leftrightBoxBodyHoverBgColor)s;
}

a.boxMenu,
ul.boxListing a.boxMenu {
  display: block;
  padding: 1px 3px;
  background: transparent %(bulletDownImg)s;
}

ul.boxListing a.boxMenu:hover {
  border-top: medium none;
  background: %(leftrightBoxBodyHoverBgColor)s %(bulletDownImg)s;
}

a.boxMenu:hover {
  cursor: pointer;
}

a.popupMenu {
  background: transparent url("puce_down_black.png") 2% 6px no-repeat;
  padding-left: 2em;
}

/* custom boxes */

.search_box div.boxBody {
  padding: 4px 4px 3px;
  background: #f0eff0 url("gradient-grey-up.png") left top repeat-x;
}

.bookmarks_box ul.boxListing div a:hover {
  border-bottom: 1px solid #000;
}

.download_box div.boxTitle {
  background : #8fbc8f !important;
}

.download_box div.boxBody {
  background : #eefed9;
}

/* search box and rql bar */

div#rqlinput {
  margin-bottom: %(defaultLayoutMargin)s;
}

input#rql{
  padding: 0.25em 0.3em;
  width: 99%;
}

input.rqlsubmit{
  display: block;
  width: 20px;
  height: 20px;
  background: %(buttonBgColor)s url("go.png") 50% 50% no-repeat;
  vertical-align: bottom;
}

input#norql{
  width:155px;
  margin-right: 2px;
}

/* user actions menu */
a.logout, a.logout:visited, a.logout:hover{
  color: #fff;
  text-decoration: none;
}

div#userActionsBox {
  width: 15em;
  text-align: right;
}

div#userActionsBox a.popupMenu {
  color: #000;
  text-decoration: underline;
  padding-right: 2em;
}

/**************/
/* navigation */
/**************/
div#etyperestriction {
  margin-bottom: 1ex;
  border-bottom: 1px solid %(pageContentBorderColor)s;
}

/* pagination */
span.slice a:visited,
span.slice a:hover{
  color: %(helperColor)s;
}

span.selectedSlice a:visited,
span.selectedSlice a {
  color: %(defaultColor)s;
}

/* FIXME should be moved to cubes/folder */
div.navigation a {
  text-align: center;
  text-decoration: none;
}

div.prevnext {
  width: 100%;
  margin-bottom: 1em;
}

div.prevnext a {
  color: %(defaultColor)s;
}

/***************************************/
/* entity views                        */
/***************************************/

div.mainRelated {
  border: none;
  margin-right: 1em;
  padding: 0.5em 0.2em 0.2em;
}

div.primaryRight{
  margin-left: %(defaultLayoutMargin)s;
}

div.metadata {
  font-size: 90%;
  margin: 5px 0px 3px;
  color: %(helperColor)s;
  text-align: right;
}

div.section {
  width:100%;
}

div.section a:hover {
  text-decoration: none;
}

/* basic entity view */

tr.entityfield th {
  text-align: left;
  padding-right: 0.5em;
}

div.field {
  display: inline;
}

div.ctxtoolbar {
  float: right;
  padding-left: 24px;
  position: relative;
  z-index: 10;
}
div.toolbarButton {
  display: inline;
}

/***************************************/
/* messages                            */
/***************************************/

.warning,
.message,
.errorMessage{
  padding: 0.2em;
  font-weight: bold;
}

.searchMessage{
 margin-top: %(defaultLayoutMargin)s;
}

.loginMessage {
  margin: 4px 0px;
  font-weight: bold;
  color: %(aColor)s;
}

div#appMsg {
  margin-bottom: %(defaultLayoutMargin)s;
  border: 1px solid %(incontextBoxTitleBgColor)s;
}

.message {
  background: %(msgBgColor)s %(infoMsgBgImg)s;
  padding-left: 15px;
}

.errorMessage {
  margin: 10px 0px;
  padding-left: 25px;
  background: %(msgBgColor)s url("critical.png") 2px center no-repeat;
  color: %(errorMsgColor)s;
  border: 1px solid %(incontextBoxTitleBgColor)s;
}

/* search-associate message */
.stateMessage {
  border: 1px solid %(pageContentBorderColor)s;
  background: %(msgBgColor)s %(infoMsgBgImg)s;
  padding: 0.1em 0 0.1em 20px;
}

/* warning messages like "There are too many results ..." */
.warning {
  padding-left: 25px;
  background: %(msgBgColor)s url("critical.png") 3px 50% no-repeat;
}

/* label shown in the top-right hand corner during form validation */
div#progress {
  position: fixed;
  right: 5px;
  top: 0px;
  background: %(defaultColor)s;
  color: #fff;
  font-weight: bold;
  display: none;
}

/***************************************/
/* listing table                       */
/***************************************/

table.listing {
  width: 100%;
  font-size: 0.9167em;
  padding: 10px 0em;
  color: %(defaultColor)s;
  border: 1px solid %(listingBorderColor)s;
  margin-bottom: 1em;
}

table.listing th {
  font-weight: bold;
  font-size: 8pt;
  background: %(listingHeaderBgColor)s; 
  padding: 2px 4px;
  border: 1px solid %(listingBorderColor)s;
  border-right:none;
 /* white-space: nowrap; */
}

table.listing thead th.over {
  background-color: %(listingHeaderBgColor)s;
  cursor: pointer;
}

table.listing tr .header {
  border-right: 1px solid %(listingBorderColor)s;
  cursor: pointer;
}

table.listing td {
  padding: 3px;
  vertical-align: top;
  border: 1px solid %(listingBorderColor)s;
  border-right: none;
  background-color: #fff;
}

table.listing td a,
table.listing td a:visited {
  color: %(defaultColor)s;
}

table.listing a:hover,
table.listing tr.highlighted td a {
  color:%(defaultColor)s;
}

table.listing td.top {
  border: 1px solid #fff;
  border-bottom: none;
  text-align: right ! important;
  /* insane IE row bug workraound */
  position: relative;
  left: -1px;
  top: -1px;
}

table.listing input,
table.listing textarea {
 background: %(listingHihligthedBgColor)s;
}

table.htableForm {
  vertical-align: middle;
}

table.htableForm td{
  padding-left: 1em;
  padding-top: 0.5em;
}
table.htableForm th{
  padding-left: 1em;
}
table.htableForm .validateButton {
  margin-right: 0.2em;
  vertical-align: top;
  margin-bottom: 0.2em; /* because vertical-align doesn't seems to have any effect */
}


table.ajaxEditRelationTable{
  margin-bottom: 0.5em;
}
table.ajaxEditRelationTable td.entity{
  padding-left: 0.5em;
}

/***************************************/
/* error view (views/management.py)    */
/***************************************/

div.pycontext { /* html traceback */
  font-family: Verdana, sans-serif;
  font-size: 80%;
  padding: 1em;
  margin: 10px 0px 5px 20px;
  background-color: #dee7ec;
}

div.pycontext span.name {
  color: #ff0000;
}

/***************************************/
/* addcombobox                         */
/***************************************/

input#newopt {
  display: block;
  float: left;
  width: 120px;
}

div#newvalue{
  margin-top: 2px;
}

#add_newopt {
  display: block;
  float: left;
  width: 20px;
  line-height: 20px;
  background: %(buttonBgColor)s url("go.png") 50% 50% no-repeat;
}

/***************************************/
/* buttons                             */
/***************************************/

input.button{
  margin: 1em 1em 0px 0px;
  border: 1px solid %(buttonBorderColor)s;
  border-color: %(buttonBorderColor)s %(incontextBoxTitleBgColor)s %(incontextBoxTitleBgColor)s %(buttonBorderColor)s;
}

/* FileItemInnerView  jquery.treeview.css */
.folder {
  /* disable odd/even under folder class */
  background-color: transparent;
}

/***************************************/
/* lists                               */
/***************************************/

ul.section,
ul.startup {
  margin-bottom: 0px;
}

ul.startup li,
ul.section li {
  margin-left: 0px
}

ul.simple li,
.popupWrapper ul li {
  background: transparent url("bullet_orange.png") no-repeat 0% 6px;
}

ul.simple li {
  padding-left: 8px;
}

.popupWrapper ul {
  padding: 0.2em 0.3em;
  margin-bottom: 0px;
}

.popupWrapper ul li {
  padding-left: 8px;
  margin-left: 0px;
  white-space: nowrap;
}

/***************************************/
/* footer                              */
/***************************************/

div#footer {
  text-align: center;
}
div#footer a {
  color: %(defaultColor)s;
  text-decoration: none;
}

/****************************************/
/* FIXME must by managed by cubes       */
/****************************************/
.needsvalidation {
  font-style: italic;
  color: gray;
}

.validateButton {
  margin: 1em 1em 0px 0px;
  border: 1px solid %(buttonBorderColor)s;
  border-color: %(buttonBorderColor)s %(incontextBoxTitleBgColor)s %(incontextBoxTitleBgColor)s %(buttonBorderColor)s;
  background: %(buttonBgColor)s url("button.png") bottom left repeat-x;
}

/********************************/
/* placement of alt. view icons */
/********************************/

.otherView {
  float: right;
}

/********************************/
/* rest related classes         */
/********************************/

img.align-right {
  margin-left: 1.5em;
}

img.align-left {
  margin-right: 1.5em;
}

/******************************/
/* reledit                    */
/******************************/

.releditField {
    display: inline;
}

.releditForm {
 display:none;
}

/********************************/
/* overwite other css here      */
/********************************/

.ui-menu li.ui-menu-item {
  /* remove background image (orange bullet) for autocomplete suggestions */
  background-image: none;
}

/* ui.tabs.css */
ul.ui-tabs-nav,
div.ui-tabs-panel {
  font-family: %(defaultFontFamily)s;
  font-size: %(defaultSize)s;
}

div.ui-tabs-panel {
  border-top:1px solid #b6b6b6;
}

ul.ui-tabs-nav a {
  color: #3d3d3d;
}

ul.ui-tabs-nav a:hover {
  color: #000;
}

img.ui-datepicker-trigger {
  margin-left: 0.5em;
  vertical-align: bottom;
}