port to 4.1 admin/ordre des collections

This commit is contained in:
aina-esokia
2018-05-24 16:06:15 +04:00
parent 50feb78c12
commit eab0bd22e5
2 changed files with 5 additions and 5 deletions

View File

@@ -47,7 +47,7 @@
$(document).ready(function(){ $(document).ready(function(){
var offsets = [ var offsets = [
{% for collection in collections|sort_collections %} {% for collection in collections|sort_collections %}
{% if not loop.first %},{% endif %} {{ collection.get_ord() }} {% if not loop.first %},{% endif %} {{ loop.index }}
{% endfor %} {% endfor %}
]; ];
var select = $("#coll-order"); var select = $("#coll-order");
@@ -91,7 +91,7 @@
data: {order: order}, data: {order: order},
url: '{{ path('admin_database_submit_collections_order', {'databox_id': app['request'].attributes.get('databox_id')}) }}', url: '{{ path('admin_database_submit_collections_order', {'databox_id': app['request'].attributes.get('databox_id')}) }}',
beforeSend : function() { beforeSend : function() {
$this.prop('disabled',true) $this.prop('disabled',true);
}, },
success : function(datas) { success : function(datas) {
var html = _.template($("#alert_"+ (datas.success ? "success" : "error") +"_tpl").html(), { var html = _.template($("#alert_"+ (datas.success ? "success" : "error") +"_tpl").html(), {

View File

@@ -22,10 +22,10 @@
<table> <table>
<tr> <tr>
<td> <td>
<input class="ck_{{collection["base_id"]}} checkbas check-filters" style="*margin-top:-18px;" data-save="true" <input class="ck_{{base_id}} checkbas check-filters" style="*margin-top:-18px;" data-save="true"
id="ck_{{collection["base_id"]}}_{{unique_id}}" type="checkbox" id="ck_{{base_id}}_{{unique_id}}" type="checkbox"
name="bases[]" value="{{collection["base_id"]}}" {% if collection["selected"] %}checked="checked"{% endif %} /> name="bases[]" value="{{base_id}}" {% if collection["selected"] %}checked="checked"{% endif %} />
</td> </td>
<td> <td>
<label style="line-height: 18px;" <label style="line-height: 18px;"