Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new tag cloud automatically redirects to its real url
- Loading branch information
Showing
3 changed files
with
108 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,105 @@ | ||
<html> | ||
<head> | ||
{% extends "frontend/base.html" %} | ||
|
||
{% block custom_style %} | ||
{{ cloud.style|safe }} | ||
<link rel="stylesheet" type="text/css" href="/media/cloud.css"> | ||
<title>{{ cloud_name }}</title> | ||
</head> | ||
|
||
<body> | ||
<div id="cloudwrapper"> | ||
{% if cloud.cloud_name %} | ||
<div id="cloudtitle"> | ||
<h1>{{ cloud.cloud_name }}</h1> | ||
</div> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block custom_include %} | ||
<link rel="stylesheet" media="screen" type="text/css" href="/media/colorpicker.css" /> | ||
<script type="text/javascript" src="/media/js/colorpicker.js"></script> | ||
{% endblock %} | ||
{% block page_title %} - TagCloud{% endblock %} | ||
|
||
{% block custom_js %} | ||
<script type="text/javascript"> | ||
$(document).ready(function() { | ||
|
||
$("#save-box").dialog({ | ||
autoOpen: false, | ||
width: 350, | ||
model: true, | ||
buttons : { | ||
'Create!' : function() { | ||
// check validity of arguments | ||
// submit the form | ||
$('#save-form').submit(); | ||
}, | ||
'Cancel' : function() { | ||
$(this).dialog("close"); | ||
} | ||
}, | ||
close: function() { | ||
allFields.val(''); | ||
} | ||
}); | ||
$("#save-cloud").button().click(function() { | ||
$("#save-box").dialog("open"); | ||
}); | ||
}); | ||
|
||
$('#id_start_color, #id_end_color').ColorPicker({ | ||
onSubmit: function(hsb, hex, rgb, el) { | ||
$(el).val(hex); | ||
$(el).ColorPickerHide(); | ||
}, | ||
onBeforeShow: function () { | ||
$(this).ColorPickerSetColor(this.value); | ||
} | ||
}) | ||
.bind('keyup', function(){ | ||
$(this).ColorPickerSetColor(this.value); | ||
}); | ||
|
||
|
||
</script> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div id="save-box"> | ||
<form id="save-form" action="save" method="POST"> | ||
{% csrf_token %} | ||
<label for="name">Name your cloud (optional)</label> | ||
<input type="text" name="name"><br> | ||
<fieldset id="update-type"> | ||
<input type="radio" name="update" value="static" checked="yes">Static | ||
<input type="radio" name="update" value="dynamic">Dynamic<br> | ||
<p>A static cloud stays the same as you see it right now. A dynamic cloud will | ||
update every time you visit it.</p> | ||
</fieldset> | ||
<input type="hidden" name="cloud_id" value="{{ cloud_id }}"> | ||
</form> | ||
</div> | ||
|
||
<div id="tagcloud_controls"> | ||
<h4>Themes</h4> | ||
<h4>Color</h4> | ||
{{ update_form.start_color.label }}: <input type="text" maxlength="6" size="6" id="id_start_color" value="00ff00" /> | ||
{{ update_form.end_color.label }}: <input type="text" maxlength="6" size="6" id="id_end_color" value="0000ff" /> | ||
{{ update_form.color_steps.label }}: {{ update_form.color_steps }} | ||
|
||
<h4>{{ update_form.max_words.label }}: <input type="range" min="0" max="{{ cloud.metadata.total_tags }}" /></h3> | ||
<h4 class="size-selector">Size:</h4> | ||
<label><input class="radio" type="radio" name="size" value="240x180"> Small</label> | ||
<label><input class="radio" type="radio" name="size" value="500x375"> Medium</label> | ||
<label><input class="radio" type="radio" name="size" value="1024x768"> Large</label> | ||
|
||
<h4>Custom Stop Words</h4> | ||
</div> | ||
|
||
<div id="tagcloud_wrapper"> | ||
{{ cloud.body|safe }} | ||
</div> | ||
<div id="cloudinfo"> | ||
{{ home_page }} | ||
Created {{ cloud.created|date:"D M d, Y" }}. | ||
|
||
<div class="clear"> | ||
</div> | ||
|
||
<div id="infobox"> | ||
Generated by <a href="{{home_page}}">WordAPI</a> | ||
<a href="{{ cloud.short_url }}">Short Url</a> | ||
Created {{ cloud.created_utc|date:"D M d, Y" }}. | ||
<a href="{{ cloud.metadata.short_url }}">Short Url</a> | ||
<a href="">Embed</a> | ||
<a href="{{home_page}}/document/new">Create your own</a> | ||
|
||
</div> | ||
|
||
</body> | ||
{% endblock %} |
This file was deleted.
Oops, something went wrong.