Skip to content

Instantly share code, notes, and snippets.

@jblac
Last active December 12, 2015 04:48
Show Gist options
  • Save jblac/4716802 to your computer and use it in GitHub Desktop.
Save jblac/4716802 to your computer and use it in GitHub Desktop.
Twig_Error_Runtime: Variable "_theDate" does not exist in "EcsCrmBundle:Reports/PostDateReports:PostDatesOverview.html.twig" at line 44
{% block content %}
<script type="text/javascript">
$(document).ready(function(){
var lastOpenRow = null;
$(".linkDetails").live("click", function(e) {
var _this = $(this);
var _repId = _this.attr("data-repid");
var _detailsRow = $("#detailsRow"+_repId);
var _theDate = _this.parent().prev().html();
if (lastOpenRow == _detailsRow) {
lastOpenRow.hide();
return false;
} else if (lastOpenRow != null) { lastOpenRow.hide(); }
var url = '{{ url("report_postdate_details_ajax", { "date" : _theDate, "companyId" : _repId}) }}';
$.get(url, function(resp) {
lastOpenRow = _detailsRow;
tableRow.show();
tableRow.find("td:last-child").html(resp);
});
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment