This commit is contained in:
Xes
2025-08-14 22:41:49 +02:00
parent 2de81ccc46
commit 8ce45119b6
39774 changed files with 4309466 additions and 0 deletions

View File

@@ -0,0 +1,691 @@
/*
This file is part of the Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
*/
var Admin = {
collectionCounters: [],
/**
* This function must be called when an ajax call is done, to ensure
* the retrieved html is properly setup
*
* @param subject
*/
shared_setup: function(subject) {
Admin.log("[core|shared_setup] Register services on", subject);
Admin.set_object_field_value(subject);
Admin.add_filters(subject);
Admin.setup_select2(subject);
Admin.setup_icheck(subject);
Admin.setup_checkbox_range_selection(subject);
Admin.setup_xeditable(subject);
Admin.setup_form_tabs_for_errors(subject);
Admin.setup_inline_form_errors(subject);
Admin.setup_tree_view(subject);
Admin.setup_collection_counter(subject);
Admin.setup_sticky_elements(subject);
Admin.setup_readmore_elements(subject);
// Admin.setup_list_modal(subject);
},
setup_list_modal: function(modal) {
Admin.log('[core|setup_list_modal] configure modal on', modal);
// this will force relation modal to open list of entity in a wider modal
// to improve readability
jQuery('div.modal-dialog', modal).css({
width: '90%', //choose your width
height: '85%',
padding: 0
});
jQuery('div.modal-content', modal).css({
'border-radius':'0',
height: '100%',
padding: 0
});
jQuery('.modal-body', modal).css({
width: 'auto',
height: '90%',
padding: 15,
overflow: 'auto'
});
jQuery(modal).trigger('sonata-admin-setup-list-modal');
},
setup_select2: function(subject) {
if (window.SONATA_CONFIG && window.SONATA_CONFIG.USE_SELECT2) {
Admin.log('[core|setup_select2] configure Select2 on', subject);
jQuery('select:not([data-sonata-select2="false"])', subject).each(function() {
var select = jQuery(this);
var allowClearEnabled = false;
var popover = select.data('popover');
select.removeClass('form-control');
if (select.find('option[value=""]').length || select.attr('data-sonata-select2-allow-clear')==='true') {
allowClearEnabled = true;
} else if (select.attr('data-sonata-select2-allow-clear')==='false') {
allowClearEnabled = false;
}
select.select2({
width: function(){
// Select2 v3 and v4 BC. If window.Select2 is defined, then the v3 is installed.
// NEXT_MAJOR: Remove Select2 v3 support.
return Admin.get_select2_width(window.Select2 ? this.element : select);
},
dropdownAutoWidth: true,
minimumResultsForSearch: 10,
allowClear: allowClearEnabled
});
if (undefined !== popover) {
select
.select2('container')
.popover(popover.options)
;
}
});
}
},
setup_icheck: function(subject) {
if (window.SONATA_CONFIG && window.SONATA_CONFIG.USE_ICHECK) {
Admin.log('[core|setup_icheck] configure iCheck on', subject);
jQuery("input[type='checkbox']:not('label.btn>input'), input[type='radio']:not('label.btn>input')", subject).iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue'
});
}
},
/**
* Setup checkbox range selection
*
* Clicking on a first checkbox then another with shift + click
* will check / uncheck all checkboxes between them
*
* @param {string|Object} subject The html selector or object on which function should be applied
*/
setup_checkbox_range_selection: function(subject) {
Admin.log('[core|setup_checkbox_range_selection] configure checkbox range selection on', subject);
var previousIndex,
useICheck = window.SONATA_CONFIG && window.SONATA_CONFIG.USE_ICHECK
;
// When a checkbox or an iCheck helper is clicked
jQuery('tbody input[type="checkbox"], tbody .iCheck-helper', subject).click(function (event) {
var input;
if (useICheck) {
input = jQuery(this).prev('input[type="checkbox"]');
} else {
input = jQuery(this);
}
if (input.length) {
var currentIndex = input.closest('tr').index();
if (event.shiftKey && previousIndex >= 0) {
var isChecked = jQuery('tbody input[type="checkbox"]:nth(' + currentIndex + ')', subject).prop('checked');
// Check all checkbox between previous and current one clicked
jQuery('tbody input[type="checkbox"]', subject).each(function (i, e) {
if (i > previousIndex && i < currentIndex || i > currentIndex && i < previousIndex) {
if (useICheck) {
jQuery(e).iCheck(isChecked ? 'check' : 'uncheck');
return;
}
jQuery(e).prop('checked', isChecked);
}
});
}
previousIndex = currentIndex;
}
});
},
setup_xeditable: function(subject) {
Admin.log('[core|setup_xeditable] configure xeditable on', subject);
jQuery('.x-editable', subject).editable({
emptyclass: 'editable-empty btn btn-sm btn-default',
emptytext: '<i class="fa fa-pencil"></i>',
container: 'body',
placement: 'auto',
success: function(response) {
var html = jQuery(response);
Admin.setup_xeditable(html);
jQuery(this)
.closest('td')
.replaceWith(html);
},
error: function(xhr, statusText, errorThrown) {
return xhr.responseText;
}
});
},
/**
* render log message
* @param mixed
*/
log: function() {
var msg = '[Sonata.Admin] ' + Array.prototype.join.call(arguments,', ');
if (window.console && window.console.log) {
window.console.log(msg);
} else if (window.opera && window.opera.postError) {
window.opera.postError(msg);
}
},
/**
* NEXT_MAJOR: remove this function.
*
* @deprecated in version 3.0
*/
add_pretty_errors: function() {
console.warn('Admin.add_pretty_errors() was deprecated in version 3.0');
},
stopEvent: function(event) {
event.preventDefault();
return event.target;
},
add_filters: function(subject) {
Admin.log('[core|add_filters] configure filters on', subject);
jQuery('a.sonata-toggle-filter', subject).on('click', function(e) {
e.preventDefault();
e.stopPropagation();
if (jQuery(e.target).attr('sonata-filter') == 'false') {
return;
}
Admin.log('[core|add_filters] handle filter container: ', jQuery(e.target).attr('filter-container'))
var filters_container = jQuery('#' + jQuery(e.currentTarget).attr('filter-container'));
if (jQuery('div[sonata-filter="true"]:visible', filters_container).length == 0) {
jQuery(filters_container).slideDown();
}
var targetSelector = jQuery(e.currentTarget).attr('filter-target'),
target = jQuery('div[id="' + targetSelector + '"]', filters_container),
filterToggler = jQuery('i', '.sonata-toggle-filter[filter-target="' + targetSelector + '"]')
;
if (jQuery(target).is(":visible")) {
filterToggler
.removeClass('fa-check-square-o')
.addClass('fa-square-o')
;
target.hide();
} else {
filterToggler
.removeClass('fa-square-o')
.addClass('fa-check-square-o')
;
target.show();
}
if (jQuery('div[sonata-filter="true"]:visible', filters_container).length > 0) {
jQuery(filters_container).slideDown();
} else {
jQuery(filters_container).slideUp();
}
});
jQuery('.sonata-filter-form', subject).on('submit', function () {
jQuery(this).find('[sonata-filter="true"]:hidden :input').val('');
});
/* Advanced filters */
if (jQuery('.advanced-filter :input:visible', subject).filter(function () { return jQuery(this).val() }).length === 0) {
jQuery('.advanced-filter').hide();
};
jQuery('[data-toggle="advanced-filter"]', subject).click(function() {
jQuery('.advanced-filter').toggle();
});
},
/**
* Change object field value
* @param subject
*/
set_object_field_value: function(subject) {
Admin.log('[core|set_object_field_value] set value field on', subject);
this.log(jQuery('a.sonata-ba-edit-inline', subject));
jQuery('a.sonata-ba-edit-inline', subject).click(function(event) {
Admin.stopEvent(event);
var subject = jQuery(this);
jQuery.ajax({
url: subject.attr('href'),
type: 'POST',
success: function(response) {
var elm = jQuery(subject).parent();
elm.children().remove();
// fix issue with html comment ...
elm.html(jQuery(response.replace(/<!--[\s\S]*?-->/g, "")).html());
elm.effect("highlight", {'color' : '#57A957'}, 2000);
Admin.set_object_field_value(elm);
},
error: function(xhr, statusText, errorThrown) {
jQuery(subject).parent().effect("highlight", {'color' : '#C43C35'}, 2000);
}
});
});
},
setup_collection_counter: function(subject) {
Admin.log('[core|setup_collection_counter] setup collection counter', subject);
// Count and save element of each collection
var highestCounterRegexp = new RegExp('_([0-9]+)[^0-9]*$');
jQuery(subject).find('[data-prototype]').each(function() {
var collection = jQuery(this);
var counter = 0;
collection.children().each(function() {
var matches = highestCounterRegexp.exec(jQuery('[id^="sonata-ba-field-container"]', this).attr('id'));
if (matches && matches[1] && matches[1] > counter) {
counter = parseInt(matches[1], 10);
}
});
Admin.collectionCounters[collection.attr('id')] = counter;
});
},
setup_collection_buttons: function(subject) {
jQuery(subject).on('click', '.sonata-collection-add', function(event) {
Admin.stopEvent(event);
var container = jQuery(this).closest('[data-prototype]');
var counter = ++Admin.collectionCounters[container.attr('id')];
var proto = container.attr('data-prototype');
var protoName = container.attr('data-prototype-name') || '__name__';
// Set field id
var idRegexp = new RegExp(container.attr('id')+'_'+protoName,'g');
proto = proto.replace(idRegexp, container.attr('id')+'_'+counter);
// Set field name
var parts = container.attr('id').split('_');
var nameRegexp = new RegExp(parts[parts.length-1]+'\\]\\['+protoName,'g');
proto = proto.replace(nameRegexp, parts[parts.length-1]+']['+counter);
jQuery(proto)
.insertBefore(jQuery(this).parent())
.trigger('sonata-admin-append-form-element')
;
jQuery(this).trigger('sonata-collection-item-added');
});
jQuery(subject).on('click', '.sonata-collection-delete', function(event) {
Admin.stopEvent(event);
jQuery(this).trigger('sonata-collection-item-deleted');
jQuery(this).closest('.sonata-collection-row').remove();
jQuery(document).trigger('sonata-collection-item-deleted-successful');
});
},
setup_per_page_switcher: function(subject) {
Admin.log('[core|setup_per_page_switcher] setup page switcher', subject);
jQuery('select.per-page').change(function(event) {
jQuery('input[type=submit]').hide();
window.top.location.href=this.options[this.selectedIndex].value;
});
},
setup_form_tabs_for_errors: function(subject) {
Admin.log('[core|setup_form_tabs_for_errors] setup form tab\'s errors', subject);
// Switch to first tab with server side validation errors on page load
jQuery('form', subject).each(function() {
Admin.show_form_first_tab_with_errors(jQuery(this), '.sonata-ba-field-error');
});
// Switch to first tab with HTML5 errors on form submit
jQuery(subject)
.on('click', 'form [type="submit"]', function() {
Admin.show_form_first_tab_with_errors(jQuery(this).closest('form'), ':invalid');
})
.on('keypress', 'form [type="text"]', function(e) {
if (13 === e.which) {
Admin.show_form_first_tab_with_errors(jQuery(this), ':invalid');
}
})
;
},
show_form_first_tab_with_errors: function(form, errorSelector) {
Admin.log('[core|show_form_first_tab_with_errors] show first tab with errors', form);
var tabs = form.find('.nav-tabs a'), firstTabWithErrors;
tabs.each(function() {
var id = jQuery(this).attr('href'),
tab = jQuery(this),
icon = tab.find('.has-errors');
if (jQuery(id).find(errorSelector).length > 0) {
// Only show first tab with errors
if (!firstTabWithErrors) {
tab.tab('show');
firstTabWithErrors = tab;
}
icon.removeClass('hide');
} else {
icon.addClass('hide');
}
});
},
setup_inline_form_errors: function(subject) {
Admin.log('[core|setup_inline_form_errors] show first tab with errors', subject);
var deleteCheckboxSelector = '.sonata-ba-field-inline-table [id$="_delete"][type="checkbox"]';
jQuery(deleteCheckboxSelector, subject).each(function() {
Admin.switch_inline_form_errors(jQuery(this));
});
jQuery(subject).on('change', deleteCheckboxSelector, function() {
Admin.switch_inline_form_errors(jQuery(this));
});
},
/**
* Disable inline form errors when the row is marked for deletion
*/
switch_inline_form_errors: function(subject) {
Admin.log('[core|switch_inline_form_errors] switch_inline_form_errors', subject);
var row = subject.closest('.sonata-ba-field-inline-table'),
errors = row.find('.sonata-ba-field-error-messages')
;
if (subject.is(':checked')) {
row
.find('[required]')
.removeAttr('required')
.attr('data-required', 'required')
;
errors.hide();
} else {
row
.find('[data-required]')
.attr('required', 'required')
;
errors.show();
}
},
setup_tree_view: function(subject) {
Admin.log('[core|setup_tree_view] setup tree view', subject);
jQuery('ul.js-treeview', subject).treeView();
},
/** Return the width for simple and sortable select2 element **/
get_select2_width: function(element){
var ereg = /width:(auto|(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc)))/i;
// this code is an adaptation of select2 code (initContainerWidth function)
var style = element.attr('style');
//console.log("main style", style);
if (style !== undefined) {
var attrs = style.split(';');
for (var i = 0, l = attrs.length; i < l; i = i + 1) {
var matches = attrs[i].replace(/\s/g, '').match(ereg);
if (matches !== null && matches.length >= 1)
return matches[1];
}
}
style = element.css('width');
if (style.indexOf("%") > 0) {
return style;
}
return '100%';
},
setup_sortable_select2: function(subject, data) {
var transformedData = [];
for (var i = 0 ; i < data.length ; i++) {
transformedData[i] = {id: data[i].data, text: data[i].label};
}
subject.select2({
width: function(){
// Select2 v3 and v4 BC. If window.Select2 is defined, then the v3 is installed.
// NEXT_MAJOR: Remove Select2 v3 support.
return Admin.get_select2_width(window.Select2 ? this.element : subject);
},
dropdownAutoWidth: true,
data: transformedData,
multiple: true
});
subject.select2("container").find("ul.select2-choices").sortable({
containment: 'parent',
start: function () {
subject.select2("onSortStart");
},
update: function () {
subject.select2("onSortEnd");
}
});
// On form submit, transform value to match what is expected by server
subject.parents('form:first').submit(function (event) {
var values = subject.val().trim();
if (values !== '') {
var baseName = subject.attr('name');
values = values.split(',');
baseName = baseName.substring(0, baseName.length-1);
for (var i=0; i<values.length; i++) {
jQuery('<input>')
.attr('type', 'hidden')
.attr('name', baseName+i+']')
.val(values[i])
.appendTo(subject.parents('form:first'));
}
}
subject.remove();
});
},
setup_sticky_elements: function(subject) {
if (window.SONATA_CONFIG && window.SONATA_CONFIG.USE_STICKYFORMS) {
Admin.log('[core|setup_sticky_elements] setup sticky elements on', subject);
var topNavbar = jQuery(subject).find('.navbar-static-top');
var wrapper = jQuery(subject).find('.content-wrapper');
var navbar = jQuery(wrapper).find('nav.navbar');
var footer = jQuery(wrapper).find('.sonata-ba-form-actions');
if (navbar.length) {
new Waypoint.Sticky({
element: navbar[0],
offset: function() {
Admin.refreshNavbarStuckClass(topNavbar);
return jQuery(topNavbar).outerHeight();
},
handler: function( direction ) {
if (direction == 'up') {
jQuery(navbar).width('auto');
} else {
jQuery(navbar).width(jQuery(wrapper).outerWidth());
}
Admin.refreshNavbarStuckClass(topNavbar);
}
});
}
if (footer.length) {
new Waypoint({
element: wrapper[0],
offset: 'bottom-in-view',
handler: function(direction) {
var position = jQuery('.sonata-ba-form form > .row').outerHeight() + jQuery(footer).outerHeight() - 2;
if (position < jQuery(footer).offset().top) {
jQuery(footer).removeClass('stuck');
}
if (direction == 'up') {
jQuery(footer).addClass('stuck');
}
}
});
}
Admin.handleScroll(footer, navbar, wrapper);
}
},
handleScroll: function(footer, navbar, wrapper) {
if (footer.length && jQuery(window).scrollTop() + jQuery(window).height() != jQuery(document).height()) {
jQuery(footer).addClass('stuck');
}
jQuery(window).scroll(
Admin.debounce(function() {
if (footer.length && jQuery(window).scrollTop() + jQuery(window).height() == jQuery(document).height()) {
jQuery(footer).removeClass('stuck');
}
if (navbar.length && jQuery(window).scrollTop() === 0) {
jQuery(navbar).removeClass('stuck');
}
}, 250)
);
jQuery('body').on('expanded.pushMenu collapsed.pushMenu', function() {
setTimeout(function() {
Admin.handleResize(footer, navbar, wrapper);
}, 350); // the animation takes 0.3s to execute, so we have to take the width, just after the animation ended
});
jQuery(window).resize(
Admin.debounce(function() {
Admin.handleResize(footer, navbar, wrapper);
}, 250)
);
},
handleResize: function(footer, navbar, wrapper) {
if (navbar.length && jQuery(navbar).hasClass('stuck')) {
jQuery(navbar).width(jQuery(wrapper).outerWidth());
}
if (footer.length && jQuery(footer).hasClass('stuck')) {
jQuery(footer).width(jQuery(wrapper).outerWidth());
}
},
refreshNavbarStuckClass: function(topNavbar) {
var stuck = jQuery('#navbar-stuck');
if (!stuck.length) {
stuck = jQuery('<style id="navbar-stuck">')
.prop('type', 'text/css')
.appendTo('head')
;
}
stuck.html('body.fixed .content-header .navbar.stuck { top: ' + jQuery(topNavbar).outerHeight() + 'px; }');
},
// http://davidwalsh.name/javascript-debounce-function
debounce: function (func, wait, immediate) {
var timeout;
return function() {
var context = this,
args = arguments;
var later = function() {
timeout = null;
if (!immediate) {
func.apply(context, args);
}
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) {
func.apply(context, args);
}
};
},
setup_readmore_elements: function(subject) {
Admin.log('[core|setup_readmore_elements] setup readmore elements on', subject);
jQuery(subject).find('.sonata-readmore').each(function(i, ui){
jQuery(this).readmore({
collapsedHeight: parseInt(jQuery(this).data('readmore-height')),
moreLink: '<a href="#">'+jQuery(this).data('readmore-more')+'</a>',
lessLink: '<a href="#">'+jQuery(this).data('readmore-less')+'</a>'
});
});
},
handle_top_navbar_height: function() {
jQuery('.content-wrapper').css('padding-top', jQuery('.navbar-static-top').outerHeight());
}
};
jQuery(document).ready(function() {
Admin.handle_top_navbar_height();
});
jQuery(window).resize(function() {
Admin.handle_top_navbar_height();
});
jQuery(document).ready(function() {
jQuery('html').removeClass('no-js');
if (window.SONATA_CONFIG && window.SONATA_CONFIG.CONFIRM_EXIT) {
jQuery('.sonata-ba-form form').each(function () { jQuery(this).confirmExit(); });
}
Admin.setup_per_page_switcher(document);
Admin.setup_collection_buttons(document);
Admin.shared_setup(document);
});
jQuery(document).on('sonata-admin-append-form-element', function(e) {
Admin.setup_select2(e.target);
Admin.setup_icheck(e.target);
Admin.setup_collection_counter(e.target);
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

View File

@@ -0,0 +1,41 @@
table.sonata-ba-list th {
background-image: -moz-linear-gradient(-90deg, #f8f8f8 , #e2e2e2);
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f8f8f8), to(#e2e2e2));
}
table.sonata-ba-list tfoot td {
background-image: -moz-linear-gradient(-90deg, #f8f8f8 , #e2e2e2);
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f8f8f8), to(#e2e2e2));
border-top: 1px solid #DDD;
}
a.sonata-ba-collapsed {
color: #404040;
}
/* Form */
textarea.title {
font-size: 1em;
width: 500px;
}
input.title {
font-size: 1em;
width: 500px;
}
div.sonata-ba-field-error input{
border: 1px solid #f79992;
}
div.sonata-ba-field-error textarea{
border: 1px solid #f79992;
}
div.sonata-ba-field-error select{
border: 1px solid #f79992;
}
div.sonata-ba-field-error .field-short-description {
border: 1px solid #B94A48;
}

View File

@@ -0,0 +1,396 @@
/*body{*/
/*padding-top: 50px;*/
/*}*/
/*@media (max-width: 978px) {*/
/*body{*/
/*padding-top: 0;*/
/*}*/
/*}*/
div.border {
border: 1px solid #DDDDDD;
border-radius: 6px 6px 6px 6px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
}
div.connection {
position: absolute;
left: 50%;
top: 35%;
width: 460px;
margin: -130px 0 0 -250px;
box-shadow: 2px 2px 10px #ccc;
border: 1px solid #ddd;
border-radius: 6px;
}
div.connection .control-group {
padding: 0 20px 0 20px;
}
div.connection .alert {
margin: 0 20px 20px 20px;
}
div.connection form {
padding-top: 15px;
margin-bottom: 0;
}
div.connection form .form-actions {
margin-bottom: 0;
}
div.connection .form-actions {
padding-left: 20px;
}
div.connection div input.big {
height: 35px;
font-size: 25px;
}
.sonata-bc.sonata-ba-no-side-menu div.container-fluid > div.content {
margin-left: 0;
}
div.sonata-ba-field-inline-table input.title {
width: 100px;
}
div.sonata-ba-field-inline-table textarea.title {
width: 150px;
height: 50px;
}
h4.filter_legend table {
margin: 10px 0;
}
.table-striped tbody tr.sonata-ba-list-row-selected td, .table-striped tbody tr.sonata-ba-list-row-selected th {
background-color: #E3F7FE;
}
table.sonata-ba-list td img {
vertical-align: bottom
}
td.pager ul {
float: left;
list-style: none;
margin: 2px;
margin-left: auto;
margin-right: auto;
}
td.pager ul li {
float: left;
}
td.pager ul li a {
border: 1px solid #cccccc;
line-height: 25px;
padding: 1px 8px 1px 8px;
margin: 2px;
}
div.sonata-actions {
/*margin-top: 18px;*/
float: right
}
.sonata-ba-action.btn:not(:hover) {
background: none;
color: inherit;
}
.sonata-ba-list td.sonata-ba-list-field a.sonata-link-identifier {
font-weight: bold;
}
td.sonata-ba-list-field.sonata-ba-list-field-boolean i {
margin-right: 1ex;
}
td.sonata-ba-list-field.sonata-ba-list-field-boolean a:hover {
text-decoration: none;
}
td.sonata-ba-list-field.sonata-ba-list-field-currency,
td.sonata-ba-list-field.sonata-ba-list-field-percent,
td.sonata-ba-list-field.sonata-ba-list-field-integer {
text-align: right;
}
td.sonata-ba-list-field.sonata-ba-list-field-select {
text-align: center;
}
div.sonata-ba-modal-edit-one-to-one td.sonata-ba-list-field-batch,
div.sonata-ba-modal-edit-one-to-one div.sonata-ba-list-actions,
div.sonata-ba-modal-edit-one-to-one th.sonata-ba-list-field-header-batch {
display: none;
}
div.sonata-ba-modal-edit-one-to-one div.sonata-ba-list-actions {
display: none;
}
th.sonata-ba-list-field-header-order-desc a,
th.sonata-ba-list-field-header-order-asc a {
position: relative;
margin-right: 10px;
}
th.sonata-ba-list-field-header-order-asc a:hover:after,
th.sonata-ba-list-field-header-order-asc.sonata-ba-list-field-order-active a:after,
th.sonata-ba-list-field-header-order-desc.sonata-ba-list-field-order-active a:hover:after {
content: "";
display: block;
border-top: 4px solid black;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
border-bottom: 4px solid transparent;
position: absolute;
top: 50%;
right: -10px;
margin-top: -1px;
}
th.sonata-ba-list-field-header-order-desc a:hover:after,
th.sonata-ba-list-field-header-order-desc.sonata-ba-list-field-order-active a:after,
th.sonata-ba-list-field-header-order-asc.sonata-ba-list-field-order-active a:hover:after {
content: "";
display: block;
border-bottom: 4px solid black;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
border-top: 4px solid transparent;
position: absolute;
top: 50%;
right: -10px;
margin-top: -5px;
}
.sonata-ba-list-field-header-label-icon {
margin-right: 2px;
}
em.sonata-ba-field-help {
display: block;
color: #999;
margin-bottom: 10px;
}
fieldset legend {
padding-left: 0;
}
select.sonata-medium, textarea.sonata-medium, input.sonata-medium {
width: 400px;
}
textarea.sonata-medium {
height: 125px;
}
input[type="file"] {
height: 34px;
}
.sonata-ba-field-standard-natural .field-actions {
display: block;
margin-top: 5px;
}
.sonata-ba-field-inline-table select.sonata-medium,
.sonata-ba-field-inline-table textarea.sonata-medium,
.sonata-ba-field-inline-table input.sonata-medium {
width: 150px;
}
.sonata-ba-view-title {
font-size: 19px;
line-height: 1;
color: #404040;
*padding: 0 0 5px 0;
*line-height: 1.5;
}
.sonata-ba-view-title td, .sonata-ba-view-title th {
border: 0;
}
.sonata-ba-view-container th {
width: 130px;
}
.sonata-ba-view-container td, .sonata-ba-view-container th {
border-bottom: 0;
border-top: 1px solid #eee;
}
.sonata-ba-view-container:nth-child(2n) td, .sonata-ba-view-container:nth-child(2n) th {
background-color: #f9f9f9;
}
.sonata-ba-view-container:nth-child(2n):hover td, .sonata-ba-view-container:nth-child(2n):hover th {
background-color: #f5f5f5;
}
.sonata-ba-view-container.history-audit-compare th {
width: 10%;
}
.sonata-ba-view-container.history-audit-compare td {
width: 40%;
}
.sonata-ba-view-container.history-audit-compare th.diff {
background: pink;
}
.container-fluid > .sidebar {
top: auto;
}
.sonata-action-element.btn-group {
display: inline-block;
padding: 4px 10px 4px;
vertical-align: middle;
}
.sonata-collection-add, .sonata-collection-delete {
box-shadow: none;
}
.no-js .sonata-collection-add, .no-js .sonata-collection-delete {
display: none;
}
ul.inputs-list {
padding-left: 150px;
}
legend + .sonata-ba-collapsed-fields {
margin-top: 18px;
-webkit-margin-top-collapse: separate;
}
legend.sonata-ba-fieldset-collapsed-description + .sonata-ba-collapsed-fields {
margin-top: 0;
}
.sonata-ba-collapsed-fields > p {
margin-bottom: 18px;
}
.bordered-table tbody.ui-sortable tr {
cursor: move;
}
.sonata-ba-fieldset-collapsed legend:before {
content: '+ ';
}
.sonata-ba-collapsed-fields-close legend:before {
content: '- ';
padding-left: 5px;
}
.sonata-preview-form-container fieldset, .sonata-preview-form-container .tabbable {
display: none;
}
.pagination {
margin: 0;
}
.field-short-description {
min-width: 250px;
min-height: 18px;
display: block;
float: left;
background: #fefefe;
border: 1px solid #e9e9e9;
border-radius: 4px 4px 4px 4px;
list-style: none outside none;
margin: 0 15px 0 0;
padding: 4px 15px;
}
.inner-field-short-description {
}
.required:after {
content: '*';
}
.form-horizontal .control-group {
margin-bottom: 10px;
}
.noscript-warning {
background-color: #C70A0A;
color: #FFFFFF;
font-size: 14px;
font-weight: bold;
padding: 4px 0;
text-align: center;
width: 100%;
}
body.fixed .content-header .navbar.stuck {
position:fixed;
top:50px;
width: 100%;
margin-left: -15px;
z-index: 5;
border-radius: 0;
}
.sonata-search-result-list > li {
word-wrap: break-word;
}
.form-actions.stuck {
position:fixed;
bottom:0;
width: 100%;
margin-left: -15px;
margin-bottom: 0;
z-index: 5;
border-radius: 0;
}
@media(max-width:768px) {
body.fixed .main-header {
position: relative;
}
body.fixed .content-wrapper,
body.fixed .right-side {
padding-top: 0;
}
body.fixed .content-header .navbar.stuck {
top: 0;
position: relative;
margin: 0;
width: 100%;
}
body.fixed .main-sidebar {
position: absolute;
}
/* disable slimScroll */
body.fixed .main-sidebar .slimScrollDiv,
body.fixed .main-sidebar .sidebar {
overflow: visible !important;
height: auto !important;
}
.navbar-custom-menu > .navbar-nav > li >.dropdown-menu {
width: auto !important;
min-width: 230px; /* width of the left sidebar */
}
}

View File

@@ -0,0 +1,519 @@
/**
* SonataAdminBundle Theme based on SB Admin v2.0
* http://startbootstrap.com/templates/sb-admin-v2/
*/
html {
position: relative;
min-height: 100%;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 20px;
background-color: #333;
}
footer p {
margin: 0;
}
footer a {
color: #f6f6f6;
}
body > .header .logo {
font-family: 'Source Sans Pro', sans-serif;
}
.main-header {
height: 50px;
}
.logo img {
display: inline;
padding-bottom: 4px;
max-height: 100%;
max-width: 60px;
}
.logo span {
display: inline-block;
line-height: 1;
vertical-align: middle;
width: 200px;
}
.logo img + span { width: 140px; }
.open > .dropdown-menu {
animation-duration: .3s;
-webkit-animation-duration: .3s;
-moz-animation-duration: .3s;
}
/* Buttons */
.btn.btn-outline {
color: inherit;
background-color: transparent;
transition: all .5s;
}
.btn.btn-primary.btn-outline:hover,
.btn.btn-success.btn-outline:hover,
.btn.btn-info.btn-outline:hover,
.btn.btn-warning.btn-outline:hover,
.btn.btn-danger.btn-outline:hover {
color: #fff;
}
/* navigation */
.navbar-static-side ul li {
border-bottom: 1px solid #e7e7e7;
}
.navbar-brand {
padding-right: 20px;
}
.navbar-brand img {
height: 28px;
margin: 0;
padding: 0 5px 0 0;
vertical-align: middle;
}
.navbar-text .navbar-link {
padding: 0 10px;
}
.right-side > .content-header {
padding-bottom: 0;
}
.content-header .navbar {
margin-bottom: 0;
}
.content-header .navbar-nav.navbar-right:last-child {
margin-right: 0;
}
/* breadcrumb */
.sonata-bc .breadcrumb {
padding: 0;
margin: 0;
background: inherit;
float:left;
}
.sonata-bc .breadcrumb li a {
display: inline-block;
}
/* MEGA MENU STYLE
********************************/
.dropdown-menu.multi-column .dropdown-menu {
display: block !important;
position: static !important;
margin: 0 !important;
border: none !important;
box-shadow: none !important;
min-width:100px;
}
.dropdown-add .dropdown-menu > li > a {
white-space: normal;
overflow: hidden;
}
/* top right */
.navbar-static-top {
margin-bottom: 0;
}
.navbar-top-links > p,
.navbar-top-links > ul {
float: right;
}
.navbar-top-links li {
display: inline-block;
}
.navbar-top-links li a,
.navbar-top-links li span {
padding: 15px;
min-height: 50px;
}
.navbar-top-links li a:hover {
text-decoration: none;
}
.skin-black .navbar .breadcrumb > li > a:hover {
color: #444;
background: #f5f5f5;
}
.skin-black .navbar .dropdown-menu > li > a:hover {
background-color: #f5f5f5;
}
.navbar-top-links .dropdown-menu li {
display: block;
}
.navbar-top-links .dropdown-menu li:last-child {
margin-right: 0;
}
.navbar-top-links .dropdown-menu li a {
padding: 3px 20px;
min-height: 0;
}
.navbar-top-links .dropdown-menu li a div {
white-space: normal;
}
.navbar-top-links .dropdown-messages,
.navbar-top-links .dropdown-tasks,
.navbar-top-links .dropdown-alerts {
width: 310px;
min-width: 0;
}
.navbar-top-links .dropdown-messages {
margin-left: 5px;
}
.navbar-top-links .dropdown-tasks {
margin-left: -59px;
}
.navbar-top-links .dropdown-alerts {
margin-left: -123px;
}
.navbar-top-links .dropdown-user {
right: 0;
left: auto;
}
/* Content navbar */
body.fixed .content-header .navbar {
position: relative;
}
/* sidebar menu styles */
.sidebar-search {
padding: 15px;
}
.sidebar-menu li.keep-open > .treeview-menu {
display: block !important;
height: auto !important;
}
.arrow {
float: right;
}
.fa.arrow:before {
content: "\f104";
}
.active > a > .fa.arrow:before {
content: "\f107";
}
.nav-second-level li,
.nav-third-level li {
border-bottom: none !important;
}
.nav-second-level li a {
padding-left: 37px;
}
.nav-third-level li a {
padding-left: 52px;
}
@media(min-width:768px) {
.navbar-static-side {
z-index: 1;
position: absolute;
width: 250px;
}
.navbar-top-links .dropdown-messages,
.navbar-top-links .dropdown-tasks,
.navbar-top-links .dropdown-alerts {
margin-left: auto;
}
}
/* Admin table */
table.sonata-ba-list {
font-size: 14px;
}
table.sonata-ba-list img {
max-width: 100%;
height: auto;
}
table.sonata-ba-list td {
overflow: auto;
}
td.sonata-ba-list-label {
color: #565656;
font-weight: bold;
text-align: right;
vertical-align: middle !important;
}
/* side filter */
.box .box-header h4.box-title.filter_legend {
position: relative;
padding-left: 20px;
cursor: pointer;
}
h4.filter_legend:before {
content: "";
display: block;
width: 0;
height: 0;
border-top: 4px solid black;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
position: absolute;
top: 50%;
left: 2px;
margin-top: -2px;
margin-left: 5px;
}
h4.filter_legend.active,
tr.filter.active * {
font-weight: bold;
color: #000;
}
form.sonata-filter-form.form-stacked {
padding-left: 0;
}
body.fixed .sonata-list-table {
position: relative;
margin-left: 15px;
margin-right: 15px;
margin-bottom: 5px;
}
.navbar-nav.navbar-right:last-child {
margin-right: 0;
}
/* Overrides */
/* x-editable */
td.sonata-ba-list-field .editable {
cursor: pointer;
}
td.sonata-ba-list-field .btn.editable {
border-bottom: solid 1px #BBB;
}
td.sonata-ba-list-field .editable-empty:not(.editable-open) {
display: none;
}
.sonata-ba-list tr:hover .editable-empty {
display: inline-block;
}
.editable-pre-wrapped {
white-space: normal;
}
.editable-container .prev:before {
content: "\2190 ";
}
.editable-container .next:before {
content: "\2192 ";
}
/* bootstrap */
.input-group-addon {
width: auto; /* See https://github.com/sonata-project/SonataAdminBundle/issues/2950 */
}
/**
* Make checkbox / radio label consistant with other labels
*/
.checkbox label,
.radio label {
font-weight: 700;
margin-left: -20px;
}
/**
* The iCheck checkboxes & radios have 0 margin by default,
* add some space for the label text.
*/
.checkbox div[class^="icheckbox"],
.checkbox-inline div[class^="icheckbox"],
.radio div[class^="iradio"],
.radio-inline div[class^="iradio"] {
position: relative;
margin-top: 4px \9;
margin-right: 5px;
margin-top: -3px;
}
.form-inline .checkbox div[class^="icheckbox"],
.form-inline .checkbox-inline div[class^="icheckbox"],
.form-inline .radio div[class^="iradio"],
.form-inline .radio-inline div[class^="iradio"] {
position: relative;
margin-top: 4px \9;
margin-left: 0;
margin-right: 5px;
margin-top: -3px;
}
/* Hide Delete checkbox on sonata_type_collection tables */
.sonata-ba-field-inline-table td > div.checkbox > label > .control-label__text {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
border: 0;
}
/* select2 */
.select2-choice, .select2-choices, .select2-drop {
border-radius: 0 !important;
}
/* Used for the mosaic view */
td > div.row {
padding: 0;
margin: 0;
}
div.mosaic-box {
padding: 2px;
border-radius: 3px;
}
div.mosaic-inner-box {
position: relative;
}
div.mosaic-inner-box-hover {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 4px 4px 0 0;
background-color: rgba(255, 255, 255, .8);
transition: .25s opacity;
padding: 5px 10px;
}
div.mosaic-inner-box:hover > div.mosaic-inner-box-hover {
opacity: 1;
}
div.mosaic-inner-box > div.mosaic-inner-box-hover {
opacity: 0;
}
div.mosaic-inner-box img {
width: 100%;
height: auto;
border-radius: 4px 4px 0 0;
}
div.mosaic-box-outter {
background-size: 100% auto;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #fff;
}
div.mosaic-inner-box {
height: 100px;
border-bottom: none;
overflow: hidden;
}
div.mosaic-inner-text {
background: white;
border-top: none;
padding: 3px;
border-radius: 0 0 5px 5px;
z-index: 2;
position: relative;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.mosaic-inner-link {
vertical-align: middle;
}
.mosaic-box-label {
position: absolute;
top: 10px;
right: 10px;
}
div.mosaic-box.sonata-ba-list-row-selected > div.mosaic-inner-box {
border: 1px solid #333;
border-bottom: none;
}
div.mosaic-box.sonata-ba-list-row-selected > div.mosaic-inner-text {
border: 1px solid #333;
border-top: none;
}
div.sonata-filters-box div.form-group div.form-group {
margin: 0;
}
div.sonata-filters-box div.form-group span.input-group-addon {
padding: 3px 10px;
font-size: 13px;
}
.sonata-search-result-hide {
display: none;
}
.sonata-search-result-fade {
opacity: 0.6;
}
.sonata-search-result-show {
display: block;
}

View File

@@ -0,0 +1,134 @@
/********************************************************************\
Page tree
\********************************************************************/
.sonata-tree {
list-style: none;
padding-left: 0;
margin-left: 15px;
margin-right: 15px;
overflow: hidden;
padding-bottom: 10px;
}
.sonata-tree ul {
list-style: none;
padding-left: 30px;
}
.sonata-tree__item {
display: block;
padding: 7px 15px 7px 7px;
border: 1px solid #ddd;
border-radius: 2px;
position: relative;
margin-bottom: 5px;
margin-right: 10px;
color: #444;
background: #fff;
}
.sonata-tree__item .label {
font-size: 12px;
margin-top: 2px;
border-radius: 2px;
}
.sonata-tree__item .label-warning {
margin-right: 5px;
}
.sonata-tree__item .fa-caret-right {
position: absolute;
top: 10px;
left: -20px;
color: #3c8dbc;
}
.sonata-tree__item:hover {
background: #eee;
color: #000;
}
.sonata-tree__item__is-hybrid {
margin-right: 5px;
}
.sonata-tree__item.is-active {
border: 1px solid #3c8dbc;
}
.sonata-tree__item.is-active:after,
.sonata-tree__item.is-active:before {
left: 100%;
top: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.sonata-tree__item.is-active:after {
border-color: rgba(255, 255, 255, 0);
border-left-color: #fff;
border-width: 8px;
margin-top: -8px;
}
.sonata-tree__item.is-active:before {
border-color: rgba(255, 255, 255, 0);
border-left-color: #3c8dbc;
border-width: 9px;
margin-top: -9px;
}
.sonata-tree__item.is-active:hover:after {
border-left-color: #eee;
}
.sonata-tree__item.is-toggled .fa-caret-right {
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
.sonata-tree__item__edit {
font-weight: bold;
}
.sonata-tree__item__edit:hover {
text-decoration: underline;
}
/**
* Toggleable tree
*/
.sonata-tree--toggleable li > ul {
display: none;
}
.sonata-tree--toggleable .sonata-tree__item {
margin-left: 20px;
}
.sonata-tree--toggleable .sonata-tree__item .fa-caret-right {
cursor: pointer;
}
.sonata-tree--toggleable .sonata-tree__item:last-child .fa-caret-right {
display: none;
}
.sonata-tree--toggleable .sonata-tree__item .fa-caret-right:after {
content: '';
position: absolute;
top: -5px;
bottom: -5px;
left: -10px;
right: -10px;
}
/**
* Smaller tree
*/
.sonata-tree--small {
margin-left: 0;
}
.sonata-tree--small .sonata-tree__item__edit {
font-size: 12px;
}
.sonata-tree--small .sonata-tree__item {
padding: 3px 15px 4px 5px;
}
.sonata-tree--small .sonata-tree__item .fa-caret-right {
top: 7px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Some files were not shown because too many files have changed in this diff Show More