1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 | <head><!-- HEAD -->
<title>Navi page</title>
<meta charset="utf-8">
<meta name="description" content="Navi-ReactOS wordcloud">
{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static 'navi_polls/style.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'navi_polls/jqcloud.css' %}" />
<!-- _______________________________________________________________________ -->
<!-- jQuery -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="{% static 'navi_polls/jqcloud-1.0.4.js' %}"></script>
<!-- jQCloud 2 -->
{% if untranslated_words %}
<script type="text/javascript">
/*!
* Create an array of word objects, each representing a word in the cloud
*/
var word_array = [
{% for row in unstranslated_words %} // Hoooooow to use Template tags in javascripts?
{text: "{{ row.rosword }}", weight: -1},
{text: "{{ row.rosword }}", weight: -2, link: "http://jquery.com/"},
{text: "{{ row.rosword }}", weight: -3, html: {title: "I can haz any html attribute"}},
{% endfor %}
{text: "Amet-15", weight: -5}
// ...as many words as you want
];
$(function() {
/*!
* When DOM is ready, select the container element and call the
* jQCloud method, passing the array of words as the first argument.
*/
$("#wordcloud2").jQCloud(word_array);
});
</script>
{% else %}
<p>No untranslated words are available.</p>
{% endif %}
</head><!-- end HEAD -->
|