Update compatibility with `django-streamfield`.
parent
b429bde765
commit
48d0b58d30
|
|
@ -49,7 +49,7 @@ https://github.com/raagin/django-streamfield/
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
.admin-interface .streamfield_app .collapse-handler {
|
||||
.admin-interface .streamfield_app .collapse-handlers .collapse-handler {
|
||||
user-select: none;
|
||||
padding: 8px;
|
||||
padding-right: 0;
|
||||
|
|
@ -58,9 +58,9 @@ https://github.com/raagin/django-streamfield/
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
.admin-interface .streamfield_app .collapse-handler:hover {
|
||||
.admin-interface .streamfield_app .collapse-handlers .collapse-handler:hover {
|
||||
color: var(--admin-interface-generic-link-hover-color);
|
||||
text-decoration: none;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.admin-interface .streamfield_app .stream-model-block {
|
||||
|
|
@ -85,6 +85,12 @@ https://github.com/raagin/django-streamfield/
|
|||
padding: 10px 10px 10px 20px;
|
||||
}
|
||||
|
||||
.admin-interface .streamfield_app .stream-model-block .streamblock__block__title .streamblock__block__model_title {
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.admin-interface .streamfield_app .stream-model-block .streamblock__block__title span {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
|
@ -139,6 +145,16 @@ https://github.com/raagin/django-streamfield/
|
|||
font-size: 18px;
|
||||
}
|
||||
|
||||
.admin-interface .streamfield_app .stream-model-block .streamblock__block__subtitle {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
flex-shrink: 1;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.admin-interface .streamfield_app .block-fields > div {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
|
@ -152,6 +168,10 @@ https://github.com/raagin/django-streamfield/
|
|||
display: none;
|
||||
}
|
||||
|
||||
.admin-interface .streamfield_app .stream-model-block .add_here {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.admin-interface .streamfield_app .stream-insert-new-block {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
|
@ -163,7 +183,7 @@ https://github.com/raagin/django-streamfield/
|
|||
|
||||
.admin-interface .streamfield_app .stream-insert-new-block .add-new-block-button:hover {
|
||||
color: var(--admin-interface-generic-link-hover-color);
|
||||
text-decoration: none;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.admin-interface .streamfield_app .stream-insert-new-block ul {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
// IMPORTANT: used by django-streamfield >= 2.0.0
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var windowRef = window;
|
||||
var openerRef = windowRef.parent;
|
||||
|
||||
var initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse);
|
||||
switch (initData.action) {
|
||||
case 'change':
|
||||
openerRef.streamapps[initData.app_id].updateBlock(initData.block_id, initData.instance_id);
|
||||
openerRef.dismissRelatedObjectModal();
|
||||
break;
|
||||
case 'delete':
|
||||
break;
|
||||
default:
|
||||
openerRef.streamapps[initData.app_id].updateBlock(initData.block_id, initData.instance_id);
|
||||
openerRef.dismissRelatedObjectModal();
|
||||
break;
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
// IMPORTANT: used by django-streamfield >= 2.0.0
|
||||
|
||||
(function() {
|
||||
|
||||
'use strict';
|
||||
|
|
|
|||
Loading…
Reference in New Issue