Saving

4 posts, 0 answers
  1. Kevin Donahue
    Kevin Donahue avatar
    33 posts
    Member since:
    Oct 2009

    Posted 22 Jul 2011 Link to this post

    Is there a way to automatically save the file when the save command is clicked without showing the dialog?  Possibly the best thing would be for me to override the behaviour of some of the commands.  Is this possible?

    On a side note:  I get a javascript error when I start typing in the crop width or height dialog.  I was trying to type 100. I selected the current value in the height textbox, type the 1, and it gets the error.
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 22 Jul 2011 Link to this post

    Hello Kevin,

    Yes, it is possible to add custom toolbars and custom buttons to the toolbar. Here is an example which demonstrates how to implement a custom Save button:

    Copy Code
    <telerik:RadImageEditor ID="RadImageEditor1"runat="server"ImageUrl="~/ImageEditor/images/hay.jpg"
    Width="720px"Height="430px">
      <tools>
        <telerik:ImageEditorToolGroup>
           <telerik:ImageEditorTool CommandName="SaveImage"ImageUrl="Save.png"/>
           <telerik:ImageEditorTool CommandName="Rotate"/>
        </telerik:ImageEditorToolGroup>
      </tools>
    </telerik:RadImageEditor>
    <script type="text/javascript">
    Telerik.Web.UI.ImageEditor.CommandList["SaveImage"] = function(imageEditor, commandName, args) {
        imageEditor.saveImageOnServer("",true); //saves the image on the server - it either overwrites the file or keeps both files
    };
    </script>
    </telerik:RadAjaxPanel>

    As to the JS error: Are you able to reproduce this problem under the Default Example of RadImageEditor and under which browser? I tried to reproduce the problem but without success. You can see my test at: http://screencast.com/t/9wnKarqI

    Could you please send us also the whole error message?

    Regards,
    Rumen
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kevin Donahue
    Kevin Donahue avatar
    33 posts
    Member since:
    Oct 2009

    Posted 24 Jul 2011 Link to this post

    Hi Rumen,

    I saw in your test that you clicked the crop button, but the dialog actually turned into a resize image dialog.  Another issue?

    Anyway, I'm running on IE 8. When I type 1 in the crop window width text box, the error happens here:

    },setContentSize:function(d,c){if(!d){throw Error.argumentNull("element");
    }if(!c){throw Error.argumentNull("size");
    }if($telerik.getCurrentStyle(d,"MozBoxSizing")=="border-box"||$telerik.getCurrentStyle(d,"BoxSizing")=="border-box"){var b=$telerik.getBorderBox(d);
    var a=$telerik.getPaddingBox(d);
    c={width:c.width+b.horizontal+a.horizontal,height:c.height+b.vertical+a.vertical};
    }d.style.width=c.width.toString()+"px";
    d.style.height=c.height.toString()+"px";
    }

    Thanks for the help on the save and customization.  I'll give it a try.
  5. Niko
    Admin
    Niko avatar
    387 posts

    Posted 26 Jul 2011 Link to this post

    Hi Kevin,

    Indeed I was able to reproduce the issue that you have reported. We will look into it and have it fixed in due time. You can check the progress on the issue through our PITS - http://www.telerik.com/support/pits.aspx#/public/aspnet-ajax/7113.

    As a sign of gratitude for your persistence in this matter, I have updated your Telerik points.

    Greetings,
    Niko
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top