New UI changes(tags, categories, authorisations, module index…)
To run: - ruby lib/remove_old_tags.rb DB_NAME - rake new_ui:migrate_tags - rake new_ui:migrate_categories['APP_KEY,''MODEL_NAME'] (check new_ui.rake for more details)
This commit is contained in:
1 parent
07b3857465
commit
856898016b
1495 files changed
+52132
-9876
No files matched your search
@@ -0,0 +1,49 @@
|
||||
$(document).ready(function() {
|
||||
$(".select_user_modal").on('click', function(){
|
||||
var ids = [];
|
||||
var users = $('.selected_user');
|
||||
users.each(function(i) {
|
||||
ids.push(users.eq(i).attr('id'));
|
||||
});
|
||||
$("#main-wrap").after("<span id='select_user'></span>");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: $(this).attr("rel"),
|
||||
dataType: 'script',
|
||||
data: {ids: ids},
|
||||
success: function (msg) {
|
||||
$("#member-filter").modal('show'); },
|
||||
error: function(){
|
||||
// TODO: i18n in javascript
|
||||
alert("ERROR");
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$("#remove_users").on('click', function(){
|
||||
var ids = [];
|
||||
var users = $('.selected_user input[type="checkbox"]:checked');
|
||||
users.each(function(i) {
|
||||
ids.push(users.eq(i).parent().attr('id'));
|
||||
});
|
||||
if (users.size() > 0) {
|
||||
// TODO: i18n in javascript
|
||||
if (confirm('Are you sure you want to delete this?')) {
|
||||
$.ajax({
|
||||
type: 'DELETE',
|
||||
url: $(this).attr("rel"),
|
||||
dataType: 'script',
|
||||
data: {ids: ids},
|
||||
error: function(){
|
||||
// TODO: i18n in javascript
|
||||
alert("ERROR");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
// TODO: i18n in javascript
|
||||
alert('You did not select anything to delete')
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user