Updating MediaGallery field editor to use "on" (delegated version) instead of the depracated "live".

--HG--
branch : 1.x
This commit is contained in:
Sipke Schoorstra
2013-04-18 10:40:12 +02:00
parent 39ade962ea
commit ca79db0072

View File

@@ -103,7 +103,7 @@
});
// editing an item
$(".media-gallery-edit").live("click", function() {
$(".items.media-gallery").on("click", ".media-gallery-edit", function() {
var img = extractModel($(this).parent());
if (img.Url && img.Url.length > 2 && img.Url.substr(0, 2) == "~/") {
img.Url = '@Url.Content("~/")' + img.Url.substr(2);
@@ -144,7 +144,7 @@
});
});
$('#media-gallery-@descriminator .media-gallery-remove').live("click", function() {
$('#media-gallery-@descriminator').on("click", ".media-gallery-remove", function() {
$(this).closest('tr').remove();
refreshIds();
$('#save-message-@descriminator').show();