From 71fe5d672e516ee7c6ed9833a828b99acf9e6d13 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 3 Jul 2014 14:38:40 +0200 Subject: Fixed dialogs styling, reversed buttons Default dialog button is now on the right, other one on the left. --- core/js/jquery.ocdialog.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/js/jquery.ocdialog.js') diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js index af32591ce52..e48e3e8df6a 100644 --- a/core/js/jquery.ocdialog.js +++ b/core/js/jquery.ocdialog.js @@ -111,6 +111,13 @@ var $buttonrow = $('
'); this.$buttonrow = $buttonrow.appendTo(this.$dialog); } + if (value.length === 1) { + this.$buttonrow.addClass('onebutton'); + } else if (value.length === 2) { + this.$buttonrow.addClass('twobuttons'); + } else if (value.length === 3) { + this.$buttonrow.addClass('threebuttons'); + } $.each(value, function(idx, val) { var $button = $('