mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +03:00
Remove js with group delete comfirm from style files
This commit is contained in:
parent
01e2d8f2a7
commit
ed6252bb38
@ -18,12 +18,10 @@
|
||||
|
||||
(function(Mibew, $) {
|
||||
$(document).ready(function(){
|
||||
$('a.removelink').click(function(){
|
||||
var groupName = $.trim($("#t" + this.id).text());
|
||||
|
||||
$('a.remove-link').click(function(){
|
||||
return confirm(Mibew.Localization.trans(
|
||||
'Are you sure that you want to delete the group "{0}"?',
|
||||
groupName
|
||||
$(this).data('group-name')
|
||||
));
|
||||
});
|
||||
});
|
@ -82,6 +82,8 @@ class ManagementController extends AbstractController
|
||||
$page['menuid'] = 'groups';
|
||||
$page = array_merge($page, prepare_menu($operator));
|
||||
|
||||
$this->getAssetManager()->attachJs('js/compiled/groups.js');
|
||||
|
||||
return $this->render('groups', $page);
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,6 @@
|
||||
{{#extends "_layout"}}
|
||||
{{#override "menu"}}{{> _menu}}{{/override}}
|
||||
|
||||
{{#override "head"}}
|
||||
<script type="text/javascript" src="{{asset "@CurrentStyle/js/groups.js"}}"></script>
|
||||
{{/override}}
|
||||
|
||||
{{#override "content"}}
|
||||
{{l10n "This page displays a list of groups. Each group can have separate button and canned responses."}}
|
||||
|
||||
@ -76,7 +72,7 @@
|
||||
{{#each groups}}
|
||||
<tr>
|
||||
<td class="notlast level{{level}}">
|
||||
<a href="{{route "group_edit" group_id=groupid}}" id="ti{{groupid}}" class="man">
|
||||
<a href="{{route "group_edit" group_id=groupid}}" class="man">
|
||||
{{vclocalname}}
|
||||
</a>
|
||||
</td>
|
||||
@ -113,7 +109,7 @@
|
||||
|
||||
{{#if ../canmodify}}
|
||||
<td>
|
||||
<a href="{{csrfProtectedRoute "group_delete" group_id=groupid}}" id="i{{groupid}}" class="removelink">
|
||||
<a href="{{csrfProtectedRoute "group_delete" group_id=groupid}}" class="remove-link" data-group-name="{{vclocalname}}">
|
||||
{{l10n "remove"}}
|
||||
</a>
|
||||
</td>
|
||||
|
Loading…
Reference in New Issue
Block a user