}; <?php if ($idItem) { $related = json_decode($dataItem['related']); if ($related) { foreach ($related as $d) { $d = (array) $d; ?> createItem('<?php echo process_js_text($d['type']); ?> ','<?php echo process_js_text($d['id']); ?> ','<?php echo process_js_text($d['text']); ?> '); <?php } ?> <?php } ?> <?php } ?> var datepickerItem = $('.form-calendar.form-post-date', formGlobal); datepickerItem.datepicker({ defaultDate: "-1w",
$d = (array) $d; ?> cItem = cloneItem(); $('.form-post-title', cItem).val('<?php echo process_js_text($d['title']); ?> '); $('.form-post-text', cItem).val('<?php echo process_js_text($d['text']); ?> '); <?php if (isset($d['link'])) { ?> $('.form-post-link', cItem).val('<?php echo process_js_text($d['link']); ?> '); <?php } ?> <?php } ?> <?php } ?> <?php } ?>