Saving task/shot on status change

This commit is contained in:
2016-11-04 16:23:08 +01:00
parent 17448248a0
commit ded4b8e2ae
2 changed files with 13 additions and 5 deletions

View File

@@ -20,8 +20,8 @@
placeholder='Description') {{ shot.description | hide_none }}
.input-group
label(for="shot-status") Status:
select.input-transparent#shot-status(
label(for="item-status") Status:
select#item-status.input-transparent(
name="status")
| {% for status in shot_node_type.dyn_schema.status.allowed %}
| <option value="{{ status }}" {% if status == shot.properties.status %}selected{% endif %}>{{ status | undertitle }}</option>
@@ -141,4 +141,8 @@ script.
.autoResize()
.blur();
});
$('#item-status').change(function(){
$("#item-save").trigger( "click" );
});
{% endif %}

View File

@@ -65,10 +65,10 @@
| {% endif %}
.input-group
label#task-status Status:
select(
label#task-status-label Status:
select#item-status(
name="status",
aria-describedby="task-status")
aria-describedby="task-status-label")
| {% for status in task_node_type.dyn_schema.status.allowed %}
| <option value="{{ status }}" {% if status == task.properties.status %}selected{% endif %}>{{ status | undertitle }}</option>
| {% endfor %}
@@ -163,6 +163,10 @@ script.
$('#item-description')
.autoResize()
.blur();
$('#item-status').change(function(){
$("#item-save").trigger( "click" );
});
{% endif %}
$('.js-help').openModalUrl('Help', "{{ url_for('attract.help', project_url=project.url) }}");