Merge pull request #2608 from aynsix/PHRAS-2057-porting-ordre-collection

PHRAS-2057 port to 4.1 admin/ordre des collections
This commit is contained in:
Nicolas Maillat
2018-05-24 18:23:01 +02:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

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

View File

@@ -22,10 +22,10 @@
<table>
<tr>
<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"
name="bases[]" value="{{collection["base_id"]}}" {% if collection["selected"] %}checked="checked"{% endif %} />
id="ck_{{base_id}}_{{unique_id}}" type="checkbox"
name="bases[]" value="{{base_id}}" {% if collection["selected"] %}checked="checked"{% endif %} />
</td>
<td>
<label style="line-height: 18px;"