Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/skins
diff options
context:
space:
mode:
authorThomas B <thomas@roundcube.net>2019-07-31 14:32:17 +0300
committerAleksander Machniak <alec@alec.pl>2019-07-31 14:32:17 +0300
commit53130c08ef582ea09221b01e87e87c5e8c3034f6 (patch)
tree33af11d1d2d4e53b1679ce56427b033e131289ae /skins
parent91398c858abfa625773ed985872317a9d960fd0a (diff)
Make propform column sizing variable (#6867)
Allow to specify the preferred column sizes with a propform table class.
Diffstat (limited to 'skins')
-rw-r--r--skins/elastic/templates/settingsedit.html2
-rw-r--r--skins/elastic/ui.js9
2 files changed, 8 insertions, 3 deletions
diff --git a/skins/elastic/templates/settingsedit.html b/skins/elastic/templates/settingsedit.html
index a716ee9bb..d80e7aa12 100644
--- a/skins/elastic/templates/settingsedit.html
+++ b/skins/elastic/templates/settingsedit.html
@@ -3,7 +3,7 @@
<h1 class="voice"><roundcube:object name="sectionname" /></h1>
<div class="formcontent">
- <roundcube:object name="userprefs" form="form" class="propform" />
+ <roundcube:object name="userprefs" form="form" class="propform cols-sm-6-6" />
</div>
<div class="formbuttons">
diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js
index 401d52b71..6cff8fff6 100644
--- a/skins/elastic/ui.js
+++ b/skins/elastic/ui.js
@@ -810,6 +810,11 @@ function rcube_elastic_ui()
$('table.propform', context).each(function() {
var text_rows = 0, form_rows = 0;
+ var col_sizes = ['sm', 4, 8];
+
+ if ($(this).attr('class').match(/cols-([a-z]+)-(\d)-(\d)/)) {
+ col_sizes = [RegExp.$1, RegExp.$2, RegExp.$3];
+ }
$(this).find('> tbody > tr, > tr').each(function() {
var first, last, row = $(this),
@@ -821,8 +826,8 @@ function rcube_elastic_ui()
last = cells.last();
$('label', first).addClass('col-form-label');
- first.addClass('col-sm-4');
- last.addClass('col-sm-8');
+ first.addClass('col-' + col_sizes[0] + '-' + col_sizes[1]);
+ last.addClass('col-' + col_sizes[0] + '-' + col_sizes[2]);
if (last.find('[type=checkbox]').length == 1 && !last.find('.proplist').length) {
row_classes.push('form-check');