.../
... + -- EO
| |
| |
+-- src ----- + -- EDO
| |
| |
+-- test + -- MO
| |
| |
+-- tutorial + -- MOEO
| |
| |
+-- doc + -- SMP
| |
| |
... + -- EOMPI
|
|
+ -- EOSERIAL
Question for current maintainers: ./README: new release?
Also:
* Moving out eompi & eoserial modules (issue #2).
* Correction of the errors when executing "make doc" command.
* Adding a solution for the conflicting headers problem (see the two CMake Cache
Values: PROJECT_TAG & PROJECT_HRS_INSTALL_SUBPATH) (issue #1)
* Header inclusions:
** src: changing absolute paths into relative paths ('#include <...>' -> '#include "..."')
** test, tutorial: changing relative paths into absolute paths ('#include "..."' -> '#include <...>')
* Moving out some scripts from EDO -> to the root
* Add a new script for compilation and installation (see build_gcc_linux_install)
* Compilation with uBLAS library or EDO module: now ok
* Minor modifications on README & INSTALL files
* Comment eompi failed tests with no end
*** TODO: CPack (debian (DEB) & RedHat (RPM) packages) (issues #6 & #7) ***
95 lines
2.4 KiB
JavaScript
Executable file
95 lines
2.4 KiB
JavaScript
Executable file
/*!
|
|
Deck JS - deck.status
|
|
Copyright (c) 2011 Caleb Troughton
|
|
Dual licensed under the MIT license and GPL license.
|
|
https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
|
|
https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
|
|
*/
|
|
|
|
/*
|
|
This module adds a (current)/(total) style status indicator to the deck.
|
|
*/
|
|
(function($, deck, undefined) {
|
|
var $d = $(document),
|
|
|
|
updateCurrent = function(e, from, to) {
|
|
var opts = $[deck]('getOptions');
|
|
|
|
$(opts.selectors.statusCurrent).text(opts.countNested ?
|
|
to + 1 :
|
|
$[deck]('getSlide', to).data('rootSlide')
|
|
);
|
|
};
|
|
|
|
/*
|
|
Extends defaults/options.
|
|
|
|
options.selectors.statusCurrent
|
|
The element matching this selector displays the current slide number.
|
|
|
|
options.selectors.statusTotal
|
|
The element matching this selector displays the total number of slides.
|
|
|
|
options.countNested
|
|
If false, only top level slides will be counted in the current and
|
|
total numbers.
|
|
*/
|
|
$.extend(true, $[deck].defaults, {
|
|
selectors: {
|
|
statusCurrent: '.deck-status-current',
|
|
statusTotal: '.deck-status-total'
|
|
},
|
|
|
|
countNested: true
|
|
});
|
|
|
|
$d.bind('deck.init', function() {
|
|
var opts = $[deck]('getOptions'),
|
|
slides = $[deck]('getSlides'),
|
|
$current = $[deck]('getSlide'),
|
|
ndx;
|
|
|
|
// Set total slides once
|
|
if (opts.countNested) {
|
|
$(opts.selectors.statusTotal).text(slides.length);
|
|
}
|
|
else {
|
|
/* Determine root slides by checking each slide's ancestor tree for
|
|
any of the slide classes. */
|
|
var rootIndex = 1,
|
|
slideTest = $.map([
|
|
opts.classes.before,
|
|
opts.classes.previous,
|
|
opts.classes.current,
|
|
opts.classes.next,
|
|
opts.classes.after
|
|
], function(el, i) {
|
|
return '.' + el;
|
|
}).join(', ');
|
|
|
|
/* Store the 'real' root slide number for use during slide changes. */
|
|
$.each(slides, function(i, $el) {
|
|
var $parentSlides = $el.parentsUntil(opts.selectors.container, slideTest);
|
|
|
|
$el.data('rootSlide', $parentSlides.length ?
|
|
$parentSlides.last().data('rootSlide') :
|
|
rootIndex++
|
|
);
|
|
});
|
|
|
|
$(opts.selectors.statusTotal).text(rootIndex - 1);
|
|
}
|
|
|
|
// Find where we started in the deck and set initial state
|
|
$.each(slides, function(i, $el) {
|
|
if ($el === $current) {
|
|
ndx = i;
|
|
return false;
|
|
}
|
|
});
|
|
updateCurrent(null, ndx, ndx);
|
|
})
|
|
/* Update current slide number with each change event */
|
|
.bind('deck.change', updateCurrent);
|
|
})(jQuery, 'deck');
|
|
|