Skip to content

Commit

Permalink
Merge pull request #155 from ksn135/master
Browse files Browse the repository at this point in the history
automatically eval dynamically added widget's script
  • Loading branch information
rozwell committed May 13, 2013
2 parents 644e663 + 027c5e6 commit b5f5fe6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/widget/sfWidgetFormSchemaOptional.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ function add{$strippedName}Widget()
var spanTag = document.createElement(\"span\");
spanTag.innerHTML = content.replace(/([_\[]){$strippedName}([_\]])/g, '\$1{$strippedName}' + + added{$strippedName} + '\$2');
document.getElementById('add_{$strippedName}').appendChild(spanTag);
var scripts = spanTag.getElementsByTagName('script');
for (var i in scripts) eval(scripts[i].text);
document.getElementById('add_{$strippedName}').style.display='block';";
if ($this->getOption('max_additions') > 0) {
$decorator .= "
Expand Down

0 comments on commit b5f5fe6

Please sign in to comment.