mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 04:40:44 +02:00
Bbcode button styling and fixes.
This commit is contained in:
@@ -29,8 +29,37 @@ class bbcode_shortcodes extends e_shortcode
|
|||||||
// The BBcode Buttons.
|
// The BBcode Buttons.
|
||||||
function bb_format($id)
|
function bb_format($id)
|
||||||
{
|
{
|
||||||
|
$formats = array(
|
||||||
$text = "<select class='e-bb bbcode_buttons e-pointer' id='{$id}' title='Format text' onchange=\"addtext(this.value);this.value=''\">
|
0 => array('[p][/p]','Paragraph'),
|
||||||
|
1 => array('[h=2][/h]','Heading'),
|
||||||
|
2 => array('[block][/block]','Block'),
|
||||||
|
3 => array('[blockquote][/blockquote]', 'Quote'),
|
||||||
|
4 => array('[code][/code]', 'Code')
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
if(e_BOOTSTRAP)
|
||||||
|
{
|
||||||
|
$text = '<div class="btn-group">';
|
||||||
|
$text .= '<a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#" title="">';
|
||||||
|
$text .= "Format";
|
||||||
|
$text .= ' <span class="caret"></span></a>';
|
||||||
|
$text .= "<ul class='dropdown-menu'>\n";
|
||||||
|
|
||||||
|
foreach($formats as $fm)
|
||||||
|
{
|
||||||
|
$text .= "<li><a href=\"javascript:addtext('".$fm[0]."')\">".$fm[1]."</a></li>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "</ul>";
|
||||||
|
$text .= "</div>";
|
||||||
|
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Legacy Version.
|
||||||
|
$text = "<select class='btn e-bb bbcode_buttons e-pointer' id='{$id}' title='Format text' onchange=\"addtext(this.value);this.value=''\">
|
||||||
<option value=''>Format</option>
|
<option value=''>Format</option>
|
||||||
<option value='[p][/p]'>Paragraph</option>
|
<option value='[p][/p]'>Paragraph</option>
|
||||||
<option value='[h2][/h2]'>Heading</option>
|
<option value='[h2][/h2]'>Heading</option>
|
||||||
@@ -38,6 +67,7 @@ class bbcode_shortcodes extends e_shortcode
|
|||||||
<option value='[blockquote][/blockquote]'>Quote</option>
|
<option value='[blockquote][/blockquote]'>Quote</option>
|
||||||
<option value='[code][/code]'>Code</option>
|
<option value='[code][/code]'>Code</option>
|
||||||
</select>";
|
</select>";
|
||||||
|
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
|
|
||||||
@@ -107,7 +137,7 @@ class bbcode_shortcodes extends e_shortcode
|
|||||||
{
|
{
|
||||||
list($tag,$tmp) = explode("--",$this->var['tagid']); // works with $frm->bbarea to detect textarea from first half of tag.
|
list($tag,$tmp) = explode("--",$this->var['tagid']); // works with $frm->bbarea to detect textarea from first half of tag.
|
||||||
}
|
}
|
||||||
$text = "<a class='e-modal' data-target='#uiModal' title='Media Manager : ".$this->var['template']."' id='{$id}' href='".e_ADMIN."image.php?mode=main&action=dialog&for=".$this->var['template']."&tagid=".$tag."&iframe=1&bbcode=img' >";
|
$text = "<a class='e-modal' data-modal-caption='Media Manager' data-target='#uiModal' title='Media Manager : ".$this->var['template']."' id='{$id}' href='".e_ADMIN."image.php?mode=main&action=dialog&for=".$this->var['template']."&tagid=".$tag."&iframe=1&bbcode=img' >";
|
||||||
$text .= "<img class='btn btn-small bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/preimage.png' title='".LANHELP_45."' alt='' />";
|
$text .= "<img class='btn btn-small bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/preimage.png' title='".LANHELP_45."' alt='' />";
|
||||||
$text .= "</a>\n";
|
$text .= "</a>\n";
|
||||||
return $text;
|
return $text;
|
||||||
@@ -123,7 +153,7 @@ class bbcode_shortcodes extends e_shortcode
|
|||||||
{
|
{
|
||||||
list($tag,$tmp) = explode("--",$this->var['tagid']); // works with $frm->bbarea to detect textarea from first half of tag.
|
list($tag,$tmp) = explode("--",$this->var['tagid']); // works with $frm->bbarea to detect textarea from first half of tag.
|
||||||
}
|
}
|
||||||
$text = "<a class=' e-modal' data-target='#uiModal' id='{$id}' href='".e_ADMIN."image.php?mode=dialog&action=list&for=_common_file&tagid=".$tag."&iframe=1&bbcode=file' >";
|
$text = "<a class='e-modal' data-modal-caption='Media Manager' data-target='#uiModal' id='{$id}' href='".e_ADMIN."image.php?mode=main&action=dialog&for=_common_file&tagid=".$tag."&iframe=1&bbcode=file' >";
|
||||||
$text .= "<img class='btn btn-small bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/prefile.png' title='".LANHELP_39."' alt='' />";
|
$text .= "<img class='btn btn-small bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/prefile.png' title='".LANHELP_39."' alt='' />";
|
||||||
$text .= "</a>\n";
|
$text .= "</a>\n";
|
||||||
return $text;
|
return $text;
|
||||||
@@ -131,11 +161,37 @@ class bbcode_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
function bb_fontsize($id) // FIXME CSS issues
|
function bb_fontsize($id) // FIXME CSS issues
|
||||||
{
|
{
|
||||||
|
|
||||||
$data = "size";
|
|
||||||
$formid = $id."_";
|
|
||||||
|
|
||||||
$event = $this->getEvent('expandit',$formid, LANHELP_22);
|
if(deftrue('e_BOOTSTRAP'))
|
||||||
|
{
|
||||||
|
$tp = e107::getParser();
|
||||||
|
|
||||||
|
$sizes = array(7,8,9,10,11,12,14,15,18,20,22,24,26,28,30,36);
|
||||||
|
|
||||||
|
$text = '<div class="btn-group">';
|
||||||
|
$text .= '<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="">';
|
||||||
|
$text .= "<img class='btn btn-small bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/fontsize.png' alt='' title='".LANHELP_22."' />\n";
|
||||||
|
$text .= '</a>';
|
||||||
|
$text .= "<ul class='dropdown-menu'>\n";
|
||||||
|
|
||||||
|
foreach($sizes as $s)
|
||||||
|
{
|
||||||
|
$text .= "<li><a href=\"javascript:addtext('[size=".$s."][/size]')\">".$tp->toHtml("[size=".$s."]Size ".$s."[/size]",true)."</a></li>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "</ul>";
|
||||||
|
$text .= "</div>";
|
||||||
|
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Legacy BC Support
|
||||||
|
|
||||||
|
|
||||||
|
$data = "size";
|
||||||
|
$formid = $id."_";
|
||||||
|
|
||||||
|
$event = $this->getEvent('expandit',$formid, LANHELP_22);
|
||||||
$text = "<a {$event} class=' e-bb e-expandit' onclick=\"expandit('{$this->var['tagid']}')\" data-function='show' href='#{$this->var['tagid']}' title='".LANHELP_22."' data-bbcode='{$data}'>
|
$text = "<a {$event} class=' e-bb e-expandit' onclick=\"expandit('{$this->var['tagid']}')\" data-function='show' href='#{$this->var['tagid']}' title='".LANHELP_22."' data-bbcode='{$data}'>
|
||||||
<img class='btn btn-small bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/fontsize.png' alt='' title='".LANHELP_22."' /></a>";
|
<img class='btn btn-small bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/fontsize.png' alt='' title='".LANHELP_22."' /></a>";
|
||||||
|
|
||||||
@@ -149,10 +205,14 @@ class bbcode_shortcodes extends e_shortcode
|
|||||||
<option value=''>".LANHELP_41."</option>";
|
<option value=''>".LANHELP_41."</option>";
|
||||||
|
|
||||||
$sizes = array(7,8,9,10,11,12,14,15,18,20,22,24,26,28,30,36);
|
$sizes = array(7,8,9,10,11,12,14,15,18,20,22,24,26,28,30,36);
|
||||||
foreach($sizes as $s){
|
foreach($sizes as $s)
|
||||||
|
{
|
||||||
$text .= "<option value='[size=".$s."][/size]'>".$s."px</option>\n";
|
$text .= "<option value='[size=".$s."][/size]'>".$s."px</option>\n";
|
||||||
}
|
}
|
||||||
$text .="</select></td></tr> \n </table></div>
|
$text .="</select>
|
||||||
|
|
||||||
|
|
||||||
|
</td></tr> \n </table></div>
|
||||||
</div>\n<!-- End of Size selector -->";
|
</div>\n<!-- End of Size selector -->";
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
@@ -5296,7 +5296,7 @@ class e_admin_form_ui extends e_form
|
|||||||
<fieldset class='e-filter'>
|
<fieldset class='e-filter'>
|
||||||
<legend class='e-hideme'>".LAN_LABEL_LABEL_SELECTED."</legend>
|
<legend class='e-hideme'>".LAN_LABEL_LABEL_SELECTED."</legend>
|
||||||
".$filter_pre."
|
".$filter_pre."
|
||||||
<div class='left' style='margin-top:10px;margin-bottom:-10px'>
|
<div class='left form-inline' style='margin-top:10px;margin-bottom:-10px'>
|
||||||
".$this->text('searchquery', $current_query[0], 50, $input_options)."<i class='icon-search searchquery'></i>
|
".$this->text('searchquery', $current_query[0], 50, $input_options)."<i class='icon-search searchquery'></i>
|
||||||
".$this->select_open('filter_options', array('class' => 'e-tip tbox select filter', 'id' => false, 'title'=>'Filter the results below'))."
|
".$this->select_open('filter_options', array('class' => 'e-tip tbox select filter', 'id' => false, 'title'=>'Filter the results below'))."
|
||||||
".$this->option(LAN_FILTER_LABEL_DISPLAYALL, '')."
|
".$this->option(LAN_FILTER_LABEL_DISPLAYALL, '')."
|
||||||
|
@@ -60,7 +60,7 @@ define("LANHELP_45", "Insert image from directory: ");
|
|||||||
define("LANHELP_46", "* No files found in: ");
|
define("LANHELP_46", "* No files found in: ");
|
||||||
|
|
||||||
define("LANHELP_47", "Insert flash: [flash=width,height]http://www.example.com/file.swf[/flash]");
|
define("LANHELP_47", "Insert flash: [flash=width,height]http://www.example.com/file.swf[/flash]");
|
||||||
define("LANHELP_48", "YouTube video: [youtube=tiny|small|medium|big|huge|width,height]6kYjxJmk0wc[/youtube]");
|
define("LANHELP_48", "YouTube video: [youtube=tiny | small | medium | big | huge | width,height]6kYjxJmk0wc[/youtube]");
|
||||||
define("LANHELP_49", "Paragraph: [p=class name]Paragraph text[/p]");
|
define("LANHELP_49", "Paragraph: [p=class name]Paragraph text[/p]");
|
||||||
define("LANHELP_50", "Heading: for H2 [h]Heading text[/h] or [h=2]Heading text[/h]");
|
define("LANHELP_50", "Heading: for H2 [h]Heading text[/h] or [h=2]Heading text[/h]");
|
||||||
define("LANHELP_51", "Disable HTML new lines for enclosed text: [nobr]text[/nobr]");
|
define("LANHELP_51", "Disable HTML new lines for enclosed text: [nobr]text[/nobr]");
|
||||||
|
@@ -126,8 +126,16 @@ td.options { }
|
|||||||
|
|
||||||
legend { display:none }
|
legend { display:none }
|
||||||
|
|
||||||
.btn { vertical-align: top; }
|
.bootstrap-select.btn-group, .bootstrap-select.btn-group[class*="span"] {
|
||||||
|
|
||||||
|
margin-bottom: 0px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
.btn { vertical-align: top; }
|
||||||
|
*/
|
||||||
|
|
||||||
input::-webkit-input-placeholder { font-style:italic }
|
input::-webkit-input-placeholder { font-style:italic }
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ a.media-select-icon { text-align:center; vertical-align:middle; margin:1px; bo
|
|||||||
a.media-select-icon:hover { border:1px solid red; }
|
a.media-select-icon:hover { border:1px solid red; }
|
||||||
.media-select-container { padding:10px; }
|
.media-select-container { padding:10px; }
|
||||||
|
|
||||||
.media-select-active { border: 2px solid silver; }
|
.media-select-active { border: 1px solid silver; }
|
||||||
|
|
||||||
.e-moving { background-color: silver; }
|
.e-moving { background-color: silver; }
|
||||||
tr.highlight-even { background-color: silver; }
|
tr.highlight-even { background-color: silver; }
|
||||||
|
Reference in New Issue
Block a user