Custom Action on Double Click Event

Last post 05-04-2009, 1:19 PM by Adam. 6 replies.
Sort Posts: Previous Next
  •  05-01-2009, 12:40 PM 51740

    Custom Action on Double Click Event

    I am trying to figure out how to add additional code to the double click event.  We are inserting our own <img> tags that have a special property  "controlname".  When the image is double clicked I want to check for this property and if it exists, I want to fire off javascript to load our own popup control.  And if it doesnt exist, i want to continue on with the Cute Editor popup.
     
    I don't want to use tag_image.ascx.  I want to load our own popup window altogether (we use jquery).
     
    Where can I see the double click event to modify it?
     
    Thanks for your time and assistance.
     
    Jason
  •  05-01-2009, 2:17 PM 51745 in reply to 51740

    Re: Custom Action on Double Click Event

    Jason,
     
    You can overwrite the double click event. But it will impact many things of Cute Editor. I don't suggest you do this.
     
    Here are my suggestions:
     
    1. How to disable tag.aspx dialog when double clicking on images?
     
    Please open the following file:

    CuteSoft_Client\CuteEditor\Dialogs\tag.config
     
    And remove the code below:
     
    <add pattern="IMG" tab="IMG" text="[[Image]]" control="Tag_Image.ascx" />
     
    2. Modify the dialog directly and integrate with your own code.
     
     
    Hope it helps.
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-01-2009, 2:35 PM 51746 in reply to 51745

    Re: Custom Action on Double Click Event

    Thanks for the response, but I have a few more questions....
     
    1) If the image is not one of our controls (controlname property doesn't exist) I want to use the cuteeditor image property box.
     
    2)  If I remove IMG from the tag configs, how will I trap the double click event to fire off my own dialog?
     
    Thanks.
     
    Jason
  •  05-01-2009, 3:08 PM 51747 in reply to 51746

    Re: Custom Action on Double Click Event

    Jason,
     
    >>1) If the image is not one of our controls (controlname property doesn't exist) I want to use the cuteeditor image property box.
     
    Can you explain it in details?
     
    >> 2)  If I remove IMG from the tag configs, how will I trap the double click event to fire off my own dialog?
     
    Go with the solution 2. Modify the exisitng image tag dialog and add your own code.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-01-2009, 3:24 PM 51749 in reply to 51747

    Re: Custom Action on Double Click Event

    we are going to write our "controls" in the editor with image tags....like....
     
    <img controlname="MyControl" props="some properties of control"/>
     
    What I want to happen is when this particular image control is double clicked, run some code to load our own dialog, that doesn't use the tag_image.asxc.
     
    If the user places an image in the editor that doesn't have the controlname in it, we want to fire off the cute editor image dialog.
     
    I don't want use your popup, which is a popup that dynamically loads a user control for the control type, we wanted to use our own ajax popup.
     
    If I go with solution 2, i will have to load a control into your "popup page".  What I was hoping to do is modify the code that calls the popup, and if it is our "control" call our popup, otherwise continue on with the code as it is.
     
    And if I were to modify the Tag_Image.asxc, if a user clicked an Image what wasn't our "control" it would goto the wrong popup.
  •  05-04-2009, 12:14 PM 51791 in reply to 51749

    Re: Custom Action on Double Click Event

    Is there any way in tag.aspx I can get another attribute of the element?  I could potentially change the tag.aspx to load a custom control if it has our controlname attribute?
  •  05-04-2009, 1:19 PM 51794 in reply to 51791

    Re: Custom Action on Double Click Event

    jsmith0429:
    Is there any way in tag.aspx I can get another attribute of the element?  I could potentially change the tag.aspx to load a custom control if it has our controlname attribute?
    1. SyncToView=function SyncToView_Image()   
    2. {   
    3.     var controlname, props;   
    4.     controlname = element.getAttribute("controlname");   
    5.     props = element.getAttribute("props");   
    6.     ...   
    7. }  

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML