4 * Represents alphabet UI control element (letters in column), that can be used to filter list of objects according to selected/tapped letter.
5 * This component is required by {{#crossLink "Library"}}{{/crossLink}} class.
7 * Use following snippet to include component in your `index.html` file:
9 * <script type="text/javascript" src='./css/car/components/alphabetBookmark/alphabetBookmark.js'></script>
10 * <link rel="stylesheet" href="./css/car/components/alphabetBookmark/alphabetBookmark.css" />
12 * and following code to initialize:
14 * AlphabetBookmark.fill();
16 * @class AlphabetBookmark
20 var AlphabetBookmark = {
28 * String of letters that will rendered.
32 abcd: "*ABCDEFGHIJKLMNOPQRSTUVWXYZ",
34 * Highlights the selected letter.
37 * @param index {Integer} Index of the letter.
39 touch: function (index) {
42 // $(".alphabetBookmarkItem").removeClass("fontColorSelected");
43 // var tabId = "#item_" + index;
44 // $(tabId).addClass("fontColorSelected");
45 // $("#alphabetBookmarkList").trigger("letterClick", this.abModel[index].text);
48 * Fills the {{#crossLink "AlphabetBookmark/abModel:property"}}{{/crossLink}} from {{#crossLink "AlphabetBookmark/abcd:property"}}{{/crossLink}} and shows the rendered default template on the screen.
57 for (i = 0; i < this.abcd.length; i++) {
58 this.abModel.push({ index: i, text: this.abcd.charAt(i) });
60 template.compile(this.abModel, "./css/car/components/alphabetBookmark/templates/alphabetBookmarkDelegate.html", "#alphabetBookmarkList");