# HG changeset patch # User Drew Perttula # Date 1363507423 25200 # Node ID a8887fb936765882f0ffd82484772e21df22a236 # Parent 9fc1f5c8aa4e9097fa9ca2ff4220c3f71f86ee01 hide share data from the public. bug in links filter box Ignore-this: 2a390b207b8e9c8d430acd268b6d765d diff -r 9fc1f5c8aa4e -r a8887fb93676 lookup.py --- a/lookup.py Sun Mar 17 00:49:27 2013 -0700 +++ b/lookup.py Sun Mar 17 01:03:43 2013 -0700 @@ -153,6 +153,7 @@ data['toRoot'] = toRoot data['allTags'] = allTags(user) data['user'] = user + data['showPrivateData'] = (user == getUser()[0]) data['pageTags'] = [{"word":t} for t in tags] data['stats']['template'] = 'TEMPLATETIME' diff -r 9fc1f5c8aa4e -r a8887fb93676 static/links.js --- a/static/links.js Sun Mar 17 00:49:27 2013 -0700 +++ b/static/links.js Sun Mar 17 01:03:43 2013 -0700 @@ -86,9 +86,11 @@ console.log("ch", ev.val); }, initSelection: function (element, callback) { - var data = []; + var data = []; $(element.val().split(",")).each(function () { - data.push({id: this, text: this}); + if (this != "") { + data.push({id: this, text: this}); + } }); callback(data); } diff -r 9fc1f5c8aa4e -r a8887fb93676 template/links.jade.mustache --- a/template/links.jade.mustache Sun Mar 17 00:49:27 2013 -0700 +++ b/template/links.jade.mustache Sun Mar 17 01:03:43 2013 -0700 @@ -37,12 +37,14 @@ a(href="{{href}}") {{href}} .modified | Modified: {{t}} + {{#showPrivateData}} .shareWith | Share with: {{#shareWith}} span.person | {{label}} {{/shareWith}} + {{/showPrivateData}} .edit a(href="{{toRoot}}/{{editLink}}") Edit