Print Menu and disable the right click context Menu

122 views
Skip to first unread message

david anafa mudii

unread,
Jun 7, 2015, 8:56:17 AM6/7/15
to phpde...@googlegroups.com
Greetings.

My simple application -creating and printing label- works well in IE and chrome. But i prefer IE over chrome because chrome does not have the "shrink to fit" like IE. However, on disabling the context menu, which has Print option, i could not access the print. 

So my question is 
Can i disable ALL other context menu option such as view source, refresh etc but leave only a selected few like PRINT option? I saw this in json-settings for chrome

"chrome": {
       

        "context_menu": {
            "enable_menu": true,
            "navigation": true,
            "print": true,
            "view_source": true,
            "open_in_external_browser": true,
            "devtools": true
        }

which gives one option to select what one wants to allow on the context menu, can i simply copy and modify and place the above in IE json-settings and will it work?


Secondly, if the above is not feasible, can a menu option be generated to only show the PRINT button so that if i disable the context menu in json-settings, i can simply click and have the print preview like in the IE of windows 7?


Thanks for a great job.

Czarek Tomczak

unread,
Jun 7, 2015, 9:06:26 AM6/7/15
to phpde...@googlegroups.com
IE and Chrome have different set of options. See the wiki pages and the original settings.json files that come with distributions for what options are available.

Yes you can have a custom context menu and call javascript window.print(). There is an example of custom context menu in the www/ folder.

--
You received this message because you are subscribed to the Google Groups "PHP Desktop" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phpdesktop+...@googlegroups.com.
Visit this group at http://groups.google.com/group/phpdesktop.
To view this discussion on the web visit https://groups.google.com/d/msgid/phpdesktop/58654240-5d0d-4962-a674-4caaa67a6e4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

david anafa mudii

unread,
Jun 7, 2015, 9:40:13 AM6/7/15
to phpde...@googlegroups.com
Ok

My problem with chrome is that it does not have the shrink to fit option like IE




And therefore makes it difficult to print out labels. Firefox has this features tho. In MSIE, this feature is available via the print preview via the right click context menu but i wish to disable it because of the view source that is enabled, pne can view source codes. I would have wished for a menu at the top of the screen with print so that i could safely disable the context menu.

Reply all
Reply to author
Forward
0 new messages