diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js
index bafbd0e0e9f..ee492d15f58 100644
--- a/core/js/jquery.ocdialog.js
+++ b/core/js/jquery.ocdialog.js
@@ -83,20 +83,22 @@
var self = this;
switch(key) {
case 'title':
- var $title = $('
' + this.options.title
- + '
'); //
');
if(this.$title) {
- this.$title.replaceWith($title);
+ this.$title.text(value);
} else {
+ var $title = $(''
+ + value
+ + '
');
this.$title = $title.prependTo(this.$dialog);
}
this._setSizes();
break;
case 'buttons':
- var $buttonrow = $('');
+ console.log('buttons', value);
if(this.$buttonrow) {
- this.$buttonrow.replaceWith($buttonrow);
+ this.$buttonrow.empty();
} else {
+ var $buttonrow = $('');
this.$buttonrow = $buttonrow.appendTo(this.$dialog);
}
$.each(value, function(idx, val) {
@@ -124,6 +126,8 @@
$closeButton.on('click', function() {
self.close();
});
+ } else {
+ this.$dialog.find('.oc-dialog-close').remove();
}
break;
case 'width':