Skip to content

Instantly share code, notes, and snippets.

@JeffreyVdb
Last active August 29, 2015 14:02
Show Gist options
  • Save JeffreyVdb/623de54064a5ac4763e9 to your computer and use it in GitHub Desktop.
Save JeffreyVdb/623de54064a5ac4763e9 to your computer and use it in GitHub Desktop.
manifest.json
locales
|-- admin
| |-- en-US.l20n
| `-- nl-NL.l20n
`-- manifest.json
{
"locales": [
"en-US",
"nl-NL"
],
"default_locale": "nl-NL",
"resources": [
"http://localhost:8888/locales/admin/{{locale}}.l20n"
]
}
(function ($) {
var ctx = document.l10n;
// Every time a link within a destroy form is clicked, show confirmation
$('input[name="_method"][value="DELETE"]').parent('form').find('a').on('click', function (e) {
e.preventDefault();
ctx.localize(['are_you_sure'], function(l10n) {
bootbox.confirm(l10n.entities.are_you_sure.value, function (result) {
});
});
})
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment