[geeklog-hg] geeklog: Added in title_2_id javascript for Staticpages
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Sep 7 14:31:33 EDT 2013
changeset 9286:f7fba63957c4
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/f7fba63957c4
user: Tom <websitemaster at cogeco.net>
date: Sat Sep 07 14:31:10 2013 -0400
description:
Added in title_2_id javascript for Staticpages
diffstat:
plugins/staticpages/templates/admin/editor.thtml | 14 +++++++-------
plugins/staticpages/templates/admin/editor_advanced.thtml | 14 +++++++-------
public_html/admin/plugins/staticpages/index.php | 3 +++
3 files changed, 17 insertions(+), 14 deletions(-)
diffs (75 lines):
diff -r a2e1b9499773 -r f7fba63957c4 plugins/staticpages/templates/admin/editor.thtml
--- a/plugins/staticpages/templates/admin/editor.thtml Sat Sep 07 14:01:08 2013 -0400
+++ b/plugins/staticpages/templates/admin/editor.thtml Sat Sep 07 14:31:10 2013 -0400
@@ -5,7 +5,13 @@
<div class="admin_basic">
<dl class="form_block">
<dt><label for="sp-editor-sp_title">{lang_title}</label></dt>
- <dd><input type="text" maxlength="128" name="sp_title" value="{sp_title}" id="sp-editor-sp_title" class="size5"{xhtml}></dd>
+ <dd><input type="text" maxlength="128" onkeyup="TitleToId('sp-editor-sp_title','sp-editor-sp_id'); name="sp_title" value="{sp_title}" id="sp-editor-sp_title" class="size5"{xhtml}></dd>
+
+ <dt><label for="sp-editor-sp_id">{lang_id}</label></dt>
+ <dd><input type="text" dir="ltr" name="sp_id" maxlength="128" value="{sp_id}" id="sp-editor-sp_id" class="size5"{xhtml}></dd>
+
+ <dt><label>{lang_url}</label></dt>
+ <dd><span class="break-word">{example_url}</span></dd>
<dt><label for="sp-editor-sp_page_title">{lang_page_title}</label></dt>
<dd><input type="text" maxlength="128" name="sp_page_title" value="{sp_page_title}" id="sp-editor-sp_page_title" class="size5"{xhtml}></dd>
@@ -32,12 +38,6 @@
{comment_options}
</select></dd>
- <dt><label for="sp-editor-sp_id">{lang_id}</label></dt>
- <dd><input type="text" dir="ltr" name="sp_id" maxlength="128" value="{sp_id}" id="sp-editor-sp_id" class="size5"{xhtml}></dd>
-
- <dt><label>{lang_url}</label></dt>
- <dd><span class="break-word">{example_url}</span></dd>
-
<dt{hide_meta}><label for="sp-editor-meta_description">{lang_metadescription}</label></dt>
<dd{hide_meta}><textarea name="meta_description" cols="45" rows="2" id="sp-editor-meta_description" class="wide">{meta_description}</textarea></dd>
diff -r a2e1b9499773 -r f7fba63957c4 plugins/staticpages/templates/admin/editor_advanced.thtml
--- a/plugins/staticpages/templates/admin/editor_advanced.thtml Sat Sep 07 14:01:08 2013 -0400
+++ b/plugins/staticpages/templates/admin/editor_advanced.thtml Sat Sep 07 14:31:10 2013 -0400
@@ -7,7 +7,13 @@
<div class="admin_basic">
<dl class="form_block">
<dt><label for="sp-advanced_editor-sp_title">{lang_title}</label></dt>
- <dd><input type="text" maxlength="128" name="sp_title" value="{sp_title}" id="sp-advanced_editor-sp_title" class="size5"{xhtml}></dd>
+ <dd><input type="text" maxlength="128" onkeyup="TitleToId('sp-advanced_editor-sp_title','sp-advanced_editor-sp_id');" name="sp_title" value="{sp_title}" id="sp-advanced_editor-sp_title" class="size5"{xhtml}></dd>
+
+ <dt><label for="sp-advanced_editor-sp_id">{lang_id}</label></dt>
+ <dd><input type="text" dir="ltr" name="sp_id" maxlength="128" value="{sp_id}" id="sp-advanced_editor-sp_id" class="size5"{xhtml}></dd>
+
+ <dt><label>{lang_url}</label></dt>
+ <dd><span class="break-word">{example_url}</span></dd>
<dt><label for="sp-advanced_editor-sp_page_title">{lang_page_title}</label></dt>
<dd><input type="text" maxlength="128" name="sp_page_title" value="{sp_page_title}" id="sp-advanced_editor-sp_page_title" class="size5"{xhtml}></dd>
@@ -39,12 +45,6 @@
{post_options}
</select></dd>
- <dt><label for="sp-advanced_editor-sp_id">{lang_id}</label></dt>
- <dd><input type="text" dir="ltr" name="sp_id" maxlength="128" value="{sp_id}" id="sp-advanced_editor-sp_id" class="size5"{xhtml}></dd>
-
- <dt><label>{lang_url}</label></dt>
- <dd><span class="break-word">{example_url}</span></dd>
-
<dt{hide_meta}><label for="sp-advanced_editor-meta_description">{lang_metadescription}</label></dt>
<dd{hide_meta}><textarea name="meta_description" cols="45" rows="2" id="sp-advanced_editor-meta_description" class="wide">{meta_description}</textarea></dd>
diff -r a2e1b9499773 -r f7fba63957c4 public_html/admin/plugins/staticpages/index.php
--- a/public_html/admin/plugins/staticpages/index.php Sat Sep 07 14:01:08 2013 -0400
+++ b/public_html/admin/plugins/staticpages/index.php Sat Sep 07 14:31:10 2013 -0400
@@ -89,6 +89,9 @@
}
}
$retval = '';
+
+ // Add JavaScript
+ $_SCRIPTS->setJavaScriptFile('title_2_id', '/javascript/title_2_id.js');
$sp_template = COM_newTemplate($template_path);
if ($_CONF['advanced_editor'] && $_USER['advanced_editor']) {
More information about the geeklog-cvs
mailing list