mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
Add option to apply template to Twig templates
This commit is contained in:
@@ -168,8 +168,9 @@ $(document).ready(function(){
|
||||
}
|
||||
if($(this).hasClass('last'))
|
||||
{
|
||||
offset_start = Math.floor(parseInt($('input[name=total_results]').val()) / perPage);
|
||||
offset_start = (Math.floor(parseInt($('input[name=total_results]').val()) / perPage))* perPage;
|
||||
}
|
||||
|
||||
$('input[name="offset_start"]', form).val(offset_start);
|
||||
});
|
||||
|
||||
@@ -261,6 +262,39 @@ $(document).ready(function(){
|
||||
evt.cancelBubble = true;
|
||||
evt.preventDefault();
|
||||
});
|
||||
|
||||
$('#users_apply_template').live('submit', function(){
|
||||
var users = p4.users.sel.join(';');
|
||||
if(users === '')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var $this = $(this);
|
||||
var template = $('select[name="template_chooser"]', $this).val();
|
||||
|
||||
if(template === '')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#right-ajax').empty().addClass('loading');
|
||||
p4.users.sel = [];
|
||||
|
||||
$.ajax({
|
||||
type: $this.attr('method'),
|
||||
url: $this.attr('action'),
|
||||
data: {
|
||||
users : users,
|
||||
template : template
|
||||
},
|
||||
success: function(data){
|
||||
$('#right-ajax').removeClass('loading').html(data);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#users_page_form .user_modifier').live('click', function(){
|
||||
var users = p4.users.sel.join(';');
|
||||
if(users === '')
|
||||
|
Reference in New Issue
Block a user