Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Tree lazy loading #1720

Conversation

cmcculloh-kr
Copy link

closes #1708

Adds third leaf type to tree, overflow, that displays as a link wherever it appears in the tree, with whatever name the user provides as the link text. When clicked, behaves similar to clicking on a folder, except that it also passes its data attributes back to the datasource to allow the datasource to respond appropriately. Whatever is returned by the datasource is appended to the parent branch of the clicked overflow. Overflow is removed when it is clicked.

Incorporated this into the tree's handlebars template.

When adding tests I tried to filter by which items no longer had data-template and discovered that this attribute wasn't actually being removed (it seemed from the intent of the code that it should have been). I modified the tree code to remove this (it now runs removeAttr("data-template") after removeData("template") since it could feasibly cause further problems for others if they happen to call $() on a tree leaf (which would re-add the data back into jQuery's internal data store). This allowed for more fine-grained testing as well as potentially avoiding future bugs.

tree-overflow

Christopher McCulloh added 3 commits February 18, 2016 11:11
…and therefore leaving the posibility open for it to be re-added to jQuery's internal data array again if is called on the object (pretty likely). Assumes intent was to actually remove the attribute, and so now it does
@kevinparkerson
Copy link
Contributor

from what I can tell this looks good

if (isBackgroundProcess === false) {
loader.removeClass('hide hidden'); // hide is deprecated
$loader.removeClass('hide hidden'); // hide is deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this comment to:
//in jQuery >= v3.0 hide and show are changing behaviors

kevinparkerson pushed a commit that referenced this pull request Feb 19, 2016
@kevinparkerson kevinparkerson merged commit cf2aa10 into ExactTarget:master Feb 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tree lazy loading
3 participants