Closes #794 -- Make Chosen fields the proper width

This commit is contained in:
Buster "Silver Eagle" Neece 2018-09-16 09:32:47 -05:00
parent d5bf941529
commit bbde33cd1b
10 changed files with 34 additions and 33 deletions

View File

@ -1,5 +1,4 @@
$(function() {
$('form.form').each(function() {
var $form = $(this);
@ -8,7 +7,13 @@ $(function() {
$form.find('.form-group > label').addClass('control-label');
$form.find('input:not(input[type=button],input[type=submit],input[type=reset],input[type=radio],input[type=checkbox]),textarea,select').addClass('form-control');
$form.find('select').wrap('<div class="select" />');
$form.find('select').wrap('<div class="select" />').chosen({
width: "100%",
placeholder_text_single: <?=$this->escapeJs(__('Select...')) ?>,
placeholder_text_multiple: <?=$this->escapeJs(__('Select...')) ?>,
no_results_text: <?=$this->escapeJs(__('No results found!')) ?>
});
autosize($form.find('textarea'));
@ -38,18 +43,15 @@ $(function() {
.prepend('<span class="label label-default">'+<?=$this->escapeJs(__('Advanced')) ?>+'</span> ');
$form.find('input[type=button],input[type=submit],input[type=reset]').addClass('btn m-t-10');
// Scroll to errors.
var error_fields = $form.find('.has-error:visible');
if (error_fields.length > 0) {
$([document.documentElement, document.body]).animate({
scrollTop: error_fields.first().offset().top - $('#header').outerHeight() - 15
}, 1000);
}
});
var error_fields = $('form .has-error:visible');
if (error_fields.length > 0) {
$([document.documentElement, document.body]).animate({
scrollTop: error_fields.first().offset().top - $('#header').outerHeight() - 15
}, 1000);
}
$('select').chosen({
placeholder_text_single: '<?=__('Select...') ?>',
placeholder_text_multiple: '<?=__('Select...') ?>',
no_results_text: '<?=__('No results found!') ?>'
});
});

View File

@ -1,7 +1,7 @@
{
"dist/app.js": "dist/app-b0b3f79e67.js",
"dist/dark.css": "dist/dark-6c34129d52.css",
"dist/light.css": "dist/light-c08cbcbc7f.css",
"dist/radio.js": "dist/radio-8f8220814e.js",
"dist/app.js": "dist/app-ea16dd7fed.js",
"dist/dark.css": "dist/dark-474718a25b.css",
"dist/light.css": "dist/light-3c36dbb401.css",
"dist/radio.js": "dist/radio-6dd35141d4.js",
"dist/zxcvbn.js": "dist/zxcvbn-da450ff5bb.js"
}

File diff suppressed because one or more lines are too long

2
web/static/dist/app-ea16dd7fed.js vendored Normal file

File diff suppressed because one or more lines are too long

6
web/static/dist/dark-474718a25b.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
web/static/dist/light-3c36dbb401.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -57,7 +57,6 @@
overflow: visible;
height: 34px;
padding: 6px 0 6px;
text-transform: uppercase;
border: 0;
border-bottom: 1px solid @input-border;
background: none;