Bug fixes
This commit is contained in:
parent
3d4e2cd526
commit
8530c8a7ba
|
@ -156,10 +156,6 @@ form h4 {
|
|||
width: 60%;
|
||||
}
|
||||
|
||||
#advancedOptions {
|
||||
|
||||
}
|
||||
|
||||
p.advOptions {
|
||||
color: #777;
|
||||
font-size: 0.8em;
|
||||
|
|
|
@ -2,26 +2,26 @@
|
|||
|
||||
<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>
|
||||
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>
|
||||
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>
|
||||
|
||||
<?php
|
||||
if($Site->advancedOptions()) {
|
||||
echo '<div id="advancedOptions">';
|
||||
echo '<div id="jsAdvancedOptions">';
|
||||
}
|
||||
else
|
||||
{
|
||||
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
|
||||
<select id="parent" name="parent" class="width-50">
|
||||
<select id="jsParent" name="parent" class="width-50">
|
||||
<?php
|
||||
$htmlOptions[NO_PARENT_CHAR] = '(No parent)';
|
||||
$htmlOptions += $dbPages->parentKeyList();
|
||||
|
@ -53,27 +53,27 @@
|
|||
<label>
|
||||
Friendly url
|
||||
<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>
|
||||
<input id="slug" type="text" name="slug" value="<?php echo $_Page->slug() ?>">
|
||||
<span class="input-prepend"><?php echo $Site->url() ?><span id="jsParentExample"><?php echo $_Page->parentKey()?$_Page->parentKey().'/':''; ?></span></span>
|
||||
<input id="jsSlug" type="text" name="slug" value="<?php echo $_Page->slug() ?>">
|
||||
</div>
|
||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
|
||||
</div>
|
||||
|
@ -91,34 +91,34 @@
|
|||
|
||||
$(document).ready(function()
|
||||
{
|
||||
var key = $("#key").val();
|
||||
var key = $("#jsKey").val();
|
||||
|
||||
$("#slug").keyup(function() {
|
||||
$("#jsSlug").keyup(function() {
|
||||
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 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 text = $("#slug").val();
|
||||
var text = $("#jsSlug").val();
|
||||
|
||||
if(parent==NO_PARENT_CHAR) {
|
||||
$("#parentExample").text("");
|
||||
$("#jsParentExample").text("");
|
||||
}
|
||||
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">
|
||||
|
||||
<input type="hidden" id="key" name="key" value="<?php echo $_Post->key() ?>">
|
||||
<?php var_dump($_Post->title()); ?>
|
||||
<input type="hidden" id="jsKey" name="key" value="<?php echo $_Post->key() ?>">
|
||||
|
||||
<label>
|
||||
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>
|
||||
|
@ -16,12 +16,12 @@
|
|||
|
||||
<?php
|
||||
if($Site->advancedOptions()) {
|
||||
echo '<div id="advancedOptions">';
|
||||
echo '<div id="jsAdvancedOptions">';
|
||||
}
|
||||
else
|
||||
{
|
||||
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>
|
||||
Friendly url
|
||||
<div class="input-groups width-50">
|
||||
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="parentExample"></span></span>
|
||||
<input id="slug" type="text" name="slug" value="<?php echo $_Post->slug() ?>">
|
||||
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsParentExample"></span></span>
|
||||
<input id="jsSlug" type="text" name="slug" value="<?php echo $_Post->slug() ?>">
|
||||
</div>
|
||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
</label>
|
||||
</div>
|
||||
|
@ -59,18 +59,18 @@
|
|||
|
||||
$(document).ready(function()
|
||||
{
|
||||
var key = $("#key").val();
|
||||
var key = $("#jsKey").val();
|
||||
|
||||
$("#title").keyup(function() {
|
||||
$("#jsTitle").keyup(function() {
|
||||
var slug = $(this).val();
|
||||
|
||||
checkSlugPost(slug, key, $("#slug"));
|
||||
checkSlugPost(slug, key, $("#jsSlug"));
|
||||
});
|
||||
|
||||
$("#slug").keyup(function() {
|
||||
var slug = $("#slug").val();
|
||||
$("#jsSlug").keyup(function() {
|
||||
var slug = $("#jsSlug").val();
|
||||
|
||||
checkSlugPost(slug, key, $("#slug"));
|
||||
checkSlugPost(slug, key, $("#jsSlug"));
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -4,30 +4,30 @@
|
|||
|
||||
<label>
|
||||
Title
|
||||
<input id="title" name="title" type="text" class="width-70">
|
||||
<input id="jsTitle" name="title" type="text" class="width-70">
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
|
||||
<?php
|
||||
if($Site->advancedOptions()) {
|
||||
echo '<div id="advancedOptions">';
|
||||
echo '<div id="jsAdvancedOptions">';
|
||||
}
|
||||
else
|
||||
{
|
||||
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>
|
||||
|
||||
<label for="parent">
|
||||
<label for="jsParent">
|
||||
Page parent
|
||||
<select id="parent" name="parent" class="width-50">
|
||||
<select id="jsParent" name="parent" class="width-50">
|
||||
<?php
|
||||
$htmlOptions[NO_PARENT_CHAR] = '(No parent)';
|
||||
$htmlOptions += $dbPages->parentKeyList();
|
||||
|
@ -42,27 +42,27 @@
|
|||
<label>
|
||||
Friendly url
|
||||
<div class="input-groups width-50">
|
||||
<span class="input-prepend"><?php echo $Site->urlPage() ?><span id="parentExample"></span></span>
|
||||
<input id="slug" name="slug" type="text">
|
||||
<span class="input-prepend"><?php echo $Site->urlPage() ?><span id="jsParentExample"></span></span>
|
||||
<input id="jsSlug" name="slug" type="text">
|
||||
</div>
|
||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
|
||||
</div>
|
||||
|
@ -77,32 +77,32 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
|
||||
$("#slug").keyup(function() {
|
||||
$("#jsSlug").keyup(function() {
|
||||
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 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 text = $("#slug").val();
|
||||
var text = $("#jsSlug").val();
|
||||
|
||||
if(parent==NO_PARENT_CHAR) {
|
||||
$("#parentExample").text("");
|
||||
$("#jsParentExample").text("");
|
||||
}
|
||||
else {
|
||||
$("#parentExample").text(parent+"/");
|
||||
$("#jsParentExample").text(parent+"/");
|
||||
}
|
||||
|
||||
checkSlugPage(text, parent, "", $("#slug"));
|
||||
checkSlugPage(text, parent, "", $("#jsSlug"));
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -4,22 +4,22 @@
|
|||
|
||||
<label>
|
||||
Title
|
||||
<input id="title" name="title" type="text" class="width-70">
|
||||
<input id="jsTitle" name="title" type="text" class="width-70">
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
|
||||
<?php
|
||||
if($Site->advancedOptions()) {
|
||||
echo '<div id="advancedOptions">';
|
||||
echo '<div id="jsAdvancedOptions">';
|
||||
}
|
||||
else
|
||||
{
|
||||
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>
|
||||
Friendly url
|
||||
<div class="input-groups width-50">
|
||||
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="parentExample"></span></span>
|
||||
<input id="slug" name="slug" type="text">
|
||||
<span class="input-prepend"><?php echo $Site->urlPost() ?><span id="jsParentExample"></span></span>
|
||||
<input id="jsSlug" name="slug" type="text">
|
||||
</div>
|
||||
<span class="forms-desc">Short text no more than 150 characters. Special characters not allowed.</span>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
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>
|
||||
</label>
|
||||
|
||||
|
@ -58,16 +58,16 @@
|
|||
$(document).ready(function()
|
||||
{
|
||||
|
||||
$("#title").keyup(function() {
|
||||
$("#jsTitle").keyup(function() {
|
||||
var slug = $(this).val();
|
||||
|
||||
checkSlugPost(slug, "", $("#slug"));
|
||||
checkSlugPost(slug, "", $("#jsSlug"));
|
||||
});
|
||||
|
||||
$("#slug").keyup(function() {
|
||||
var slug = $("#slug").val();
|
||||
$("#jsSlug").keyup(function() {
|
||||
var slug = $("#jsSlug").val();
|
||||
|
||||
checkSlugPost(slug, "", $("#slug"));
|
||||
checkSlugPost(slug, "", $("#jsSlug"));
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -73,6 +73,7 @@ class Url
|
|||
if($filter===$adminFilter['admin'])
|
||||
{
|
||||
$this->whereAmI = 'admin';
|
||||
$this->slug = 'dashboard';
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue