<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" version="2.0">
  <channel>
    <title>Recent Posts in Context Menu | Prototype UI</title>
    <link>http://forums.prototype-ui.com/forums/5/posts</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <atom:link rel="search" type="application/opensearchdescription+xml" href="http://forums.prototype-ui.com/open_search.xml"/>
    <item>
      <title>override default context menu? replied by weazil @ Fri, 04 Apr 2008 17:38:49 -0000</title>
      <description>&lt;p&gt;I&amp;#8217;ve been toying with the example provided, how do you get it to over ride the original context meunu?  when I right click I get the original context menu with the prototype ui context menu under it.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m using Firefox 2.0.0.13 on Fedora 8, I have not had time to test it on a windows box.  i checked my javascript settings and it is set to allow context change.&lt;/p&gt;</description>
      <pubDate>Fri, 04 Apr 2008 17:38:49 -0000</pubDate>
      <guid isPermaLink="false">forums.prototype-ui.com:5:110:304</guid>
      <author>weazil</author>
      <link>http://forums.prototype-ui.com/forums/5/topics/110</link>
    </item>
    <item>
      <title>code for multi-level menu? replied by obaid @ Thu, 03 Apr 2008 21:04:01 -0000</title>
      <description>&lt;p&gt;how do I create multi-level menu?&lt;/p&gt;</description>
      <pubDate>Thu, 03 Apr 2008 21:04:01 -0000</pubDate>
      <guid isPermaLink="false">forums.prototype-ui.com:5:109:302</guid>
      <author>obaid</author>
      <link>http://forums.prototype-ui.com/forums/5/topics/109</link>
    </item>
    <item>
      <title>Suggestions? replied by mhollauf @ Tue, 18 Mar 2008 16:31:24 -0000</title>
      <description>&lt;p&gt;Actually ignore that, just found the problem &amp;#8211; don&amp;#8217;t ever try to set a filter(opacity) on the contextmenu &amp;#8230; ;-)&lt;/p&gt;


	&lt;p&gt;Re suggestions, I think the component is really good, but as I&amp;#8217;m an advovate of the &amp;#8220;less is more&amp;#8221; principle I&amp;#8217;d recommend to not let it get too bloated, in terms of features and code size. I removed all those new callbacks from my code cause I don&amp;#8217;t need them and they just cost time and bandwidth. But I guess everyone has different requirements don&amp;#8217;t they &amp;#8230;&lt;/p&gt;


	&lt;p&gt;Thanks,&lt;br /&gt;Michael&lt;/p&gt;</description>
      <pubDate>Tue, 18 Mar 2008 16:31:24 -0000</pubDate>
      <guid isPermaLink="false">forums.prototype-ui.com:5:13:252</guid>
      <author>mhollauf</author>
      <link>http://forums.prototype-ui.com/forums/5/topics/13</link>
    </item>
    <item>
      <title>Suggestions? replied by mhollauf @ Tue, 18 Mar 2008 15:21:44 -0000</title>
      <description>&lt;p&gt;Hi kangax,&lt;/p&gt;


	&lt;p&gt;Great work on the ContextMenu &amp;#8211; I tried to integrate the latest &lt;span class="caps"&gt;SVN&lt;/span&gt; version into my code but it seems that submenus don&amp;#8217;t work in IE yet. Am I right? It seems to be a problem with the &lt;span class="caps"&gt;DOM&lt;/span&gt;, in that it won&amp;#8217;t display a &lt;span class="caps"&gt;DIV&lt;/span&gt; inside an LI / A tag that&amp;#8217;s outside of the original UL.&lt;/p&gt;


	&lt;p&gt;Any ideas?&lt;/p&gt;


	&lt;p&gt;Cheers&lt;br /&gt;Michael&lt;/p&gt;</description>
      <pubDate>Tue, 18 Mar 2008 15:21:44 -0000</pubDate>
      <guid isPermaLink="false">forums.prototype-ui.com:5:13:251</guid>
      <author>mhollauf</author>
      <link>http://forums.prototype-ui.com/forums/5/topics/13</link>
    </item>
    <item>
      <title>switch the selector on the fly replied by johncarlson21 @ Sun, 20 Jan 2008 23:37:23 -0000</title>
      <description>&lt;p&gt;Hey man&amp;#8230; well I don&amp;#8217;t want to make another instance.. because if I show a datagrid with like say 20 rows I would have to make 20 menus&amp;#8230;.. and that can&amp;#8217;t be good.. :( so that is why I ask if you can make one menu that when you click on a row it changes the selector or sends a variable to the menu for the call backs.. so if I click on row 1 it sends say 1 to the alert(row) and it would show row1.. in the alert.. :)&lt;/p&gt;


	&lt;p&gt;thanks for the quick reply&lt;/p&gt;</description>
      <pubDate>Sun, 20 Jan 2008 23:37:23 -0000</pubDate>
      <guid isPermaLink="false">forums.prototype-ui.com:5:24:62</guid>
      <author>johncarlson21</author>
      <link>http://forums.prototype-ui.com/forums/5/topics/24</link>
    </item>
    <item>
      <title>switch the selector on the fly replied by kangax @ Sun, 20 Jan 2008 19:10:36 -0000</title>
      <description>&lt;p&gt;John, you could always create another instance of a menu which would be binded to another selector. I am planning to change selector logic in a near future to use delegation, rather than attaching events directly. This would make it possible to add/remove elements from the document without worrying about losing event handlers.&lt;/p&gt;


	&lt;p&gt;Best,&lt;br /&gt;kangax&lt;/p&gt;</description>
      <pubDate>Sun, 20 Jan 2008 19:10:36 -0000</pubDate>
      <guid isPermaLink="false">forums.prototype-ui.com:5:24:61</guid>
      <author>kangax</author>
      <link>http://forums.prototype-ui.com/forums/5/topics/24</link>
    </item>
    <item>
      <title>switch the selector on the fly replied by johncarlson21 @ Sun, 20 Jan 2008 17:00:13 -0000</title>
      <description>&lt;p&gt;Hey is there a way to switch the selector for the menu on the fly.. say I create a menu, but i want to use it on a table of data and I want to switch the selector so that I can tell it which say row id I am on to respond to my menu actions..&lt;/p&gt;</description>
      <pubDate>Sun, 20 Jan 2008 17:00:13 -0000</pubDate>
      <guid isPermaLink="false">forums.prototype-ui.com:5:24:60</guid>
      <author>johncarlson21</author>
      <link>http://forums.prototype-ui.com/forums/5/topics/24</link>
    </item>
    <item>
      <title>Sample code? replied by beefymanus @ Sat, 15 Dec 2007 04:02:17 -0000</title>
      <description>&lt;p&gt;All you need was to add the desktop theme css (I also added the mac shadow) and give the ContextMenu a classname of menu desktop. You can also use others like mac themes or vista, I forget the exact class names for those. Heres your modified code.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&amp;gt;

&amp;lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Test URL Content&amp;lt;/title&amp;gt;
    &amp;lt;script src="../lib/prototype.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;
      &amp;lt;script src="../lib/effects.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;  
      &amp;lt;script src="../dist/prototype-ui.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;link href="../themes/contextmenu/contextmenu.css" rel="stylesheet" type="text/css"&amp;gt;
  &amp;lt;link href="../themes/carousel/prototype-ui.css" rel="stylesheet" type="text/css"&amp;gt;
  &amp;lt;link href="../themes/shadow/mac_shadow.css" rel="stylesheet" type="text/css"&amp;gt;
  &amp;lt;link href="../themes/contextmenu/desktop.css" rel="stylesheet" type="text/css" /&amp;gt;

&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;div id='aDiv' style="width:100px; height:100px; background-color:#CCCCCC; border:solid #000000 1px;"&amp;gt;This is aDiv&amp;lt;/div&amp;gt;

&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
var contextLinks = [
{
    name: 'Save',
    className: 'add',
    callback: Document.save
}, 
{
    name: 'Save as...',submenu: [
                                {name: 'Excel (.xls)',className: 'add',callback: Document.saveAsXls}, 
                                {name: 'Word (.doc)',className: 'add',callback: Document.saveAsDoc}, 
                                {name: 'Acrobat Reader',className: 'add',callback: Document.saveAsPdf}
                                ]
}
];

new UI.ContextMenu({ 
    selector: '#aDiv', // element to attach right click event to
      showEffect: false, // indicates whether Effect.Appear is used when menu is shown
      className: 'menu desktop',
       menuItems: contextLinks // array of links to be used when building menu
});
&amp;lt;/script&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Sat, 15 Dec 2007 04:02:17 -0000</pubDate>
      <guid isPermaLink="false">forums.prototype-ui.com:5:14:34</guid>
      <author>beefymanus</author>
      <link>http://forums.prototype-ui.com/forums/5/topics/14</link>
    </item>
    <item>
      <title>Sample code? replied by nrasch @ Mon, 10 Dec 2007 02:01:37 -0000</title>
      <description>&lt;p&gt;Kangax:&lt;/p&gt;


	&lt;p&gt;Hello.  :)&lt;/p&gt;


	&lt;p&gt;I have attempted to begin testing of the contect menu this evening.  I am having issues getting an example to work.&lt;/p&gt;


	&lt;p&gt;In &lt;span class="caps"&gt;IE7&lt;/span&gt; nothing happens, and in Firefox and Safari the options show up, but below my div element.&lt;/p&gt;


	&lt;p&gt;Would you mind putting up a simple example?&lt;/p&gt;


	&lt;p&gt;Or, as an alternative, here is the simple code I was testing with (which is pretty much a cut-and-paste of the example you provide in the documentation):&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;
&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&amp;gt;
&amp;lt;title&amp;gt;Context Menu Test&amp;lt;/title&amp;gt;

&amp;lt;link type="text/css" href="/themes/contextmenu/contextmenu.css" media="all" /&amp;gt;
&amp;lt;script src="/javascripts/prototype.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src="/javascripts/prototype-ui.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src="/javascripts/scriptaculous.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;div id='aDiv' style="width:100px; height:100px; background-color:#CCCCCC; border:solid #000000 1px;"&amp;gt;This is aDiv&amp;lt;/div&amp;gt;

&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
var contextLinks = [{
    name: 'Save',
    className: 'back',
    callback: Document.save}, 
    {name: 'Save as...',submenu: 
        [{name: 'Excel (.xls)',className: 'xls',callback: Document.saveAsXls}, 
        {name: 'Word (.doc)',className: 'doc',callback: Document.saveAsDoc}, 
        {name: 'Acrobat Reader',className: 'pdf',callback: Document.saveAsPdf}
    ]}
];

new UI.ContextMenu({
    selector: '#aDiv', // element to attach right click event to
  showEffect: false, // indicates whether Effect.Appear is used when menu is shown
   menuItems: contextLinks // array of links to be used when building menu
});
&amp;lt;/script&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Many thanks!&lt;br /&gt;Nathan&lt;/p&gt;</description>
      <pubDate>Mon, 10 Dec 2007 02:01:37 -0000</pubDate>
      <guid isPermaLink="false">forums.prototype-ui.com:5:14:31</guid>
      <author>nrasch</author>
      <link>http://forums.prototype-ui.com/forums/5/topics/14</link>
    </item>
    <item>
      <title>Suggestions? replied by kangax @ Fri, 07 Dec 2007 20:56:51 -0000</title>
      <description>&lt;p&gt;Hi guys,&lt;/p&gt;


	&lt;p&gt;If anyone has any suggestions regarding Contextmenu class, I would be glad to hear them out!&lt;br /&gt;Just wanted to say that submenus are coming very soon and there&amp;#8217;s a new Leopard theme in a trunk (Seb, great job on that!)&lt;/p&gt;


	&lt;p&gt;best,&lt;br /&gt;kangax&lt;/p&gt;</description>
      <pubDate>Fri, 07 Dec 2007 20:56:51 -0000</pubDate>
      <guid isPermaLink="false">forums.prototype-ui.com:5:13:29</guid>
      <author>kangax</author>
      <link>http://forums.prototype-ui.com/forums/5/topics/13</link>
    </item>
  </channel>
</rss>
