From 8c32205ecb7cd606f447cac654091fce3d5ad038 Mon Sep 17 00:00:00 2001 From: yomguy Date: Wed, 25 Jul 2012 20:58:33 +0200 Subject: [PATCH] fix button --- teleforma/templates/teleforma/course_media.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/teleforma/templates/teleforma/course_media.html b/teleforma/templates/teleforma/course_media.html index 0b7f7205..39eff58e 100644 --- a/teleforma/templates/teleforma/course_media.html +++ b/teleforma/templates/teleforma/course_media.html @@ -23,15 +23,15 @@ $(document).ready(function(){ publish : function(id){ var p = jQuery('#publish'); json([id],'teleforma.publish_media',function(){ - p.removeClass('icon_ok').addClass('icon_delete') - p.html('{% trans "Reject" %}') + p.removeClass('icon_delete').addClass('icon_ok') + p.html('{% trans "Published" %}') }); }, unpublish : function(id){ var p = jQuery('#publish'); json([id],'teleforma.unpublish_media',function(){ - p.removeClass('icon_delete').addClass('icon_ok') - p.html('{% trans "Publish" %}') + p.removeClass('icon_ok').addClass('icon_delete') + p.html('{% trans "Rejected" %}') }); } } @@ -41,11 +41,11 @@ $(document).ready(function(){ var f = mediaUtils; p.unbind('click').click(function() { if (p.hasClass('icon_ok')){ - f.publish('{{media.id}}'); + f.unpublish('{{media.id}}'); return false; } if (p.hasClass('icon_delete')) { - f.unpublish('{{media.id}}'); + f.publish('{{media.id}}'); return false; } } -- 2.39.5