Skip to content

Commit

Permalink
[#2375] Update all info blocks to sit below inputs
Browse files Browse the repository at this point in the history
To make info sit inline add a class of .info-inline to the info
element.
  • Loading branch information
aron committed Aug 14, 2012
1 parent 9d097d2 commit 7f181de
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 39 deletions.
32 changes: 15 additions & 17 deletions ckan/public/base/css/main.css
Expand Up @@ -5127,30 +5127,31 @@ textarea {
}
.form-horizontal .info-block {
position: relative;
float: right;
width: 265px;
display: block;
font-size: 11px;
color: #aeaeae;
line-height: 1.3;
padding: 6px 0 6px 25px;
margin-top: 6px;
}
.control-medium .info-block {
width: 165px;
.form-horizontal .info-inline {
float: right;
width: 265px;
margin-top: 0;
}
.control-full .info-block {
width: auto;
float: left;
.form-horizontal .control-medium .info-block.info-inline {
width: 165px;
}
.info-block:before {
.form-horizontal .info-block:before {
font-size: 2.2em;
position: absolute;
left: 0;
top: 8px;
}
.control-full .info-block:before {
top: 2px;
}
.info-block a {
.form-horizontal .info-inline:before {
top: 8px;
}
.form-horizontal .info-block a {
color: #aeaeae;
text-decoration: underline;
}
Expand Down Expand Up @@ -5229,7 +5230,7 @@ textarea {
border-radius: 3px 3px 0 0;
border-bottom: none;
}
.editor .info-block {
.editor .editor-info-block {
-webkit-border-radius: 0 0 3px 3px;
-moz-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
Expand All @@ -5243,13 +5244,10 @@ textarea {
font-size: 11px;
color: #282828;
}
.editor .info-block a {
.editor .editor-info-block a {
color: #005772;
text-decoration: none;
}
.editor .info-block:after {
content: none;
}
.control-custom {
font-size: 0;
}
Expand Down
33 changes: 13 additions & 20 deletions ckan/public/base/less/forms.less
Expand Up @@ -134,32 +134,33 @@ textarea {

.form-horizontal .info-block {
position: relative;
float: right;
width: 265px;
display: block;
font-size: 11px;
color: @emptyTextColor;
line-height: 1.3;
padding: 6px 0 6px 25px;
margin-top: 6px;
}

.form-horizontal .control-medium .info-block {
width: 165px;
.form-horizontal .info-inline {
float: right;
width: 265px;
margin-top: 0;
}

.form-horizontal .control-full .info-block {
width: auto;
float: left;
.form-horizontal .control-medium .info-block.info-inline {
width: 165px;
}

.form-horizontal .info-block:before {
font-size: 2.2em;
position: absolute;
left: 0;
top: 8px;
top: 2px;
}

.form-horizontal .control-full .info-block:before {
top: 2px;
.form-horizontal .info-inline:before {
top: 8px;
}

.form-horizontal .info-block a {
Expand Down Expand Up @@ -248,7 +249,7 @@ textarea {
border-bottom: none;
}

.editor .info-block {
.editor .editor-info-block {
.border-radius(0 0 @inputBorderRadius @inputBorderRadius);
display: block;
float: none;
Expand All @@ -261,19 +262,11 @@ textarea {
color: #282828;
}

.form-horizontal .editor .info-block {
float: none;
}

.editor .info-block a {
.editor .editor-info-block a {
color: @layoutLinkColor;
text-decoration: none;
}

.editor .info-block:after {
content: none;
}

// Controls

// Custom Key/Value input
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/macros/form.html
Expand Up @@ -119,7 +119,7 @@
{%- set extra_html = caller() if caller -%}
{% call input_block(id or name, label or name, error, classes, control_classes=["editor"]) %}
<textarea id="{{ id or name }}" name="{{ name }}" cols="20" rows="5" placeholder="{{ placeholder }}" {{ attributes(attrs) }}>{{ value | empty_and_escape }}</textarea>
<span class="info-block">{% trans %}You can use <a href="http://daringfireball.net/projects/markdown/syntax" target="_blank">Markdown formatting</a> here{% endtrans %}</span>
<span class="editor-info-block">{% trans %}You can use <a href="http://daringfireball.net/projects/markdown/syntax" target="_blank">Markdown formatting</a> here{% endtrans %}</span>
{{ extra_html }}
{% endcall %}
{% endmacro %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/package/snippets/package_basic_fields.html
Expand Up @@ -24,7 +24,7 @@
{% endfor %}
</select>
{% if error %}<span class="error-block">{{ error }}</span>{% endif %}
<span class="info-block icon-large icon-info-sign">
<span class="info-block info-inline icon-large icon-info-sign">
{% trans %}
License definitions and additional information can be found
at <a href="http://opendefinition.org/licenses/">opendefinition.org</a>
Expand Down

0 comments on commit 7f181de

Please sign in to comment.