Permalink
Showing
with
30 additions
and
3 deletions.
-
+28
−1
jquery.dropdown.css
-
+2
−2
jquery.dropdown.js
|
@@ -92,6 +92,33 @@ select[data-dropdownjs][disabled] + .dropdownjs > input[readonly] { |
|
|
text-shadow: 0 1px 0 #fff;
|
|
|
opacity: .6;
|
|
|
}
|
|
|
-.dropdownjs > ul > li:h > .close:hover:before {
|
|
|
+.dropdownjs > ul > li:hover > .close:hover:before {
|
|
|
opacity: .9;
|
|
|
}
|
|
|
+
|
|
|
+.rtl .dropdownjs > input{
|
|
|
+ padding-right: 0;
|
|
|
+ padding-left: 30px;
|
|
|
+}
|
|
|
+
|
|
|
+.rtl .dropdownjs > ul[placement=top-right] {
|
|
|
+ -webkit-transform-origin: bottom right;
|
|
|
+ -ms-transform-origin: bottom right;
|
|
|
+ transform-origin: bottom right;
|
|
|
+ bottom: 0;
|
|
|
+ left: auto;
|
|
|
+ right: 0;
|
|
|
+}
|
|
|
+.rtl .dropdownjs > ul[placement=bottom-right] {
|
|
|
+ -webkit-transform-origin: top right;
|
|
|
+ -ms-transform-origin: top right;
|
|
|
+ transform-origin: top right;
|
|
|
+ top: 0;
|
|
|
+ left: auto;
|
|
|
+ right: 0;
|
|
|
+}
|
|
|
+.rtl .dropdownjs > ul > li > .close:before {
|
|
|
+ right: auto;
|
|
|
+ left: 15px;
|
|
|
+ float: left;
|
|
|
+}
|
|
@@ -245,9 +245,9 @@ |
|
|
// Decide if place the dropdown below or above the input
|
|
|
if (height < 200 && coords.top > coords.bottom) {
|
|
|
height = coords.top;
|
|
|
- $ul.attr("placement", "top-left");
|
|
|
+ $ul.attr("placement", $("body").hasClass("rtl") ? "top-right" : "top-left");
|
|
|
} else {
|
|
|
- $ul.attr("placement", "bottom-left");
|
|
|
+ $ul.attr("placement", $("body").hasClass("rtl") ? "bottom-right" : "bottom-left");
|
|
|
}
|
|
|
|
|
|
$(this).next("ul").css("max-height", height - 20);
|
|
|
0 comments on commit
cf7d54b