Closes #794 -- Make Chosen fields the proper width
This commit is contained in:
parent
d5bf941529
commit
bbde33cd1b
|
@ -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!') ?>'
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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
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
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
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue