New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linked Cells #372

Merged
merged 3 commits into from Oct 12, 2012

Conversation

Projects
None yet
3 participants
@ihanson
Contributor

ihanson commented Oct 12, 2012

This pull request allows an embedder to specify that a group of cells is to be linked (using the same kernel).

To create linked cells, run

makeSagecell({"inputLocation": ".cellSelector", "linked": true});
@jasongrout

This comment has been minimized.

Show comment
Hide comment
@jasongrout
Member

jasongrout commented Oct 12, 2012

@rbeezer: ping

@rbeezer

This comment has been minimized.

Show comment
Hide comment
@rbeezer

rbeezer Oct 12, 2012

Fantastic! Thanks for the ping, Jason, and for the work on this Ira. Will it be live on aleph/aleph2 once the pull request is merged? I have a 5-day weekend and will be working extensively on the web version of FCLA the next few days. It'd be a good time to experiment.

rbeezer commented Oct 12, 2012

Fantastic! Thanks for the ping, Jason, and for the work on this Ira. Will it be live on aleph/aleph2 once the pull request is merged? I have a 5-day weekend and will be working extensively on the web version of FCLA the next few days. It'd be a good time to experiment.

jasongrout added a commit that referenced this pull request Oct 12, 2012

@jasongrout jasongrout merged commit 80b92ad into sagemath:master Oct 12, 2012

@jasongrout

This comment has been minimized.

Show comment
Hide comment
@jasongrout

jasongrout Oct 12, 2012

Member

Ira: I'm merging this now, but can you add something to the docs about it, either as a separate pull request, or just push directly to the repository. Thanks!

Member

jasongrout commented Oct 12, 2012

Ira: I'm merging this now, but can you add something to the docs about it, either as a separate pull request, or just push directly to the repository. Thanks!

@jasongrout

This comment has been minimized.

Show comment
Hide comment
@jasongrout

jasongrout Oct 12, 2012

Member

@rbeezer: okay, this is live on aleph now. Have fun!

Member

jasongrout commented Oct 12, 2012

@rbeezer: okay, this is live on aleph now. Have fun!

@rbeezer

This comment has been minimized.

Show comment
Hide comment
@rbeezer

rbeezer Oct 15, 2012

Thanks, Ira and Jason. I've got this working in the textbook now. Watch sage-edu for news, once I tidy up a few things.

Being a novice javascript programmer, here's a bit more guidance on how to use this, for those who might see this later. Four cells in two linked groups of two.

sagecell.makeSagecell({inputLocation: '#cellone'  });
sagecell.makeSagecell({inputLocation: '#celltwo'  });
sagecell.makeSagecell({inputLocation: '#cellthree'});
sagecell.makeSagecell({inputLocation: '#cellfour' });
sagecell.makeSagecell({inputLocation: '.groupone', linked: true});
sagecell.makeSagecell({inputLocation: '.grouptwo', linked: true});
<div id="cellone"   class="groupone"><script type="text/code"></script></div>
<div id="celltwo"   class="groupone"><script type="text/code"></script></div>
<div id="cellthree" class="grouptwo"><script type="text/code"></script></div>
<div id="cellfour"  class="grouptwo"><script type="text/code"></script></div>```

rbeezer commented Oct 15, 2012

Thanks, Ira and Jason. I've got this working in the textbook now. Watch sage-edu for news, once I tidy up a few things.

Being a novice javascript programmer, here's a bit more guidance on how to use this, for those who might see this later. Four cells in two linked groups of two.

sagecell.makeSagecell({inputLocation: '#cellone'  });
sagecell.makeSagecell({inputLocation: '#celltwo'  });
sagecell.makeSagecell({inputLocation: '#cellthree'});
sagecell.makeSagecell({inputLocation: '#cellfour' });
sagecell.makeSagecell({inputLocation: '.groupone', linked: true});
sagecell.makeSagecell({inputLocation: '.grouptwo', linked: true});
<div id="cellone"   class="groupone"><script type="text/code"></script></div>
<div id="celltwo"   class="groupone"><script type="text/code"></script></div>
<div id="cellthree" class="grouptwo"><script type="text/code"></script></div>
<div id="cellfour"  class="grouptwo"><script type="text/code"></script></div>```
@jasongrout

This comment has been minimized.

Show comment
Hide comment
@jasongrout

jasongrout Oct 15, 2012

Member

Do you need those first four lines? I don't think you should need those lines. I thought this should work:

sagecell.makeSagecell({inputLocation: '.groupone', linked: true});
sagecell.makeSagecell({inputLocation: '.grouptwo', linked: true});
<div id="cellone"   class="groupone"><script type="text/code"></script></div>
<div id="celltwo"   class="groupone"><script type="text/code"></script></div>
<div id="cellthree" class="grouptwo"><script type="text/code"></script></div>
<div id="cellfour"  class="grouptwo"><script type="text/code"></script></div>

To clarify, the inputLocation can be any jquery selector (http://api.jquery.com/category/selectors/, http://www.w3schools.com/jquery/jquery_ref_selectors.asp, http://codylindley.com/jqueryselectors/) or any jquery list of objects.

Member

jasongrout commented Oct 15, 2012

Do you need those first four lines? I don't think you should need those lines. I thought this should work:

sagecell.makeSagecell({inputLocation: '.groupone', linked: true});
sagecell.makeSagecell({inputLocation: '.grouptwo', linked: true});
<div id="cellone"   class="groupone"><script type="text/code"></script></div>
<div id="celltwo"   class="groupone"><script type="text/code"></script></div>
<div id="cellthree" class="grouptwo"><script type="text/code"></script></div>
<div id="cellfour"  class="grouptwo"><script type="text/code"></script></div>

To clarify, the inputLocation can be any jquery selector (http://api.jquery.com/category/selectors/, http://www.w3schools.com/jquery/jquery_ref_selectors.asp, http://codylindley.com/jqueryselectors/) or any jquery list of objects.

@rbeezer

This comment has been minimized.

Show comment
Hide comment
@rbeezer

rbeezer Oct 15, 2012

I guess so. Once I found something that "worked", I quit experimenting and started implementing. The id's don't seem to be needed either.

sagecell.makeSagecell({inputLocation: '.groupone', linked: true});
sagecell.makeSagecell({inputLocation: '.grouptwo', linked: true});
<div class="groupone"><script type="text/code"></script></div>
<div class="groupone"><script type="text/code"></script></div>
<div class="grouptwo"><script type="text/code"></script></div>
<div class="grouptwo"><script type="text/code"></script></div>

rbeezer commented Oct 15, 2012

I guess so. Once I found something that "worked", I quit experimenting and started implementing. The id's don't seem to be needed either.

sagecell.makeSagecell({inputLocation: '.groupone', linked: true});
sagecell.makeSagecell({inputLocation: '.grouptwo', linked: true});
<div class="groupone"><script type="text/code"></script></div>
<div class="groupone"><script type="text/code"></script></div>
<div class="grouptwo"><script type="text/code"></script></div>
<div class="grouptwo"><script type="text/code"></script></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment