// Seperate js to force codemirror for reports in frontend. No Form needed with this.
$(document).ready(function(){
varexternWindow=$(".externWindow");
vartargetEditReportButton=$(".targetEditReport");
varhtmlContent=$('');
// select all edit buttons from content records and remove onclick attribute to prevent showing content in primary window if clicked. onclick attribute is not removed in php to have the opportunity for old way of editing in front end.
if(targetEditReportButton!==undefined){
for(vari=0;targetEditReportButton.length>i;i++){
varcurrentTarget=targetEditReportButton[i];
$(currentTarget).removeAttr("onclick");
}
}
// We prepare the content for extern window and show it. Only if onclick doesn't exist. Compatibility for old way is given this way.
// Show same content editor with refreshed data again after save. Control it with the given get parameter. First fetch only needed html content again (form) and open it in same window.
/* all anchors in form-group divs can only be created by users using #!report in forms. These anchors without a target href (#) like some elements which use js functions (example datetimepicker) dont need to be marked as required.*/