Skip to content

Commit

Permalink
issue #252: prepared for bootstrap 4 (work in progress!)
Browse files Browse the repository at this point in the history
  • Loading branch information
YaWK committed Oct 29, 2018
1 parent e2b1d77 commit cb81656
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 10 deletions.
71 changes: 61 additions & 10 deletions admin/includes/template-redesign.php
Expand Up @@ -172,7 +172,11 @@ function confirmExit() { // dialog
}
elseif ($template->bootstrapVersion == "4")
{
// ....
echo
"<li>
<a href=\"#bs4-cards\" aria-controls=\"bs4-cards\" data-toggle=\"tab\"><i class=\"fa fa-bars\"></i>
&nbsp; $lang[CARDS]</a>
</li>";
}
?>

Expand Down Expand Up @@ -224,15 +228,8 @@ function confirmExit() { // dialog
<script>
$(document).ready(function () {

// TODO: THIS IS WAAAAYYYY NOT READY...!!
// switch preview from text to link
/*
$("#switchPreview").click(function() {
// alert('you flipped the switch!');
$("#h1-preview").replaceWith( "<div class=\"h1\" id=\"h1-preview\"><a href=\"#\">H1 Heading (link)</div>");
// $("#h1-preview").css("text-decoration", "underline");
});
*/

// call set default values and preview font function
previewFont($("#h1-fontfamily"), 'H1 Heading', 'h1-preview', $("#h1-preview"), $("#h1-size"), $("#h1-fontcolor"), $("#h1-fontshadowsize"), $("#h1-fontshadowcolor"), $("#h1-fontweight"), $("#h1-fontstyle"), $("#h1-textdecoration"));
previewFont($("#h2-fontfamily"), 'H2 Heading', 'h2-preview', $("#h2-preview"), $("#h2-size"), $("#h2-fontcolor"), $("#h2-fontshadowsize"), $("#h2-fontshadowcolor"), $("#h2-fontweight"), $("#h2-fontstyle"), $("#h2-textdecoration"));
Expand Down Expand Up @@ -783,7 +780,61 @@ function previewFont(font, heading, previewString, previewField, fontsize, fontc
}
else if ($template->bootstrapVersion == "4")
{
// ...
echo "<!-- CARDS TAB -->
<div class=\"tab-pane fade in\" id=\"bs4-cards\">
<h3>$lang[BOOTSTRAP4] <small>$lang[CARDS]</small></h3>
<div class=\"row animated fadeIn\">
<div class=\"col-md-3\">
<div class=\"box box-default\">
<div class=\"box-header\">
<h3 class=\"box-title\">$lang[CARDS] <small>$lang[SETTINGS]</small></h3>
</div>
<div class=\"box-body\">
<!-- add bootstrap 4 here -->";
$template->getFormElements($db, $templateSettings, 58, $lang, $user);
echo "
</div>
</div>
</div>
<div class=\"col-md-3\">
<div class=\"box box-default\">
<div class=\"box-header\">
<h3 class=\"box-title\">$lang[LIST_GROUP] <small>$lang[DESIGN]</small></h3>
</div>
<div class=\"box-body\">
<!-- more bootstrap 4 here -->";
// $template->getFormElements($db, $templateSettings, 15, $lang, $user);
echo "
</div>
</div>
</div>
<div class=\"col-md-3\">
<div class=\"box box-default\">
<div class=\"box-header\">
<h3 class=\"box-title\">$lang[JUMBOTRON] <small>$lang[BOX] $lang[DESIGN]</small></h3>
</div>
<div class=\"box-body\">
<!-- more bootstrap 4 here -->";
// $template->getFormElements($db, $templateSettings, 16, $lang, $user);
echo "
</div>
</div>
</div>
<div class=\"col-md-3\">
<div class=\"box box-default\">
<div class=\"box-header\">
<h3 class=\"box-title\">... <small>...</small></h3>
</div>
<div class=\"box-body\">
</div>
</div>
</div>
</div>
</div>";
}
?>

Expand Down
1 change: 1 addition & 0 deletions admin/language/lang-de-DE.ini
Expand Up @@ -75,6 +75,7 @@ FOLDER = "Ordner"
BOOTSTRAP = "Bootstrap"
BOOTSTRAP3 = "Bootstrap 3"
BOOTSTRAP4 = "Bootstrap 4"
CARDS = "Cards"
FORM = "Formular"
FORMS = "Formulare"
NEW = "neu"
Expand Down
1 change: 1 addition & 0 deletions admin/language/lang-en-EN.ini
Expand Up @@ -75,6 +75,7 @@ FOLDER = "Folder"
BOOTSTRAP = "Bootstrap"
BOOTSTRAP3 = "Bootstrap 3"
BOOTSTRAP4 = "Bootstrap 4"
CARDS = "Cards"
FORM = "Formular"
FORMS = "Formulare"
NEW = "neu"
Expand Down

0 comments on commit cb81656

Please sign in to comment.