only populate search field when logged in

This commit is contained in:
Konrad Mohrfeldt 2011-10-13 00:58:17 +02:00
parent def4cebcdf
commit 8eedb855cb
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html {% if user.is_authenticated %}class="loggedIn"{% endif %}>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" media="screen" type="text/css" <link rel="stylesheet" media="screen" type="text/css"

View File

@ -1,4 +1,8 @@
jQuery(document).ready(function($) { jQuery(document).ready(function($) {
if(!$("html").hasClass("loggedIn"))
return;
var search_input = $("div.search input.autocomplete"); var search_input = $("div.search input.autocomplete");
var selected_item = []; var selected_item = [];
var selection = false; var selection = false;