Open Media Library
This commit is contained in:
commit
2ee2bc178a
228 changed files with 85988 additions and 0 deletions
23
static/js/confirmDialog.js
Normal file
23
static/js/confirmDialog.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
oml.ui.confirmDialog = function(options, callback) {
|
||||
|
||||
options = Ox.extend(options, {
|
||||
buttons: options.buttons.map(function($button, index) {
|
||||
return $button
|
||||
.options({id: index ? 'yes' : 'no'})
|
||||
.bindEvent({
|
||||
click: function() {
|
||||
that.close();
|
||||
index && callback();
|
||||
}
|
||||
});
|
||||
}),
|
||||
keys: {enter: 'yes', escape: 'no'}
|
||||
});
|
||||
|
||||
var that = oml.ui.iconDialog(options);
|
||||
|
||||
return that.open();
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue