From 26673d3ada9e0be42e35a802cb2952ba133dc2a5 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Sun, 26 Jan 2014 17:55:51 -0500 Subject: [PATCH] delegated events in admin categories --- public/src/forum/admin/categories.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/src/forum/admin/categories.js b/public/src/forum/admin/categories.js index 327e29968f..6142cafb24 100644 --- a/public/src/forum/admin/categories.js +++ b/public/src/forum/admin/categories.js @@ -178,13 +178,13 @@ define(['uploader'], function(uploader) { }); // Permissions modal - $('.permissions').on('click', function() { + $('.admin-categories').on('click', '.permissions', function() { var cid = $(this).parents('li[data-cid]').attr('data-cid'); Categories.launchPermissionsModal(cid); }); - $('.upload-button').on('click', function() { + $('.admin-categories').on('click', '.upload-button', function() { var inputEl = this; var cid = $(this).parents('li[data-cid]').attr('data-cid'); uploader.open(RELATIVE_PATH + '/admin/category/uploadpicture', {cid:cid}, function(imageUrlOnServer) { @@ -196,7 +196,7 @@ define(['uploader'], function(uploader) { }); }); - $('.admin-categories').delegate('.delete-image', 'click', function() { + $('.admin-categories').on('click', '.delete-image', function() { var parent = $(this).parents('li[data-cid]'), inputEl = parent.find('.upload-button'), preview = parent.find('.preview-box'),