mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
More Tinymce and form tweaks
This commit is contained in:
@@ -153,6 +153,13 @@ class e_file
|
|||||||
return $f;
|
return $f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setMode($mode)
|
||||||
|
{
|
||||||
|
$this->mode= $mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read files from given path
|
* Read files from given path
|
||||||
*
|
*
|
||||||
|
@@ -1417,6 +1417,23 @@ class e_form
|
|||||||
return $this->admin_button('etrigger_'.$name, $value, $action, $label, $options);
|
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
|
* @param string $name
|
||||||
|
@@ -20,8 +20,8 @@ e107::css('inline',"
|
|||||||
}
|
}
|
||||||
span.badge { cursor: pointer }
|
span.badge { cursor: pointer }
|
||||||
span.label { cursor: pointer }
|
span.label { cursor: pointer }
|
||||||
ul.glyphicons { list-style:none; margin-left:0px}
|
ul.glyphicons { list-style:none; margin-left:0px; font-size:120%}
|
||||||
ul.glyphicons li { float:left; border-bottom:1px solid silver; cursor:pointer; width:160px; padding:5px; }
|
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 = $('#glyph-color').val();
|
||||||
|
var custom = $('#glyph-custom').val();
|
||||||
|
var cls = (custom != '') ? custom : $(this).find('i').attr('class');
|
||||||
|
|
||||||
//var color = $('input:select[name=glyph-color]:selected').val();
|
|
||||||
// alert(color);
|
|
||||||
var cls = $(this).find('i').attr('class');
|
|
||||||
var html = '<i class=\"' + cls + '\"></i> ';
|
var html = '<i class=\"' + cls + '\"></i> ';
|
||||||
|
|
||||||
|
// alert(html);
|
||||||
tinyMCEPopup.editor.execCommand('mceInsertContent', false, html);
|
tinyMCEPopup.editor.execCommand('mceInsertContent', false, html);
|
||||||
tinyMCEPopup.close();
|
tinyMCEPopup.close();
|
||||||
});
|
});
|
||||||
@@ -354,10 +357,10 @@ class e_bootstrap
|
|||||||
);
|
);
|
||||||
|
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
$sel = array(''=>'Gray','icon-white'=>'White');
|
$sel = array(''=>'Dark Gray','icon-white'=>'White');
|
||||||
|
|
||||||
$text .= "<div style='padding:10px'>";
|
$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'>";
|
$text .= "<ul class='glyphicons clearfix'>";
|
||||||
foreach($icons as $ic)
|
foreach($icons as $ic)
|
||||||
|
@@ -3,5 +3,5 @@
|
|||||||
<tinymce_name>Main Admin</tinymce_name>
|
<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_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>
|
<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>
|
</tinymce>
|
||||||
|
@@ -214,6 +214,7 @@ class wysiwyg
|
|||||||
function getConfig($config=FALSE)
|
function getConfig($config=FALSE)
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
$fl = e107::getFile();
|
||||||
|
|
||||||
if(getperms('0'))
|
if(getperms('0'))
|
||||||
{
|
{
|
||||||
@@ -251,7 +252,17 @@ class wysiwyg
|
|||||||
'plugins' => $this->filter_plugins($config['tinymce_plugins'])
|
'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');
|
$content_styles = array('Bootstrap Button' => 'btn btn-primary', 'Bootstrap Table' => 'table');
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user