/**
  * Determines and sets several script calls to a JSON array, that would have been executed if processed in non-AJAX mode.
  *
  * @param	array		&$jsonArray: Reference of the array to be used for JSON
  * @param	array		$config: The configuration of the IRRE field of the parent record
  * @return	void
  */
 protected function getCommonScriptCalls(&$jsonArray, $config)
 {
     // Add data that would have been added at the top of a regular TCEforms call:
     if ($headTags = $this->getHeadTags()) {
         $jsonArray['headData'] = $headTags;
     }
     // Add the JavaScript data that would have been added at the bottom of a regular TCEforms call:
     $jsonArray['scriptCall'][] = $this->fObj->JSbottom($this->fObj->formName, true);
     // If script.aculo.us Sortable is used, update the Observer to know the record:
     if ($config['appearance']['useSortable']) {
         $jsonArray['scriptCall'][] = "inline.createDragAndDropSorting('" . $this->inlineNames['object'] . "_records');";
     }
     // if TCEforms has some JavaScript code to be executed, just do it
     if ($this->fObj->extJSCODE) {
         $jsonArray['scriptCall'][] = $this->fObj->extJSCODE;
     }
 }