fix js for contexts and add i18n keys for closed contexts

This commit is contained in:
Reinier Balt 2013-03-02 16:33:38 +01:00
parent 2719cb87c7
commit f649c6ce0c
3 changed files with 13 additions and 2 deletions

View file

@ -854,6 +854,15 @@ var ContextListPage = {
return false;
});
/* cancel edit context form */
$(document).on("click",'form.edit-context-form a.negative', function(){
$(this).parents('.edit-form').fadeOut(200, function () {
$(this).parents('.context-edit-current').removeClass('context-edit-current');
$(this).parents('.list').find('.context').fadeIn(500);
$(this).parents('.container').find('.item-show').fadeIn(500);
});
});
/* Contexts behavior */
$('#toggle_context_new').click(function(evt){
TracksForm.toggle('toggle_context_new', 'context_new', 'context-form',
@ -862,7 +871,7 @@ var ContextListPage = {
});
/* make the two state lists of context sortable */
$(['active', 'hidden']).each(function() {
$(['active', 'hidden', 'closed']).each(function() {
$("#list-contexts-"+this).sortable({
handle: '.grip',
update: update_order

View file

@ -3,7 +3,7 @@
<%= form_for(context, :html => {
:id => dom_id(context, 'edit_form'),
:class => "inline-form edit-project-form",
:class => "inline-form edit-context-form",
:method => :put }) do
-%>

View file

@ -620,6 +620,8 @@ en:
completed_plural: Completed
visible_plural: Visible
visible: Visible
close: Closed
closed_plural: Closed
active_plural: Active
hidden: Hidden
active: Active