My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 387: How to dissable right click menu in nyro window
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Apr 2010


 
Reported by texas...@gmail.com, Nov 22, 2009
Hi,

I found some JQ scripts to dissable right click menu on site (for example I
want to prevent dummies to save pictures on right click :) ), and they are
working everywhere on site except in nyro window.. How can I include this
script into nyro window (or where)?

Thanks


Nov 22, 2009
Project Member #1 nyro...@gmail.com
It depends on how is write the script, but basically, you'll use the endShowContent
callback to disable the right click where you need to.
Nov 22, 2009
#2 texas...@gmail.com
Hi,

I use the trigger like on demo: Ajax Filtering Content #blabla   , and popup window
opens, but I cant figure out where to put addidtional code {in nyro core files} (I
use JQuery script for ContextMenu to have a vertical menu on right click - nice way
to dissable right click :) ).. Could you be a little more specific about
endShowContent callback please as I dont know much about java ? Just some example call..

thanks
Nov 29, 2009
Project Member #3 nyro...@gmail.com
You shouldn't edit nyroModal files. Instead you ahev to use one of the many callback
described in the homepage project.

To do what you want, add this after including the nyroModal file :
<script type="text/javascript">
$(function() {
	$.nyroModalSettings({
		endShowContent(elts, settings) {
			elts.full.contextMenu('WhatYouWant', {
				// YOU option here
			});
		}
	});
});
</script>
Nov 29, 2009
#4 texas...@gmail.com
<script type="text/javascript">

$(function() {
	$.nyroModalSettings({
		endShowContent(elts, settings) {
			elts.full.contextMenu('WhatYouWant', {
        
            $(this).bind("contextmenu", function(e) {
                e.preventDefault();
            });
       


				});
		}
	});
});
</script>

I would like to dissable right click in nyro window, but this code doesnt work for
me.. :( I am still jquery newbie.. could you please help..

Apr 16, 2010
Project Member #5 nyro...@gmail.com
This code should work:
<script type="text/javascript">
$(function() {
	$.nyroModalSettings({
		endShowContent(elts, settings) {
            elts.full.bind("contextmenu", function(e) {
                e.preventDefault();
            });
		}
	});
});
</script>

Status: Fixed

Powered by Google Project Hosting