Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
e0422f49
Commit
e0422f49
authored
Feb 15, 2017
by
Rafael Ostertag
Browse files
Re-expand placeholders upon removal of line.
parent
8c6ae374
Changes
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/FieldTemplate.js
View file @
e0422f49
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment