Skip to content

Commit 8eab4b7

Browse files
committed
Merge master into release branch
2 parents 621c5d5 + 0c7c592 commit 8eab4b7

File tree

11 files changed

+1216
-154
lines changed

11 files changed

+1216
-154
lines changed

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"parsleyjs": "1.1.18",
2828
"jquery.tinymce": "",
2929
"moment": "",
30-
"moment-timezone": ""
30+
"moment-timezone": "",
31+
"imagesloaded": "~3.1.8"
3132
}
3233
}

build.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@
2727
"Markdown.Converter": "legacy/Markdown.Converter",
2828
"Markdown.Extra": "legacy/Markdown.Extra",
2929
"Markdown.Sanitizer": "legacy/Markdown.Sanitizer",
30-
"select2": "bower_components/select2/select2.min",
30+
"imagesloaded": "bower_components/imagesloaded/imagesloaded",
31+
"eventEmitter/EventEmitter": "bower_components/eventEmitter/EventEmitter",
32+
"eventie/eventie": "bower_components/eventie/eventie",
3133
"jquery.chosen": "bower_components/chosen/chosen/chosen.jquery",
3234
"jquery.fullcalendar": "bower_components/fullcalendar/fullcalendar.min",
3335
"jquery.fullcalendar.dnd": "bower_components/fullcalendar/lib/jquery-ui.custom.min",
3436
"jquery.placeholder": "bower_components/jquery-placeholder/jquery.placeholder.min",
3537
"jquery.textchange": "bower_components/jquery-textchange/jquery.textchange",
38+
"select2": "bower_components/select2/select2.min",
3639
"tinymce": "bower_components/jquery.tinymce/jscripts/tiny_mce/jquery.tinymce",
3740
"spectrum": "bower_components/spectrum/spectrum",
3841

bundle.js

Lines changed: 1183 additions & 132 deletions
Large diffs are not rendered by default.

changes.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Changelog
2+
3+
## 2.0.5 - Dec. 4, 2014
4+
5+
- #383 pat-equaliser sets the height to early
26

37
## 2.0.4 - Oct. 7, 2014
48

5-
- spectrum lib for colour picker now defaults to hsv values. Keep hex as
6-
default for backward compatibility, slc ref #9849
9+
- spectrum lib for colour picker now defaults to hsv values. Keep hex as default for backward compatibility (SLC ref 9849)
10+
- pat-inject autoload did not properly remove event handlers, so that they were called over and over. (SLC ref 10695)
711

812
## 2.0.3 - Sept. 22, 2014
913

src/pat/equaliser.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ define([
77
"jquery",
88
"pat-registry",
99
"pat-parser",
10-
"pat-utils"
11-
], function($, patterns, Parser, utils) {
10+
"pat-utils",
11+
"imagesloaded"
12+
], function($, patterns, Parser, utils, imagesLoaded) {
1213
var parser = new Parser("equaliser");
1314
parser.add_argument("transition", "none", ["none", "grow"]);
1415
parser.add_argument("effect-duration", "fast");
@@ -25,7 +26,9 @@ define([
2526
$container.data("pat-equaliser", options);
2627
$container.on("pat-update.pat-equaliser", null, this, equaliser._onEvent);
2728
$(window).on("resize.pat-equaliser", null, this, utils.debounce(equaliser._onEvent, 100));
28-
equaliser._update(this);
29+
imagesLoaded(this, $.proxy(function() {
30+
equaliser._update(this);
31+
}, this));
2932
});
3033
},
3134

src/pat/navigation.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ define([
5050
var $a = $(this),
5151
$li = $a.parents("li:first"),
5252
url = $a.attr("href"),
53-
path = _._pathfromurl(url);
53+
path;
54+
if (typeof url === "undefined") {
55+
return;
56+
}
57+
path = _._pathfromurl(url);
5458
log.debug("checking url:", url, "extracted path:", path);
5559
if (_._match(curpath, path)) {
5660
log.debug("found match", $li);

src/pat/toggle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ define([
102102
victims=document.querySelectorAll(options[i].selector);
103103
if (!victims.length)
104104
continue;
105-
state=options[i].toggler.get(victims[0]),
105+
state=options[i].toggler.get(victims[0]);
106106
last_state=options[i].value_storage.get();
107107
if (state!==last_state && last_state !== null)
108108
for (var j=0; j<victims.length; j++)

src/pat/tooltip.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ define([
480480
case "t":
481481
container_offset.top = trigger_box.bottom + tip_margin;
482482
tip_offset.top = -23;
483-
bottom_row = status.scroll.top + status.window.height,
483+
bottom_row = status.scroll.top + status.window.height;
484484
content_css["max-height"] = (bottom_row - container_offset.top - container_margin) + "px";
485485
break;
486486
case "l":
@@ -551,13 +551,13 @@ define([
551551
container_offset.top = trigger_center.top - container_margin;
552552
tip_offset.top = 0;
553553
}
554-
bottom_row = status.scroll.top + status.window.height,
554+
bottom_row = status.scroll.top + status.window.height;
555555
content_css["max-height"] = (bottom_row - container_offset.top - container_margin) + "px";
556556
break;
557557
case "m":
558558
if (options.height === "max") {
559-
container_offset.top = container_margin;
560-
bottom_row = status.scroll.top + status.window.height,
559+
container_offset.top = container_margin ;
560+
bottom_row = status.scroll.top + status.window.height;
561561
content_css["max-height"] = (bottom_row - 2*container_margin) + "px";
562562
tip_offset.top = trigger_box.top - container_margin;
563563
} else {
@@ -568,7 +568,7 @@ define([
568568
case "b":
569569
if (options.height === "max") {
570570
container_offset.top = 2*container_margin;
571-
bottom_row = status.scroll.top + status.window.height,
571+
bottom_row = status.scroll.top + status.window.height;
572572
content_css.height = (bottom_row - 3*container_margin) + "px";
573573
tip_offset.top = trigger_center.top - container_margin - tip_margin;
574574
} else {

test-build.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
"Markdown.Converter": "legacy/Markdown.Converter",
2323
"Markdown.Extra": "legacy/Markdown.Extra",
2424
"Markdown.Sanitizer": "legacy/Markdown.Sanitizer",
25+
"imagesloaded": "bower_components/imagesloaded/imagesloaded",
26+
"eventEmitter/EventEmitter": "bower_components/eventEmitter/EventEmitter",
27+
"eventie/eventie": "bower_components/eventie/eventie",
2528
"select2": "bower_components/select2/select2.min",
2629
"jquery.chosen": "bower_components/chosen/chosen/chosen.jquery",
2730
"jquery.fullcalendar": "bower_components/fullcalendar/fullcalendar.min",

tests/specs/pat/equaliser.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ define(["pat-equaliser"], function(pattern) {
1515
jq.each.andReturn(jq);
1616
expect(pattern.init(jq)).toBe(jq);
1717
});
18-
19-
it("Perform initial update", function() {
20-
var $el = $("<div/>");
21-
spyOn(pattern, "_update");
22-
pattern.init($el);
23-
expect(pattern._update).toHaveBeenCalledWith($el[0]);
24-
});
2518
});
2619

2720
describe("_update", function() {

0 commit comments

Comments
 (0)