Remove right click functionalities for the selected categories in the Image gallery

Last post 03-11-2014, 9:35 AM by Kenneth. 5 replies.
Sort Posts: Previous Next
  •  02-18-2014, 9:47 AM 79941

    Remove right click functionalities for the selected categories in the Image gallery

    Hi,

     

                  I am using asp.net image gallery (classic layout), I am binding Images to that gallery by folder name 'Image

     

    Gallery' in my server. In the Gallery there is a gallery browser for uploading new files. In that there is also an option

     

    "New Category" for creating categories, Now I created 3 categories with names like as Pages, Emails, Banners..

     

    My requirement is that when the user gives right click on those categories one menu is displaying with menu items

     

    as Open, Add Comment, Edit etc. Now I want to disable the right click for 2 categories (Pages, Emails only) of total 3

     

    categories. I mean that for particular selected categories I want to remove the right click functionality. But the user

     

    can upload images into those categories, but he can't able to add comments or rename the category like that..

     

     How can I achieve this. Please try to give quick reply.

     

    Thanks in advance.. 


    Regards,
    Narendra
  •  02-19-2014, 8:51 AM 79946 in reply to 79941

    Re: Remove right click functionalities for the selected categories in the Image gallery

    Hi,

     

    1. Please open file "\CuteSoft_Client\Gallery\Popup\Default\Code.js".

     

    2. Find function below 

     

    GalleryPopup.prototype.ShowPhotoMenu=function _GalleryPopup_ShowPhotoMenu(photo,element,event,listener)

    {}

     

    3.  Add the section below into the function above. then it will disable the context menu of the category images what you set in it. you can find the category id from file category.config.

     

    1. //disable the content menu for category3 images  
    2.     if (photo.CategoryID == "3")  
    3.     {  
    4.          return;  
    5.     }  
     

    Regards,

     

    Ken 

  •  02-21-2014, 2:31 AM 79959 in reply to 79946

    Re: Remove right click functionalities for the selected categories in the Image gallery

    Hi,

     

                     You gave the code for disable context menu for the images in the particular category, But my requirement

     

    is that to disable the context menu for the selected categories (disable context menu for right click on category folder)

     

    also.

     

    Please try to give reply quickly, Don't delay. This is urgent requirement for me. 

     

    I am waiting for your reply. Thanks in advance.. 


    Regards,
    Narendra
  •  02-21-2014, 8:09 AM 79961 in reply to 79959

    Re: Remove right click functionalities for the selected categories in the Image gallery

    hi,

     

    1. please open file \CuteSoft_Client\Gallery\Popup\Default\Code.js. 

     

    2. Find function below(line 69).

     

    GalleryPopup.prototype.ShowCategoryMenu=function _GalleryPopup_ShowCategoryMenu(category,element,event,listener)

    {} 

     

    3.Add the code below int the function above.

     

      if (category.Title == "Pages" || category.Title == "Emails")

        {

            return;

        }

     

    Regards,

     

    Ken 

  •  03-11-2014, 8:43 AM 80050 in reply to 79961

    Re: Remove right click functionalities for the selected categories in the Image gallery

    Hi,

     

                    I  want to remove right click functionality for Default category click also.  As You above said I put the below code to hide

     

    category menu for Default Category.

     

            if(category.Title == "(Default)") 

            {

                   return;

           }

     

    But It's not working  for me. How Can I achieve this.

     

    Please try to give Quick reply..

     

    Thanks in advance.. 

     


    Regards,
    Narendra
  •  03-11-2014, 9:35 AM 80054 in reply to 80050

    Re: Remove right click functionalities for the selected categories in the Image gallery

    hi,

     

    Please try

     

    1. if (category.Title == null)  
    2. {  
    3.     return;  
    4. }  
     

    Regards,

     

    Ken 

View as RSS news feed in XML