Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
| 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.
Uh oh!
There was an error while loading. Please reload this page.
| 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.
Uh oh!
There was an error while loading. Please reload this page.
| 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.
Uh oh!
There was an error while loading. Please reload this page.
| 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.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| }); | ||
| var ChannelList = BaseViews.BaseEditableListView.extend({ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.
| }, | ||
| 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.
Uh oh!
There was an error while loading. Please reload this page.
| }, | ||
| 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.
Uh oh!
There was an error while loading. Please reload this page.
| 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.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| 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.
Uh oh!
There was an error while loading. Please reload this page.
| }); | ||
| } | ||
| }); | ||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
rtibbles
commented
May 8, 2017
If the usage of Promises is pervasive, may be worth adding a shim for them. |
DXCanas
commented
May 9, 2017
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.