Skip to content
This repository has been archived by the owner on Jan 17, 2019. It is now read-only.

Added global $.confirm.options, for initial application configuraion #16

Merged
merged 2 commits into from
Feb 28, 2014

Conversation

soulman-is-good
Copy link
Contributor

Added global $.confirm.options, for initial application configuraion
And made some fixes with direct $.confirm call without event supplied

And made some fixes with direct $.confirm call without event supplied
@mnapoli
Copy link
Member

mnapoli commented Feb 27, 2014

Thanks for your pull request, this feature is definitely interesting.

However the diff is unreadable, you seem to have changed the indentation of the whole file which has changed every line. Could you restore the original indentation please? Thanks

@soulman-is-good
Copy link
Contributor Author

Sorry commited wrong file.
I want to thank you for this usefull tool. This is just what I needed. And I extruded options for global redeclaration. We use translations on our site so I need to do this.
Just fixed indentation to source file like, but seems this won't help with readiness.
You may decline my pull request then, I can make a new one if you still interested.

@mnapoli
Copy link
Member

mnapoli commented Feb 28, 2014

It looks better now, I think it's good thank you. I just have a question, I'll put it inline with the code.

form.submit();
} else {
window.location = url;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above, I don't understand the change.

Why replace this:

var url = e.currentTarget.attributes['href'].value;

with this:

var url = e && (('string' === typeof e && e) || (e.currentTarget && e.currentTarget.attributes['href'].value));

@soulman-is-good
Copy link
Contributor Author

I've written this because I call $.confirm directly and I do not pass any event.
So when I click "Yes" without overriding "confirm" method it breaks because e is undefined.
And actually somewhere I want to pass url string except Event object so method would work too.

mnapoli added a commit that referenced this pull request Feb 28, 2014
Added global $.confirm.options, for initial application configuraion
@mnapoli mnapoli merged commit df6495e into myclabs:master Feb 28, 2014
@mnapoli
Copy link
Member

mnapoli commented Feb 28, 2014

Thank you, I have merged it, I will release a new version soon.

@mnapoli
Copy link
Member

mnapoli commented Feb 28, 2014

I just released 2.1.0: https://github.com/myclabs/jquery.confirm/releases/tag/2.1.0

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants