annotate static/links.js @ 21:8008ec2fd763

fix up link page reloading. tried davisjs; may not need it Ignore-this: d0021609f019f0734e779a61e3e73b62
author Drew Perttula <drewp@bigasterisk.com>
date Thu, 11 Jul 2013 00:45:55 -0700
parents a8887fb93676
children fa55f4439977
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
1 $("#filterTag").focus();
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
2
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
3 var model = {
21
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
4 filterTags: ko.observableArray(tagsFromWindowLocation())
10
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
5 };
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
6
21
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
7 function tagsFromWindowLocation() {
10
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
8 var p = window.location.pathname;
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
9 var comps = p.split("/");
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
10 if (toRoot == ".") {
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
11 return [];
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
12 } else {
21
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
13 return (comps[comps.length-1] || "").replace("%20", "+").split("+");
10
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
14 }
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
15 }
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
16
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
17 function toggleTag(tag) {
21
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
18 var selected = model.filterTags();
10
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
19
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
20 if (selected.indexOf(tag) == -1) {
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
21 selected.push(tag);
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
22 } else {
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
23 selected.splice(selected.indexOf(tag), 1);
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
24 }
21
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
25 model.filterTags(selected);
10
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
26 }
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
27
21
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
28 function initSpecialLinkBehavior() {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
29 // clicking tag links doesn't go to them (they're not
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
30 // user-specific); it toggles their presence in our page's current
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
31 // filter list
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
32 $(document).on("click", "a.tag", function (ev) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
33 var tag = $(this).text();
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
34 toggleTag(tag);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
35 ev.stopPropagation()
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
36 ev.preventDefault()
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
37 return false;
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
38 });
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
39 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
40
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
41 var linklist = null;
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
42 // unsure how to use toRoot- can it change?
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
43 $.getJSON("/href/templates", function (result) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
44 linklist = result.linklist;
10
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
45 });
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
46
21
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
47 function initUrlSync(model) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
48 // tag changes push url history; and url edits freshen the page
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
49
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
50 ko.computed(function () {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
51 var tags = model.filterTags();
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
52 var newPath = window.location.pathname;
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
53 console.log("currently", newPath, toRoot);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
54 if (toRoot == ".") {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
55 newPath += "/";
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
56 toRoot = "..";
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
57 } else {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
58 newPath = newPath.replace(
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
59 /(.*\/)[^\/]*$/, "$1")
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
60 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
61 console.log("user root", newPath);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
62 if (tags.length) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
63 newPath += tags.join("+")
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
64 } else {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
65 newPath = newPath.substr(0, newPath.length - 1);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
66 toRoot = ".";
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
67 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
68
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
69 changePage(newPath);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
70 });
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
71
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
72 function changePage(newPath) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
73 console.log("changePage", newPath);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
74 if (window.location.pathname != newPath) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
75 window.history.pushState({}, "", newPath);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
76
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
77 function updateLinklist(fullPath) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
78 var t0 = +new Date();
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
79 if (linklist === null) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
80 console.log("too soon- templates aren't loaded");
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
81 return;
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
82 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
83 $(".linklist").text("Loading...");
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
84 $.getJSON(fullPath + ".json", function (result) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
85 var t1 = +new Date();
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
86 var rendered = Mustache.render(linklist, result)
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
87 var t2 = +new Date();
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
88 $(".linklist").html(rendered);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
89 var t3 = +new Date();
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
90 $(".stats").text(JSON.stringify({
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
91 "getMs": t1 - t0,
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
92 "mustacheRenderMs": t2 - t1,
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
93 "setHtmlMs": t3 - t2
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
94 }));
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
95 });
10
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
96 }
21
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
97 updateLinklist(newPath);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
98 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
99 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
100 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
101
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
102 function initFilterTag(elem, model) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
103 // sync the entry box and the model
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
104
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
105 elem.change(function () {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
106 var tags = $(this).val().split(",");
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
107 model.filterTags(tags);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
108 return false;
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
109 });
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
110
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
111 var filterCompleteWords = "";
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
112 elem.select2({
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
113 allowClear: true,
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
114 multiple: true,
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
115 tokenSeparators: [' ', ','],
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
116 query: function (opts) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
117 $.ajax({
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
118 url: toRoot + "/tags",
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
119 data: {user: user, have: opts.element.val()},
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
120 success: function (data) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
121 opts.callback({results: data.tags});
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
122 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
123 });
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
124 },
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
125 change: function (ev) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
126 console.log("ch", ev.val);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
127 },
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
128 initSelection: function (element, callback) {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
129 var data = [];
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
130 $(element.val().split(",")).each(function () {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
131 if (this != "") {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
132 data.push({id: this, text: this});
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
133 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
134 });
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
135 callback(data);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
136 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
137 });
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
138 ko.computed(function () {
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
139 elem.select2("val", model.filterTags());
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
140 });
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
141 }
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
142
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
143 initFilterTag($("#filterTag"), model);
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
144 initSpecialLinkBehavior();
8008ec2fd763 fix up link page reloading. tried davisjs; may not need it
Drew Perttula <drewp@bigasterisk.com>
parents: 20
diff changeset
145 initUrlSync(model);
10
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
146
e054949143e9 reworking addlink and shareWith support
drewp@bigasterisk.com
parents:
diff changeset
147 ko.applyBindings(model);