##// END OF EJS Templates
Merge pull request #5486 from minrk/disambiguate-default...
Merge pull request #5486 from minrk/disambiguate-default disambiguate to location when no IPs can be determined

File last commit:

r12649:4c1106f8
r16394:3cc040ef merge
Show More
slideshow.js
50 lines | 2.0 KiB | application/javascript | JavascriptLexer
Matthias BUSSONNIER
add slideshow extension/preset for celltoolbar
r9087 //----------------------------------------------------------------------------
// Copyright (C) 2012 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------
//============================================================================
//CellToolbar Example
//============================================================================
// IIFE without asignement, we don't modifiy the IPython namespace
(function (IPython) {
"use strict";
var CellToolbar = IPython.CellToolbar;
var slideshow_preset = [];
var select_type = CellToolbar.utils.select_ui_generator([
Matthias BUSSONNIER
fixes #4039....
r12649 ["-" ,"-" ],
Matthias BUSSONNIER
add slideshow extension/preset for celltoolbar
r9087 ["Slide" ,"slide" ],
Matthias BUSSONNIER
Change Slide denomination...
r9088 ["Sub-Slide" ,"subslide" ],
Matthias BUSSONNIER
add slideshow extension/preset for celltoolbar
r9087 ["Fragment" ,"fragment" ],
["Skip" ,"skip" ],
Matthias BUSSONNIER
Change Slide denomination...
r9088 ["Notes" ,"notes" ],
Matthias BUSSONNIER
add slideshow extension/preset for celltoolbar
r9087 ],
// setter
function(cell, value){
// we check that the slideshow namespace exist and create it if needed
if (cell.metadata.slideshow == undefined){cell.metadata.slideshow = {}}
// set the value
cell.metadata.slideshow.slide_type = value
},
//geter
function(cell){ var ns = cell.metadata.slideshow;
// if the slideshow namespace does not exist return `undefined`
// (will be interpreted as `false` by checkbox) otherwise
// return the value
return (ns == undefined)? undefined: ns.slide_type
},
"Slide Type");
CellToolbar.register_callback('slideshow.select',select_type);
slideshow_preset.push('slideshow.select');
Matthias BUSSONNIER
Uppercase and update path
r9089 CellToolbar.register_preset('Slideshow',slideshow_preset);
console.log('Slideshow extension for metadata editing loaded.');
Matthias BUSSONNIER
add slideshow extension/preset for celltoolbar
r9087
}(IPython));