Recent Questions Extjs Tree Collapse
Q: Typically in order to generate a menu with multiple layers I’d put a pipe character in front of the menu text.. For example:
["|Page Admin","/admin/handoutadmin.php", , , , "_new", , , , ],
["||Student Pages","/admin/handoutadmin.php?type=1", , , , "_new", , , , ],
["||Teacher Pages","/admin/handoutadmin.php?type=2", , , , "_new", , , , ],
["||Family Letters","/admin/handoutadmin.php?type=4", , , , "_new", , , , ],
["||Transparencies","/admin/handoutadmin.php?type=3", , , , "_new", , , , ],
However, when I try to do it with dm_ext_addItem it actually SHOWS the pipe character and doesn’t create any menu levels at all.
For example:
dm_ext_addItem(0, 0, ["Add a Handout to this Lesson", "", "", "", "", "", ""]);
dm_ext_addItem(0, 0, ["|Student Page","/admin/handoutadmin.php?type=$type", "", "", "", "_new", ""]);
dm_ext_addItem(0, 0, ["|Teacher Page","/admin/handoutadmin.php?type=$type", "", "", "", "_new", ""]);
How can I generate multiple levels of the menu with javascript?
A: I suppose that your code is not valid
dm_ext_addItem(0, 0, ["|Teacher Page", "/admin/handoutadmin.php?type=$type", "", "", "", "_new", ""]);
Try to write it in the following way:
dm_ext_addItem(0, 0, ["|Teacher Page", "/admin/handoutadmin.php?type=", "", "", "", "_new", ""]);
Q: Thanks for your reply, I have another question as follow, I find the tree menu just expand one tree item, if I have expanded one tree when I click it, whether I click another tree to expand it's item and the before expanded tree are maintain expanded, I don't want to close it?
A: Use the following parameters:
var tcloseExpanded = 0; - Enables the mode when 1 item only can be expanded.
0 - disabled, 1 - enabled.
var tcloseExpandedXP = 0; - Enables the mode when 1 submenu only can be expanded (XP-style).
0 - disabled, 1 - enabled.
You can also try to set the following parameter:
var texpandItemClick = 1; - 0 - expand items on a [+]-button click only;
1 - expand items on a mouse click.
See more info about menu parameters here:
http://deluxe-tree.com/parameters-info.html
Q: We have a problem with true type fonts. The dropdown menu in html does not showing properly for Turkish letters. We are using true type fonts (bold 10px TR Tahoma).
A: Font.If there will be no TR Tahoma font on the user machinethe font won't be shown correctly.
You can find another font similar to your font and write it through a comma.
You should choose the font among the following fonts:
Arial
Tahoma
Times New Roman
Trebuchet MS
Verdana
These fonts are installed on the most of windows computers.
For example:
var fontStyle=["bold 9px TR Tahoma, Tahoma","bold 9px TR Tahoma, Tahoma"];
Or you can create images with text and use it for the top items.
Encoding.
You can save your data file in UTF-8 in Windows version of DeluxeTuner v3.2.5.
You should turn on "Tools/Use utf8 encode" property.In that case your data file will be saved in UTF-8 encode.
Enter these symbols and save your data file.
If you don't want to use UTF-8 encode on your page you should turn off"Tools/Use utf8 encode" property, save your data file and manuallychange your letters in any text editor.
You can also replace your letters with special sets, for example
É - Capital E, acute accent - É
ç - Small c, cedilla - ç
var menuItems = [
["É....","testlink.html", "", "", "", "", "", "", "", ],
["ç....","testlink.html", "", "", "", "", "", "", "", ],
Q: I used your trial version. In my application, I need one column of submenu to be displayed, all other columns should be closed.
A: You should adjust the following parameters, for example you should write so:
var transDuration=350; //Delay of a transitional effect (in ms) on submenu's showing.
var transDuration2=200; //Delay of a transitional effect (in ms) on submenu's hiding.