Have an account?

» Forgot your username or password?

» Register for Free

Piczard v1.x Support Forum Archive


The Piczard v1.x Support Forum is no longer active. This is a static read-only copy of it.
It's not possible to post new messages or replies.
Search | Active Topics

How I can Customize the OK button click in PopupPictureTrimmer
narendrababu
#1 Posted : Wednesday, December 18, 2013 12:43:30 PM(UTC)
Rank: Newbie

Joined: 12/18/2013(UTC)
Posts: 2
Points: 6

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hi,

I am using "SimpleImageUpload" user control after I uploading an image one popup (PopupPictureTrimmer) is

coming for croping the uploaded picture after we crop the picture we will click ok button, Now I want to customize the

OK button click event. How can I achieve this and where can I customize the Ok button click in the popup.

Please try to give Quick reply..

Thanks in advance..
sergioturolla
#2 Posted : Thursday, December 19, 2013 8:29:42 AM(UTC)

Rank: Administration

Joined: 3/11/2011(UTC)
Posts: 159
Points: 489

Thanks: 0 times
Was thanked: 28 time(s) in 28 post(s)
Hello,
This kind of customization requires changes to the source code of the SimpleImageUpload ASCX control.
In particular you have to edit the file "simpleImageUpload.js".

Locate the function onImageEditAfterPopupClose:

Code:
onImageEditAfterPopupClose: function(sender, args) {
    if (this.configurationChange) {
        // Configuration changed
        this.configurationChange = false;
        this.executeAction("configuration");
    }
    else {
        if (args.saveChanges) {
            this.executeAction("edit");
        }
    }
},


and add your code before the instruction this.executeAction("edit");

Example:

Code:
onImageEditAfterPopupClose: function(sender, args) {
    if (this.configurationChange) {
        // Configuration changed
        this.configurationChange = false;
        this.executeAction("configuration");
    }
    else {
        if (args.saveChanges) {
            alert("YOU CLICKED THE OK BUTTON !");
            this.executeAction("edit");
        }
    }
},


Kind regards

Sergio
narendrababu
#3 Posted : Friday, December 20, 2013 7:54:42 AM(UTC)
Rank: Newbie

Joined: 12/18/2013(UTC)
Posts: 2
Points: 6

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Hi,

Thanks for your valuable reply. Now I want to save the image I cropped into a folder in that 'Ok' button click.

Where I can get that cropped image and how I can save that cropped new image into specified folder.

How can I achieve this..?

Please try to give quick reply.

Thanks in advance..
sergioturolla
#4 Posted : Sunday, December 22, 2013 3:56:24 PM(UTC)

Rank: Administration

Joined: 3/11/2011(UTC)
Posts: 159
Points: 489

Thanks: 0 times
Was thanked: 28 time(s) in 28 post(s)
You can use the "ImageEdit" event.

Example - Markup:
Code:
<ccPiczardUC:SimpleImageUpload runat="server" id="SimpleImageUpload" OnImageEdit="SimpleImageUpload_ImageEdit" />


Example - Code behind:
Code:
protected void SimpleImageUpload_ImageEdit(object sender, EventArgs e)
{
    this.SimpleImageUpload.SaveProcessedImageToFileSystem("~/App_Data/__My__Image__Path.jpg");
}


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.