cdotyone / mochaui

development tree for MochaUI
http://mochaui.org/demo/
Other
290 stars 83 forks source link

Patch for tree.js plugin #59

Closed marsender closed 13 years ago

marsender commented 14 years ago

Hi, cdotyone, and many thanks for your hard work.

I just want to submit a patch for the tree.js plugin, because the first plus/minus is not correct if the list contains only one folder.

The patch is very simple, you just have to replace this (line 32): else if (folder.hasClass('first')) { folder.minus = iconPath + 'Fminus.gif' folder.plus = iconPath + 'Fplus.gif' }

with the folowing: else if (folder.hasClass('first')) { if (folder.getNext()) { folder.minus = iconPath + 'Fminus.gif' folder.plus = iconPath + 'Fplus.gif' } else { folder.minus = iconPath + 'Rminus.gif' folder.plus = iconPath + 'Rplus.gif' } }

Thanks Didier

mui-org commented 13 years ago

added to next 0.9.8 release.