PropertyController.prototype.removeProperty = function()

in src/main/resources/SLING-INF/libs/sling/resource-editor/static/js/properties/PropertyController.js [119:145]


	PropertyController.prototype.removeProperty = function(key, row){
		var thisPropertyController = this;
		var confirmationMsg = "You are about to delete the property with the key '"+key+"'. Are you sure?";
		bootbox.confirm(confirmationMsg, function(result) {
			if (result){
				var data = {};
				data[key+"@Delete"] = "";
				$.ajax({
			  	  type: 'POST',
				  url: location.href,
				  dataType: "json",
			  	  data: data
			  	})
				.done(function() {
					row.remove();
					$.notify({
						message: 'Property \''+key+'\' deleted.' 
					},{
						type: 'success'
					});
				})
				.fail(function(errorJson) {
					thisPropertyController.mainController.displayAlert(errorJson);
				});
			}
		});
	};