Commit 2ef49758 authored by matjaz's avatar matjaz
Browse files

Added tooltips at widget's parameters window (tooltip on parameter's name or...

Added tooltips at widget's parameters window (tooltip on parameter's name or parameter's value shows parameter description from database)
parent c971b69b
...@@ -3,27 +3,27 @@ ...@@ -3,27 +3,27 @@
<fieldset> <fieldset>
{% for p in parameters %} {% for p in parameters %}
{% if p.parameter_type == "checkbox" %} {% if p.parameter_type == "checkbox" %}
<input id="pref-{{p.pk}}" name="pref-{{p.pk}}" type="checkbox" value="true" {% ifequal p.value 'true' %}checked {% endifequal%} style="width:15px;display:inline;float:left;" /> <input id="pref-{{p.pk}}" name="pref-{{p.pk}}" title="{{p.description}}" type="checkbox" value="true" {% ifequal p.value 'true' %}checked {% endifequal%} style="width:15px;display:inline;float:left;" />
{% endif %}<label for="pref-{{p.pk}}" {% if p.parameter_type == "checkbox" %} style="float:left;"{% endif %}>{{p.name}}</label> {% endif %}<label for="pref-{{p.pk}}" title="{{p.description}}" {% if p.parameter_type == "checkbox" %} style="float:left;"{% endif %}>{{p.name}}</label>
{% if p.parameter_type == "checkbox" %}<div class="clear"><!----></div>{% endif %} {% if p.parameter_type == "checkbox" %}<div class="clear"><!----></div>{% endif %}
{% if p.parameter_type == "text" %} {% if p.parameter_type == "text" %}
<input id="pref-{{p.pk}}" name="pref-{{p.pk}}" type="text" value="{{p.value}}" onchange="" class="text ui-widget-content ui-corner-all" /> <input id="pref-{{p.pk}}" name="pref-{{p.pk}}" title="{{p.description}}" type="text" value="{{p.value}}" onchange="" class="text ui-widget-content ui-corner-all" />
{% endif %} {% endif %}
{% if p.parameter_type == "select" %} {% if p.parameter_type == "select" %}
<select id="pref-{{p.pk}}" name="pref-{{p.pk}}" style="background:#fefefe;width:99%;" class="text ui-widget-content ui-corner-all" onchange=""> <select id="pref-{{p.pk}}" name="pref-{{p.pk}}" title="{{p.description}}" style="background:#fefefe;width:99%;" class="text ui-widget-content ui-corner-all" onchange="">
{% for o in p.options.all %} {% for o in p.options.all %}
<option value="{{ o.value }}" {% if o.value == p.value %} selected {% endif %}>{{ o.name }}</option> <option value="{{ o.value }}" {% if o.value == p.value %} selected {% endif %}>{{ o.name }}</option>
{% endfor %} {% endfor %}
</select> </select>
{% endif %} {% endif %}
{% if p.parameter_type == "textarea" %} {% if p.parameter_type == "textarea" %}
<textarea id="pref-{{p.pk}}" name="pref-{{p.pk}}" onchange="" class="text ui-widget-content ui-corner-all">{{ p.value }}</textarea> <textarea id="pref-{{p.pk}}" name="pref-{{p.pk}}" title="{{p.description}}" onchange="" class="text ui-widget-content ui-corner-all">{{ p.value }}</textarea>
{% endif %} {% endif %}
{% if p.parameter_type == "file" %} {% if p.parameter_type == "file" %}
<form id="upload_form{{ p.pk }}" method="POST" action="{% url 'file upload' %}" enctype="multipart/form-data" target="upload_target{{ p.pk }}"> <form id="upload_form{{ p.pk }}" method="POST" action="{% url 'file upload' %}" enctype="multipart/form-data" target="upload_target{{ p.pk }}">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="input_id" value="{{p.pk}}" /> <input type="hidden" name="input_id" value="{{p.pk}}" />
<input id="id_file{{ p.pk }}" class="filename" type="file" name="file"><br/> <input id="id_file{{ p.pk }}" title="{{p.description}}" class="filename" type="file" name="file"><br/>
<iframe id="upload_target{{ p.pk }}" name="upload_target{{ p.pk }}" src="" style="width:0px;height:0px;border:0px solid #fff;"></iframe> <iframe id="upload_target{{ p.pk }}" name="upload_target{{ p.pk }}" src="" style="width:0px;height:0px;border:0px solid #fff;"></iframe>
</form> </form>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment