Revision e4939695
Added by Andreas Kohlbecker almost 8 years ago
modules/cdm_dataportal/includes/pages.inc | ||
---|---|---|
992 | 992 |
} |
993 | 993 |
|
994 | 994 |
$rank_limit_uuid = variable_get(TAXONTREE_RANKLIMIT, TAXONTREE_RANKLIMIT_DEFAULT); |
995 |
|
|
996 |
/* |
|
997 |
if($parent_taxon_nodes) { |
|
998 |
// the path to root never contains the classification->root, by asking for |
|
999 |
// the parent node we either get this or the predecessor of the virtual root node. |
|
1000 |
$root_parent_taxon_node_dto = cdm_ws_get(CDM_WS_TAXONNODE_PARENT, array($parent_taxon_nodes[0]->uuid)); |
|
1001 |
} else { |
|
1002 |
|
|
1003 |
|
|
1004 |
}*/ |
|
1005 |
|
|
1006 | 995 |
$children_indicator = '<span class="taxonomic-children-button" data-classification-uuid="'. $current_classification_uuid |
1007 | 996 |
. '" data-rank-limit-uuid="'. $rank_limit_uuid . '" > ' |
1008 | 997 |
. font_awesome_icon_markup('fa-chevron-right') |
modules/cdm_dataportal/js/jquery.cdm.taxonomic_children.js | ||
---|---|---|
175 | 175 |
|
176 | 176 |
this works at earliest with v1.7, with 1.4.4 we need to use bind: |
177 | 177 |
*/ |
178 |
plugin.$element.bind('mouseenter', function() { // 'mouseenter' or 'click' are appropriate candidates |
|
179 |
/* |
|
180 |
Use the "call" method so that inside of the method being |
|
181 |
called, ie: "someOtherFunction", the "this" keyword refers |
|
182 |
to the plugin instance, not the event handler. |
|
178 |
/*plugin.$element.bind('mouseenter', function() { // 'mouseenter' or 'click' are appropriate candidates |
|
179 |
plugin.showChildren.call(plugin); |
|
180 |
}); |
|
181 |
*/ |
|
183 | 182 |
|
184 |
More: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call |
|
185 |
*/ |
|
186 |
plugin.showChildren.call(plugin); // TODO? why can't handleShowChildren(plugin) be used? |
|
183 |
plugin.$element.bind('click', function (event){ |
|
184 |
plugin.showChildren.call(plugin); |
|
185 |
event.stopPropagation(); |
|
186 |
}); |
|
187 |
|
|
188 |
plugin.container.mouseleave(function (){ |
|
189 |
plugin.hideChildren.call(plugin); |
|
190 |
}); |
|
191 |
|
|
192 |
$(document).click(function (){ |
|
193 |
plugin.hideChildren.call(plugin); |
|
187 | 194 |
}); |
188 | 195 |
|
189 | 196 |
plugin.$element.children('i.fa').hover( |
... | ... | |
194 | 201 |
this.removeClass(this.options.hoverClass); |
195 | 202 |
} |
196 | 203 |
); |
197 |
|
|
198 |
plugin.container.mouseleave(function (){ |
|
199 |
plugin.hideChildren.call(plugin); |
|
200 |
}); |
|
201 |
|
|
202 |
$(document).click(function (){ |
|
203 |
plugin.hideChildren.call(plugin); |
|
204 |
}); |
|
205 | 204 |
|
206 | 205 |
}, |
207 | 206 |
|
Also available in: Unified diff
#5852 classification breadcrumbs working on mobile devices (android ffirefox)