mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Merge branch 'feature/streamfield' of github.com:torchbox/wagtail into feature/streamfield
This commit is contained in:
commit
dfb2a999f4
@ -311,18 +311,12 @@ class FieldBlock(Block):
|
||||
#if error:
|
||||
# error_html = str(ErrorList(error.error_list))
|
||||
#else:
|
||||
# error_html = ''
|
||||
|
||||
if self.meta.classname:
|
||||
classes = self.meta.classname.split(' ')
|
||||
else:
|
||||
classes = None
|
||||
|
||||
|
||||
# error_html = ''
|
||||
|
||||
return render_to_string('wagtailadmin/block_forms/field.html', {
|
||||
'name': self.name,
|
||||
'label': self.label,
|
||||
'classes': classes,
|
||||
'classes': self.meta.classname,
|
||||
'widget': widget_html,
|
||||
'label_tag': label_html,
|
||||
'field': self.field,
|
||||
|
@ -31,9 +31,11 @@ function makeRichTextEditable(id) {
|
||||
removeStylingPending = false;
|
||||
}
|
||||
|
||||
var closestObj = input.closest('.object');
|
||||
|
||||
richText.hallo({
|
||||
toolbar: 'halloToolbarFixed',
|
||||
toolbarCssClass: (input.closest('.object').hasClass('full')) ? 'full' : '',
|
||||
toolbarCssClass: (closestObj.hasClass('full')) ? 'full' : (closestObj.hasClass('stream-field')) ? 'stream-field' : '',
|
||||
plugins: halloPlugins
|
||||
}).bind('hallomodified', function(event, data) {
|
||||
input.val(data.content);
|
||||
|
@ -2,29 +2,31 @@
|
||||
@import "../mixins.scss";
|
||||
@import "../grid.scss";
|
||||
|
||||
.page-editor .content-wrapper{
|
||||
margin-bottom:10em;
|
||||
}
|
||||
|
||||
.page-editor .breadcrumb{
|
||||
margin-top:-1.2em;
|
||||
margin-bottom:2em;
|
||||
}
|
||||
.page-editor .modal .breadcrumb{
|
||||
margin:0;
|
||||
background-color:transparent;
|
||||
|
||||
a{
|
||||
color:$color-grey-2;
|
||||
.page-editor {
|
||||
.content-wrapper{
|
||||
margin-bottom:10em;
|
||||
}
|
||||
li:hover{
|
||||
background-color:$color-grey-4;
|
||||
.breadcrumb{
|
||||
margin-top:-1.2em;
|
||||
margin-bottom:2em;
|
||||
}
|
||||
.home{
|
||||
padding-left:0;
|
||||
.modal .breadcrumb{
|
||||
margin:0;
|
||||
background-color:transparent;
|
||||
|
||||
a{
|
||||
color:$color-grey-2;
|
||||
}
|
||||
li:hover{
|
||||
background-color:$color-grey-4;
|
||||
}
|
||||
.home{
|
||||
padding-left:0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* An object is the basic wrapper around any field or group of fields in the editor interface */
|
||||
.object{
|
||||
position:relative;
|
||||
overflow:hidden;
|
||||
@ -273,6 +275,11 @@
|
||||
background-color:transparent;
|
||||
max-width:1024px;
|
||||
}
|
||||
|
||||
.richtext.inEditMode{
|
||||
padding-top:1em;
|
||||
padding-bottom:1em;
|
||||
}
|
||||
}
|
||||
|
||||
/* Object controls */
|
||||
@ -564,6 +571,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Custom styles that make some fields look more important */
|
||||
.full input, textarea, .richtext{
|
||||
@include nice-padding();
|
||||
@include border-radius(0px);
|
||||
@ -576,39 +584,11 @@
|
||||
.title input,
|
||||
.title textarea,
|
||||
.title .richtext{
|
||||
font-size:2em;
|
||||
font-family:Bitter, Georgia, serif;
|
||||
}
|
||||
|
||||
.title.h2 input,
|
||||
.title.h2 textarea,
|
||||
.title.h2 .richtext{
|
||||
font-size:2em;
|
||||
}
|
||||
|
||||
.title.h3 input,
|
||||
.title.h3 textarea
|
||||
.title.h3 .richtext{
|
||||
font-size:1.8em;
|
||||
}
|
||||
|
||||
.title.h4 input,
|
||||
.title.h4 textarea,
|
||||
.title.h4 .richtext{
|
||||
font-size:1.5em;
|
||||
}
|
||||
|
||||
.intro input,
|
||||
.intro textarea,
|
||||
.intro .richtext{
|
||||
font-size:1.4em;
|
||||
}
|
||||
|
||||
.quote input{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Footer control bar for perfoming actions on the page */
|
||||
footer .preview{
|
||||
button, .button{
|
||||
background-color:lighten($color-grey-2,10%);
|
||||
|
@ -11,6 +11,11 @@
|
||||
.hallotoolbar.full{
|
||||
margin-left:$mobile-nice-padding;
|
||||
}
|
||||
/* stream-field is added to hallotoolbar when invoked on a field within a stream-field */
|
||||
.hallotoolbar.stream-field{
|
||||
margin-top:0;
|
||||
margin-left:0;
|
||||
}
|
||||
.hallotoolbar.affixed{
|
||||
position:fixed;
|
||||
margin-top:0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% load wagtailadmin_tags %}
|
||||
<div class="field {{ field|fieldtype }} {% for class in classes %} blockclass-{{ class }}{% endfor %} blockname-{{ label }}">
|
||||
<div class="field {{ field|fieldtype }} fieldname-{{ name }} {{ classes }} ">
|
||||
{{ label_tag }}
|
||||
<div class="field-content">
|
||||
<div class="input">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<li id="{{ prefix }}-container" class="sequence-member">
|
||||
<li id="{{ prefix }}-container" class="sequence-member sequencename-{{ block_type_name }}">
|
||||
<input type="hidden" id="{{ prefix }}-deleted" name="{{ prefix }}-deleted" value="">
|
||||
<input type="hidden" id="{{ prefix }}-order" name="{{ prefix }}-order" value="{{ index }}">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user