From 48930f052285f11f6953c15fe81640116530e110 Mon Sep 17 00:00:00 2001 From: Sanj Date: Mon, 24 Oct 2011 01:19:04 +0100 Subject: [PATCH] specify some fts_fields --- itf/bestpractices/models.py | 5 +++++ itf/static/js/insidepage.js | 2 ++ 2 files changed, 7 insertions(+) diff --git a/itf/bestpractices/models.py b/itf/bestpractices/models.py index 01bee9c..58b66bc 100755 --- a/itf/bestpractices/models.py +++ b/itf/bestpractices/models.py @@ -118,7 +118,9 @@ class BestPracticeFAQ(ItfModel): question = models.TextField() answer = models.TextField() + title_field = 'question' + fts_fields = ['question', 'answer'] def __unicode__(self): return self.question @@ -193,6 +195,8 @@ class Guideline(ItfModel): title = models.CharField(max_length=512) text = models.TextField() + fts_fields = ['title', 'text'] + def get_dict(self): return { 'title': self.title, @@ -220,6 +224,7 @@ class Glossary(ItfModel): term = models.CharField(max_length=256) definition = models.TextField() title_field = 'term' + fts_fields = ['term', 'definition'] def get_dict(self): return { diff --git a/itf/static/js/insidepage.js b/itf/static/js/insidepage.js index 281bb24..7319ca4 100755 --- a/itf/static/js/insidepage.js +++ b/itf/static/js/insidepage.js @@ -7,6 +7,8 @@ $('#listLeft ul li a').live("click", function() { var objId = $(this).attr("data-id"); var tab = $('.innerSelected').attr("data-slug"); var formData = getSearchFormJSON(); + $('#textRight').text("Loading..."); + $('#bottomRight').text("Loading..."); formData.object_id = objId; var urlString = JSONtoQueryString(formData); History.pushState(formData, "", urlString);