From 548d95d132d3f3d24ba0abcd6db2e8db7c577cab Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 26 Oct 2010 18:16:34 +0200 Subject: remove jqueryui, we will be using FCBKcomplete --- data/templates/editbookmark.tpl.php | 64 ++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 25 deletions(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index dd6b100..44e3ac3 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -16,22 +16,11 @@ switch ($row['bStatus']) { break; } -$this->includeTemplate("dojo.inc"); - function jsEscTitle($title) { return addcslashes($title, "'"); } ?> - - - - -
@@ -73,17 +62,21 @@ function jsEscTitle($title) - + - + @@ -124,13 +117,28 @@ function jsEscTitle($title) ?> - -
+ + +
" to include one tag in another. e.g.: europe>france>paris')?>" to include one tag in another. e.g.: europe>france>paris'))?>
+ +
+ + + + + + + + + includeTemplate('dynamictags.inc'); + //FIXME$this->includeTemplate('dynamictags.inc'); // Bookmarklets and import links if (empty($_REQUEST['popup']) && (!isset($showdelete) || !$showdelete)) { @@ -139,17 +147,18 @@ if (empty($_REQUEST['popup']) && (!isset($showdelete) || !$showdelete)) {

+:

+

-- cgit v1.2.3-54-g00ecf From 8146646a0e1c7535e62aeebab049f7b1740c86ae Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 17 Mar 2011 08:46:15 +0100 Subject: prepare jquery autocomplete (does not work yet) --- data/templates/editbookmark.tpl.php | 19 +++++++------------ www/ajax/getcontacttags.php | 22 ++++++++++++---------- www/bookmarks.php | 11 +++++++---- 3 files changed, 26 insertions(+), 26 deletions(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 44e3ac3..504249b 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -26,12 +26,12 @@ function jsEscTitle($title) - ← + ← - ← + ← @@ -39,7 +39,7 @@ function jsEscTitle($title) - ← + ← 0): ?>

@@ -56,19 +56,15 @@ function jsEscTitle($title) style="display:none"> - ← + ← - - ← + ← @@ -104,7 +100,7 @@ function jsEscTitle($title) echo ' ('; echo T_('edit common description').')'; } - + if ($popup) { ?> @@ -135,7 +131,6 @@ jQuery(document).ready(function() { }); - includeTemplate('dynamictags.inc'); @@ -204,5 +199,5 @@ else if (false) includeTemplate($GLOBALS['bottom_include']); +$this->includeTemplate($GLOBALS['bottom_include']); ?> diff --git a/www/ajax/getcontacttags.php b/www/ajax/getcontacttags.php index 89d6a3a..5f1edb3 100644 --- a/www/ajax/getcontacttags.php +++ b/www/ajax/getcontacttags.php @@ -27,18 +27,20 @@ require_once '../www-header.php'; $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Tag'); +$listTags = $b2tservice->getContactTags( + $userservice->getCurrentUserId(), 1000, $userservice->getCurrentUserId() +); +$tags = array(); +foreach($listTags as $t) { + $tags[] = array( + 'caption' => $t['tag'], + 'value' => $t['tag'], + ); +} + +echo json_encode($tags); ?> -{identifier:"tag", -items: [ -getContactTags($userservice->getCurrentUserId(), 1000, $userservice->getCurrentUserId()); - foreach($listTags as $t) { - echo "{tag: \"".$t['tag']."\"},"; - } -?> -]} - diff --git a/www/bookmarks.php b/www/bookmarks.php index 5241481..0753c16 100644 --- a/www/bookmarks.php +++ b/www/bookmarks.php @@ -41,7 +41,6 @@ isset($_POST['address']) ? define('POST_ADDRESS', $_POST['address']): define('PO isset($_POST['description']) ? define('POST_DESCRIPTION', $_POST['description']): define('POST_DESCRIPTION', ''); isset($_POST['privateNote']) ? define('POST_PRIVATENOTE', $_POST['privateNote']): define('POST_PRIVATENOTE', ''); isset($_POST['status']) ? define('POST_STATUS', $_POST['status']): define('POST_STATUS', ''); -isset($_POST['tags']) ? define('POST_TAGS', $_POST['tags']): define('POST_TAGS', ''); isset($_POST['referrer']) ? define('POST_REFERRER', $_POST['referrer']): define('POST_REFERRER', ''); isset($_GET['popup']) ? define('GET_POPUP', $_GET['popup']): define('GET_POPUP', ''); @@ -50,6 +49,10 @@ isset($_POST['popup']) ? define('POST_POPUP', $_POST['popup']): define('POST_POP isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0); isset($_GET['sort']) ? define('GET_SORT', $_GET['sort']): define('GET_SORT', ''); +if (!isset($_POST['tags'])) { + $_POST['tags'] = array(); +} +//echo '

' . var_export($_POST, true) . '

';die(); if ((GET_ACTION == "add") && !$userservice->isLoggedOn()) { @@ -143,7 +146,7 @@ if ($userservice->isLoggedOn() && POST_SUBMITTED != '') { $description = trim(POST_DESCRIPTION); $privateNote = trim(POST_PRIVATENOTE); $status = intval(POST_STATUS); - $categories = trim(POST_TAGS); + $categories = trim(implode(',', $_POST['tags'])); $saved = true; if ($bookmarkservice->addBookmark($address, $title, $description, $privateNote, $status, $categories)) { if (POST_POPUP != '') { @@ -184,10 +187,10 @@ if ($templatename == 'editbookmark.tpl') { 'bAddress' => stripslashes(POST_ADDRESS), 'bDescription' => stripslashes(POST_DESCRIPTION), 'bPrivateNote' => stripslashes(POST_PRIVATENOTE), - 'tags' => (POST_TAGS ? explode(',', stripslashes(POST_TAGS)) : array()), + 'tags' => ($_POST['tags'] ? $_POST['tags'] : array()), 'bStatus' => 0, ); - $tplVars['tags'] = POST_TAGS; + $tplVars['tags'] = $_POST['tags']; } else { if(GET_COPYOF != '') { //copy from bookmarks page $tplVars['row'] = $bookmarkservice->getBookmark(intval(GET_COPYOF), true); -- cgit v1.2.3-54-g00ecf From abc2ca6f79d14ed92fdd251284708212eba425dd Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 22 Mar 2011 18:06:43 +0100 Subject: add jquery-ui with autocomplete --- data/templates/editbookmark.tpl.php | 10 +- www/js/jquery-ui-1.8.5/jquery-ui-1.8.5.custom.js | 1362 ++++++++++++++++++++ www/js/jquery-ui-1.8.5/jquery.ui.autocomplete.js | 555 ++++++++ .../jquery-ui-1.8.5/jquery.ui.autocomplete.min.js | 31 + www/js/jquery-ui-1.8.5/jquery.ui.core.js | 307 +++++ www/js/jquery-ui-1.8.5/jquery.ui.core.min.js | 17 + www/js/jquery-ui-1.8.5/jquery.ui.position.js | 251 ++++ www/js/jquery-ui-1.8.5/jquery.ui.position.min.js | 16 + www/js/jquery-ui-1.8.5/jquery.ui.widget.js | 249 ++++ www/js/jquery-ui-1.8.5/jquery.ui.widget.min.js | 15 + .../base/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 180 bytes .../base/images/ui-bg_flat_75_ffffff_40x100.png | Bin 0 -> 178 bytes .../base/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes .../base/images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../base/images/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes .../base/images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes .../base/images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 119 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 101 bytes .../themes/base/images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_888888_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4369 bytes .../jquery-ui-1.8.5/themes/base/jquery.ui.all.css | 11 + .../themes/base/jquery.ui.autocomplete.css | 53 + .../jquery-ui-1.8.5/themes/base/jquery.ui.base.css | 2 + .../jquery-ui-1.8.5/themes/base/jquery.ui.core.css | 41 + .../themes/base/jquery.ui.theme.css | 252 ++++ 28 files changed, 3167 insertions(+), 5 deletions(-) create mode 100644 www/js/jquery-ui-1.8.5/jquery-ui-1.8.5.custom.js create mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.autocomplete.js create mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.autocomplete.min.js create mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.core.js create mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.core.min.js create mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.position.js create mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.position.min.js create mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.widget.js create mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.widget.min.js create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_flat_75_ffffff_40x100.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_glass_75_dadada_1x400.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-icons_222222_256x240.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-icons_2e83ff_256x240.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-icons_454545_256x240.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-icons_888888_256x240.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-icons_cd0a0a_256x240.png create mode 100644 www/js/jquery-ui-1.8.5/themes/base/jquery.ui.all.css create mode 100644 www/js/jquery-ui-1.8.5/themes/base/jquery.ui.autocomplete.css create mode 100644 www/js/jquery-ui-1.8.5/themes/base/jquery.ui.base.css create mode 100644 www/js/jquery-ui-1.8.5/themes/base/jquery.ui.core.css create mode 100644 www/js/jquery-ui-1.8.5/themes/base/jquery.ui.theme.css (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 504249b..bbdd544 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -117,12 +117,12 @@ function jsEscTitle($title) - + - - - - + + + + diff --git a/www/bookmarks.php b/www/bookmarks.php index 0753c16..3b1d50a 100644 --- a/www/bookmarks.php +++ b/www/bookmarks.php @@ -146,7 +146,7 @@ if ($userservice->isLoggedOn() && POST_SUBMITTED != '') { $description = trim(POST_DESCRIPTION); $privateNote = trim(POST_PRIVATENOTE); $status = intval(POST_STATUS); - $categories = trim(implode(',', $_POST['tags'])); + $categories = explode(',', $_POST['tags']); $saved = true; if ($bookmarkservice->addBookmark($address, $title, $description, $privateNote, $status, $categories)) { if (POST_POPUP != '') { -- cgit v1.2.3-54-g00ecf From f67250a720c96031309f7c9ed129bb30e4972242 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 22 Mar 2011 21:08:17 +0100 Subject: do not error out when the bookmark cannot be saved --- data/templates/editbookmark.tpl.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 0bfdb29..727ee1a 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -20,6 +20,10 @@ function jsEscTitle($title) { return addcslashes($title, "'"); } + +if (is_array($row['tags'])) { + $row['tags'] = implode(', ', $row['tags']); +} ?>
@@ -62,7 +66,7 @@ function jsEscTitle($title) -- cgit v1.2.3-54-g00ecf From 6d49b0622df0ea44975e99b585781f55fe9ac671 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 25 Mar 2011 19:26:42 +0100 Subject: begin modifying ajax/getcontacttags --- data/templates/editbookmark.tpl.php | 5 +++ www/ajax/getcontacttags.php | 69 +++++++++++++++++++------------------ 2 files changed, 40 insertions(+), 34 deletions(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 727ee1a..6ce10b3 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -150,6 +150,11 @@ jQuery(document).ready(function() { $.ui.autocomplete.filter( availableTags, extractLast(request.term) ) + /* + $.getJSON( "search.php", { + term: extractLast( request.term ) + }, response ); + */ ); }, diff --git a/www/ajax/getcontacttags.php b/www/ajax/getcontacttags.php index 5f1edb3..1377fea 100644 --- a/www/ajax/getcontacttags.php +++ b/www/ajax/getcontacttags.php @@ -1,46 +1,47 @@ + * @author Christian Weiske + * @author Eric Dane + * @license GPL http://www.gnu.org/licenses/gpl.html + * @link http://sourceforge.net/projects/semanticscuttle + */ -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -***************************************************************************/ - -/* Return a json file with list of tags according to current user and sort by popularity*/ $httpContentType = 'application/json'; require_once '../www-header.php'; -/* Service creation: only useful services are created */ -$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag'); -$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag'); +$limit = 30; +$beginsWith = null; +$currentUserId = $userservice->getCurrentUserId(); + +if (isset($_GET['limit']) && is_numeric($_GET['limit'])) { + $limit = (int)$_GET['limit']; +} +if (isset($_GET['beginsWith']) && strlen(trim($_GET['beginsWith']))) { + $beginsWith = trim($_GET['beginsWith']); +} -$listTags = $b2tservice->getContactTags( - $userservice->getCurrentUserId(), 1000, $userservice->getCurrentUserId() +$listTags = SemanticScuttle_Service_Factory::get('Bookmark2Tag')->getContactTags( + $currentUserId, $limit, $currentUserId, $beginsWith ); $tags = array(); -foreach($listTags as $t) { - $tags[] = array( - 'caption' => $t['tag'], - 'value' => $t['tag'], - ); +foreach ($listTags as $t) { + $tags[] = $t['tag']; } echo json_encode($tags); ?> - - - - -- cgit v1.2.3-54-g00ecf From 833dde3f53fe4f5101c299245d9fa02e0ae51c80 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 28 Mar 2011 19:17:51 +0200 Subject: jquey-autocomplete works! --- data/templates/editbookmark.tpl.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 6ce10b3..f440740 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -142,19 +142,21 @@ jQuery(document).ready(function() { jQuery("input#tags").autocomplete({ - minLength: 0, + minLength: 1, source: function(request, response) { // delegate back to autocomplete, but extract the last term response( + /* $.ui.autocomplete.filter( availableTags, extractLast(request.term) ) - /* - $.getJSON( "search.php", { - term: extractLast( request.term ) - }, response ); */ + $.getJSON( + "ajax/getcontacttags.php", + { beginsWith: extractLast(request.term) }, + response + ) ); }, -- cgit v1.2.3-54-g00ecf From 5c1d75ae653275d329ca5c7fd5df4bd918937dba Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 28 Mar 2011 19:24:44 +0200 Subject: use getadmintags.php if configured so --- data/templates/editbookmark.tpl.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index f440740..4ce3239 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -24,6 +24,13 @@ function jsEscTitle($title) if (is_array($row['tags'])) { $row['tags'] = implode(', ', $row['tags']); } + +$ajaxUrl = ROOT . 'ajax/' + . ( + ($GLOBALS['adminsAreAdvisedTagsFromOtherAdmins'] && $currentUser->isAdmin()) + ? 'getadmintags' + : 'getcontacttags' + ) . '.php'; ?>
- +
@@ -138,7 +145,7 @@ jQuery(document).ready(function() { { return split(term).pop(); } - var availableTags = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"]; + //var availableTags = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"]; jQuery("input#tags").autocomplete({ @@ -153,7 +160,7 @@ jQuery(document).ready(function() { ) */ $.getJSON( - "ajax/getcontacttags.php", + "", { beginsWith: extractLast(request.term) }, response ) -- cgit v1.2.3-54-g00ecf From 3f6bf4a5eb6705d3d8b83f0e6a488c1fca2c1565 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 29 Mar 2011 07:54:47 +0200 Subject: update from 1.8.5 to jquery-ui 1.8.11 --- data/templates/editbookmark.tpl.php | 12 +- www/js/jquery-ui-1.8.11/jquery.ui.autocomplete.js | 612 +++++++++ .../jquery-ui-1.8.11/jquery.ui.autocomplete.min.js | 32 + www/js/jquery-ui-1.8.11/jquery.ui.core.js | 308 +++++ www/js/jquery-ui-1.8.11/jquery.ui.core.min.js | 17 + www/js/jquery-ui-1.8.11/jquery.ui.position.js | 252 ++++ www/js/jquery-ui-1.8.11/jquery.ui.position.min.js | 16 + www/js/jquery-ui-1.8.11/jquery.ui.widget.js | 262 ++++ www/js/jquery-ui-1.8.11/jquery.ui.widget.min.js | 15 + .../base/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 180 bytes .../base/images/ui-bg_flat_75_ffffff_40x100.png | Bin 0 -> 178 bytes .../base/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes .../base/images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../base/images/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes .../base/images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes .../base/images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 119 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 101 bytes .../themes/base/images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_888888_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4369 bytes .../jquery-ui-1.8.11/themes/base/jquery.ui.all.css | 11 + .../themes/base/jquery.ui.autocomplete.css | 53 + .../themes/base/jquery.ui.base.css | 11 + .../themes/base/jquery.ui.core.css | 41 + .../themes/base/jquery.ui.theme.css | 252 ++++ www/js/jquery-ui-1.8.5/jquery-ui-1.8.5.custom.js | 1362 -------------------- www/js/jquery-ui-1.8.5/jquery.ui.autocomplete.js | 555 -------- .../jquery-ui-1.8.5/jquery.ui.autocomplete.min.js | 31 - www/js/jquery-ui-1.8.5/jquery.ui.core.js | 307 ----- www/js/jquery-ui-1.8.5/jquery.ui.core.min.js | 17 - www/js/jquery-ui-1.8.5/jquery.ui.position.js | 251 ---- www/js/jquery-ui-1.8.5/jquery.ui.position.min.js | 16 - www/js/jquery-ui-1.8.5/jquery.ui.widget.js | 249 ---- www/js/jquery-ui-1.8.5/jquery.ui.widget.min.js | 15 - .../base/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 180 -> 0 bytes .../base/images/ui-bg_flat_75_ffffff_40x100.png | Bin 178 -> 0 bytes .../base/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 120 -> 0 bytes .../base/images/ui-bg_glass_65_ffffff_1x400.png | Bin 105 -> 0 bytes .../base/images/ui-bg_glass_75_dadada_1x400.png | Bin 111 -> 0 bytes .../base/images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 110 -> 0 bytes .../base/images/ui-bg_glass_95_fef1ec_1x400.png | Bin 119 -> 0 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 101 -> 0 bytes .../themes/base/images/ui-icons_222222_256x240.png | Bin 4369 -> 0 bytes .../themes/base/images/ui-icons_2e83ff_256x240.png | Bin 4369 -> 0 bytes .../themes/base/images/ui-icons_454545_256x240.png | Bin 4369 -> 0 bytes .../themes/base/images/ui-icons_888888_256x240.png | Bin 4369 -> 0 bytes .../themes/base/images/ui-icons_cd0a0a_256x240.png | Bin 4369 -> 0 bytes .../jquery-ui-1.8.5/themes/base/jquery.ui.all.css | 11 - .../themes/base/jquery.ui.autocomplete.css | 53 - .../jquery-ui-1.8.5/themes/base/jquery.ui.base.css | 2 - .../jquery-ui-1.8.5/themes/base/jquery.ui.core.css | 41 - .../themes/base/jquery.ui.theme.css | 252 ---- 54 files changed, 1888 insertions(+), 3168 deletions(-) create mode 100644 www/js/jquery-ui-1.8.11/jquery.ui.autocomplete.js create mode 100644 www/js/jquery-ui-1.8.11/jquery.ui.autocomplete.min.js create mode 100644 www/js/jquery-ui-1.8.11/jquery.ui.core.js create mode 100644 www/js/jquery-ui-1.8.11/jquery.ui.core.min.js create mode 100644 www/js/jquery-ui-1.8.11/jquery.ui.position.js create mode 100644 www/js/jquery-ui-1.8.11/jquery.ui.position.min.js create mode 100644 www/js/jquery-ui-1.8.11/jquery.ui.widget.js create mode 100644 www/js/jquery-ui-1.8.11/jquery.ui.widget.min.js create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-bg_flat_75_ffffff_40x100.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-bg_glass_75_dadada_1x400.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-icons_222222_256x240.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-icons_2e83ff_256x240.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-icons_454545_256x240.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-icons_888888_256x240.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/images/ui-icons_cd0a0a_256x240.png create mode 100644 www/js/jquery-ui-1.8.11/themes/base/jquery.ui.all.css create mode 100644 www/js/jquery-ui-1.8.11/themes/base/jquery.ui.autocomplete.css create mode 100644 www/js/jquery-ui-1.8.11/themes/base/jquery.ui.base.css create mode 100644 www/js/jquery-ui-1.8.11/themes/base/jquery.ui.core.css create mode 100644 www/js/jquery-ui-1.8.11/themes/base/jquery.ui.theme.css delete mode 100644 www/js/jquery-ui-1.8.5/jquery-ui-1.8.5.custom.js delete mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.autocomplete.js delete mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.autocomplete.min.js delete mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.core.js delete mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.core.min.js delete mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.position.js delete mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.position.min.js delete mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.widget.js delete mode 100644 www/js/jquery-ui-1.8.5/jquery.ui.widget.min.js delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_flat_75_ffffff_40x100.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_glass_65_ffffff_1x400.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_glass_75_dadada_1x400.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-icons_222222_256x240.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-icons_2e83ff_256x240.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-icons_454545_256x240.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-icons_888888_256x240.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/images/ui-icons_cd0a0a_256x240.png delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/jquery.ui.all.css delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/jquery.ui.autocomplete.css delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/jquery.ui.base.css delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/jquery.ui.core.css delete mode 100644 www/js/jquery-ui-1.8.5/themes/base/jquery.ui.theme.css (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 4ce3239..8083a79 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -128,12 +128,12 @@ $ajaxUrl = ROOT . 'ajax/'
- + - - - - + + + + ", - { beginsWith: extractLast(request.term) }, + { beginsWith: term }, response ) ); -- cgit v1.2.3-54-g00ecf From 28c8cdaf5836690b2d393e0735bab62c59aaa7b7 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 30 Mar 2011 19:20:26 +0200 Subject: make dynamictags (tagcloud) work again --- data/templates/dynamictags.inc.php | 63 +++++++++++++++++++++---------------- data/templates/editbookmark.tpl.php | 2 +- 2 files changed, 37 insertions(+), 28 deletions(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/dynamictags.inc.php b/data/templates/dynamictags.inc.php index 62f5071..8cf07c1 100644 --- a/data/templates/dynamictags.inc.php +++ b/data/templates/dynamictags.inc.php @@ -36,22 +36,34 @@ $allPopularTagsCount = count($allPopularTags); // function printing the cloud -function writeTagsProposition($tagsCloud, $title) { - echo 'document.write(\'
\');'; - echo 'document.write(\'

'. $title .'<\/h3>\');'; - echo 'document.write(\'

\');'; +function writeTagsProposition($tagsCloud, $title) +{ + static $id = 0; + ++$id; + + echo <<' ++ '

$title

' ++ '

' ++ '
'); +JS; $taglist = ''; - foreach(array_keys($tagsCloud) as $key) { - $row =& $tagsCloud[$key]; + foreach (array_keys($tagsCloud) as $key) { + $row = $tagsCloud[$key]; $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']); - $taglist .= ''. filter($row['tag']) .'<\/span> '; + $taglist .= '' + . filter($row['tag']) + . ' '; } - - echo 'document.write(\''. $taglist .'\');'; - echo 'document.write(\'<\/p>\');'; - echo 'document.write(\'<\/div>\');'; - + echo '$(\'#edit-tagcloud-' . $id . ' p\').append(' + . json_encode($taglist) + . ");\n"; } @@ -88,10 +100,18 @@ function addonload(addition) { } jQuery(function($) { - var taglist = document.getElementById('tags'); - var tags = taglist.value.split(', '); + 0) { + writeTagsProposition($userPopularTagsCloud, T_('Popular Tags')); +} +if ($allPopularTagsCount > 0) { + writeTagsProposition($allPopularTagsCloud, T_('Popular Tags From All Users')); +} +?> + var taglist = $('#tags'); + var tags = taglist.val().split(', '); - var populartags = document.getElementById('popularTags').getElementsByTagName('span'); + var populartags = $('.edit-tagclouds span'); for (var i = 0; i < populartags.length; i++) { if (tags.contains(populartags[i].innerHTML)) { @@ -120,20 +140,9 @@ function addTag(ele) { document.getElementById('tags').focus(); } - - 0) { - writeTagsProposition($userPopularTagsCloud, T_('Popular Tags')); -} -if( $allPopularTagsCount > 0) { - writeTagsProposition($allPopularTagsCloud, T_('Popular Tags From All Users')); -} - - -?> //]]> - +
diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 1783692..25938e8 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -194,7 +194,7 @@ jQuery(document).ready(function() { includeTemplate('dynamictags.inc'); +$this->includeTemplate('dynamictags.inc'); // Bookmarklets and import links if (empty($_REQUEST['popup']) && (!isset($showdelete) || !$showdelete)) { -- cgit v1.2.3-54-g00ecf From 7a45f330a7a6011a1816ffb77011518c29f332c2 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 31 Mar 2011 19:13:07 +0200 Subject: re-enable browser bookmarklets after fixing some naaaaaaaaaaaaaasty bugs with site titles that have special chars in them --- data/templates/editbookmark.tpl.php | 60 ++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 20 deletions(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 25938e8..8b98987 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -201,33 +201,34 @@ if (empty($_REQUEST['popup']) && (!isset($showdelete) || !$showdelete)) { ?>

-

+

-:

-- cgit v1.2.3-54-g00ecf From 43974a15f24859fd817adccb6c906522748ce42d Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 1 Apr 2011 08:17:01 +0200 Subject: make popup bookmarklet work in firefox when the title contains double and single quotes. opera still broken, though --- data/templates/editbookmark.tpl.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 8b98987..1a74290 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -20,6 +20,10 @@ function jsEscTitle($title) { return addcslashes($title, "'"); } +function jsEscTitleDouble($title) +{ + return addcslashes(addcslashes($title, "'"), "'\\"); +} if (is_array($row['tags'])) { $row['tags'] = implode(', ', $row['tags']); @@ -261,7 +265,7 @@ if (browser == "Opera") { + 't=encodeURIComponent(x.title);' + 'd=encodeURIComponent('+selection+');' + 'open(' - + '\'?action=add&popup=1&address=\'+a+\'&title=\'+t+\'&description=\'+d,\'\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2' + + '\'?action=add&popup=1&address=\'+a+\'&title=\'+t+\'&description=\'+d,\'\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2' + ');void 0;">' + '' + '' -- cgit v1.2.3-54-g00ecf From 51763183e0ccf15de791a2d8206d84a4116e8b20 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 4 Apr 2011 22:07:39 +0200 Subject: FINALLY get the first opera bookmarklet working, with cleaner code now --- data/templates/editbookmark.tpl.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 1a74290..fc03a59 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -247,7 +247,27 @@ if (browser == "Opera") { $('#bookmarklet').append( '' ); -- cgit v1.2.3-54-g00ecf From 705d016301194b39b87ec4f1223633bf1ac4489e Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 5 Apr 2011 18:56:51 +0200 Subject: move bookmarklet code to own template file --- data/templates/bookmarklet.inc.php | 117 ++++++++++++++++++++++++++++++++++ data/templates/editbookmark.tpl.php | 121 +----------------------------------- 2 files changed, 119 insertions(+), 119 deletions(-) create mode 100644 data/templates/bookmarklet.inc.php (limited to 'data/templates/editbookmark.tpl.php') diff --git a/data/templates/bookmarklet.inc.php b/data/templates/bookmarklet.inc.php new file mode 100644 index 0000000..9867745 --- /dev/null +++ b/data/templates/bookmarklet.inc.php @@ -0,0 +1,117 @@ +

+

+ + diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index b7fb227..8b71230 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -206,126 +206,9 @@ $this->includeTemplate('dynamictags.inc'); // Bookmarklets and import links if (empty($_REQUEST['popup']) && (!isset($showdelete) || !$showdelete)) { -?> - -

-

- - +$this->includeTemplate('bookmarklet.inc.php'); +?>