Author: david
Date: Fri Apr 1 15:45:56 2011
New Revision: 9055
Log:
+XX... link goes to search results hitlist. Fixes issue 1943.
Modified:
trunk/js/treeView.js
trunk/lib/SearchIndex.class.php
trunk/lib/model/QubitInformationObject.php
Modified: trunk/js/treeView.js
==============================================================================
--- trunk/js/treeView.js Fri Apr 1 00:02:56 2011 (r9054)
+++ trunk/js/treeView.js Fri Apr 1 15:45:56 2011 (r9055)
@@ -194,76 +194,6 @@
};
}
- function seeAll(oArgs)
- {
- var node = oArgs.node;
- var parentNode = node.parent;
-
- if
(jQuery(node.getContentEl()).children('a').hasClass('seeAllNode'))
- {
- // If current object is the last in the treeview, it may be out
- // proper order, so reload data from position 9 (offset 8)
- var offset = 10;
- var lastChild =
parentNode.children[parentNode.children.length-2];
- if (Qubit.treeView.currentNodeId == lastChild.data.id)
- {
- offset = 9;
- }
-
- // Show loading text
-
$(node.getContentEl()).children('a').text(Qubit.treeView.i18nLoading);
-
- // Mark node as loading
- node.isLoading = true;
- node.tree.locked = true;
-
$(node.getToggleEl()).addClass('ygtvloading').removeClass('ygtvln');
-
- jQuery.ajax({
- data: { 'offset': offset },
- dataType: 'json',
- url: parentNode.expandUrl,
-
- success: function (data)
- {
- if (9 == offset)
- {
- Qubit.treeView.treeView.removeNode(lastChild);
- }
-
- for (var i = 0; i < data.length; i++)
- {
- var textNode = new YAHOO.widget.TextNode(data[i],
parentNode, false);
- textNode.isLeaf = data[i].isLeaf;
- textNode.moveUrl = data[i].moveUrl;
- textNode.expandUrl = data[i].expandUrl;
-
- if (Qubit.treeView.currentNodeId == data[i].id)
- {
- textNode.labelStyle = 'ygtvlabel currentTextNode';
- textNode.highlight();
- }
- }
-
- // Turn off loading state
- node.isLoading = false;
- node.tree.locked = false;
-
- Qubit.treeView.treeView.removeNode(node);
-
- for (i in parentNode.children)
- {
- addDragNDrop(parentNode.children[i], parentNode);
- }
-
- parentNode.refresh();
- }
- });
-
- // Don't jump to the top of the page (default behaviour)
- oArgs.event.preventDefault();
- }
- }
-
try
{
// Create a new tree
@@ -277,9 +207,6 @@
// Turn dynamic loading on for entire tree
Qubit.treeView.treeView.setDynamicLoad(loadNodeData);
- // On click listener for 'See all' behaviour
- Qubit.treeView.treeView.subscribe("clickEvent", seeAll);
-
// Build tree
build(Qubit.treeView.objects, Qubit.treeView.expands,
Qubit.treeView.objects[0].parentId, Qubit.treeView.treeView.getRoot());
Modified: trunk/lib/SearchIndex.class.php
==============================================================================
--- trunk/lib/SearchIndex.class.php Fri Apr 1 00:02:56 2011 (r9054)
+++ trunk/lib/SearchIndex.class.php Fri Apr 1 15:45:56 2011 (r9055)
@@ -223,9 +223,10 @@
$doc->addField(Zend_Search_Lucene_Field::Keyword('id',
$informationObject->id));
// PARENT
- if (null !== $informationObject->parentId)
+ if (null !== $informationObject->parent)
{
$doc->addField(Zend_Search_Lucene_Field::Keyword('parentId',
$informationObject->parentId));
+ $doc->addField(Zend_Search_Lucene_Field::Keyword('parent',
$informationObject->parent->slug));
}
else
{
Modified: trunk/lib/model/QubitInformationObject.php
==============================================================================
--- trunk/lib/model/QubitInformationObject.php Fri Apr 1 00:02:56 2011
(r9054)
+++ trunk/lib/model/QubitInformationObject.php Fri Apr 1 15:45:56 2011
(r9055)
@@ -1734,7 +1734,7 @@
$node['label'] = sfContext::getInstance()->i18n->__('+%1% ...',
array('%1%' => $count));
$node['parentId'] = $item['parentId'];
- $node['href'] = '#';
+ $node['href'] = sfContext::getInstance()->routing->generate(null,
array('module' => 'search', 'query' =>
'+parent:'.QubitInformationObject::getById($item['parentId'])->slug));
$node['isLeaf'] = 'true';
$node['style'] = 'seeAllNode';
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.