Skip to content

Commit 4d4b586

Browse files
committed
upd file, dropdown
1 parent bdd569a commit 4d4b586

11 files changed

+88
-14
lines changed

lib/metro.all.css

+13
Original file line numberDiff line numberDiff line change
@@ -57885,6 +57885,19 @@ aside::after {
5788557885
margin-left: 0;
5788657886
margin-right: auto;
5788757887
}
57888+
.file.input-small {
57889+
line-height: 28px;
57890+
height: 28px;
57891+
}
57892+
.file.input-small .caption {
57893+
font-size: 12px;
57894+
line-height: 28px;
57895+
height: 28px;
57896+
}
57897+
.file.input-small .button {
57898+
height: 24px;
57899+
margin: 1px 1px 1px auto;
57900+
}
5788857901

5788957902
/* source/components/flip-card/flip-card.less */
5789057903
.flip-card .front,

lib/metro.all.css.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/metro.all.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -15710,6 +15710,7 @@
1571015710
openMode: "auto",
1571115711
openFunc: "show",
1571215712
closeFunc: "hide",
15713+
height: "auto",
1571315714
onDrop: Metro2.noop,
1571415715
onUp: Metro2.noop,
1571515716
onDropdownCreate: Metro2.noop
@@ -15767,6 +15768,12 @@
1576715768
toggle.append(toggleImage);
1576815769
}
1576915770
this.displayOrigin = Metro2.utils.getStyleOne(element2, "display");
15771+
if (o2.height !== "auto") {
15772+
element2.css({
15773+
"height": o2.height,
15774+
"overflow-y": "auto"
15775+
});
15776+
}
1577015777
element2.css("display", "none");
1577115778
this.toggle = toggle;
1577215779
this.level = level;
@@ -15842,10 +15849,10 @@
1584215849
},
1584315850
_open: function(el, immediate) {
1584415851
const dropdown = Metro2.getPlugin(el, "dropdown");
15845-
const toggle = dropdown.toggle;
1584615852
const options = dropdown.options;
1584715853
const func = options.openFunc;
15848-
toggle.addClass("active-toggle").addClass("active-control");
15854+
dropdown.toggle.addClass("active-toggle").addClass("active-control");
15855+
dropdown.element.parent().addClass("active-container");
1584915856
dropdown.element[func](immediate ? 0 : options.duration, function() {
1585015857
const _el = this, $el = $3(this);
1585115858
let wOut = Metro2.utils.viewportOutByWidth(_el);
@@ -21835,6 +21842,9 @@
2183521842
button2 = $3("<button>").addClass("button select-files-button").attr("tabindex", -1).html(o2.buttonTitle || this.strings.label_choose_file);
2183621843
button2.appendTo(container);
2183721844
button2.addClass(o2.clsButton);
21845+
if (container.hasClass("input-small")) {
21846+
button2.addClass("small");
21847+
}
2183821848
if (element2.attr("dir") === "rtl") {
2183921849
container.addClass("rtl");
2184021850
}

lib/metro.all.js.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/metro.css

+13
Original file line numberDiff line numberDiff line change
@@ -57885,6 +57885,19 @@ aside::after {
5788557885
margin-left: 0;
5788657886
margin-right: auto;
5788757887
}
57888+
.file.input-small {
57889+
line-height: 28px;
57890+
height: 28px;
57891+
}
57892+
.file.input-small .caption {
57893+
font-size: 12px;
57894+
line-height: 28px;
57895+
height: 28px;
57896+
}
57897+
.file.input-small .button {
57898+
height: 24px;
57899+
margin: 1px 1px 1px auto;
57900+
}
5788857901

5788957902
/* source/components/flip-card/flip-card.less */
5789057903
.flip-card .front,

lib/metro.css.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/metro.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -15710,6 +15710,7 @@
1571015710
openMode: "auto",
1571115711
openFunc: "show",
1571215712
closeFunc: "hide",
15713+
height: "auto",
1571315714
onDrop: Metro2.noop,
1571415715
onUp: Metro2.noop,
1571515716
onDropdownCreate: Metro2.noop
@@ -15767,6 +15768,12 @@
1576715768
toggle.append(toggleImage);
1576815769
}
1576915770
this.displayOrigin = Metro2.utils.getStyleOne(element2, "display");
15771+
if (o2.height !== "auto") {
15772+
element2.css({
15773+
"height": o2.height,
15774+
"overflow-y": "auto"
15775+
});
15776+
}
1577015777
element2.css("display", "none");
1577115778
this.toggle = toggle;
1577215779
this.level = level;
@@ -15842,10 +15849,10 @@
1584215849
},
1584315850
_open: function(el, immediate) {
1584415851
const dropdown = Metro2.getPlugin(el, "dropdown");
15845-
const toggle = dropdown.toggle;
1584615852
const options = dropdown.options;
1584715853
const func = options.openFunc;
15848-
toggle.addClass("active-toggle").addClass("active-control");
15854+
dropdown.toggle.addClass("active-toggle").addClass("active-control");
15855+
dropdown.element.parent().addClass("active-container");
1584915856
dropdown.element[func](immediate ? 0 : options.duration, function() {
1585015857
const _el = this, $el = $3(this);
1585115858
let wOut = Metro2.utils.viewportOutByWidth(_el);
@@ -21835,6 +21842,9 @@
2183521842
button2 = $3("<button>").addClass("button select-files-button").attr("tabindex", -1).html(o2.buttonTitle || this.strings.label_choose_file);
2183621843
button2.appendTo(container);
2183721844
button2.addClass(o2.clsButton);
21845+
if (container.hasClass("input-small")) {
21846+
button2.addClass("small");
21847+
}
2183821848
if (element2.attr("dir") === "rtl") {
2183921849
container.addClass("rtl");
2184021850
}

lib/metro.js.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/components/dropdown/dropdown.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
openMode: "auto",
1515
openFunc: "show",
1616
closeFunc: "hide",
17+
height: "auto",
1718
onDrop: Metro.noop,
1819
onUp: Metro.noop,
1920
onDropdownCreate: Metro.noop
@@ -86,6 +87,12 @@
8687

8788
this.displayOrigin = Metro.utils.getStyleOne(element, "display");
8889

90+
if (o.height !== "auto") {
91+
element.css({
92+
"height": o.height,
93+
"overflow-y": "auto",
94+
});
95+
}
8996
element.css("display", "none");
9097

9198
this.toggle = toggle;
@@ -179,11 +186,11 @@
179186

180187
_open: function(el, immediate){
181188
const dropdown = Metro.getPlugin(el, "dropdown");
182-
const toggle = dropdown.toggle;
183189
const options = dropdown.options;
184190
const func = options.openFunc;
185191

186-
toggle.addClass('active-toggle').addClass("active-control");
192+
dropdown.toggle.addClass('active-toggle').addClass("active-control");
193+
dropdown.element.parent().addClass("active-container");
187194

188195
dropdown.element[func](immediate ? 0 : options.duration, function(){
189196
const _el = this, $el = $(this);

source/components/file/file.js

+4
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969
button.appendTo(container);
7070
button.addClass(o.clsButton);
7171

72+
if (container.hasClass("input-small")) {
73+
button.addClass("small");
74+
}
75+
7276
if (element.attr('dir') === 'rtl' ) {
7377
container.addClass("rtl");
7478
}

source/components/file/file.less

+17
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,21 @@
163163
margin-right: auto;
164164
}
165165
}
166+
}
167+
168+
.file {
169+
&.input-small {
170+
line-height: 28px;
171+
height: 28px;
172+
173+
.caption {
174+
font-size: 12px;
175+
line-height: 28px;
176+
height: 28px;
177+
}
178+
.button {
179+
height: 24px;
180+
margin: 1px 1px 1px auto;
181+
}
182+
}
166183
}

0 commit comments

Comments
 (0)