first commit
This commit is contained in:
28
apps/backend/modules/stTinyMCE/actions/actions.class.php
Normal file
28
apps/backend/modules/stTinyMCE/actions/actions.class.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
class stTinyMCEActions extends stActions
|
||||
{
|
||||
public function executeConfig()
|
||||
{
|
||||
$this->labels = $this->getLabels();
|
||||
|
||||
$this->config = stConfig::getInstance('stTinyMCE');
|
||||
|
||||
if ($this->getRequest()->getMethod() == sfRequest::POST)
|
||||
{
|
||||
$this->config->setFromRequest('config');
|
||||
$this->config->save();
|
||||
$this->setFlash('notice', 'Twoje zmiany zostały zapisane');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function getLabels()
|
||||
{
|
||||
$i18n = $this->getContext()->getI18n();
|
||||
|
||||
return array(
|
||||
'config{advanced}' => $i18n->__('Aktywuj edycje zaawansowaną'),
|
||||
);
|
||||
}
|
||||
}
|
||||
13
apps/backend/modules/stTinyMCE/actions/components.class.php
Normal file
13
apps/backend/modules/stTinyMCE/actions/components.class.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
class stTinyMCEComponents extends sfComponents
|
||||
{
|
||||
|
||||
public function executeListMenu()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
4
apps/backend/modules/stTinyMCE/config/config.php
Normal file
4
apps/backend/modules/stTinyMCE/config/config.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
stPluginHelper::addRouting('stTinyMCE', '/wysiwyg/:action/*', 'stTinyMCE', 'config', 'backend');
|
||||
stConfiguration::addModule(array('label' => 'Edytor WYSIWYG', 'route' => '@stTinyMCE', 'icon' => 'stTinyMCEPlugin'), 'theme');
|
||||
1
apps/backend/modules/stTinyMCE/templates/_footer.php
Normal file
1
apps/backend/modules/stTinyMCE/templates/_footer.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php echo st_get_admin_foot() ?>
|
||||
1
apps/backend/modules/stTinyMCE/templates/_header.php
Normal file
1
apps/backend/modules/stTinyMCE/templates/_header.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php echo st_get_admin_head(array('@stTinyMCEBackend', __('Edytor WYSIWYG'), '/images/backend/main/icons/new_red/stTinyMCEPlugin.svg'), $title) ?>
|
||||
19
apps/backend/modules/stTinyMCE/templates/_listMenu.php
Normal file
19
apps/backend/modules/stTinyMCE/templates/_listMenu.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="list-menu">
|
||||
<ul>
|
||||
|
||||
<li class="selected">
|
||||
<?php echo link_to(__('Konfiguracja'),'stTinyMCE/config')?>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<?php if (sfContext::getInstance()->getUser()->getCulture() == 'pl_PL'): ?>
|
||||
<a href="https://www.sote.pl/docs/edytor_wysiwyg" target="_blank"><?php echo __('Dokumentacja'); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="https://www.soteshop.com/docs/wysiwyg_editor" target="_blank"><?php echo __('Documentation'); ?></a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="clr"></div>
|
||||
36
apps/backend/modules/stTinyMCE/templates/configSuccess.php
Normal file
36
apps/backend/modules/stTinyMCE/templates/configSuccess.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php use_helper('stAdminGenerator'); ?>
|
||||
|
||||
<?php st_include_partial('stTinyMCE/header', array('title' => __('Konfiguracja'))); ?>
|
||||
|
||||
<?php st_view_slot_start('application-menu') ?>
|
||||
<?php st_include_component('stTinyMCE', 'listMenu') ?>
|
||||
<?php st_view_slot_end() ?>
|
||||
|
||||
<?php st_include_partial('stAdminGenerator/message') ?>
|
||||
|
||||
<?php echo form_tag('@stTinyMCE', array('id' => 'sf_admin_config_form', 'class' => "admin_form")) ?>
|
||||
<fieldset>
|
||||
<div class="content" id="sf_fieldset_none_slide">
|
||||
<?php echo st_admin_get_form_field('config[advanced]', $labels['config{advanced}'], 1, 'checkbox_tag', array('checked' => $config->get('advanced'), 'help' => __('Aktywuje ukryte opcje edytora tj.: krój i rozmiar czcionki oraz kolor tekstu i tła.'))); ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div id="config_actions">
|
||||
<?php echo st_get_admin_actions_head() ?>
|
||||
<?php echo st_get_admin_action('save', __('Zapisz', null, 'stAdminGeneratorPlugin'), null, array ('name' => 'save')) ?>
|
||||
<?php echo st_get_admin_actions_foot() ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php st_include_partial('stTinyMCE/footer'); ?>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#config_actions').stickyBox();
|
||||
fieldsetVisibility();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user