Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1965

Přidáno uživatelem Ondřej Fibich před více než 11 roky(ů)

Novinky:
- podpora modu simple a advanced u html_textarea ve Forge (medota mode)
- closes #599: Komentare u zarizeni pomoci HTML_Textarea (u slenu zatim nerealizovano, tam to neni tak potreba)

Zobrazit rozdíly:

freenetis/branches/1.1/application/i18n/cs_CZ/texts.php
'monthly member fee' => 'Měsíční členský příspěvek',
'monthly payment rate' => 'Měsíční splátka',
'monthly payment rate of devices' => 'Měsíční splátka zařízení',
'months' => 'Měsíce',
'more devices' => 'Více zařízení',
'multiple choice' => 'Vícenásobná volba',
'must be greater than zero' => 'Musí být větší než nula',
freenetis/branches/1.1/application/controllers/devices.php
->selected($selected_engineer)
->style('width: 200px');
$group_device_details->textarea('device_comment')
->label('Comment')
->rules('length[0,254]')
->style('width: 520px');
$group_device_details->html_textarea('device_comment')
->mode('simple')
->label('Comment');
if (Settings::get('finance_enabled'))
{
......
$device->buy_date = date('Y-m-d', $form_data['buy_date']);
}
$device->comment = $form_data['device_comment'];
$device->comment = $group_device_details->device_comment->value; // not escaped
// address point ///////////////////////////////////////////////////
......
->selected($selected_engineer)
->style('width: 200px');
$group_device_details->textarea('device_comment')
->label('Comment')
->rules('length[0,254]')
->style('width: 520px');
$group_device_details->html_textarea('device_comment')
->mode('simple')
->label('Comment');
$group_payment = $form->group('Device repayments')->visible(FALSE);
......
$dm->password = $form_data['login_password'];
}
$dm->comment = $form_data['device_comment'];
$dm->comment = $group_device_details->device_comment->value; // not escaped
$dm->price = $form_data['price'];
$dm->payment_rate = $form_data['payment_rate'];
$dm->buy_date = date('Y-m-d', $form_data['buy_date']);
......
->autocomplete('json/device_password');
}
$group_device_details->textarea('comment')
->rules('length[0,254]')
->value($device->comment)
->style('width: 520px');
$group_device_details->html_textarea('comment')
->mode('simple')
->label('Comment')
->value($device->comment);
if (Settings::get('finance_enabled'))
{
......
$device->password = $form_data['login_password'];
}
$device->comment = $form_data['comment'];
$device->comment = $group_device_details->comment->value; // not escaped
if (Settings::get('finance_enabled'))
{
freenetis/branches/1.1/application/libraries/variable_key_generators/Pvfree_Variable_Key_Generator.php
*
* @author David Kuba, Ondrej Fibich
*/
class Pvfree_Variable_Key_Generator
class Pvfree_Variable_Key_Generator extends Variable_Key_Generator
{
/**
freenetis/branches/1.1/application/libraries/forge/Form_Html_textarea.php
protected $data = array
(
'class' => 'wysiwyg',
'value' => '',
);
protected $protect = array('type');
public function __construct($name)
{
parent::__construct($name);
$this->mode('advanced');
}
/**
* Set mode of the HTML test area - simple (only few tools) or advanced (default)
*
* @param string $mode
* @return Form_Html_textarea
*/
public function mode($mode)
{
if ($mode == 'advanced' || $mode == 'simple')
{
$this->data['mode'] = $mode;
if ($mode == 'advanced')
{
$this->class('wysiwyg');
}
else
{
$this->class('wysiwyg_simple');
}
}
return $this;
}
protected function html_element()
{
$data = $this->data;
$te = new TextEditor();
$te->setWidth(656);
$te->setHeight(480);
if ($data['mode'] == 'advanced')
{
$te->setWidth(656);
$te->setHeight(480);
}
else
{
$te->setWidth(400);
$te->setHeight(150);
}
$te->setFieldName($data['name']);
$te->setContent($data['value']);
$te->setClass($data['class']);
return $te->getHtml();
}
freenetis/branches/1.1/application/libraries/TextEditor.php
{
return $this->driver->getHeight();
}
public function getClass()
{
return $this->driver->getClass();
}
public function setClass($c)
{
return $this->driver->setClass($c);
}
public function checkCompatiblily()
{
......
// TinyMCE path
protected $path = 'media/js/tinymce/';
protected $content;
protected $class = 'wysisyg';
public function __construct()
{
}
public function getClass()
{
return $this->class;
}
public function setClass($c)
{
return $this->class = $c;
}
public function setWidth($width)
{
......
{
return '<textarea id="' . $this->fieldName . '" name="' .
$this->fieldName . '" width="' . $this->width .
'" class="wysiwyg">' . $this->content . '</textarea>';
'" class="' . $this->class . '">' . $this->content . '</textarea>';
}
public function checkCompatiblily()
freenetis/branches/1.1/application/views/main.php
<?php echo html::script('media/js/tinymce/tiny_mce', FALSE) ?>
<script type="text/javascript"><!--
// set up of tinyMCE only if pop up is not on
/* advanced editor */
tinyMCE.init({
// General options
language : "<?php echo Config::get('lang') ?>",
......
theme_advanced_buttons2 : "pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : false,
......
convert_urls : 0,
remove_script_host : 0
});
/* simple editor */
tinyMCE.init({
// General options
language : "<?php echo Config::get('lang') ?>",
entity_encoding : "raw",
mode : "textareas",
theme : "advanced",
editor_selector : "wysiwyg_simple",
editor_deselector : "textarea",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,link,unlink,|,undo,redo",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_resizing : false,
height : "170px",
width : "500px",
convert_urls : 0,
remove_script_host : 0
});
--></script>
<?php endif; ?>
<?php echo html::script('media/js/detect_mobile_browser', FALSE) ?>
freenetis/branches/1.1/application/views/js/base.php
$('.focus').focus();
// auto resize for non WYSIWYG textareas
$('textarea').not('.wysiwyg').autoResize();
$('textarea').not('.wysiwyg').not('.wysiwyg_simple').autoResize();
// trigger autosize by default
$('textarea.autosize').trigger('keyup');

Také k dispozici: Unified diff