mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Move editor frame function to editorView::dispEditorFrame
This commit is contained in:
parent
488181eaae
commit
7d5b78b269
6 changed files with 35 additions and 36 deletions
|
|
@ -3,6 +3,7 @@
|
|||
<grants />
|
||||
<actions>
|
||||
<action name="dispEditorComponentInfo" type="view" />
|
||||
<action name="dispEditorFrame" type="view" />
|
||||
<action name="dispEditorPopup" type="view" />
|
||||
<action name="dispEditorPreview" type="view" />
|
||||
<action name="dispEditorSkinColorset" type="view" permission="all-managers" />
|
||||
|
|
|
|||
|
|
@ -15,6 +15,39 @@ class editorView extends editor
|
|||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display editor in an iframe
|
||||
*/
|
||||
function dispEditorFrame()
|
||||
{
|
||||
// Check parent input ID
|
||||
$parent_input_id = Context::get('parent_input_id');
|
||||
Context::addBodyClass('disable_debug_panel');
|
||||
|
||||
// Load editor
|
||||
$oEditorModel = getModel('editor');
|
||||
$option = $oEditorModel->getEditorConfig();
|
||||
$option->editor_skin = 'ckeditor';
|
||||
$option->content_style = 'ckeditor_light';
|
||||
$option->sel_editor_colorset = 'moono-lisa';
|
||||
$option->primary_key_name = 'primary_key';
|
||||
$option->content_key_name = 'content';
|
||||
$option->allow_fileupload = FALSE;
|
||||
$option->enable_autosave = FALSE;
|
||||
$option->enable_default_component = TRUE;
|
||||
$option->enable_component = FALSE;
|
||||
$option->height = 300;
|
||||
$option->editor_focus = 'Y';
|
||||
$editor = $oEditorModel->getEditor(0, $option);
|
||||
Context::set('editor', $editor);
|
||||
|
||||
// Set template
|
||||
$this->setLayoutPath('./common/tpl/');
|
||||
$this->setLayoutFile("default_layout");
|
||||
$this->setTemplatePath($this->module_path . 'tpl');
|
||||
$this->setTemplateFile('editor_frame');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Action to get a request to display compoenet pop-up
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@
|
|||
<action name="dispMemberAdminConfig" type="view" menu_name="userSetting" menu_index="true" />
|
||||
<action name="dispMemberAdminFeaturesConfig" type="view" menu_name="userSetting" />
|
||||
<action name="dispMemberAdminAgreementsConfig" type="view" menu_name="userSetting" />
|
||||
<action name="dispMemberAdminAgreementsEdit" type="view" menu_name="userSetting" />
|
||||
<action name="dispMemberAdminSignUpConfig" type="view" menu_name="userSetting" />
|
||||
<action name="dispMemberAdminLoginConfig" type="view" menu_name="userSetting" />
|
||||
<action name="dispMemberAdminDesignConfig" type="view" menu_name="userSetting" />
|
||||
|
|
|
|||
|
|
@ -157,40 +157,6 @@ class memberAdminView extends member
|
|||
$this->setTemplateFile('agreements_config');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the agreements edit form.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function dispMemberAdminAgreementsEdit()
|
||||
{
|
||||
// Check parent input ID
|
||||
$parent_input_id = Context::get('parent_input_id');
|
||||
Context::addBodyClass('disable_debug_panel');
|
||||
|
||||
// Load editor
|
||||
$oEditorModel = getModel('editor');
|
||||
$option = $oEditorModel->getEditorConfig();
|
||||
$option->editor_skin = 'ckeditor';
|
||||
$option->content_style = 'ckeditor_light';
|
||||
$option->sel_editor_colorset = 'moono-lisa';
|
||||
$option->primary_key_name = 'primary_key';
|
||||
$option->content_key_name = 'content';
|
||||
$option->allow_fileupload = FALSE;
|
||||
$option->enable_autosave = FALSE;
|
||||
$option->enable_default_component = TRUE;
|
||||
$option->enable_component = FALSE;
|
||||
$option->height = 300;
|
||||
$option->editor_focus = 'Y';
|
||||
$editor = $oEditorModel->getEditor(0, $option);
|
||||
Context::set('editor', $editor);
|
||||
|
||||
// Set template
|
||||
$this->setLayoutPath('./common/tpl/');
|
||||
$this->setLayoutFile("default_layout");
|
||||
$this->setTemplateFile('agreements_edit');
|
||||
}
|
||||
|
||||
public function dispMemberAdminSignUpConfig()
|
||||
{
|
||||
$config = $this->memberConfig;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
// Editor replacement callback function
|
||||
var editor_replace = function(input) {
|
||||
var iframe = $('<iframe class="editor_iframe"></iframe>');
|
||||
iframe.attr("src", current_url.setQuery("act", "dispMemberAdminAgreementsEdit").setQuery("parent_input_id", input.attr("id")));
|
||||
iframe.attr("src", current_url.setQuery("module", "editor").setQuery("act", "dispEditorFrame").setQuery("parent_input_id", input.attr("id")));
|
||||
iframe.insertAfter(input);
|
||||
input.siblings(".editor_preview").hide();
|
||||
if (input.attr("type") !== "hidden") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue