mirror of
https://github.com/e107inc/e107.git
synced 2025-04-22 05:31:58 +02:00
More Tinymce and form tweaks
This commit is contained in:
parent
177d705509
commit
2682d9b872
e107_handlers
e107_plugins/tinymce
@ -152,7 +152,14 @@ class e_file
|
||||
|
||||
return $f;
|
||||
}
|
||||
|
||||
|
||||
function setMode($mode)
|
||||
{
|
||||
$this->mode= $mode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Read files from given path
|
||||
*
|
||||
|
@ -1417,6 +1417,23 @@ class e_form
|
||||
return $this->admin_button('etrigger_'.$name, $value, $action, $label, $options);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generic Button Element.
|
||||
* @param string $name
|
||||
* @param string $value
|
||||
* @param string $action [optional] default is submit
|
||||
* @param string $label [optional]
|
||||
* @param string|array $options [optional]
|
||||
* @return string
|
||||
*/
|
||||
public function button($name, $value, $action = 'submit', $label = '', $options = array())
|
||||
{
|
||||
return $this->admin_button($name, $value, $action, $label, $options);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $name
|
||||
|
@ -20,8 +20,8 @@ e107::css('inline',"
|
||||
}
|
||||
span.badge { cursor: pointer }
|
||||
span.label { cursor: pointer }
|
||||
ul.glyphicons { list-style:none; margin-left:0px}
|
||||
ul.glyphicons li { float:left; border-bottom:1px solid silver; cursor:pointer; width:160px; padding:5px; }
|
||||
ul.glyphicons { list-style:none; margin-left:0px; font-size:120%}
|
||||
ul.glyphicons li { float:left; border-bottom:1px solid silver; cursor:pointer; width:190px; padding:5px; }
|
||||
|
||||
|
||||
");
|
||||
@ -58,12 +58,15 @@ $(document).ready(function()
|
||||
});
|
||||
|
||||
|
||||
$('ul.glyphicons li').click(function () {
|
||||
$('ul.glyphicons li, #glyph-save').click(function () {
|
||||
|
||||
//var color = $('input:select[name=glyph-color]:selected').val();
|
||||
// alert(color);
|
||||
var cls = $(this).find('i').attr('class');
|
||||
var color = $('#glyph-color').val();
|
||||
var custom = $('#glyph-custom').val();
|
||||
var cls = (custom != '') ? custom : $(this).find('i').attr('class');
|
||||
|
||||
var html = '<i class=\"' + cls + '\"></i> ';
|
||||
|
||||
// alert(html);
|
||||
tinyMCEPopup.editor.execCommand('mceInsertContent', false, html);
|
||||
tinyMCEPopup.close();
|
||||
});
|
||||
@ -354,10 +357,10 @@ class e_bootstrap
|
||||
);
|
||||
|
||||
$frm = e107::getForm();
|
||||
$sel = array(''=>'Gray','icon-white'=>'White');
|
||||
$sel = array(''=>'Dark Gray','icon-white'=>'White');
|
||||
|
||||
$text .= "<div style='padding:10px'>";
|
||||
$text .= "<div>Color: ".$frm->selectbox('glyph-color',$sel)."</div>";
|
||||
$text .= "<div class='inline-form'>Color: ".$frm->selectbox('glyph-color',$sel)." Custom: ".$frm->text('glyph-custom','').$frm->button('glyph-save','Go')."</div>";
|
||||
|
||||
$text .= "<ul class='glyphicons clearfix'>";
|
||||
foreach($icons as $ic)
|
||||
|
@ -3,5 +3,5 @@
|
||||
<tinymce_name>Main Admin</tinymce_name>
|
||||
<tinymce_plugins>advhr,advlink,autosave,contextmenu,directionality,e107bbcode,emoticons,ibrowser,jqueryinlinepopups,paste,table,visualchars,wordcount,xhtmlxtras,youtube,fullscreen</tinymce_plugins>
|
||||
<tinymce_buttons1>link, unlink, bold, italic, underline, undo, redo,formatselect,justifyleft,justifycenter,justifyright,justifyfull, |, ibrowser, forecolor, removeformat, table, bullist, numlist, outdent, indent, cleanup, emoticons, youtube, e107bbcode, fullscreen</tinymce_buttons1>
|
||||
<extended_valid_elements>object[*],embed[*]</extended_valid_elements>
|
||||
<extended_valid_elements>i[*], object[*],embed[*]</extended_valid_elements>
|
||||
</tinymce>
|
||||
|
@ -214,6 +214,7 @@ class wysiwyg
|
||||
function getConfig($config=FALSE)
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$fl = e107::getFile();
|
||||
|
||||
if(getperms('0'))
|
||||
{
|
||||
@ -251,7 +252,17 @@ class wysiwyg
|
||||
'plugins' => $this->filter_plugins($config['tinymce_plugins'])
|
||||
);
|
||||
|
||||
$content_css = vartrue($config['content_css'], "{e_WEB_ABS}js/bootstrap/css/bootstrap.min.css");
|
||||
|
||||
$cssFiles = $fl->get_files(THEME,"\.css",'',2);
|
||||
|
||||
$css[] = "{e_WEB_ABS}js/bootstrap/css/bootstrap.min.css";
|
||||
foreach($cssFiles as $val)
|
||||
{
|
||||
$css[] = str_replace(THEME,THEME_ABS,$val['path'].$val['fname']);
|
||||
}
|
||||
|
||||
$content_css = vartrue($config['content_css'], implode(",",$css));
|
||||
|
||||
$content_styles = array('Bootstrap Button' => 'btn btn-primary', 'Bootstrap Table' => 'table');
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user