Improves on GUI and Installer
This commit is contained in:
parent
1e0e663c23
commit
2e2d5e1000
@ -209,9 +209,36 @@ div.dashboard-links h4 {
|
||||
font-size: 0.9em !important;
|
||||
}
|
||||
|
||||
.bl-publish-sidebar ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.bl-publish-sidebar li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.bl-publish-sidebar li:not(:first-child) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.bl-publish-sidebar .uk-form-label {
|
||||
font-size: 0.9em;
|
||||
text-transform: uppercase;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.bl-publish-sidebar .sidebar-view {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bl-publish-sidebar h2.sidebar-button {
|
||||
font-size: 0.9em;
|
||||
text-transform: uppercase;
|
||||
border-bottom: 1px solid #ddd;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.uk-form legend {
|
||||
@ -340,19 +367,19 @@ table.statistics tr:last-child td {
|
||||
}
|
||||
|
||||
#bludit-tags .uk-button {
|
||||
padding: 0 12px !important;
|
||||
margin-left: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#jstagList {
|
||||
margin-top: 15px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
#jstagList span.unselect,
|
||||
#jstagList span.select {
|
||||
margin-top: 5px;
|
||||
margin-right: 5px;
|
||||
padding: 2px 15px;
|
||||
margin-top: 7px;
|
||||
margin-right: 7px;
|
||||
padding: 1px 15px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
border-radius: 3px;
|
||||
|
@ -151,6 +151,20 @@ $(document).ready(function() {
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if( AUTO_SCROLL ) {
|
||||
?>
|
||||
<script>
|
||||
// Auto scroll
|
||||
$(document).ready(function () {
|
||||
$('html, body').animate({
|
||||
scrollTop: $('#bl-view').offset().top
|
||||
}, 'slow');
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Javascript -->
|
||||
|
@ -4,7 +4,9 @@ class HTML {
|
||||
|
||||
public static function title($args)
|
||||
{
|
||||
$html = '<h2 class="title"><i class="uk-icon-'.$args['icon'].'"></i> '.$args['title'].'</h2>';
|
||||
$id = empty($args['id']) ? '' : 'id="'.$args['id'].'"';
|
||||
|
||||
$html = '<h2 class="title" '.$id.'><i class="uk-icon-'.$args['icon'].'"></i> '.$args['title'].'</h2>';
|
||||
echo $html;
|
||||
}
|
||||
|
||||
@ -81,7 +83,7 @@ class HTML {
|
||||
$html .= '<label for="jstagInput" class="uk-form-label">'.$args['label'].'</label>';
|
||||
|
||||
$html .= '<div class="uk-form-controls">';
|
||||
$html .= '<input id="jstagInput" type="text" class="uk-width-1-2" autocomplete="off">';
|
||||
$html .= '<input id="jstagInput" type="text" class="uk-width-1-1" autocomplete="off">';
|
||||
$html .= '<button id="jstagAdd" class="uk-button">'.$L->g('Add').'</button>';
|
||||
|
||||
$html .= '<div id="jstagList">';
|
||||
|
@ -16,7 +16,8 @@ HTML::formOpen(array('class'=>'uk-form-stacked'));
|
||||
'value'=>$_Page->key()
|
||||
));
|
||||
|
||||
// ---- LEFT SIDE ----
|
||||
// LEFT SIDE
|
||||
// --------------------------------------------------------------------
|
||||
echo '<div class="uk-grid uk-grid-medium">';
|
||||
echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
|
||||
@ -38,7 +39,10 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
|
||||
// Form buttons
|
||||
echo '<div class="uk-form-row uk-margin-bottom">';
|
||||
echo ' <button class="uk-button uk-button-primary" type="submit">'.$L->g('Save').'</button>';
|
||||
echo '
|
||||
<button class="uk-button uk-button-primary" type="submit">'.$L->g('Save').'</button>
|
||||
<button class="uk-button uk-button-primary" type="button" id="jsSaveDraft">'.$L->g('Save as draft').'</button>
|
||||
';
|
||||
|
||||
if(count($_Page->children())===0)
|
||||
{
|
||||
@ -50,20 +54,16 @@ if(count($_Page->children())===0)
|
||||
|
||||
echo '</div>';
|
||||
|
||||
// ---- RIGHT SIDE ----
|
||||
// RIGHT SIDE
|
||||
// --------------------------------------------------------------------
|
||||
echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
|
||||
// Tabs, general and advanced mode
|
||||
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
||||
echo '<li><a href="">'.$L->g('General').'</a></li>';
|
||||
echo '<li><a href="">'.$L->g('Images').'</a></li>';
|
||||
echo '<li><a href="">'.$L->g('Advanced').'</a></li>';
|
||||
echo '</ul>';
|
||||
echo '<ul>';
|
||||
|
||||
echo '<ul id="tab-options" class="uk-switcher uk-margin">';
|
||||
|
||||
// ---- GENERAL TAB ----
|
||||
echo '<li>';
|
||||
// GENERAL TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-general-view"><i class="uk-icon-angle-down"></i> GENERAL</h2></li>';
|
||||
echo '<li id="sidebar-general-view" class="sidebar-view">';
|
||||
|
||||
// Description input
|
||||
HTML::formTextarea(array(
|
||||
@ -75,23 +75,15 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
||||
));
|
||||
|
||||
// Tags input
|
||||
HTML::tags(array(
|
||||
'name'=>'tags',
|
||||
'label'=>$L->g('Tags'),
|
||||
'allTags'=>$dbTags->getAll(),
|
||||
'selectedTags'=>$_Page->tags(true)
|
||||
));
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ---- IMAGES TAB ----
|
||||
echo '<li>';
|
||||
// IMAGES TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-images-view"><i class="uk-icon-angle-down"></i> Images</h2></li>';
|
||||
echo '<li id="sidebar-images-view" class="sidebar-view">';
|
||||
|
||||
// --- BLUDIT COVER IMAGE ---
|
||||
echo '<hr>';
|
||||
HTML::bluditCoverImage($_Page->coverImage(false));
|
||||
echo '<hr>';
|
||||
|
||||
// --- BLUDIT QUICK IMAGES ---
|
||||
HTML::bluditQuickImages();
|
||||
@ -104,8 +96,26 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ---- ADVANCED TAB ----
|
||||
echo '<li>';
|
||||
|
||||
// TAGS
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-tags-view"><i class="uk-icon-angle-down"></i> '.$L->g('Tags').'</h2></li>';
|
||||
echo '<li id="sidebar-tags-view" class="sidebar-view">';
|
||||
|
||||
// Tags input
|
||||
HTML::tags(array(
|
||||
'name'=>'tags',
|
||||
'label'=>$L->g('Tags'),
|
||||
'allTags'=>$dbTags->getAll(),
|
||||
'selectedTags'=>$_Page->tags(true)
|
||||
));
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ADVANCED TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-advanced-view"><i class="uk-icon-angle-down"></i> ADVANCED</h2></li>';
|
||||
echo '<li id="sidebar-advanced-view" class="sidebar-view">';
|
||||
|
||||
// Status input
|
||||
HTML::formSelect(array(
|
||||
@ -167,42 +177,61 @@ HTML::formClose();
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
var key = $("#jskey").val();
|
||||
var key = $("#jskey").val();
|
||||
|
||||
$("#jsslug").keyup(function() {
|
||||
var text = $(this).val();
|
||||
var parent = $("#jsparent").val();
|
||||
$("#jsslug").keyup(function() {
|
||||
var text = $(this).val();
|
||||
var parent = $("#jsparent").val();
|
||||
|
||||
checkSlugPage(text, parent, key, $("#jsslug"));
|
||||
});
|
||||
checkSlugPage(text, parent, key, $("#jsslug"));
|
||||
});
|
||||
|
||||
$("#jstitle").keyup(function() {
|
||||
var text = $(this).val();
|
||||
var parent = $("#jsparent").val();
|
||||
$("#jstitle").keyup(function() {
|
||||
var text = $(this).val();
|
||||
var parent = $("#jsparent").val();
|
||||
|
||||
checkSlugPage(text, parent, key, $("#jsslug"));
|
||||
});
|
||||
checkSlugPage(text, parent, key, $("#jsslug"));
|
||||
});
|
||||
|
||||
$("#jsparent").change(function() {
|
||||
var parent = $(this).val();
|
||||
var text = $("#jsslug").val();
|
||||
$("#jsparent").change(function() {
|
||||
var parent = $(this).val();
|
||||
var text = $("#jsslug").val();
|
||||
|
||||
if(parent==NO_PARENT_CHAR) {
|
||||
$("#jsparentExample").text("");
|
||||
}
|
||||
else {
|
||||
$("#jsparentExample").text(parent+"/");
|
||||
}
|
||||
if(parent==NO_PARENT_CHAR) {
|
||||
$("#jsparentExample").text("");
|
||||
}
|
||||
else {
|
||||
$("#jsparentExample").text(parent+"/");
|
||||
}
|
||||
|
||||
checkSlugPage(text, parent, key, $("#jsslug"));
|
||||
});
|
||||
checkSlugPage(text, parent, key, $("#jsslug"));
|
||||
});
|
||||
|
||||
$("#jsdelete").click(function() {
|
||||
if(confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")==false) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#jsdelete").click(function() {
|
||||
if(confirm("<?php $Language->p('confirm-delete-this-action-cannot-be-undone') ?>")==false) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Button Save as draft
|
||||
$("#jsSaveDraft").on("click", function() {
|
||||
$("#jsstatus").val("draft");
|
||||
$(".uk-form").submit();
|
||||
});
|
||||
|
||||
// Right sidebar
|
||||
$(".sidebar-button").click(function() {
|
||||
var view = "#" + $(this).data("view");
|
||||
|
||||
if( $(view).is(":visible") ) {
|
||||
$(view).hide();
|
||||
}
|
||||
else {
|
||||
$(".sidebar-view").hide();
|
||||
$(view).show();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
@ -16,7 +16,8 @@ HTML::formOpen(array('class'=>'uk-form-stacked'));
|
||||
'value'=>$_Post->key()
|
||||
));
|
||||
|
||||
// ---- LEFT SIDE ----
|
||||
// LEFT SIDE
|
||||
// --------------------------------------------------------------------
|
||||
echo '<div class="uk-grid uk-grid-medium">';
|
||||
echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
|
||||
@ -39,26 +40,23 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
// Form buttons
|
||||
echo '<div class="uk-form-row uk-margin-bottom">
|
||||
<button class="uk-button uk-button-primary" type="submit">'.$L->g('Save').'</button>
|
||||
<button class="uk-button uk-button-primary" type="button" id="jsSaveDraft">'.$L->g('Save as draft').'</button>
|
||||
<button id="jsdelete-post" name="delete-post" class="uk-button" type="submit">'.$L->g('Delete').'</button>
|
||||
<a class="uk-button" href="'.HTML_PATH_ADMIN_ROOT.'manage-posts">'.$L->g('Cancel').'</a>
|
||||
</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
// ---- RIGHT SIDE ----
|
||||
// RIGHT SIDE
|
||||
// --------------------------------------------------------------------
|
||||
echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
|
||||
// Tabs, general and advanced mode
|
||||
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
||||
echo '<li><a href="">'.$L->g('General').'</a></li>';
|
||||
echo '<li><a href="">'.$L->g('Images').'</a></li>';
|
||||
echo '<li><a href="">'.$L->g('Advanced').'</a></li>';
|
||||
echo '</ul>';
|
||||
echo '<ul>';
|
||||
|
||||
echo '<ul id="tab-options" class="uk-switcher uk-margin">';
|
||||
|
||||
// ---- GENERAL TAB ----
|
||||
echo '<li>';
|
||||
// GENERAL TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-general-view"><i class="uk-icon-angle-down"></i> GENERAL</h2></li>';
|
||||
echo '<li id="sidebar-general-view" class="sidebar-view">';
|
||||
|
||||
// Description input
|
||||
HTML::formTextarea(array(
|
||||
@ -70,23 +68,15 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
||||
));
|
||||
|
||||
// Tags input
|
||||
HTML::tags(array(
|
||||
'name'=>'tags',
|
||||
'label'=>$L->g('Tags'),
|
||||
'allTags'=>$dbTags->getAll(),
|
||||
'selectedTags'=>$_Post->tags(true)
|
||||
));
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ---- IMAGES TAB ----
|
||||
echo '<li>';
|
||||
// IMAGES TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-images-view"><i class="uk-icon-angle-down"></i> Images</h2></li>';
|
||||
echo '<li id="sidebar-images-view" class="sidebar-view">';
|
||||
|
||||
// --- BLUDIT COVER IMAGE ---
|
||||
echo '<hr>';
|
||||
HTML::bluditCoverImage($_Post->coverImage(false));
|
||||
echo '<hr>';
|
||||
|
||||
// --- BLUDIT QUICK IMAGES ---
|
||||
HTML::bluditQuickImages();
|
||||
@ -99,8 +89,25 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ---- ADVANCED TAB ----
|
||||
echo '<li>';
|
||||
// TAGS
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-tags-view"><i class="uk-icon-angle-down"></i> '.$L->g('Tags').'</h2></li>';
|
||||
echo '<li id="sidebar-tags-view" class="sidebar-view">';
|
||||
|
||||
// Tags input
|
||||
HTML::tags(array(
|
||||
'name'=>'tags',
|
||||
'label'=>$L->g('Tags'),
|
||||
'allTags'=>$dbTags->getAll(),
|
||||
'selectedTags'=>$_Post->tags(true)
|
||||
));
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ADVANCED TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-advanced-view"><i class="uk-icon-angle-down"></i> ADVANCED</h2></li>';
|
||||
echo '<li id="sidebar-advanced-view" class="sidebar-view">';
|
||||
|
||||
// Status input
|
||||
HTML::formSelect(array(
|
||||
@ -164,6 +171,25 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
// Button Save as draft
|
||||
$("#jsSaveDraft").on("click", function() {
|
||||
$("#jsstatus").val("draft");
|
||||
$(".uk-form").submit();
|
||||
});
|
||||
|
||||
// Right sidebar
|
||||
$(".sidebar-button").click(function() {
|
||||
var view = "#" + $(this).data("view");
|
||||
|
||||
if( $(view).is(":visible") ) {
|
||||
$(view).hide();
|
||||
}
|
||||
else {
|
||||
$(".sidebar-view").hide();
|
||||
$(view).show();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
@ -10,7 +10,8 @@ HTML::formOpen(array('class'=>'uk-form-stacked'));
|
||||
'value'=>$Security->getTokenCSRF()
|
||||
));
|
||||
|
||||
// ---- LEFT SIDE ----
|
||||
// LEFT SIDE
|
||||
// --------------------------------------------------------------------
|
||||
echo '<div class="uk-grid uk-grid-medium">';
|
||||
echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
|
||||
@ -33,25 +34,22 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
// Form buttons
|
||||
echo '<div class="uk-form-row uk-margin-bottom">
|
||||
<button class="uk-button uk-button-primary" type="submit">'.$L->g('Save').'</button>
|
||||
<a class="uk-button" href="'.HTML_PATH_ADMIN_ROOT.'manage-pages">'.$L->g('Cancel').'</a>
|
||||
<button class="uk-button uk-button-primary" type="button" id="jsSaveDraft">'.$L->g('Save as draft').'</button>
|
||||
<a class="uk-button" href="'.HTML_PATH_ADMIN_ROOT.'manage-posts">'.$L->g('Cancel').'</a>
|
||||
</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
// ---- RIGHT SIDE ----
|
||||
// RIGHT SIDE
|
||||
// --------------------------------------------------------------------
|
||||
echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
|
||||
// Tabs, general and advanced mode
|
||||
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
||||
echo '<li><a href="">'.$L->g('General').'</a></li>';
|
||||
echo '<li><a href="">'.$L->g('Images').'</a></li>';
|
||||
echo '<li><a href="">'.$L->g('Advanced').'</a></li>';
|
||||
echo '</ul>';
|
||||
echo '<ul>';
|
||||
|
||||
echo '<ul id="tab-options" class="uk-switcher uk-margin">';
|
||||
|
||||
// ---- GENERAL TAB ----
|
||||
echo '<li>';
|
||||
// GENERAL TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-general-view"><i class="uk-icon-angle-down"></i> GENERAL</h2></li>';
|
||||
echo '<li id="sidebar-general-view" class="sidebar-view">';
|
||||
|
||||
// Description input
|
||||
HTML::formTextarea(array(
|
||||
@ -63,23 +61,15 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
||||
));
|
||||
|
||||
// Tags input
|
||||
HTML::tags(array(
|
||||
'name'=>'tags',
|
||||
'label'=>$L->g('Tags'),
|
||||
'allTags'=>$dbTags->getAll(),
|
||||
'selectedTags'=>array()
|
||||
));
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ---- IMAGES TAB ----
|
||||
echo '<li>';
|
||||
// IMAGES TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-images-view"><i class="uk-icon-angle-down"></i> Images</h2></li>';
|
||||
echo '<li id="sidebar-images-view" class="sidebar-view">';
|
||||
|
||||
// --- BLUDIT COVER IMAGE ---
|
||||
echo '<hr>';
|
||||
HTML::bluditCoverImage();
|
||||
echo '<hr>';
|
||||
|
||||
// --- BLUDIT QUICK IMAGES ---
|
||||
HTML::bluditQuickImages();
|
||||
@ -92,8 +82,25 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ---- ADVANCED TAB ----
|
||||
echo '<li>';
|
||||
// TAGS
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-tags-view"><i class="uk-icon-angle-down"></i> '.$L->g('Tags').'</h2></li>';
|
||||
echo '<li id="sidebar-tags-view" class="sidebar-view">';
|
||||
|
||||
// Tags input
|
||||
HTML::tags(array(
|
||||
'name'=>'tags',
|
||||
'label'=>'',
|
||||
'allTags'=>$dbTags->getAll(),
|
||||
'selectedTags'=>array()
|
||||
));
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ADVANCED TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-advanced-view"><i class="uk-icon-angle-down"></i> ADVANCED</h2></li>';
|
||||
echo '<li id="sidebar-advanced-view" class="sidebar-view">';
|
||||
|
||||
// Status input
|
||||
HTML::formSelect(array(
|
||||
@ -151,34 +158,53 @@ HTML::formClose();
|
||||
$(document).ready(function()
|
||||
{
|
||||
|
||||
$("#jsslug").keyup(function() {
|
||||
var text = $(this).val();
|
||||
var parent = $("#jsparent").val();
|
||||
$("#jsslug").keyup(function() {
|
||||
var text = $(this).val();
|
||||
var parent = $("#jsparent").val();
|
||||
|
||||
checkSlugPage(text, parent, "", $("#jsslug"));
|
||||
});
|
||||
checkSlugPage(text, parent, "", $("#jsslug"));
|
||||
});
|
||||
|
||||
$("#jstitle").keyup(function() {
|
||||
var text = $(this).val();
|
||||
var parent = $("#jsparent").val();
|
||||
$("#jstitle").keyup(function() {
|
||||
var text = $(this).val();
|
||||
var parent = $("#jsparent").val();
|
||||
|
||||
checkSlugPage(text, parent, "", $("#jsslug"));
|
||||
});
|
||||
checkSlugPage(text, parent, "", $("#jsslug"));
|
||||
});
|
||||
|
||||
$("#jsparent").change(function() {
|
||||
var parent = $(this).val();
|
||||
var text = $("#jsslug").val();
|
||||
$("#jsparent").change(function() {
|
||||
var parent = $(this).val();
|
||||
var text = $("#jsslug").val();
|
||||
|
||||
if(parent==NO_PARENT_CHAR) {
|
||||
$("#jsparentExample").text("");
|
||||
}
|
||||
else {
|
||||
$("#jsparentExample").text(parent+"/");
|
||||
}
|
||||
if(parent==NO_PARENT_CHAR) {
|
||||
$("#jsparentExample").text("");
|
||||
}
|
||||
else {
|
||||
$("#jsparentExample").text(parent+"/");
|
||||
}
|
||||
|
||||
checkSlugPage(text, parent, "", $("#jsslug"));
|
||||
});
|
||||
checkSlugPage(text, parent, "", $("#jsslug"));
|
||||
});
|
||||
|
||||
// Button Save as draft
|
||||
$("#jsSaveDraft").on("click", function() {
|
||||
$("#jsstatus").val("draft");
|
||||
$(".uk-form").submit();
|
||||
});
|
||||
|
||||
// Right sidebar
|
||||
$(".sidebar-button").click(function() {
|
||||
var view = "#" + $(this).data("view");
|
||||
|
||||
if( $(view).is(":visible") ) {
|
||||
$(view).hide();
|
||||
}
|
||||
else {
|
||||
$(".sidebar-view").hide();
|
||||
$(view).show();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
@ -10,7 +10,8 @@ HTML::formOpen(array('class'=>'uk-form-stacked'));
|
||||
'value'=>$Security->getTokenCSRF()
|
||||
));
|
||||
|
||||
// ---- LEFT SIDE ----
|
||||
// LEFT SIDE
|
||||
// --------------------------------------------------------------------
|
||||
echo '<div class="uk-grid uk-grid-medium">';
|
||||
echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
|
||||
@ -33,25 +34,22 @@ echo '<div class="bl-publish-view uk-width-8-10">';
|
||||
// Form buttons
|
||||
echo '<div class="uk-form-row uk-margin-bottom">
|
||||
<button class="uk-button uk-button-primary" type="submit">'.$L->g('Save').'</button>
|
||||
<button class="uk-button uk-button-primary" type="button" id="jsSaveDraft">'.$L->g('Save as draft').'</button>
|
||||
<a class="uk-button" href="'.HTML_PATH_ADMIN_ROOT.'manage-posts">'.$L->g('Cancel').'</a>
|
||||
</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
// ---- RIGHT SIDE ----
|
||||
// RIGHT SIDE
|
||||
// --------------------------------------------------------------------
|
||||
echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
|
||||
// Tabs, general and advanced mode
|
||||
echo '<ul class="uk-tab" data-uk-tab="{connect:\'#tab-options\'}">';
|
||||
echo '<li><a href="">'.$L->g('General').'</a></li>';
|
||||
echo '<li><a href="">'.$L->g('Images').'</a></li>';
|
||||
echo '<li><a href="">'.$L->g('Advanced').'</a></li>';
|
||||
echo '</ul>';
|
||||
echo '<ul>';
|
||||
|
||||
echo '<ul id="tab-options" class="uk-switcher uk-margin">';
|
||||
|
||||
// ---- GENERAL TAB ----
|
||||
echo '<li>';
|
||||
// GENERAL TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-general-view"><i class="uk-icon-angle-down"></i> GENERAL</h2></li>';
|
||||
echo '<li id="sidebar-general-view" class="sidebar-view">';
|
||||
|
||||
// Description input
|
||||
HTML::formTextarea(array(
|
||||
@ -63,23 +61,15 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
'tip'=>$L->g('this-field-can-help-describe-the-content')
|
||||
));
|
||||
|
||||
// Tags input
|
||||
HTML::tags(array(
|
||||
'name'=>'tags',
|
||||
'label'=>$L->g('Tags'),
|
||||
'allTags'=>$dbTags->getAll(),
|
||||
'selectedTags'=>array()
|
||||
));
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ---- IMAGES TAB ----
|
||||
echo '<li>';
|
||||
|
||||
// IMAGES TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-images-view"><i class="uk-icon-angle-down"></i> Images</h2></li>';
|
||||
echo '<li id="sidebar-images-view" class="sidebar-view">';
|
||||
|
||||
// --- BLUDIT COVER IMAGE ---
|
||||
echo '<hr>';
|
||||
HTML::bluditCoverImage();
|
||||
echo '<hr>';
|
||||
|
||||
// --- BLUDIT QUICK IMAGES ---
|
||||
HTML::bluditQuickImages();
|
||||
@ -92,8 +82,25 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ---- ADVANCED TAB ----
|
||||
echo '<li>';
|
||||
// TAGS
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-tags-view"><i class="uk-icon-angle-down"></i> '.$L->g('Tags').'</h2></li>';
|
||||
echo '<li id="sidebar-tags-view" class="sidebar-view">';
|
||||
|
||||
// Tags input
|
||||
HTML::tags(array(
|
||||
'name'=>'tags',
|
||||
'label'=>'',
|
||||
'allTags'=>$dbTags->getAll(),
|
||||
'selectedTags'=>array()
|
||||
));
|
||||
|
||||
echo '</li>';
|
||||
|
||||
// ADVANCED TAB
|
||||
// --------------------------------------------------------------------
|
||||
echo '<li><h2 class="sidebar-button" data-view="sidebar-advanced-view"><i class="uk-icon-angle-down"></i> ADVANCED</h2></li>';
|
||||
echo '<li id="sidebar-advanced-view" class="sidebar-view">';
|
||||
|
||||
// Status input
|
||||
HTML::formSelect(array(
|
||||
@ -149,6 +156,25 @@ $(document).ready(function() {
|
||||
checkSlugPost(slug, "", $("#jsslug"));
|
||||
});
|
||||
|
||||
// Button Save as draft
|
||||
$("#jsSaveDraft").on("click", function() {
|
||||
$("#jsstatus").val("draft");
|
||||
$(".uk-form").submit();
|
||||
});
|
||||
|
||||
// Right sidebar
|
||||
$(".sidebar-button").click(function() {
|
||||
var view = "#" + $(this).data("view");
|
||||
|
||||
if( $(view).is(":visible") ) {
|
||||
$(view).hide();
|
||||
}
|
||||
else {
|
||||
$(".sidebar-view").hide();
|
||||
$(view).show();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
@ -1,10 +1,10 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// Bludit version
|
||||
define('BLUDIT_VERSION', '1.5.2');
|
||||
define('BLUDIT_CODENAME', 'Learning To Fly');
|
||||
define('BLUDIT_RELEASE_DATE', '2016-10-11');
|
||||
define('BLUDIT_BUILD', '20161011');
|
||||
define('BLUDIT_VERSION', '1.6-beta');
|
||||
define('BLUDIT_CODENAME', '');
|
||||
define('BLUDIT_RELEASE_DATE', '');
|
||||
define('BLUDIT_BUILD', '');
|
||||
|
||||
// Debug mode
|
||||
// Change to FALSE, for prevent warning or error on browser
|
||||
@ -59,6 +59,9 @@ if(!defined('JSON_PRETTY_PRINT')) {
|
||||
// Protecting against Symlink attacks.
|
||||
define('CHECK_SYMBOLIC_LINKS', TRUE);
|
||||
|
||||
// Auto scroll
|
||||
define('AUTO_SCROLL', TRUE);
|
||||
|
||||
// Alert status ok
|
||||
define('ALERT_STATUS_OK', 0);
|
||||
|
||||
|
@ -247,5 +247,7 @@
|
||||
"сurrent-status" : "Status",
|
||||
"disable-the-user" : "Disable the user",
|
||||
"add-a-new-page": "Add a new page",
|
||||
"add-a-new-post": "Add a new post"
|
||||
"add-a-new-post": "Add a new post",
|
||||
|
||||
"save-as-draft": "Save as draft"
|
||||
}
|
66
install.php
66
install.php
@ -12,6 +12,23 @@ if(version_compare(phpversion(), '5.3', '<')) {
|
||||
exit('Current PHP version '.phpversion().', you need > 5.3. (ERR_202)');
|
||||
}
|
||||
|
||||
// Check PHP modules
|
||||
if(!extension_loaded('mbstring')) {
|
||||
exit('PHP module mbstring is not installed. Check the requirements.');
|
||||
}
|
||||
|
||||
if(!extension_loaded('json')) {
|
||||
exit('PHP module json is not installed. Check the requirements.');
|
||||
}
|
||||
|
||||
if(!extension_loaded('gd')) {
|
||||
exit('PHP module gd is not installed. Check the requirements.');
|
||||
}
|
||||
|
||||
if(!extension_loaded('dom')) {
|
||||
exit('PHP module dom is not installed. Check the requirements.');
|
||||
}
|
||||
|
||||
// Security constant
|
||||
define('BLUDIT', true);
|
||||
|
||||
@ -184,14 +201,10 @@ function checkSystem()
|
||||
{
|
||||
$stdOut = array();
|
||||
$dirpermissions = 0755;
|
||||
$phpModules = array();
|
||||
|
||||
if(function_exists('get_loaded_extensions')) {
|
||||
$phpModules = get_loaded_extensions();
|
||||
}
|
||||
|
||||
// Check .htaccess file for different webservers
|
||||
if( !file_exists(PATH_ROOT.'.htaccess') ) {
|
||||
if( !file_exists(PATH_ROOT.'.htaccess') )
|
||||
{
|
||||
|
||||
if ( !isset($_SERVER['SERVER_SOFTWARE']) ||
|
||||
stripos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false ||
|
||||
@ -203,50 +216,9 @@ function checkSystem()
|
||||
$tmp['title'] = 'File .htaccess';
|
||||
$tmp['errorText'] = $errorText;
|
||||
array_push($stdOut, $tmp);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(!in_array('gd', $phpModules))
|
||||
{
|
||||
$errorText = 'PHP module GD is not installed.';
|
||||
error_log($errorText, 0);
|
||||
|
||||
$tmp['title'] = 'PHP module';
|
||||
$tmp['errorText'] = $errorText;
|
||||
array_push($stdOut, $tmp);
|
||||
}
|
||||
|
||||
if(!in_array('dom', $phpModules))
|
||||
{
|
||||
$errorText = 'PHP module DOM is not installed. (ERR_203)';
|
||||
error_log($errorText, 0);
|
||||
|
||||
$tmp['title'] = 'PHP module';
|
||||
$tmp['errorText'] = $errorText;
|
||||
array_push($stdOut, $tmp);
|
||||
}
|
||||
|
||||
if(!in_array('json', $phpModules))
|
||||
{
|
||||
$errorText = 'PHP module JSON is not installed. (ERR_204)';
|
||||
error_log($errorText, 0);
|
||||
|
||||
$tmp['title'] = 'PHP module';
|
||||
$tmp['errorText'] = $errorText;
|
||||
array_push($stdOut, $tmp);
|
||||
}
|
||||
|
||||
if(!in_array('mbstring', $phpModules))
|
||||
{
|
||||
$errorText = 'PHP module Multibyte String (mbstring) is not installed. (ERR_206)';
|
||||
error_log($errorText, 0);
|
||||
|
||||
$tmp['title'] = 'PHP module';
|
||||
$tmp['errorText'] = $errorText;
|
||||
array_push($stdOut, $tmp);
|
||||
}
|
||||
|
||||
// Try to create the directory content
|
||||
@mkdir(PATH_CONTENT, $dirpermissions, true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user