Bug fixes
This commit is contained in:
parent
3d4e2cd526
commit
8530c8a7ba
|
@ -156,10 +156,6 @@ form h4 {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#advancedOptions {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
p.advOptions {
|
p.advOptions {
|
||||||
color: #777;
|
color: #777;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
|
|
|
@ -2,26 +2,26 @@
|
||||||
|
|
||||||
<form method="post" action="" class="forms">
|
<form method="post" action="" class="forms">
|
||||||
|
|
||||||
<input type="hidden" id="key" name="key" value="<?php echo $_Page->key() ?>">
|
<input type="hidden" id="jsKey" name="key" value="<?php echo $_Page->key() ?>">
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Title
|
Title
|
||||||
<input id="title" name="title" type="text" class="width-70" value="<?php echo $_Page->title() ?>">
|
<input id="jsTitle" name="title" type="text" class="width-70" value="<?php echo $_Page->title() ?>">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Content <span class="forms-desc">HTML and Markdown code supported.</span>
|
Content <span class="forms-desc">HTML and Markdown code supported.</span>
|
||||||
<textarea name="content" rows="10" class="width-70"><?php echo htmlspecialchars($_Page->contentRaw(), ENT_COMPAT|ENT_HTML5, CHARSET) ?></textarea>
|
<textarea name="content" rows="10" class="width-70"><?php echo $_Page->contentRaw() ?></textarea>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if($Site->advancedOptions()) {
|
if($Site->advancedOptions()) {
|
||||||
echo '<div id="advancedOptions">';
|
echo '<div id="jsAdvancedOptions">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
||||||
echo '<div id="advancedOptions" style="display:none">';
|
echo '<div id="jsAdvancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -33,9 +33,9 @@
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<label for="parent">
|
<label for="jsParent">
|
||||||
Page parent
|
Page parent
|
||||||
<select id="parent" name="parent" class="width-50">
|
<select id="jsParent" name="parent" class="width-50">
|
||||||
<?php
|
<?php
|
||||||
$htmlOptions[NO_PARENT_CHAR] = '(No parent)';
|
$htmlOptions[NO_PARENT_CHAR] = '(No parent)';
|
||||||
$htmlOptions += $dbPages->parentKeyList();
|
$htmlOptions += $dbPages->parentKeyList();
|
||||||
|
@ -53,27 +53,27 @@
|
||||||
<label>
|
<label>
|
||||||
Friendly url
|
Friendly url
|
||||||
<div class="input-groups width-50">
|
<div class="input-groups width-50">
|
||||||
<span class="input-prepend"><?php echo $Site->url() ?><span id="parentExample"><?php echo $_Page->parentKey()?$_Page->parentKey().'/':''; ?></span></span>
|
<span class="input-prepend"><?php echo $Site->url() ?><span id="jsParentExample"><?php echo $_Page->parentKey()?$_Page->parentKey().'/':''; ?></span></span>
|
||||||
<input id="slug" type="text" name="slug" value="<?php echo $_Page->slug() ?>">
|
<input id="jsSlug" type="text" name="slug" value="<?php echo $_Page->slug() ?>">
|
||||||
</div>
|
</div>
|
||||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Description
|
Description
|
||||||
<input id="description" type="text" name="description" class="width-50" value="<?php echo $_Page->description() ?>">
|
<input id="jsDescription" type="text" name="description" class="width-50" value="<?php echo $_Page->description() ?>">
|
||||||
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Tags
|
Tags
|
||||||
<input id="tags" name="tags" type="text" class="width-50" value="<?php echo $_Page->tags() ?>">
|
<input id="jsTags" name="tags" type="text" class="width-50" value="<?php echo $_Page->tags() ?>">
|
||||||
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Position
|
Position
|
||||||
<input id="position" name="position" type="text" class="width-20" value="<?php echo $_Page->position() ?>">
|
<input id="jsPosition" name="position" type="text" class="width-20" value="<?php echo $_Page->position() ?>">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -91,34 +91,34 @@
|
||||||
|
|
||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
var key = $("#key").val();
|
var key = $("#jsKey").val();
|
||||||
|
|
||||||
$("#slug").keyup(function() {
|
$("#jsSlug").keyup(function() {
|
||||||
var text = $(this).val();
|
var text = $(this).val();
|
||||||
var parent = $("#parent").val();
|
var parent = $("#jsParent").val();
|
||||||
|
|
||||||
checkSlugPage(text, parent, key, $("#slug"));
|
checkSlugPage(text, parent, key, $("#jsSlug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#title").keyup(function() {
|
$("#jsTitle").keyup(function() {
|
||||||
var text = $(this).val();
|
var text = $(this).val();
|
||||||
var parent = $("#parent").val();
|
var parent = $("#jsParent").val();
|
||||||
|
|
||||||
checkSlugPage(text, parent, key, $("#slug"));
|
checkSlugPage(text, parent, key, $("#jsSlug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#parent").change(function() {
|
$("#jsParent").change(function() {
|
||||||
var parent = $(this).val();
|
var parent = $(this).val();
|
||||||
var text = $("#slug").val();
|
var text = $("#jsSlug").val();
|
||||||
|
|
||||||
if(parent==NO_PARENT_CHAR) {
|
if(parent==NO_PARENT_CHAR) {
|
||||||
$("#parentExample").text("");
|
$("#jsParentExample").text("");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#parentExample").text(parent+"/");
|
$("#jsParentExample").text(parent+"/");
|
||||||
}
|
}
|
||||||
|
|
||||||
checkSlugPage(text, parent, key, $("#slug"));
|
checkSlugPage(text, parent, key, $("#jsSlug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
<form method="post" action="" class="forms">
|
<form method="post" action="" class="forms">
|
||||||
|
|
||||||
<input type="hidden" id="key" name="key" value="<?php echo $_Post->key() ?>">
|
<input type="hidden" id="jsKey" name="key" value="<?php echo $_Post->key() ?>">
|
||||||
<?php var_dump($_Post->title()); ?>
|
|
||||||
<label>
|
<label>
|
||||||
Title
|
Title
|
||||||
<input id="title" name="title" type="text" class="width-70" value="<?php echo $_Post->title() ?>">
|
<input id="jsTitle" name="title" type="text" class="width-70" value="<?php echo $_Post->title() ?>">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
@ -16,12 +16,12 @@
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if($Site->advancedOptions()) {
|
if($Site->advancedOptions()) {
|
||||||
echo '<div id="advancedOptions">';
|
echo '<div id="jsAdvancedOptions">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
||||||
echo '<div id="advancedOptions" style="display:none">';
|
echo '<div id="jsAdvancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -30,21 +30,21 @@
|
||||||
<label>
|
<label>
|
||||||
Friendly url
|
Friendly url
|
||||||
<div class="input-groups width-50">
|
<div class="input-groups width-50">
|
||||||
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="parentExample"></span></span>
|
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsParentExample"></span></span>
|
||||||
<input id="slug" type="text" name="slug" value="<?php echo $_Post->slug() ?>">
|
<input id="jsSlug" type="text" name="slug" value="<?php echo $_Post->slug() ?>">
|
||||||
</div>
|
</div>
|
||||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Description
|
Description
|
||||||
<input id="description" type="text" name="description" class="width-50" value="<?php echo $_Post->description() ?>">
|
<input id="jsDescription" type="text" name="description" class="width-50" value="<?php echo $_Post->description() ?>">
|
||||||
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Tags
|
Tags
|
||||||
<input id="tags" name="tags" type="text" class="width-50" value="<?php echo $_Post->tags() ?>">
|
<input id="jsTags" name="tags" type="text" class="width-50" value="<?php echo $_Post->tags() ?>">
|
||||||
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -59,18 +59,18 @@
|
||||||
|
|
||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
var key = $("#key").val();
|
var key = $("#jsKey").val();
|
||||||
|
|
||||||
$("#title").keyup(function() {
|
$("#jsTitle").keyup(function() {
|
||||||
var slug = $(this).val();
|
var slug = $(this).val();
|
||||||
|
|
||||||
checkSlugPost(slug, key, $("#slug"));
|
checkSlugPost(slug, key, $("#jsSlug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#slug").keyup(function() {
|
$("#jsSlug").keyup(function() {
|
||||||
var slug = $("#slug").val();
|
var slug = $("#jsSlug").val();
|
||||||
|
|
||||||
checkSlugPost(slug, key, $("#slug"));
|
checkSlugPost(slug, key, $("#jsSlug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,30 +4,30 @@
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Title
|
Title
|
||||||
<input id="title" name="title" type="text" class="width-70">
|
<input id="jsTitle" name="title" type="text" class="width-70">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Content <span class="forms-desc">HTML and Markdown code supported.</span>
|
Content <span class="forms-desc">HTML and Markdown code supported.</span>
|
||||||
<textarea name="content" rows="10" class="width-70"></textarea>
|
<textarea id="jsContent" name="content" rows="10" class="width-70"></textarea>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if($Site->advancedOptions()) {
|
if($Site->advancedOptions()) {
|
||||||
echo '<div id="advancedOptions">';
|
echo '<div id="jsAdvancedOptions">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
||||||
echo '<div id="advancedOptions" style="display:none">';
|
echo '<div id="jsAdvancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h4>Advanced options</h4>
|
<h4>Advanced options</h4>
|
||||||
|
|
||||||
<label for="parent">
|
<label for="jsParent">
|
||||||
Page parent
|
Page parent
|
||||||
<select id="parent" name="parent" class="width-50">
|
<select id="jsParent" name="parent" class="width-50">
|
||||||
<?php
|
<?php
|
||||||
$htmlOptions[NO_PARENT_CHAR] = '(No parent)';
|
$htmlOptions[NO_PARENT_CHAR] = '(No parent)';
|
||||||
$htmlOptions += $dbPages->parentKeyList();
|
$htmlOptions += $dbPages->parentKeyList();
|
||||||
|
@ -42,27 +42,27 @@
|
||||||
<label>
|
<label>
|
||||||
Friendly url
|
Friendly url
|
||||||
<div class="input-groups width-50">
|
<div class="input-groups width-50">
|
||||||
<span class="input-prepend"><?php echo $Site->urlPage() ?><span id="parentExample"></span></span>
|
<span class="input-prepend"><?php echo $Site->urlPage() ?><span id="jsParentExample"></span></span>
|
||||||
<input id="slug" name="slug" type="text">
|
<input id="jsSlug" name="slug" type="text">
|
||||||
</div>
|
</div>
|
||||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Description
|
Description
|
||||||
<input id="description" name="description" type="text" class="width-50">
|
<input id="jsDescription" name="description" type="text" class="width-50">
|
||||||
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Tags
|
Tags
|
||||||
<input id="tags" name="tags" type="text" class="width-50">
|
<input id="jsTags" name="tags" type="text" class="width-50">
|
||||||
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Position
|
Position
|
||||||
<input id="position" name="position" type="text" class="width-20" value="0">
|
<input id="jsPosition" name="position" type="text" class="width-20" value="0">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -77,32 +77,32 @@
|
||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
|
|
||||||
$("#slug").keyup(function() {
|
$("#jsSlug").keyup(function() {
|
||||||
var text = $(this).val();
|
var text = $(this).val();
|
||||||
var parent = $("#parent").val();
|
var parent = $("#jsParent").val();
|
||||||
|
|
||||||
checkSlugPage(text, parent, "", $("#slug"));
|
checkSlugPage(text, parent, "", $("#jsSlug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#title").keyup(function() {
|
$("#jsTitle").keyup(function() {
|
||||||
var text = $(this).val();
|
var text = $(this).val();
|
||||||
var parent = $("#parent").val();
|
var parent = $("#jsParent").val();
|
||||||
|
|
||||||
checkSlugPage(text, parent, "", $("#slug"));
|
checkSlugPage(text, parent, "", $("#jsSlug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#parent").change(function() {
|
$("#jsParent").change(function() {
|
||||||
var parent = $(this).val();
|
var parent = $(this).val();
|
||||||
var text = $("#slug").val();
|
var text = $("#jsSlug").val();
|
||||||
|
|
||||||
if(parent==NO_PARENT_CHAR) {
|
if(parent==NO_PARENT_CHAR) {
|
||||||
$("#parentExample").text("");
|
$("#jsParentExample").text("");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#parentExample").text(parent+"/");
|
$("#jsParentExample").text(parent+"/");
|
||||||
}
|
}
|
||||||
|
|
||||||
checkSlugPage(text, parent, "", $("#slug"));
|
checkSlugPage(text, parent, "", $("#jsSlug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,22 +4,22 @@
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Title
|
Title
|
||||||
<input id="title" name="title" type="text" class="width-70">
|
<input id="jsTitle" name="title" type="text" class="width-70">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Content <span class="forms-desc">HTML and Markdown code supported.</span>
|
Content <span class="forms-desc">HTML and Markdown code supported.</span>
|
||||||
<textarea name="content" rows="10" class="width-70"></textarea>
|
<textarea id="jsContent" name="content" rows="10" class="width-70"></textarea>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if($Site->advancedOptions()) {
|
if($Site->advancedOptions()) {
|
||||||
echo '<div id="advancedOptions">';
|
echo '<div id="jsAdvancedOptions">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
||||||
echo '<div id="advancedOptions" style="display:none">';
|
echo '<div id="jsAdvancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -28,21 +28,21 @@
|
||||||
<label>
|
<label>
|
||||||
Friendly url
|
Friendly url
|
||||||
<div class="input-groups width-50">
|
<div class="input-groups width-50">
|
||||||
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="parentExample"></span></span>
|
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsParentExample"></span></span>
|
||||||
<input id="slug" name="slug" type="text">
|
<input id="jsSlug" name="slug" type="text">
|
||||||
</div>
|
</div>
|
||||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Description
|
Description
|
||||||
<input id="description" name="description" type="text" class="width-50">
|
<input id="jsDescription" name="description" type="text" class="width-50">
|
||||||
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
<span class="forms-desc">This field is for Twitter/Facebook/Google+ descriptions. No more than 150 characters.</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Tags
|
Tags
|
||||||
<input id="tags" name="tags" type="text" class="width-50">
|
<input id="jsTags" name="tags" type="text" class="width-50">
|
||||||
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
<span class="forms-desc">Write the tags separeted by comma. eg: tag1, tag2, tag3</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
@ -58,16 +58,16 @@
|
||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
|
|
||||||
$("#title").keyup(function() {
|
$("#jsTitle").keyup(function() {
|
||||||
var slug = $(this).val();
|
var slug = $(this).val();
|
||||||
|
|
||||||
checkSlugPost(slug, "", $("#slug"));
|
checkSlugPost(slug, "", $("#jsSlug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#slug").keyup(function() {
|
$("#jsSlug").keyup(function() {
|
||||||
var slug = $("#slug").val();
|
var slug = $("#jsSlug").val();
|
||||||
|
|
||||||
checkSlugPost(slug, "", $("#slug"));
|
checkSlugPost(slug, "", $("#jsSlug"));
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -73,6 +73,7 @@ class Url
|
||||||
if($filter===$adminFilter['admin'])
|
if($filter===$adminFilter['admin'])
|
||||||
{
|
{
|
||||||
$this->whereAmI = 'admin';
|
$this->whereAmI = 'admin';
|
||||||
|
$this->slug = 'dashboard';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue