2 2009-10-03 17:20:26
Re: Quick fix for Mootools 1.2.3 upgrade (9 replies, posted in Bugs)
moro,
what do I need to update in MifMenu source to make it work with Mootools 1.2.3?
There are problems with firing custom events in Mif.Menu.Item.check() method:
Mif.Menu.Item.js
check: function(state){
if(this.type=='checkbox'){
...
this.list.fireEvent('check', [this, this.checked]);
}
if(this.type=='radio'){
...
this.list.groups[this.group].each(function(item){
if(item==this && this.checked){
...
item.list.fireEvent('radioCheck', [this, true]);
return;
}else{
...
item.list.fireEvent('radioCheck', [this, false]);
}
}, this);
}
return this;
},Both this.list and item.list do not have fireEvent() method defined.
Your help will be greatly appreciated.
Thanks,
Temuri
3 2009-05-10 17:39:35
Topic: MifMenu - the end of development? (1 replies, posted in Help)
moro,
I would like to know whether you stopped working on MifMenu at all? Can we expect any new features in the future?
thanks
4 2009-02-08 00:00:00
Topic: MifTree keynav in IE6 (1 replies, posted in Bugs)
moro,
page is broken in IE6 (have not tested IE7).
to fix it I had to comment out the following line in Mif.Tree.KeyNav.js:
tree.wrapper.setAttribute('tabIndex',1);Why is this happening?
Thanks
5 2009-02-07 23:16:26
Re: Node's "selected" property in JSON description (2 replies, posted in Feature requests)
so what is the status on this, moro?
do you view this as possible improvement? if so, when can we expect it to be implemented?
thanks
6 2009-01-29 22:59:10
Topic: Key navigation - Right Arrow on empty nodes (1 replies, posted in Feature requests)
Hi moro,
I've been testing your demo of key navigation at http://mifjs.net/tree/Demos/index.html
Question:
When "node1" is selected (that does not have children) and I press Right Arrow key, can the selection switch to "node2"?
Thanks,
Temuri
7 2009-01-29 22:45:05
Topic: Node's "selected" property in JSON description (2 replies, posted in Feature requests)
Hi moro,
Currently in the example files there's "expandTo" property of a node:
var json=[
{
"property": {
"name": "root"
},
"children": [
{
"property": {
"name": "node1",
"expandTo": 1
}]
}While this works and is extemely useful, I'd still like to have one more property of a node, that will select it after the render. After all, in most cases when you are "expanding to a node", you are also selecting it.
Can you introduce "selected" property as shown below:
"children": [
{
"property": {
"name": "node1",
"expandTo": 1,
"selected": true
}]Thanks,
Temuri
8 2008-12-04 21:47:24
Topic: MifTree, MifMenu - where is the *latest* code located? (2 replies, posted in Help)
moro,
Two questions:
1. I downloaded MifTree from:
svn checkout http://miftree.googlecode.com/svn/trunk/,
Github: http://github.com/magmoro/mif/zipball/master
and
http://mifjs.net/tree/Download/file/mif .0-dev.zip
and Javascript source files differ.
Git should have the latest source, right?
2. Source that you get from http://mifjs.net/tree/Download/file/mif
.0-dev.zip
and source that you get from http://mifjs.net/tree/Download/Builder/ is identical, right?
Thanks
9 2008-12-02 03:46:38
Topic: MifTree and MifMenu integration (18 replies, posted in Help)
moro,
Can you post an example of how to show MifMenu depending on a clicked MifTree node?
Thank you
10 2008-10-28 04:47:38
Re: MifMenu - "detach" method? (2 replies, posted in Help)
hey moro
actually, I ran into quite a problem with MifMenu. maybe you could help me out.
I am working on images data grid that is similar to Windows Explorer's Thumbnails view. MifMenu is attached to every tile/square.
I need to be able to dynamically reconfigure menu items depending on number of tiles selected: if more than one tiles are hilighted - I want to have "Delete all selected" item in addition to "Delete" that is always there.
Here's my code:
var itemMenu = {items:[]};
itemMenu.items.push({
name: 'Delete',
onAction: function()
{
this.menu.el.fireEvent('deleteOne')
}
});
if (this.options.selected.length > 1)
{
itemMenu.items.push({
name: 'Delete all selected',
onAction: function()
{
this.menu.el.fireEvent('deleteAll')
}
});
}
var menu = new Mif.Menu(
{
list: itemMenu
},
{
container: Mif.Menu.Container,
options:{
...
}
});
menu.attachTo(tile);
So menu is initialized with each click on a tile - this is done to reconfigure it and show "Delete all selected" item.
The problem is that menu.attach() method does not replace existing attached menu with the new one. As a result I have TWO overlapping menus.
Questions:
1. Is it possible to detach an existing menu from a tile?
2. Can menu.attach() method override menu that's been attached previously?
My preferred solution would be if you could add a new method that accepts new 'list' definition that contains new/updated items for the existing & attached menu.
This would enable me to write something like:
var menu = new Mif.Menu(
{
list: OriginalMenuItems
},
{
container: Mif.Menu.Container,
options:{
...
}
});
menu.attachTo(tile);
and later on trigger display using:
menu.display({list: UpdatedMenuItems})
What do you think?
Thanks
11 2008-10-28 03:49:10
Topic: MifMenu - "detach" method? (2 replies, posted in Help)
Is it possible to detach menu from DIV element that was attached to it using menu.attachTo(div) ?
thanks
12 2008-10-26 23:45:13
Topic: MifMenu - update of tree structure (0 replies, posted in Help)
moro,
Suppose I initialize context menu with one element:
list: {
items: [
{
name: 'new: ONE',
onAction: function(){
alert('new');
}
}
]
}
It is attached to a DIV element (displayed on left-click), showing and works fine.
Now, I need to replace 'new: ONE' with 'new: TWO' element:
items: [
{
name: 'new: ONE',
onAction: function(){
alert('new');
}
}
]
How can I do it without totally re-instantiating the whole class. Is there a method to "update" the existing menu based on new 'list' parameter?
For example, I need to update menu items based on a state of other page components. If there's more that one item selected on the page - menu should have "DELETE ALL" entry dynamically inserted after "DELETE".
Thanks
13 2008-10-12 19:28:35
Re: "Menu attached to button" example (6 replies, posted in Bugs)
what I want to do is similar to binding context menu to tree nodes. each node has unique Id and data associated with it.
are you saying that attachTo() should not be used in that case?
14 2008-10-12 19:26:43
Re: MifMenu - page scroller flicker (4 replies, posted in Bugs)
I can't give you a test page cuz it depends on your screen resolution and how much of the page height is used.
Let's say your available browser screen height is 550px and document body is 540px - in this case right-clicking causes Firefox to add page scroller and remove it immediately. this shifts the whole page left and then back right, causing the entire page to flicker.
this could probably be solved if you inject:
this.container.inject(element, how)
somewhere outside view area and then position it back.
15 2008-10-12 19:01:53
Re: "Menu attached to button" example (6 replies, posted in Bugs)
question. after I use attachTo('myDiv'), how can I reference 'myDiv' in all further actions?
attachTo: function(el){
el=$(el);
el.addEvents({
'mousedown': function(event){
if(event.rightClick) return;
if(!this.isVisible()){
this.$attaching=true;
var coords=el.getCoordinates();
this.show({x: coords.left + 10, y: coords.bottom - 15});
}else{
this.hide();
}
......
}
It seems that all information on 'el' is lost forever. I need the original trigger to determine what menu actions should do.
thanks
16 2008-10-12 18:13:53
Re: Menu Builder without ART (4 replies, posted in Bugs)
Builder page: http://mifjs.net/trunk/menu/Download/Builder/.
Building without "Mif.Menu.Container" and ART gives Javascript error in:
Mif.Menu.List::initialize()
this.parent($merge(this.options, {styles: {position: 'absolute'}}), 'mifmenu');
saying that this.parent is not defined (or smth like that).
ALSO, there's an error in:
if(ART && Browser.Engine.trident && skin.container==ART.Container){
};
Saying that ART is undefined.
Thanks
17 2008-10-12 18:10:19
Re: MifMenu - page scroller flicker (4 replies, posted in Bugs)
moro,
can this be fixed?
thanks
18 2008-10-12 03:04:59
Topic: MifMenu - configurable triggers (1 replies, posted in Feature requests)
It would be nice to be able to tell how context menu is invoked: LEFT click, RIGHT click, either LEFT or RIGHT, or DOUBLE CLICK.
19 2008-10-12 03:02:50
Topic: "Menu attached to button" example (6 replies, posted in Bugs)
moro,
I tried to attach menu to a DIV element using attachTo() and found some bugs.
1. Menu is showing on both LEFT click.
I was happy to see LEFT click working, however I was not expecting that. Why is it attachTo() work with LEFT click and after normal instantiation it triggers with RIGHT?
2. Google Chrome, FF2, IE6 and IE7 also display native context menu on top of MifMenu (both on Buttons that you have in Demos AND my custom DIV). Only FF3 does not show native context menu.
I think attachTo() should configure menu trigger mouse button - left, right or both.
Thanks
20 2008-10-12 00:50:58
Re: MifMenu - hide on mouseout (6 replies, posted in Help)
I looked inside your code - there's a lot of stuff going on when you render menu shadow.
Question - would it not be more optimal to bypass all that code using IF and add "noshadow" parameter?
21 2008-10-12 00:40:24
Topic: Menu Builder without ART (4 replies, posted in Bugs)
moro,
if I use menu builder http://mifjs.net/trunk/menu/Download/Builder/ and do not include ART,
then the following line Mif.Menu::initialize() is creating errors:
if(Browser.Engine.trident && skin.container==ART.Container){
}
Obviously, there's no ART.
Question, do you plan to add new features to Menu?
Thanks
22 2008-10-08 23:05:07
Re: MifMenu - hide on mouseout (6 replies, posted in Help)
moro,
has number 2 been fixed, by any chance?
Thanks
23 2008-10-02 18:35:18
Re: MifMenu - hide on mouseout (6 replies, posted in Help)
1. ok, I see your point. But, could you tell me where in the code it's suitable to add onmouseout event? I'll have to customize it for my needs.
2. yes. however, if you have more than one target object and you use two different menus, I can rightclick on the first and rightclick on the second. Thus, I'll have two menus at the same time. In my opinion, not only mousedown, but right-click event should also close current menu.
thanks.
24 2008-10-01 17:01:36
Topic: MifMenu - page scroller flicker (4 replies, posted in Bugs)
moro,
this method in Mif.Menu.Container causes page height to increase (it injects a container into document body) and after menu is properly sized and positioned, body height decreases again.
inject: function(element, how){
this.container.inject(element, how)
return this.draw();
}
This causes page flicker in Firefox in cases when document body height is near window height - page content is quickly shifted left and back to its original position.
Is it possible to inject the container somewhere outside visible area?
Thanks
25 2008-10-01 16:32:13
Topic: MifMenu - hide on mouseout (6 replies, posted in Help)
moro,
I've been playing with your context menu control. My questions so far:
1. Is there a property to tell menu to hide when mouse moves outside of it?
2. Can the menu disappear after right- or left-click events elsewhere on the page?
3. Is there a way to configure menu so it would not use Fx.Morph and shadow?
Thanks