From ac8cea75ed68e568658a8e45215a78b8c40f3ce6 Mon Sep 17 00:00:00 2001 From: mensonge Date: Mon, 12 Jan 2009 13:45:49 +0000 Subject: Interface fix: add suggested anchors to bookmarks' description field. git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@229 b3834d28-1941-0410-a4f8-b48e95affb8f --- config.inc.php.example | 3 +++ jsScuttle.php | 6 ++++++ scuttle.css | 5 +++++ templates/editbookmark.tpl.php | 16 ++++++++++++++-- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/config.inc.php.example b/config.inc.php.example index 56cf957..e8fc9b2 100644 --- a/config.inc.php.example +++ b/config.inc.php.example @@ -88,5 +88,8 @@ $enableGoogleCustomSearch = true; #Enable Google Search Engine into "gsearch/" f ### Other ### $enableAdminColors = true; #Enables special colors on admin pages and bookmarks marking the difference with normal user. +$descriptionAnchors = array("author", "isbn", "address"=>"[address][street][/street][city][/city][/address]"); #add a possible anchor (structured content) for bookmarks' description field + # a simple value "xxx" (like "author") automatically associates xxx with [xxx][/xxx]. + # a complex value "xxx"=>"yyy" (like "address") direclty associates xxx with yyy. ?> diff --git a/jsScuttle.php b/jsScuttle.php index 222b91d..c21fa0e 100644 --- a/jsScuttle.php +++ b/jsScuttle.php @@ -141,3 +141,9 @@ function playerLoad() { } } } + +function addAnchor(anchorForm, where) { + var whereZone = document.getElementById(where); + whereZone.value = whereZone.value + anchorForm; + document.getElementById(where).focus(); +} diff --git a/scuttle.css b/scuttle.css index 7f9b579..5c9aba6 100644 --- a/scuttle.css +++ b/scuttle.css @@ -325,6 +325,11 @@ p.tags span.selected { background: #CEC; } +.anchor { + cursor: pointer; + text-decoration: underline; +} + .treeTag { color: #999955; } diff --git a/templates/editbookmark.tpl.php b/templates/editbookmark.tpl.php index 264a3c1..ab0e861 100644 --- a/templates/editbookmark.tpl.php +++ b/templates/editbookmark.tpl.php @@ -41,8 +41,20 @@ $this->includeTemplate("dojo.inc"); - - ← + + ← + 0): ?> +

+ + $anchorValue): ?> + + + + + -- cgit v1.2.3