Commit e9245931 authored by Dries's avatar Dries

Issue #1678002 by jessebeach, Wim Leers, Gábor Hojtsy: Edit should provide a...

Issue #1678002 by jessebeach, Wim Leers, Gábor Hojtsy: Edit should provide a usable entity-level toolbar for saving fields.
parent 0a91fd93
/**
* @file edit.icons.css
*/
.edit .icon {
min-height: 1em;
min-width: 2.5em;
position: relative;
}
.edit .icon.icon-only {
text-indent: -9999px;
}
.edit .icon.icon-end {
padding-right: 2.5em; /* LTR */
}
[dir="rtl"] .edit .icon.icon-end {
padding-left: 2.5em;
padding-right: 0;
}
.edit .icon:before {
background-attachment: scroll;
background-color: transparent;
background-position: center center;
background-repeat: no-repeat;
content: '';
display: block;
height: 100%;
left: 0; /* LTR */
position: absolute;
top: 0;
width: 100%;
}
[dir="rtl"] .edit .icon:before {
left: auto;
right: 0;
}
.edit .icon-end:before {
left: auto; /* LTR */
right: 0.5em; /* LTR */
width: 18px;
}
[dir="rtl"] .edit .icon-end:before {
left: 0.5em;
right: auto;
}
.edit button.icon {
font-size: 1em;
}
/**
* Images.
*/
.edit .icon-close:before {
background-image: url("../images/icon-close.png");
background-position: center top;
height: 12px;
top: 10px;
}
.edit .icon-close:hover:before {
background-image: url("../images/icon-close.png");
background-position: center bottom;
}
.edit .icon-throbber:before {
background-image: url("../images/icon-throbber.gif");
}
/**
* Animations.
*/
.edit-animate-invisible {
opacity: 0;
}
.edit-animate-fast {
-webkit-transition: all .2s ease;
-moz-transition: all .2s ease;
-ms-transition: all .2s ease;
-o-transition: all .2s ease;
transition: all .2s ease;
}
.edit-animate-default {
-webkit-transition: all .4s ease;
-moz-transition: all .4s ease;
-ms-transition: all .4s ease;
-o-transition: all .4s ease;
transition: all .4s ease;
}
.edit-animate-slow {
-webkit-transition: all .6s ease;
-moz-transition: all .6s ease;
-ms-transition: all .6s ease;
-o-transition: all .6s ease;
transition: all .6s ease;
}
.edit-animate-delay-veryfast {
-webkit-transition-delay: .05s;
-moz-transition-delay: .05s;
-ms-transition-delay: .05s;
-o-transition-delay: .05s;
transition-delay: .05s;
}
.edit-animate-delay-fast {
-webkit-transition-delay: .2s;
-moz-transition-delay: .2s;
-ms-transition-delay: .2s;
-o-transition-delay: .2s;
transition-delay: .2s;
}
.edit-animate-disable-width {
-webkit-transition: width 0s;
-moz-transition: width 0s;
-ms-transition: width 0s;
-o-transition: width 0s;
transition: width 0s;
}
.edit-animate-only-visibility {
-webkit-transition: opacity .2s ease;
-moz-transition: opacity .2s ease;
-ms-transition: opacity .2s ease;
-o-transition: opacity .2s ease;
transition: opacity .2s ease;
}
.edit-animate-only-background-and-padding {
-webkit-transition: background, padding .2s ease;
-moz-transition: background, padding .2s ease;
-ms-transition: background, padding .2s ease;
-o-transition: background, padding .2s ease;
transition: background, padding .2s ease;
}
/**
* Candidate editables + editables being edited.
* @file edit.module.css
*
* Note: every class is prefixed with "edit-" to prevent collisions with modules
* or themes. In IPE-specific DOM subtrees, this is not necessary.
*/
/* Editable. */
/**
* Editable.
*/
.edit-editable {
z-index: 300;
z-index: 98;
position: relative;
}
.edit-editable:focus {
outline: none;
}
.edit-field.edit-editable,
.edit-field .edit-editable {
box-shadow: 0 0 1px 1px #4d9de9;
}
/* Highlighted (hovered) editable. */
/**
* Highlighted (hovered) editable.
*/
.edit-editable.edit-highlighted {
z-index: 99;
min-width: 200px;
}
.edit-field.edit-editable.edit-highlighted,
.edit-form.edit-editable.edit-highlighted,
.edit-field .edit-editable.edit-highlighted {
box-shadow: 0 0 1px 1px #0199ff, 0 0 3px 3px rgba(153, 153, 153, .5);
}
.edit-field.edit-editable.edit-highlighted.edit-validation-error,
.edit-form.edit-editable.edit-highlighted.edit-validation-error,
.edit-field .edit-editable.edit-highlighted.edit-validation-error {
box-shadow: 0 0 1px 1px red, 0 0 3px 3px rgba(153, 153, 153, .5);
}
.edit-form.edit-editable .form-item .error {
border: 1px solid #eea0a0;
.edit-validation-errors > .messages {
margin-left: 0;
margin-right: 0;
}
/* Editing (focused) editable. */
.edit-form.edit-editable.edit-editing,
.edit-field .edit-editable.edit-editing {
/* In the latest design, there's no special styling when editing as opposed to
* just hovering.
* This will be necessary again for http://drupal.org/node/1844220.
*/
.edit-validation-errors > .messages > ul {
list-style: none;
margin: 0;
padding: 0;
}
/**
* Edit mode: modal.
*/
......@@ -131,30 +39,13 @@
z-index: 350;
position: fixed;
top: 40%;
left: 40%;
box-shadow: 3px 3px 5px #333;
background-color: white;
border: 1px solid #0199ff;
font-family: 'Droid sans', 'Lucida Grande', sans-serif;
left: 40%; /* LTR */
}
#edit_modal .main {
font-size: 130%;
margin: 25px;
padding-left: 40px;
background: transparent url('../images/attention.png') no-repeat;
}
#edit_modal .actions {
border-top: 1px solid #ddd;
padding: 3px inherit;
text-align: right;
background: #f5f5f5;
[dir="rtl"] #edit_modal {
left: auto;
right: 40%;
}
/**
* Edit mode: type=direct.
*/
......@@ -162,19 +53,17 @@
z-index: 300;
position: relative;
}
.edit-validation-errors .messages.error {
position: absolute;
top: 6px;
left: -5px;
left: -5px; /* LTR */
margin: 0;
border: none;
box-shadow: 0 0 1px 1px red, 0 0 3px 3px rgba(153, 153, 153, .5);
background-color: white;
}
[dir="rtl"] .edit-validation-errors .messages.error {
left: auto;
right: -5px;
}
/**
* Edit mode: type=form.
......@@ -182,39 +71,42 @@
#edit_backstage {
display: none;
}
.edit-form {
position: absolute;
z-index: 300;
box-shadow: 0 0 30px 4px #4f4f4f;
max-width: 35em;
background-color: white;
}
.edit-form .placeholder {
min-height: 22px;
}
/* Default form styling overrides. */
.edit-form form { padding: 1em; }
.edit-form .form-item { margin: 0; }
.edit-form .form-wrapper { margin: .5em; }
.edit-form .form-wrapper .form-wrapper { margin: inherit; }
.edit-form .form-actions { display: none; }
.edit-form input { max-width: 100%; }
/**
* Edit mode: toolbars
* Default form styling overrides.
*/
.edit-form .form-wrapper .form-wrapper {
margin: inherit;
}
.edit-form .form-actions {
display: none;
}
.edit-form input {
max-width: 100%;
}
/* Trick: wrap statically positioned elements in relatively positioned element
without changing its location. This allows us to absolutely position the
toolbar.
*/
.edit-toolbar-container,
/**
* Entity toolbar.
*/
.edit-toolbar-container {
max-width: 100%;
position: absolute;
max-width: 320px;
width: 320px;
z-index: 350;
}
.edit-toolbar-container > .edit-toolbar-pointer,
.edit-toolbar-container > .edit-toolbar-lining {
display: none;
}
.edit-form-container {
position: relative;
padding: 0;
......@@ -223,150 +115,20 @@
vertical-align: baseline;
z-index: 100;
}
.edit-toolbar-container {
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.edit-toolbar-heightfaker {
height: auto;
position: absolute;
bottom: 1px;
box-shadow: 0 0 1px 1px #0199ff, 0 0 3px 3px rgba(153, 153, 153, .5);
background: #fff;
display: none;
}
.edit-highlighted .edit-toolbar-heightfaker {
display: block;
}
/* The toolbar; these are not necessarily visible. */
.edit-toolbar {
position: relative;
height: 100%;
font-family: 'Droid sans', 'Lucida Grande', sans-serif;
}
.edit-toolbar-heightfaker {
clip: rect(-1000px, 1000px, auto, -1000px); /* Remove bottom box-shadow. */
}
/* Exception: when the toolbar is instructed to be "full width". */
.edit-toolbar-fullwidth .edit-toolbar-heightfaker {
width: 100%;
clip: auto;
}
/* The toolbar contains toolgroups; these are visible. */
.edit-toolgroup {
float: left; /* LTR */
}
/* Info toolgroup. */
.edit-toolgroup.info {
float: left; /* LTR */
font-weight: bolder;
padding: 0 5px;
background: #fff url('../images/throbber.gif') no-repeat -60px 60px;
}
.edit-toolgroup.info.loading {
padding-right: 35px;
background-position: 90% 50%;
}
/* Operations toolgroup. */
.edit-toolgroup.ops {
float: right; /* LTR */
margin-left: 5px;
}
.edit-toolgroup.wysiwyg-floated {
float: right;
}
.edit-toolgroup.wysiwyg-main {
clear: left;
width: 100%;
padding-left: 0;
}
/**
* Edit mode: buttons (in both modal and toolbar).
*/
#edit_modal button,
.edit-toolbar button {
float: left; /* LTR */
display: block;
height: 29px;
min-width: 29px;
padding: 3px 6px 6px 6px;
margin: 4px 5px 1px 0;
border: 1px solid #fff;
border-radius: 3px;
color: white;
text-decoration: none;
font-size: 13px;
cursor: pointer;
}
#edit_modal button {
float: none;
display: inline-block;
}
/* Button with icons. */
#edit_modal button span,
.edit-toolbar button span {
width: 22px;
height: 19px;
display: block;
[dir="rtl"] .edit-toolgroup.ops {
float: left;
}
.edit-toolbar span.close {
background: url('../images/close.png') no-repeat 3px 2px;
text-indent: -999em;
direction: ltr;
}
.edit-toolbar button.blank-button {
color: black;
background-color: #fff;
font-weight: bolder;
}
#edit_modal button.blue-button,
.edit-toolbar button.blue-button {
color: white;
background-image: -webkit-linear-gradient(top, #6fc2f2 0%, #4e97c0 100%);
background-image: -moz-linear-gradient(top, #6fc2f2 0%, #4e97c0 100%);
background-image: linear-gradient(top, #6fc2f2 0%, #4e97c0 100%);
border-radius: 5px;
.edit-toolbar-label {
overflow: hidden;
}
#edit_modal button.gray-button,
.edit-toolbar button.gray-button {
color: #666;
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #ccc 100%);
background-image: -moz-linear-gradient(top, #f5f5f5 0%, #ccc 100%);
background-image: linear-gradient(top, #f5f5f5 0%, #ccc 100%);
border-radius: 5px;
}
#edit_modal button.blue-button:hover,
.edit-toolbar button.blue-button:hover,
#edit_modal button.blue-button:active,
.edit-toolbar button.blue-button:active {
border: 1px solid #55a5d3;
box-shadow: 0 2px 1px rgba(0,0,0,0.2);
}
#edit_modal button.gray-button:hover,
.edit-toolbar button.gray-button:hover,
#edit_modal button.gray-button:active,
.edit-toolbar button.gray-button:active {
border: 1px solid #cdcdcd;
box-shadow: 0 2px 1px rgba(0,0,0,0.1);
#edit-toolbar-fence {
bottom: 0;
left: 0;
right: 0;
top: 0;
position: fixed;
z-index: -1;
}
/**
* @file edit.theme.css
*/
/**
* Hide comments on entities
*/
.edit-entity-active .comment-wrapper {
display: none ;
}
/**
* Editable.
*/
.edit-field.edit-editable,
.edit-field .edit-editable {
box-shadow: 0 0 0 2px #4d9de9;
}
/**
* Highlighted (hovered) editable.
*/
.edit-field.edit-highlighted,
.edit-form.edit-highlighted,
.edit-field .edit-highlighted {
box-shadow: 0 0 0 2px #0199ff, 0 1px 0 3px rgba(153, 153, 153, .5);
}
.edit-field.edit-changed,
.edit-form.edit-changed,
.edit-field .edit-changed {
box-shadow: 0 0 0px 2px orange, 0px 1px 0px 3px rgba(153, 153, 153, .5);
}
.edit-editing.edit-validation-error,
.edit-form.edit-validation-error {
box-shadow: 0 0 1px 2px red, 0 0 3px 5px rgba(153, 153, 153, .5);
}
.edit-form .form-item .error {
border: 1px solid #eea0a0;
}
/**
* Default form styling overrides.
*/
.edit-form form {
padding: 0.5em;
}
.edit-form .form-item {
margin: 0;
}
.edit-form .form-wrapper {
margin: .5em;
}
/**
* Animations.
*/
.edit-animate-invisible {
opacity: 0;
}
.edit-animate-default {
-webkit-transition: all .4s ease;
transition: all .4s ease;
}
.edit-animate-slow {
-webkit-transition: all .6s ease;
transition: all .6s ease;
}
.edit-animate-delay-veryfast {
-webkit-transition-delay: .05s;
transition-delay: .05s;
}
.edit-animate-delay-fast {
-webkit-transition-delay: .2s;
transition-delay: .2s;
}
.edit-animate-disable-width {
-webkit-transition: width 0s;
transition: width 0s;
}
.edit-animate-only-visibility {
-webkit-transition: opacity .2s ease;
transition: opacity .2s ease;
}
/**
* Edit mode: modal.
*/
#edit_modal {
background-color: white;
border: 1px solid #0199ff;
box-shadow: 3px 3px 5px #333;
font-family: 'Droid sans', 'Lucida Grande', sans-serif;
}
#edit_modal .main {
font-size: 130%;
margin: 25px;
padding-left: 40px; /* LTR */
background: transparent url('../images/attention.png') no-repeat;
}
[dir="rtl"] #edit_modal .main {
padding-left: 0;
padding-right: 40px;
}
#edit_modal .actions {
border-top: 1px solid #ddd;
padding: 0.25em 0.2em;
text-align: right; /* LTR */
background: #f5f5f5;
}
[dir="rtl"] #edit_modal .actions {
text-align: left;
}
/**
* Edit mode: type=direct.
*/
.edit-validation-errors .messages.error {
box-shadow: 0 0 1px 1px red, 0 0 3px 3px rgba(153, 153, 153, .5);
background-color: white;
}
/**
* Edit mode: type=form.
*/
.edit-form {
box-shadow: 0 0 30px 4px #4f4f4f;
background-color: white;
}
/**
* Toolbars.
*/
.edit-toolbar-container {
font-family: 'Source Sans Pro','Lucida Grande', sans-serif;
font-size: 1.1em;
padding-bottom: 7px;
padding-top: 7px;
-webkit-transition: all 1s;
transition: all 1s;
}
.edit-toolbar-container > .edit-toolbar-content {
background-color: #45545E;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: white;
padding: 0.1667em;
position: relative;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
z-index: 2;
}
.edit-toolbar-container > .edit-toolbar-pointer {
background-color: #45545E;
bottom: 2px;
box-shadow: 0px 0px 0 4px rgba(150, 150, 150, 0.5);
display: block;
height: 16px;
left: 18px; /* LTR */
position: absolute;
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
width: 16px;
z-index: 1;
}
[dir="rtl"] .edit-toolbar-container > .edit-toolbar-pointer {
left: auto;
right: 18px;
}
.edit-toolbar-container.edit-toolbar-pointer-top > .edit-toolbar-pointer {
bottom: auto;
top: 2px;
}
.edit-toolbar-container > .edit-toolbar-lining {
bottom: 7px;
box-shadow: 0px 1px 0px 3px rgba(150, 150, 150, 0.5);
display: block;
left: 0;
position: absolute;
right: 0;
top: 7px;
z-index: 0;
}
.edit-toolbar-label {
overflow: hidden;
padding: 0.333em 0.5em;
text-overflow: ellipsis;
white-space: nowrap;
}
/* The toolbar; these are not necessarily visible. */
.edit-toolbar {
font-family: 'Droid sans', 'Lucida Grande', sans-serif;
}
.edit-toolbar-entity {
padding: 0.1667em 0.2em;
}
/**
* Info toolgroup.
*/
.edit-toolbar-fullwidth {
width: 100%;
}
.edit-toolgroup.wysiwyg-floated {
float: right; /* LTR */
}
[dir="rtl"] .edit-toolgroup.wysiwyg-floated {
float: left;
}
.edit-toolgroup.wysiwyg-main {
clear: both;
width: 100%;
padding-left: 0; /* LTR */
}
[dir="rtl"] .edit-toolgroup.wysiwyg-main {
padding-left: 0;
padding-right: 0;
}
/**
* Buttons.
*/
.edit-button {
background-color: #e4e4e4;
border: 1px solid #d2d2d2;
color: #5a5a5a;
cursor: pointer;
display: inline-block;
margin: 0;
opacity: 1;
padding: 0.4545em;
-webkit-transition: all .1s ease;
transition: all .1s ease;