Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activate Upload on an Event and Custom Button for Crop/Save #139

Closed
kriskd opened this issue Jul 16, 2015 · 5 comments
Closed

Activate Upload on an Event and Custom Button for Crop/Save #139

kriskd opened this issue Jul 16, 2015 · 5 comments

Comments

@kriskd
Copy link

kriskd commented Jul 16, 2015

Is there a way I could implement the following two enhancements:

  1. I do the uploading and cropping in a Twitter Bootstrap modal. The user clicks a link on my page, the TWBS modal opens with croppic in it. Instead of having the user then click on the green upload button or even a custom upload link, is there a way I can have trigger the upload immediately when the modal opens? I tried the click event andtrigger('click') on a custom upload link in the modal and that did not work.
  2. Similar to customUploadButtonId, is there a way to have a custom crop/save button. I would like to remove the crop/save icon from the image space and have a button off the image to do the save. I'm concerned my users will not associate that button with saving the image and lose their changes.
@marcosschroh
Copy link

I have already implemented the point 2. If you can I can upload this feature
El 16/7/2015 12:04, "Kris Dockter" [email protected] escribió:

Is there a way I could implement the following two enhancements:

I do the uploading and cropping in a Twitter Bootstrap modal. The user
clicks a link on my page, the TWBS modal opens with croppic in it. Instead
of having the user then click on the green upload button or even a custom
upload link, is there a way I can have trigger the upload immediately when
the modal opens? I tried the click event andtrigger('click') on a
custom upload link in the modal and that did not work.
2.

Similar to customUploadButtonId, is there a way to have a custom
crop/save button. I would like to remove the crop/save icon from the image
space and have a button off the image to do the save. I'm concerned my
users will not associate that button with saving the image and lose their
changes.


Reply to this email directly or view it on GitHub
#139.

@kriskd
Copy link
Author

kriskd commented Jul 16, 2015

@marcosschroh Yes, I would appreciate you sharing with me, pointing me to a PR or similar so I can implement this.

@kriskd
Copy link
Author

kriskd commented Jul 17, 2015

I ended up taking a stab at this myself. @marcosschroh Is this similar to what you did? It seems to work:

kriskd@7d746c2

@marcosschroh
Copy link

Hey.. sorry for the late response... Take a look in my repo: https://github.com/marcosschroh/croppic/blob/master/croppic.js
I have added the extra option when you initialize the plugin, it is customCropButtonId. You have to pass the id of the selector, It's all.

@kriskd
Copy link
Author

kriskd commented Jul 22, 2015

I have submitted PR #143 to create the custom crop button as well as an option to not display the red reset button.

@kriskd kriskd closed this as completed Jul 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants