From 698188fe9afc00792e36c2ec647207902bdedde2 Mon Sep 17 00:00:00 2001 From: Stefan Matheis Date: Sun, 22 Apr 2012 15:08:24 +0000 Subject: [PATCH] SOLR-3238: Use Bootstrap-Style for Buttons git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1328891 13f79535-47bb-0310-9956-ffa450edef68 --- solr/webapp/web/css/styles/common.css | 96 ++++++++++++++++++- solr/webapp/web/css/styles/replication.css | 20 ++-- solr/webapp/web/css/styles/schema-browser.css | 14 +-- solr/webapp/web/js/scripts/replication.js | 4 +- solr/webapp/web/js/scripts/schema-browser.js | 20 ++-- solr/webapp/web/tpl/analysis.html | 4 +- solr/webapp/web/tpl/replication.html | 14 +-- solr/webapp/web/tpl/schema-browser.html | 4 +- 8 files changed, 130 insertions(+), 46 deletions(-) diff --git a/solr/webapp/web/css/styles/common.css b/solr/webapp/web/css/styles/common.css index 76f7cda018c..c6b5fed150e 100644 --- a/solr/webapp/web/css/styles/common.css +++ b/solr/webapp/web/css/styles/common.css @@ -22,12 +22,106 @@ a, button cursor: pointer; } -button, input, select, textarea +input, select, textarea { border: 1px solid #c0c0c0; padding: 2px; } +button +{ + background-color: #e6e6e6; + background-repeat: no-repeat; + background-image: -webkit-gradient( linear, 0 0, 0 100%, from( #ffffff ), color-stop( 25%, #ffffff ), to( #e6e6e6 ) ); + background-image: -webkit-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -moz-linear-gradient( top, #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -ms-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: -o-linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + background-image: linear-gradient( #ffffff, #ffffff 25%, #e6e6e6 ); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0 ); + border: 1px solid #ccc; + border-bottom-color: #bbb; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + -moz-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 2px rgba( 0, 0, 0, 0.05 ); + color: #333; + cursor: pointer; + display: inline-block; + padding: 4px 7px 5px; + overflow: visible; + text-shadow: 0 1px 1px rgba( 255, 255, 255, 0.75 ); + -webkit-transition: 0.1s linear background-image; + -moz-transition: 0.1s linear background-image; + -ms-transition: 0.1s linear background-image; + -o-transition: 0.1s linear background-image; + transition: 0.1s linear background-image; +} + +button span +{ + background-position: 0 50%; + display: block; + padding-left: 21px; +} + +button[type=submit], button.primary +{ + background-color: #0064cd; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #049cdb ), to( #0064cd ) ); + background-image: -moz-linear-gradient( top, #049cdb, #0064cd ); + background-image: -ms-linear-gradient( top, #049cdb, #0064cd ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #049cdb ), color-stop( 100%, #0064cd ) ); + background-image: -webkit-linear-gradient( top, #049cdb, #0064cd ); + background-image: -o-linear-gradient( top, #049cdb, #0064cd ); + background-image: linear-gradient( top, #049cdb, #0064cd ); + border-color: #0064cd #0064cd #003f81; + border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 ); + color: #ffffff; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0 ); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +button.success +{ + background-color: #57a957; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #62c462 ), to( #57a957 ) ); + background-image: -moz-linear-gradient( top, #62c462, #57a957 ); + background-image: -ms-linear-gradient( top, #62c462, #57a957 ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #62c462 ), color-stop( 100%, #57a957 ) ); + background-image: -webkit-linear-gradient( top, #62c462, #57a957 ); + background-image: -o-linear-gradient( top, #62c462, #57a957 ); + background-image: linear-gradient( top, #62c462, #57a957 ); + border-color: #57a957 #57a957 #3d773d; + border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 ); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#62c462', endColorstr='#57a957', GradientType=0 ); + color: #ffffff; + text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.25 ); +} + +button.warn +{ + background-color: #c43c35; + background-repeat: repeat-x; + background-image: -khtml-gradient( linear, left top, left bottom, from( #ee5f5b ), to( #c43c35 ) ); + background-image: -moz-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -ms-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -webkit-gradient( linear, left top, left bottom, color-stop( 0%, #ee5f5b ), color-stop( 100%, #c43c35 ) ); + background-image: -webkit-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: -o-linear-gradient( top, #ee5f5b, #c43c35 ); + background-image: linear-gradient( top, #ee5f5b, #c43c35 ); + border-color: #c43c35 #c43c35 #882a25; + border-color: rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.1 ) rgba( 0, 0, 0, 0.25 ); + color: #ffffff; + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0 ); + text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.25 ); +} + a { text-decoration: none; diff --git a/solr/webapp/web/css/styles/replication.css b/solr/webapp/web/css/styles/replication.css index 2592330bb98..f8cd5b48c57 100644 --- a/solr/webapp/web/css/styles/replication.css +++ b/solr/webapp/web/css/styles/replication.css @@ -449,9 +449,8 @@ #content #replication #navigation button { - background-position: 2px 50%; + display: block; margin-bottom: 10px; - padding-left: 21px; } #content #replication #navigation button.optional @@ -459,40 +458,37 @@ display: none; } -#content #replication #navigation .replicate-now +#content #replication #navigation .replicate-now span { background-image: url( ../../img/ico/document-convert.png ); } -#content #replication #navigation .abort-replication +#content #replication #navigation .abort-replication span { - background-color: #800; background-image: url( ../../img/ico/hand.png ); - border-color: #800; - color: #fff; } -#content #replication #navigation .disable-polling +#content #replication #navigation .disable-polling span { background-image: url( ../../img/ico/cross.png ); } -#content #replication #navigation .enable-polling +#content #replication #navigation .enable-polling span { background-image: url( ../../img/ico/tick.png ); } -#content #replication #navigation .disable-replication +#content #replication #navigation .disable-replication span { background-image: url( ../../img/ico/cross.png ); } -#content #replication #navigation .enable-replication +#content #replication #navigation .enable-replication span { background-image: url( ../../img/ico/tick.png ); } -#content #replication #navigation .refresh-status +#content #replication #navigation .refresh-status span { background-image: url( ../../img/ico/arrow-circle.png ); } \ No newline at end of file diff --git a/solr/webapp/web/css/styles/schema-browser.css b/solr/webapp/web/css/styles/schema-browser.css index 9cb051c9f27..47efba6090e 100644 --- a/solr/webapp/web/css/styles/schema-browser.css +++ b/solr/webapp/web/css/styles/schema-browser.css @@ -153,6 +153,7 @@ margin-right: 5px; text-align: right; width: 100px; + white-space: pre; } #content #schema-browser #data #field .field-options .analyzer a @@ -246,15 +247,12 @@ #content #schema-browser #data #field .terminfo-holder .trigger { float: left; - width: 130px; + width: 140px; } -#content #schema-browser #data #field .terminfo-holder .trigger button +#content #schema-browser #data #field .terminfo-holder .trigger button span { background-image: url( ../../img/ico/information.png ); - background-position: 3px 50%; - display: block; - padding-left: 23px; } #content #schema-browser #data #field .terminfo-holder .status @@ -266,13 +264,9 @@ padding-right: 20px; } -#content #schema-browser #data #field .terminfo-holder.disabled .trigger button +#content #schema-browser #data #field .terminfo-holder.disabled .trigger button span { - background-color: #f0f0f0; background-image: url( ../../img/ico/prohibition.png ); - border-color: #fff; - color: #c0c0c0; - cursor: auto; } #content #schema-browser #data #field .terminfo-holder.disabled .status diff --git a/solr/webapp/web/js/scripts/replication.js b/solr/webapp/web/js/scripts/replication.js index b9b298b3bc3..7d00d97f97f 100644 --- a/solr/webapp/web/js/scripts/replication.js +++ b/solr/webapp/web/js/scripts/replication.js @@ -110,14 +110,14 @@ var replication_fetch_status = function() dataType : 'json', beforeSend : function( xhr, settings ) { - $( '.refresh-status', navigation_element ) + $( '.refresh-status span', navigation_element ) .addClass( 'loader' ); clear_timer(); }, success : function( response, text_status, xhr ) { - $( '.refresh-status', navigation_element ) + $( '.refresh-status span', navigation_element ) .removeClass( 'loader' ); var data = response.details; diff --git a/solr/webapp/web/js/scripts/schema-browser.js b/solr/webapp/web/js/scripts/schema-browser.js index a63f0be4c43..fb1ce701480 100644 --- a/solr/webapp/web/js/scripts/schema-browser.js +++ b/solr/webapp/web/js/scripts/schema-browser.js @@ -61,12 +61,12 @@ var load_terminfo = function( trigger_element, core_basepath, field, data_elemen context : terminfo_element, beforeSend : function( xhr, settings ) { - trigger_element + $( 'span', trigger_element ) .addClass( 'loader' ); }, success : function( response, text_status, xhr ) { - trigger_element + $( 'span', trigger_element ) .removeClass( 'loader' ); var field_data = response.fields[field]; @@ -104,15 +104,15 @@ var load_terminfo = function( trigger_element, core_basepath, field, data_elemen { if( topterms_frq_last !== topterms[i+1] ) { - if( topterms_frq_last ) - { - topterms_content += '' + "\n"; - } + if( topterms_frq_last ) + { + topterms_content += '' + "\n"; + } - topterms_frq_last = topterms[i+1]; - topterms_content += '
  • ' - + '

    ' + topterms_frq_last.esc() + '

    ' + "\n" - + '