* chosen suppot change dropmenu direction.

This commit is contained in:
Catouse
2015-02-02 16:04:33 +08:00
parent 24f81f356e
commit cf330a9264
3 changed files with 14 additions and 4 deletions

View File

@@ -13,6 +13,13 @@ defaultChosenOptions = {no_results_text: noResultsMatch, width:'100%', allow_sin
$(document).ready(function()
{
$("#mailto").attr('data-placeholder', chooseUsersToMail);
$(".chosen, #productID").chosen(defaultChosenOptions);
$("#mailto, .chosen, #productID").each(function()
{
var $this = $(this);
if($this.offset().top + 240 > $(document.body).height())
{
$this.attr('data-css-class', 'chosen-up');
}
}).chosen(defaultChosenOptions);
});
</script>

File diff suppressed because one or more lines are too long

View File

@@ -261,6 +261,9 @@ fieldset > .form-group {margin-bottom: 0;}
/* chosen container in input group */
.input-group > .chosen-container {display: table-cell;}
/* chosen up */
.chosen-up.chosen-container .chosen-drop {bottom: 100%; top: inherit; border-radius: 2px 2px 0 0; box-shadow: 0 -3px 5px rgba(0,0,0,.15); margin-top: auto; margin-bottom: -1px;}
/* Condensed form */
.form-condensed .table-form {margin-bottom: 0;}
.form-condensed .table-form td, .form-condensed .table-form th {padding: 5px; font-size: 12px;}