function _initJavascriptActions() { $this->HTMLEditorSetup(); $header =& AMP_getHeader(); $this->_initAutoLookups($header); $this->_initPhotoLookup($header); }
function AMP_Content_Stylesheet_Form() { $name = 'css_edit_form'; $this->init($name, 'POST', 'stylesheet.php'); $header =& AMP_getHeader(); $header->addJavaScript('scripts/picker.js', 'color_picker'); }
function cache_output() { $this->_cache =& AMP_get_cache(); $this->_header =& AMP_getHeader(); $this->_header->addJavaScript('scripts/folder_tree/tree.js', 'section_menu_tree'); $this->_header->addJavaScript('scripts/folder_tree/tree_tpl.js', 'section_menu_tree_tpl'); return $this->cache_js(); }
function _initJavascriptActions() { $header =& AMP_getHeader(); $this->_initTabDisplay($header); $this->_initAutoLookups($header); $this->_initMediaThumbnailLookup($header); $this->_initTransferMode($header); $this->_initPhotoLookup($header); $this->_initPhotoSearch($header); $this->_initPrettyUrlCreation($header); $this->HTMLEditorSetup(); }
function _initCopier() { require_once 'AMP/Form/ElementCopierScript.inc.php'; $this->_getValueSet('navid'); $this->_getValueSet('position'); $copier_fields = array('navid' => $this->getField('navid'), 'position' => $this->getField('position')); $this->_copier =& ElementCopierScript::instance(); $this->_copier->addCopier($this->copier_name, $copier_fields, $this->_form_name); if (!empty($_POST)) { $this->_copier->addSets($this->copier_name, $_POST); } $this->addFields($this->_copier->getAddButton($this->copier_name)); $header =& AMP_getHeader(); $header->addJavascriptDynamic($this->_copier->output(), 'copier'); }
function init($fields = null) { if (!defined('AMP_TEXT_FORM_ELEMENT_COPIER_ADD_BUTTON')) { define('AMP_TEXT_FORM_ELEMENT_COPIER_ADD_BUTTON', 'Add New Item'); } if (!defined('AMP_TEXT_FORM_ELEMENT_COPIER_VALUE_ARRAY_DEFAULT')) { define('AMP_TEXT_FORM_ELEMENT_COPIER_VALUE_ARRAY_DEFAULT', 'Select One'); } if (!defined('AMP_TEXT_FORM_ELEMENT_COPIER_REMOVE_BUTTON')) { define('AMP_TEXT_FORM_ELEMENT_COPIER_REMOVE_BUTTON', 'Remove'); } if (isset($fields)) { $this->addCopier($this->copier_name_default, $fields); } $this->_header =& AMP_getHeader(); }
function AMP_System_CustomFile_Form() { $name = 'customfile_edit_form'; $this->init($name, 'POST', 'customfile.php'); $header =& AMP_getHeader(); }
function init() { //interface $this->_header =& AMP_getHeader(); }
function _initJavascriptActions() { $header =& AMP_getHeader(); $this->_initPrettyUrlCreation($header); }
function _initJavascriptActions() { $header =& AMP_getHeader(); $header->addJavaScript($this->_script_file, 'crop'); // this code applies to non-implemented cropper based on prototype $header->addJavaScriptDynamic($this->_scriptEndCrop(), 'crop_value_commit'); $header->addJavaScriptDynamic($this->_scriptInit(), 'crop_init'); }
function &_get_header() { $header = AMP_getHeader(); return $header; }
function commit($script_source) { $page_header =& AMP_getHeader(); return $page_header->addJavascriptDynamic($script_source, 'onload'); }
function set_banner($action = null, $heading) { $text = ucfirst(isset($action) ? $action : join("", $this->get_actions())); $plural_headings = array(AMP_TEXT_LIST, AMP_TEXT_SEARCH, AMP_TEXT_VIEW); if (array_search($text, $plural_headings) !== FALSE) { $heading = AMP_pluralize($heading); } $this->add_component_header($text, ucwords($heading), 'banner', AMP_CONTENT_DISPLAY_KEY_INTRO); $header_text = $text . ' ' . $heading; $header =& AMP_getHeader(); $header->setPageAction($header_text); }
function copy_button() { $script_name = get_class($this) . '_getCopyName'; $attr = array("onclick" => "return " . $script_name . "();"); $this->defineSubmit('copy', 'Save As...', $attr); $script = 'function ' . $script_name . '() { pform = document.forms["' . $this->formname . '"]; copyname = prompt ("What would you like to name this new item?"); if (copyname != "" && copyname) { pform.elements["' . $this->name_field . '"].value=copyname; return true; } return false; }'; $header =& AMP_getHeader(); $header->addJavascriptDynamic($script, 'copy_button_' . $script_name); }
function AMPFormElement_HTMLEditor() { $this->_header =& AMP_getHeader(); }
function _initJavascriptActions() { $header =& AMP_getHeader(); $header->addJavascriptOnload('new Ajax.Autocompleter( "title", "title_list", "ajax_request.php", {} );'); $header->addJavascriptOnload('new Ajax.Autocompleter( "author", "author_list", "ajax_request.php", {} );'); }
function cache_components() { $this->_cache =& AMP_get_cache(); $this->_header =& AMP_getHeader(); return $this->cache_css() . $this->cache_js() . $this->cache_html(); }
function _showDynamicBlock($data, $fieldname) { $def = $this->getField($fieldname); if (!(isset($data[$fieldname]) && $data[$fieldname])) { return false; } if (!isset($def['block'])) { return $data[$fieldname]; } $script = 'change_form_block( "' . $def['block'] . '");'; $header =& AMP_getHeader(); $header->addJavascriptOnload($script, 'form_block_' . $def['block']); return $data[$fieldname]; }
function _initJavascriptActions() { $header =& AMP_getHeader(); $this->_initPhotoLookup($header); }