YadaWeb/src/main/resources/net/yadaframework/views/yada/js/yada.ajax.js
/**
	 * 
	 * @param $element the link or the form
	 * @returns true if "data-yadaDeleteOnSuccess" was present
	 */
@param $element the link or the form
@returns true if "data-yadaDeleteOnSuccess" was present
@param $element the link or the form @returns true if " data - yadaDeleteOnSuccess " was present
function deleteOnSuccess($element) {
		var deleteSelector = $element.attr("data-yadaDeleteOnSuccess");
		if (deleteSelector != null) {
			var selectors = deleteSelector.split(',');
			for (var count=0; count<selectors.length; count++) {
				var selector = selectors[count];
				yada.extendedSelect($element, selector).remove();
			}
			return true;
		}
		return false;
	}
function deleteOnSuccess ( $element ) { var deleteSelector = $element . attr ( "data-yadaDeleteOnSuccess" ) ; if ( deleteSelector != null ) { var selectors = deleteSelector . split ( ',' ) ; for ( var count = 0 ; count < selectors . length ; count ++ ) { var selector = selectors [ count ] ; yada . extendedSelect ( $element , selector ) . remove ( ) ; } return true ; } return false ; }
@param $element the link or the form
 @returns true if "data-yadaDeleteOnSuccess" was present
@param $element the link or the form @returns true if " data - yadaDeleteOnSuccess " was present
// Delete a (parent) element
 // The target can be a parent when the css selector starts with parentSelector (currently "yadaParents:").
 // The selector can be multiple, separated by comma. 
 //				if (selector=="") {
 //					$element.remove();
 //				} else {
 //					var fromParents = yada.startsWith(selector, parentSelector); // yadaParents:
 //					var fromSiblings = yada.startsWith(selector, siblingSelector); // yadaSiblings:
 //					var fromClosestFind = yada.startsWith(selector, closestFindSelector); // yadaClosestFind:
 //					if (fromParents==false && fromSiblings==false && fromClosestFind==false) {
 //						$(selector).remove();
 //					} else if (fromParents) {
 //						selector = selector.replace(parentSelector, "").trim();
 //						$element.parent().closest(selector).remove();
 //					} else if (fromSiblings) {
 //						selector = selector.replace(siblingSelector, "").trim();
 //						$element.siblings(selector).remove();
 //					} else if (fromClosestFind) {
 //						selector = selector.replace(closestFindSelector, "").trim();
 //						var splitSelector = selector.split(" ", 2);
 //						$element.closest(splitSelector[0]).find(splitSelector[1]).remove();
 //					}
 //				}
