/
breadcrumb.js
42 lines (34 loc) · 1.11 KB
/
breadcrumb.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'use strict';
define(
[
'flight/lib/component'
],
function (defineComponent) {
return defineComponent(breadcrumb);
function breadcrumb() {
this.defaultAttrs({
//selectors
});
this.onClick = function (ev, data) {
ev.preventDefault();
var filterIdx = $(ev.target).attr("data-filter-idx");
this.trigger("uiFilterChanged", {filter: "breadcrumbIdx", value: filterIdx})
}
this.renderItems = function (ev, data) {
console.info("On Rendering Breadcrumb");
var $breadcrumb = this.$node;
$.ajax({
type: "GET",
url: "/getBreadcrumb1.htm",
success: function (data) {
$breadcrumb.html(data);
}
});
}
this.after('initialize', function () {
this.on('click', this.onClick);
this.on(document, 'dataChanged', this.renderItems);
});
}
}
);