Update compatibility with `django-streamfield`.
parent
b429bde765
commit
48d0b58d30
|
|
@ -49,7 +49,7 @@ https://github.com/raagin/django-streamfield/
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface .streamfield_app .collapse-handler {
|
.admin-interface .streamfield_app .collapse-handlers .collapse-handler {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
|
|
@ -58,9 +58,9 @@ https://github.com/raagin/django-streamfield/
|
||||||
text-decoration: none;
|
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);
|
color: var(--admin-interface-generic-link-hover-color);
|
||||||
text-decoration: none;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface .streamfield_app .stream-model-block {
|
.admin-interface .streamfield_app .stream-model-block {
|
||||||
|
|
@ -85,6 +85,12 @@ https://github.com/raagin/django-streamfield/
|
||||||
padding: 10px 10px 10px 20px;
|
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 {
|
.admin-interface .streamfield_app .stream-model-block .streamblock__block__title span {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
@ -139,6 +145,16 @@ https://github.com/raagin/django-streamfield/
|
||||||
font-size: 18px;
|
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 {
|
.admin-interface .streamfield_app .block-fields > div {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
@ -152,6 +168,10 @@ https://github.com/raagin/django-streamfield/
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.admin-interface .streamfield_app .stream-model-block .add_here {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.admin-interface .streamfield_app .stream-insert-new-block {
|
.admin-interface .streamfield_app .stream-insert-new-block {
|
||||||
margin-bottom: 20px;
|
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 {
|
.admin-interface .streamfield_app .stream-insert-new-block .add-new-block-button:hover {
|
||||||
color: var(--admin-interface-generic-link-hover-color);
|
color: var(--admin-interface-generic-link-hover-color);
|
||||||
text-decoration: none;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface .streamfield_app .stream-insert-new-block ul {
|
.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() {
|
(function() {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue