Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 14ef49a

Browse filesBrowse files
committed
some more fixes for 1.2.1
1 parent ae12e0f commit 14ef49a
Copy full SHA for 14ef49a

File tree

Expand file treeCollapse file tree

4 files changed

+35
-22
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+35
-22
lines changed

‎build.properties

Copy file name to clipboard
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11

22
# version number
3-
tools = 1.2.0
4-
jquery = 1.3.2
5-
sizzle = 0.9.3
3+
tools = 1.2.1

‎src/dateinput/dateinput.js

Copy file name to clipboardExpand all lines: src/dateinput/dateinput.js
+22-10Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
}
207207
input.addClass(css.input);
208208

209-
var fire = input.add(this);
209+
var fire = input.add(self);
210210

211211
// construct layout
212212
if (!root.length) {
@@ -270,10 +270,12 @@
270270
currMonth = date.getMonth();
271271
currDay = date.getDate();
272272

273+
273274
// change
274275
e = e || $.Event("api");
275276
e.type = "change";
276-
fire.trigger(e, [date]);
277+
278+
fire.trigger(e, [date]);
277279
if (e.isDefaultPrevented()) { return; }
278280

279281
// formatting
@@ -346,7 +348,7 @@
346348
// enter
347349
if (key == 13) {
348350
if (!$(e.target).is("select")) {
349-
select($("." + css.focus).data("date"), conf, e);
351+
$("." + css.focus).click();
350352
}
351353
}
352354

@@ -558,8 +560,11 @@
558560

559561
// date picking
560562
a.click(function(e) {
561-
if (!$(this).hasClass(css.disabled)) {
562-
select($(this).data("date"), conf, e);
563+
var el = $(this);
564+
if (!el.hasClass(css.disabled)) {
565+
$("#" + css.current).removeAttr("id");
566+
el.attr("id", css.current);
567+
select(el.data("date"), conf, e);
563568
}
564569
return false;
565570
});
@@ -607,15 +612,21 @@
607612

608613
hide: function(e) {
609614

610-
if (opened) {
611-
root.hide();
612-
$(document).unbind("click.d").unbind("keydown.d");
615+
if (opened) {
613616

614-
// onHide
615-
opened = false;
617+
// onHide
616618
e = e || $.Event();
617619
e.type = "onHide";
618620
fire.trigger(e);
621+
622+
$(document).unbind("click.d").unbind("keydown.d");
623+
624+
// cancelled ?
625+
if (e.isDefaultPrevented()) { return; }
626+
627+
// do the hide
628+
root.hide();
629+
opened = false;
619630
}
620631

621632
return self;
@@ -676,6 +687,7 @@
676687
});
677688

678689
// initial value
690+
679691
if (parseDate(input.val())) {
680692
select(value, conf);
681693
}

‎src/tooltip/tooltip.js

Copy file name to clipboardExpand all lines: src/tooltip/tooltip.js
+8-7Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,16 @@
168168
// tip not initialized yet
169169
if (!tip) {
170170

171-
// find a "manual" tooltip
171+
// autogenerated tooltip
172172
if (title) {
173-
tip = $(conf.layout).addClass(conf.tipClass).appendTo(document.body).hide();
173+
tip = $(conf.layout).addClass(conf.tipClass).appendTo(document.body)
174+
.hide().append(title);
175+
176+
// single tip element for all
174177
} else if (conf.tip) {
175178
tip = $(conf.tip).eq(0);
176179

180+
// manual tooltip
177181
} else {
178182
tip = trigger.next();
179183
if (!tip.length) { tip = trigger.parent().next(); }
@@ -185,14 +189,11 @@
185189
if (self.isShown()) { return self; }
186190

187191
// stop previous animation
188-
tip.stop(true, true);
189-
192+
tip.stop(true, true);
190193

191194
// get position
192195
var pos = getPosition(trigger, tip, conf);
193-
194-
// title attribute
195-
if (title) { tip.html(title); }
196+
196197

197198
// onBeforeShow
198199
e = e || $.Event();

‎src/validator/validator.js

Copy file name to clipboardExpand all lines: src/validator/validator.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211

212212
/******* built-in HTML5 standard validators *********/
213213

214-
v.fn(":email", "Plase enter a valid email address", function(el, v) {
214+
v.fn(":email", "Please enter a valid email address", function(el, v) {
215215
return !v || emailRe.test(v);
216216
});
217217

@@ -467,7 +467,9 @@
467467
// disable browser's default validation mechanism
468468
if (inputs.get(0).validity) {
469469
inputs.each(function() {
470-
this.oninvalid = function() { return false; }
470+
this.oninvalid = function() {
471+
return false;
472+
};
471473
});
472474
}
473475

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.