Commit e0422f49 authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Re-expand placeholders upon removal of line.

parent 8c6ae374
......@@ -53,7 +53,11 @@ var QfqNS = QfqNS || {};
};
n.removeFields = function (target) {
$(target).closest('.qfq-line').remove();
var $line = $(target).closest('.qfq-line');
var $container = $line.parent();
$line.remove();
n.reExpandLineByLine($container);
};
/**
......@@ -107,4 +111,15 @@ var QfqNS = QfqNS || {};
n.replacePlaceholder = function (haystack, by) {
return haystack.replace(/%d/g, by);
};
/**
* @private
* @param $container
*/
n.reExpandLineByLine = function ($container) {
$container.children().each(function (index) {
var $element = $(this);
n.expandRetainedPlaceholders($element, index);
});
};
})(QfqNS);
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment