Pending invitations shown on channel home page#258
Conversation
| return HttpResponse("Tags are successfully saved.", status=200) | ||
|
|
||
|
|
||
| def add_editor_to_channel(invitation): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| from rest_framework.authtoken.models import Token | ||
| from le_utils.constants import content_kinds,file_formats, format_presets, licenses, exercises | ||
|
|
||
| EDIT_ACCESS = "edit" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| fields = ('email', 'first_name', 'last_name', 'id') | ||
|
|
||
| class InvitationSerializer(BulkSerializerMixin, serializers.ModelSerializer): | ||
| channel_name = serializers.SerializerMethodField('retrieve_channel_name') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| get_full_name: function(){ | ||
| return this.get('first_name') + " " + this.get('last_name'); | ||
| }, | ||
| get_channels: function(){ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| resend_invitation_email:function(channel){ | ||
| return mail_helper.send_mail(channel, this.get("email"), this.get("share_mode")); | ||
| }, | ||
| accept_invitation:function(){ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| } | ||
| }); | ||
|
|
||
| var ChannelList = BaseViews.BaseEditableListView.extend({ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
DXCanas
left a comment
There was a problem hiding this comment.
I've got some questions/concerns with some of the JS! Looks good for the most part, though.
| if(this.image_error){ | ||
| var self = this; | ||
| dialog.dialog("Image Error", this.image_error, { "OK":function(){} }, null); | ||
| dialog.alert("Image Error", this.image_error, null); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| }, | ||
| get_pending_invites: function(){ | ||
| var self = this; | ||
| return new Promise(function(resolve, reject){ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| }, | ||
| accept_invitation:function(){ | ||
| var self = this; | ||
| return new Promise(function(resolve, reject){ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| decline: function(){ | ||
| var self = this; | ||
| dialog.dialog("Declining Invitation", "Are you sure you want to decline this invitation?", { | ||
| "CANCEL":function(){}, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| function alert(title, message, callback){ | ||
| dialog(title, message, { | ||
| "OK":function(){} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| }); | ||
| } | ||
| }); | ||
|
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
If the usage of Promises is pervasive, may be worth adding a shim for them. |
|
RE: Promises #274 |
…ation into pending # Conflicts: # contentcuration/contentcuration/static/js/edit_channel/models.js # contentcuration/contentcuration/views.py
Uh oh!
There was an error while loading. Please reload this page.