mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Fix #1667 Admin tree is not reloaded when empty action is triggered
This commit is contained in:
@@ -108,8 +108,6 @@ class Root implements ControllerProviderInterface
|
|||||||
return $app->redirectPath('logout');
|
return $app->redirectPath('logout');
|
||||||
}
|
}
|
||||||
|
|
||||||
$section = $request->query->get('section', false);
|
|
||||||
|
|
||||||
$available = array(
|
$available = array(
|
||||||
'connected',
|
'connected',
|
||||||
'registrations',
|
'registrations',
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form style="display:inline; margin:0;" method="post" action="{{ path('admin_collection_empty', { 'bas_id' : bas_id }) }}">
|
<form style="display:inline; margin:0;" method="post" action="{{ path('admin_collection_empty', { 'bas_id' : bas_id }) }}">
|
||||||
<button type="button" class="btn confirm submiter" data-confirm-msg="{% trans 'admin::base:collection: etes vous sur de vider la collection ?' %}">
|
<button type="button" class="btn confirm submiter reload" data-confirm-msg="{% trans 'admin::base:collection: etes vous sur de vider la collection ?' %}">
|
||||||
<img src="/skins/icons/trash.png" />
|
<img src="/skins/icons/trash.png" />
|
||||||
{% trans 'admin::base:collection: vider la collection' %}
|
{% trans 'admin::base:collection: vider la collection' %}
|
||||||
</button>
|
</button>
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
success: function(datas) {
|
success: function(datas) {
|
||||||
if(datas.success) {
|
if(datas.success) {
|
||||||
if(submitLink.hasClass('reload')) {
|
if(submitLink.hasClass('reload')) {
|
||||||
reloadTree('base:{{ collection.get_sbas_id() }}', true);
|
reloadTree('collection:{{ collection.get_base_id() }}', true);
|
||||||
} else if(submitLink.hasClass('reload-tree')) {
|
} else if(submitLink.hasClass('reload-tree')) {
|
||||||
reloadTree('bases:bases', true);
|
reloadTree('bases:bases', true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form style="display:inline;" method="post" action="{{ path('admin_database_empty', {'databox_id': databox.get_sbas_id()}) }}">
|
<form style="display:inline;" method="post" action="{{ path('admin_database_empty', {'databox_id': databox.get_sbas_id()}) }}">
|
||||||
<button type="button" class="btn submiter confirm" data-confirm-msg="{% trans 'admin::base: Confirmer le vidage complet de la base' %}">
|
<button type="button" class="btn submiter confirm reload" data-confirm-msg="{% trans 'admin::base: Confirmer le vidage complet de la base' %}">
|
||||||
<img src="/skins/icons/trash.png" />
|
<img src="/skins/icons/trash.png" />
|
||||||
{% trans "admin::base: vider la base" %}
|
{% trans "admin::base: vider la base" %}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -150,8 +150,8 @@
|
|||||||
});
|
});
|
||||||
if(click === true)
|
if(click === true)
|
||||||
{
|
{
|
||||||
if($('#tree li.selected').length > 0)
|
if($('#tree .selected').length > 0)
|
||||||
$('#tree li.selected a').trigger('click');
|
$('#tree .selected a').trigger('click');
|
||||||
else
|
else
|
||||||
$('.zone_online_users').trigger('click');
|
$('.zone_online_users').trigger('click');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,8 +163,14 @@
|
|||||||
or collection.get_base_id() in app['authentication'].getUser().ACL.get_granted_base(['manage'])|keys
|
or collection.get_base_id() in app['authentication'].getUser().ACL.get_granted_base(['manage'])|keys
|
||||||
or collection.get_base_id() in app['authentication'].getUser().ACL.get_granted_base(['modify_struct'])|keys) %}
|
or collection.get_base_id() in app['authentication'].getUser().ACL.get_granted_base(['modify_struct'])|keys) %}
|
||||||
|
|
||||||
|
{% if feature == 'collection' and featured == collection.get_base_id() %}
|
||||||
|
{% set coll_selected = true %}
|
||||||
|
{% else %}
|
||||||
|
{% set coll_selected = false %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<div style="padding:0 0 2px 0;">
|
<div style="padding:0 0 2px 0;" {% if coll_selected %}class="selected"{% endif %}>
|
||||||
<a target="right" href="{{ path('admin_display_collection', { 'bas_id' : collection.get_base_id() }) }}" class="ajax">
|
<a target="right" href="{{ path('admin_display_collection', { 'bas_id' : collection.get_base_id() }) }}" class="ajax">
|
||||||
<span>{{ collection.get_name() }}</span>
|
<span>{{ collection.get_name() }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user