コード例 #1
0
ファイル: Form.inc.php プロジェクト: radicaldesigns/amp
 function _initJavascriptActions()
 {
     $this->HTMLEditorSetup();
     $header =& AMP_getHeader();
     $this->_initAutoLookups($header);
     $this->_initPhotoLookup($header);
 }
コード例 #2
0
ファイル: Form.inc.php プロジェクト: radicalsuz/amp
 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');
 }
コード例 #3
0
ファイル: Menu.inc.php プロジェクト: radicaldesigns/amp
 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();
 }
コード例 #4
0
ファイル: Form.inc.php プロジェクト: radicalsuz/amp
 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();
 }
コード例 #5
0
ファイル: Form.inc.php プロジェクト: radicaldesigns/amp
 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');
 }
コード例 #6
0
 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();
 }
コード例 #7
0
ファイル: Form.inc.php プロジェクト: radicalsuz/amp
 function AMP_System_CustomFile_Form()
 {
     $name = 'customfile_edit_form';
     $this->init($name, 'POST', 'customfile.php');
     $header =& AMP_getHeader();
 }
コード例 #8
0
 function init()
 {
     //interface
     $this->_header =& AMP_getHeader();
 }
コード例 #9
0
ファイル: Form.inc.php プロジェクト: radicaldesigns/amp
 function _initJavascriptActions()
 {
     $header =& AMP_getHeader();
     $this->_initPrettyUrlCreation($header);
 }
コード例 #10
0
ファイル: Form.inc.php プロジェクト: radicalsuz/amp
 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');
 }
コード例 #11
0
 function &AMP_get_header()
 {
     $header = AMP_getHeader();
     return $header;
 }
コード例 #12
0
ファイル: OnLoad.php プロジェクト: radicalsuz/amp
 function commit($script_source)
 {
     $page_header =& AMP_getHeader();
     return $page_header->addJavascriptDynamic($script_source, 'onload');
 }
コード例 #13
0
ファイル: Controller.php プロジェクト: radicalsuz/amp
 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);
 }
コード例 #14
0
ファイル: Form.inc.php プロジェクト: radicalsuz/amp
    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);
    }
コード例 #15
0
ファイル: HTMLEditor.inc.php プロジェクト: radicalsuz/amp
 function AMPFormElement_HTMLEditor()
 {
     $this->_header =& AMP_getHeader();
 }
コード例 #16
0
ファイル: Form.inc.php プロジェクト: radicaldesigns/amp
 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", {} );');
 }
コード例 #17
0
ファイル: Menu.inc.php プロジェクト: radicalsuz/amp
 function cache_components()
 {
     $this->_cache =& AMP_get_cache();
     $this->_header =& AMP_getHeader();
     return $this->cache_css() . $this->cache_js() . $this->cache_html();
 }
コード例 #18
0
ファイル: Form.inc.php プロジェクト: radicalsuz/amp
 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];
 }
コード例 #19
0
ファイル: Form.inc.php プロジェクト: radicaldesigns/amp
 function _initJavascriptActions()
 {
     $header =& AMP_getHeader();
     $this->_initPhotoLookup($header);
 }