mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
add SeedDMSBox.redirect()
This commit is contained in:
parent
69cab29178
commit
a2676573a6
|
@ -1542,3 +1542,20 @@ $(document).ready(function() { /* {{{ */
|
|||
}
|
||||
}
|
||||
}( window.SeedDMSAjax = window.SeedDMSAjax || {}, jQuery )); /* }}} */
|
||||
|
||||
(function( SeedDMSBox, $, undefined ) { /* {{{ */
|
||||
SeedDMSBox.redirect = function(url, boxparams) {
|
||||
bootbox.dialog(boxparams.message, [{
|
||||
"label" : boxparams.confirmLabel,
|
||||
"class" : "btn-danger",
|
||||
"callback": function() {
|
||||
window.location.href = url;
|
||||
}
|
||||
}, {
|
||||
"label" : boxparams.cancelLabel,
|
||||
"class" : "btn-cancel",
|
||||
"callback": function() {
|
||||
}
|
||||
}]);
|
||||
}
|
||||
}( window.SeedDMSBox = window.SeedDMSBox || {}, jQuery )); /* }}} */
|
||||
|
|
|
@ -1598,3 +1598,26 @@ $(document).ready(function() { /* {{{ */
|
|||
}
|
||||
}
|
||||
}( window.SeedDMSAjax = window.SeedDMSAjax || {}, jQuery )); /* }}} */
|
||||
|
||||
(function( SeedDMSBox, $, undefined ) { /* {{{ */
|
||||
SeedDMSBox.redirect = function(url, boxparams) {
|
||||
bootbox.confirm({
|
||||
"message": boxparams.message,
|
||||
"buttons": {
|
||||
"confirm": {
|
||||
"label" : boxparams.confirmLabel,
|
||||
"className" : "btn-danger",
|
||||
},
|
||||
"cancel": {
|
||||
"label" : boxparams.cancelLabel,
|
||||
"className" : "btn-secondary",
|
||||
}
|
||||
},
|
||||
"callback": function(result) {
|
||||
if(result) {
|
||||
window.location.href = url;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}( window.SeedDMSBox = window.SeedDMSBox || {}, jQuery )); /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user