Skip to content

Instantly share code, notes, and snippets.

@leonguyen
Created March 1, 2014 04:09
Show Gist options
  • Select an option

  • Save leonguyen/9284986 to your computer and use it in GitHub Desktop.

Select an option

Save leonguyen/9284986 to your computer and use it in GitHub Desktop.
ad_user js
<script type="text/javascript">
function del(id){
var n = noty({
layout: 'center',
type: 'alert',
modal: false,
closeWith: ['click'],
text: 'Do you want to delete?',
buttons: [
{addClass: 'btn btn-primary', text: 'Ok', onClick: function($noty) {
location.href='/<%=control%>/delete/'+id
}
},
{addClass: 'btn btn-danger', text: 'Cancel', onClick: function($noty) {
$noty.close();
}
}
]
});
}
function delDt(id,pid){
var n = noty({
layout: 'center',
type: 'alert',
modal: false,
closeWith: ['click'],
text: 'Do you want to delete?',
buttons: [
{addClass: 'btn btn-primary', text: 'Ok', onClick: function($noty) {
location.href='/<%=control%>/delDt/'+id+'/'+pid
}
},
{addClass: 'btn btn-danger', text: 'Cancel', onClick: function($noty) {
$noty.close();
}
}
]
});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment