Skip to content

Commit 91bb5ba

Browse files
committed
Fix the helper in input control
1 parent 9611941 commit 91bb5ba

10 files changed

Lines changed: 55 additions & 44 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.15.8.11
4+
5+
Fix helper button in input control click (change the span tag to button tag and fix plugin)
6+
37
## 0.15.8.10
48

59
Add new icons:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ x.x.x.x
1515

1616
# Current Version
1717

18-
## 0.15.8.10
18+
## 0.15.8.11
1919

2020
See details of definition on [metroui.org.ua](http://metroui.org.ua)
2121

css/modern.css

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3936,6 +3936,7 @@ table.bordered tbody tr:last-child td {
39363936
margin-left: 0;
39373937
list-style: none;
39383938
padding: 0;
3939+
margin: 0;
39393940
}
39403941
.nav-bar .nav-bar-inner > ul.menu > li {
39413942
display: block;
@@ -5148,11 +5149,11 @@ table.bordered tbody tr:last-child td {
51485149
border: 2px #bababa solid;
51495150
width: 100%;
51505151
padding: 4px 32px 6px 5px;
5151-
position: relative;
51525152
background-color: #fff;
51535153
outline: 0;
51545154
margin-right: 32px;
5155-
width: 100%;
5155+
min-height: 32px;
5156+
position: relative;
51565157
}
51575158
.input-control > input[type=text]:disabled,
51585159
.input-control > input[type=email]:disabled,
@@ -5233,8 +5234,10 @@ table.bordered tbody tr:last-child td {
52335234
.input-control.password .helper {
52345235
background: #fff;
52355236
top: 2px;
5236-
width: 26px;
5237-
height: 27px;
5237+
width: 26px !important;
5238+
height: 27px !important;
5239+
min-width: 26px !important;
5240+
min-height: 27px !important;
52385241
cursor: pointer;
52395242
color: #000;
52405243
position: absolute;

javascript/input-control.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
input = $element.children('input');
4343
input.attr('value', '');
4444
input.focus();
45-
});
45+
}).on('click', function(e){e.preventDefault(); return false;});
4646
};
4747

4848
/**
@@ -67,14 +67,14 @@
6767
password.hide();
6868
text.insertAfter(password);
6969
text.attr('value', password.attr('value'));
70-
});
70+
}).on('click', function(e){e.preventDefault(); return false;});
7171

7272
// return password and remove text element
7373
$helper.on('mouseup, mouseout', function () {
7474
text.detach();
7575
password.show();
7676
password.focus();
77-
});
77+
}).on('click', function(e){e.preventDefault(); return false;});
7878
};
7979

8080
plugin.init();

less/forms.less

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,11 @@
270270
border: 2px #bababa solid;
271271
width: 100%;
272272
padding: 4px 32px 6px 5px;
273-
.pos-rel;
274273
background-color: #fff;
275274
outline: 0;
276275
margin-right: 32px;
277-
width: 100%;
276+
min-height: 32px;
277+
.pos-rel;
278278

279279

280280
&:disabled {
@@ -327,10 +327,11 @@
327327
&.text, &.password {
328328
.helper {
329329
background: #fff;// @textbox_pass_inactive_icon 50% no-repeat;
330-
//right: 3px;
331330
top: 2px;
332-
width: 26px;
333-
height: 27px;
331+
width: 26px !important;
332+
height: 27px !important;
333+
min-width: 26px !important;
334+
min-height: 27px !important;
334335
cursor: pointer;
335336
color: #000;
336337
position: absolute;
@@ -339,7 +340,6 @@
339340
display: block;
340341
border: 1px #fff solid;
341342

342-
343343
&:before {
344344
//content: "";
345345
font-size: 12pt;

less/menus.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
& > ul.menu {
111111
.unstyled;
112112
padding: 0;
113+
margin: 0;
113114

114115
& > li {
115116
display: block;

public/css/modern.css

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3936,6 +3936,7 @@ table.bordered tbody tr:last-child td {
39363936
margin-left: 0;
39373937
list-style: none;
39383938
padding: 0;
3939+
margin: 0;
39393940
}
39403941
.nav-bar .nav-bar-inner > ul.menu > li {
39413942
display: block;
@@ -5148,11 +5149,11 @@ table.bordered tbody tr:last-child td {
51485149
border: 2px #bababa solid;
51495150
width: 100%;
51505151
padding: 4px 32px 6px 5px;
5151-
position: relative;
51525152
background-color: #fff;
51535153
outline: 0;
51545154
margin-right: 32px;
5155-
width: 100%;
5155+
min-height: 32px;
5156+
position: relative;
51565157
}
51575158
.input-control > input[type=text]:disabled,
51585159
.input-control > input[type=email]:disabled,
@@ -5233,8 +5234,10 @@ table.bordered tbody tr:last-child td {
52335234
.input-control.password .helper {
52345235
background: #fff;
52355236
top: 2px;
5236-
width: 26px;
5237-
height: 27px;
5237+
width: 26px !important;
5238+
height: 27px !important;
5239+
min-width: 26px !important;
5240+
min-height: 27px !important;
52385241
cursor: pointer;
52395242
color: #000;
52405243
position: absolute;

public/forms.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@
139139
<form>
140140
<div class="input-control text">
141141
<input type="text" />
142-
<span class="helper"></span>
142+
<button class="helper" onclick="return false"></button>
143143
</div>
144144
<div class="input-control text">
145145
<input type="text" placeholder="Enter sample text"/>
146-
<span class="helper"></span>
146+
<button class="helper"></button>
147147
</div>
148148
<div class="input-control text disabled">
149149
<input type="text" disabled="" value="disabled input"/>
150-
<span class="helper"></span>
150+
<button class="helper"></button>
151151
</div>
152152
<div class="input-control text disabled">
153153
<input type="text" value="this input without helper"/>
@@ -156,7 +156,7 @@
156156
<pre class="prettyprint linenums">
157157
&lt;div class="input-control text"&gt;
158158
&lt;input type="text[email, phone, url]" /&gt;
159-
&lt;span class="helper"&gt;&lt;/span&gt;
159+
&lt;button class="helper"&gt;&lt;/button&gt;
160160
&lt;/div&gt;
161161
</pre>
162162
</div>
@@ -166,15 +166,15 @@
166166
<form>
167167
<div class="input-control password">
168168
<input type="password"/>
169-
<span class="helper"></span>
169+
<button class="helper"></button>
170170
</div>
171171
<div class="input-control password">
172172
<input type="password" placeholder="Enter password"/>
173-
<span class="helper"></span>
173+
<button class="helper"></button>
174174
</div>
175175
<div class="input-control password">
176176
<input type="password" disabled=""/>
177-
<span class="helper"></span>
177+
<button class="helper"></button>
178178
</div>
179179
<div class="input-control password">
180180
<input type="password" />
@@ -183,7 +183,7 @@
183183
<pre class="prettyprint linenums">
184184
&lt;div class="input-control password"&gt;
185185
&lt;input type="password" /&gt;
186-
&lt;span class="helper"&gt;&lt;/span&gt;
186+
&lt;button class="helper"&gt;&lt;/button&gt;
187187
&lt;/div&gt;
188188
</pre>
189189
</div>
@@ -193,15 +193,15 @@
193193
<div class="span10">
194194
<div class="input-control text">
195195
<input type="phone" placeholder="Enter phone" required="required"/>
196-
<span class="helper"></span>
196+
<button class="helper"></button>
197197
</div>
198198
<div class="input-control text">
199199
<input type="email" placeholder="Enter email" required="required" />
200-
<span class="helper"></span>
200+
<button class="helper"></button>
201201
</div>
202202
<div class="input-control text">
203203
<input type="url" placeholder="Enter url" required="required"/>
204-
<span class="helper"></span>
204+
<button class="helper"></button>
205205
</div>
206206
</div>
207207
</div>
@@ -289,58 +289,58 @@
289289
<pre class="prettyprint linenums">
290290
&lt;div class="input-control text spanN"&gt;
291291
&lt;input type="text" /&gt;
292-
&lt;span class="helper"&gt;&lt;/span&gt;
292+
&lt;button class="helper"&gt;&lt;/button&gt;
293293
&lt;/div&gt;
294294
</pre>
295295
<form>
296296
<div class="input-control text span1 as-block">
297297
<input type="text" placeholder="s1"/>
298-
<span class="helper"></span>
298+
<button class="helper"></button>
299299
</div>
300300

301301
<div class="input-control text span2 as-block">
302302
<input type="text" placeholder="span2"/>
303-
<span class="helper"></span>
303+
<button class="helper"></button>
304304
</div>
305305

306306
<div class="input-control text span3 as-block">
307307
<input type="text" placeholder="span3"/>
308-
<span class="helper"></span>
308+
<button class="helper"></button>
309309
</div>
310310

311311
<div class="input-control text span4 as-block">
312312
<input type="text" placeholder="span4"/>
313-
<span class="helper"></span>
313+
<button class="helper"></button>
314314
</div>
315315

316316
<div class="input-control text span5 as-block">
317317
<input type="text" placeholder="span5"/>
318-
<span class="helper"></span>
318+
<button class="helper"></button>
319319
</div>
320320

321321
<div class="input-control text span6 as-block">
322322
<input type="text" placeholder="span6"/>
323-
<span class="helper"></span>
323+
<button class="helper"></button>
324324
</div>
325325

326326
<div class="input-control text span7 as-block">
327327
<input type="text" placeholder="span7"/>
328-
<span class="helper"></span>
328+
<button class="helper"></button>
329329
</div>
330330

331331
<div class="input-control text span8 as-block">
332332
<input type="text" placeholder="span8"/>
333-
<span class="helper"></span>
333+
<button class="helper"></button>
334334
</div>
335335

336336
<div class="input-control text span9 as-block">
337337
<input type="text" placeholder="span9"/>
338-
<span class="helper"></span>
338+
<button class="helper"></button>
339339
</div>
340340

341341
<div class="input-control text span10 as-block">
342342
<input type="text" placeholder="span10"/>
343-
<span class="helper"></span>
343+
<button class="helper"></button>
344344
</div>
345345

346346
</form>

public/js/modern/input-control.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
input = $element.children('input');
4343
input.attr('value', '');
4444
input.focus();
45-
});
45+
}).on('click', function(e){e.preventDefault(); return false;});
4646
};
4747

4848
/**
@@ -67,14 +67,14 @@
6767
password.hide();
6868
text.insertAfter(password);
6969
text.attr('value', password.attr('value'));
70-
});
70+
}).on('click', function(e){e.preventDefault(); return false;});
7171

7272
// return password and remove text element
7373
$helper.on('mouseup, mouseout', function () {
7474
text.detach();
7575
password.show();
7676
password.focus();
77-
});
77+
}).on('click', function(e){e.preventDefault(); return false;});
7878
};
7979

8080
plugin.init();

public/version.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
return "0.15.8.10";
3+
return "0.15.8.11";

0 commit comments

Comments
 (0)