Skip to content

Pending invitations shown on channel home page#258

Merged
jayoshih merged 18 commits into
learningequality:developfrom
jayoshih:pending
May 13, 2017
Merged

Pending invitations shown on channel home page#258
jayoshih merged 18 commits into
learningequality:developfrom
jayoshih:pending

Conversation

@jayoshih
Copy link
Copy Markdown
Contributor

@jayoshih jayoshih commented May 3, 2017

image

return HttpResponse("Tags are successfully saved.", status=200)


def add_editor_to_channel(invitation):

This comment was marked as spam.

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.

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.

get_full_name: function(){
return this.get('first_name') + " " + this.get('last_name');
},
get_channels: function(){

This comment was marked as spam.

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.

}
});

var ChannelList = BaseViews.BaseEditableListView.extend({

This comment was marked as spam.

Copy link
Copy Markdown
Member

@DXCanas DXCanas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

},
get_pending_invites: function(){
var self = this;
return new Promise(function(resolve, reject){

This comment was marked as spam.

},
accept_invitation:function(){
var self = this;
return new Promise(function(resolve, reject){

This comment was marked as spam.

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.


function alert(title, message, callback){
dialog(title, message, {
"OK":function(){}

This comment was marked as spam.

});
}
});

This comment was marked as spam.

@rtibbles
Copy link
Copy Markdown
Member

rtibbles commented May 8, 2017

If the usage of Promises is pervasive, may be worth adding a shim for them.

@DXCanas
Copy link
Copy Markdown
Member

DXCanas commented May 9, 2017

RE: Promises #274

jayoshih added 4 commits May 12, 2017 17:21
…ation into pending

# Conflicts:
#	contentcuration/contentcuration/static/js/edit_channel/models.js
#	contentcuration/contentcuration/views.py
@jayoshih jayoshih merged commit 936ce61 into learningequality:develop May 13, 2017
@jayoshih jayoshih deleted the pending branch August 8, 2017 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants