Add if/else brackets
This commit is contained in:
parent
01ec1ff00b
commit
407fad5410
|
@ -28,20 +28,23 @@ $(document).ready(function() {
|
||||||
|
|
||||||
new_content = new_content.replace(regexp_underscord, newcontent_underscord);
|
new_content = new_content.replace(regexp_underscord, newcontent_underscord);
|
||||||
|
|
||||||
if (insertionNode)
|
if (insertionNode){
|
||||||
insertionNode = $(insertionNode);
|
insertionNode = $(insertionNode);
|
||||||
else
|
} else {
|
||||||
insertionNode = $(this).parent();
|
insertionNode = $(this).parent();
|
||||||
|
}
|
||||||
|
|
||||||
var contentNode = $(new_content);
|
var contentNode = $(new_content);
|
||||||
|
|
||||||
if (insertionPosition == 'after')
|
if (insertionPosition == 'after'){
|
||||||
insertionNode.after(contentNode);
|
insertionNode.after(contentNode);
|
||||||
else
|
} else {
|
||||||
insertionNode.before(contentNode);
|
insertionNode.before(contentNode);
|
||||||
|
}
|
||||||
if (insertionCallback)
|
|
||||||
|
if (insertionCallback){
|
||||||
insertionCallback.call(contentNode);
|
insertionCallback.call(contentNode);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.remove_fields.dynamic').live('click', function(e) {
|
$('.remove_fields.dynamic').live('click', function(e) {
|
||||||
|
|
Loading…
Reference in New Issue