Why menu, status or go options of deck.js does not work with HTML generated

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Why menu, status or go options of deck.js does not work with HTML generated

ch007m
Hi,

When doing the rendering of a list of asciidoc into a single HTML / Slideshow page (deck.js), the options menu, goto and status, table of content of deck.js does not work when I press the key ('m', 'g', 't')

Here is the command used (with maven plugin) and view source of the HTML page generated

 <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>output-html</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>process-asciidoc</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <sourceDirectory>${basedir}/docs</sourceDirectory>
              <outputDirectory>${slideshow_location}</outputDirectory>
             
              <embedAssets>true</embedAssets>
              <backend>deckjs</backend>
             
              <templateDir>${asciidoctor_backends}/haml/deckjs</templateDir>
              <attributes>
                <max-width>1024px</max-width>
                <icons/>
                <doc-uri/>
               
                <deckjs_theme>swiss</deckjs_theme>
               
                <deckjs_transition>swiss</deckjs_transition>
                <navigation/>
                <menu/>
                <status/>
              </attributes>
              <extensions>
                <extension>index</extension>
              </extensions>
            </configuration>
          </plugin>

https://gist.github.com/7532622
...
https://gist.github.com/7532601

Any idea is welcome ?

Regards,

Charles
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: Why menu, status or go options of deck.js does not work with HTML generated

ch007m
I think that I know the reason. This is because the deck.js backend (https://github.com/asciidoctor/asciidoctor-backends/blob/master/haml/deckjs/document.html.haml) does not add the following lines to be able to use the options (g = goto, m = menu, b = blank page, t=table of contents)

What we generate today -->
#
<script src="deck.js/jquery-1.7.2.min.js"></script><script src="deck.js/core/deck.core.js"></script><script src="deck.js/core/deck.core.js"></script><script src="deck.js/extensions/hash/deck.hash.js"></script><script src="deck.js/extensions/menu/deck.menu.js"></script><script src="deck.js/extensions/goto/deck.goto.js"></script><script src="deck.js/extensions/status/deck.status.js"></script><script src="deck.js/extensions/navigation/deck.navigation.js"></script><script src="deck.js/extensions/scale/deck.scale.js"></script><script> $(function() { $.deck('.slide'); }); </script>
but should be -->



<p class="deck-status">
       
        /
       
</p>
<div class="deck-toc"></div>
<form action="." method="get" class="goto-form">
        <label for="goto-slide">Go to slide:</label>
        <input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
        <datalist id="goto-datalist"></datalist>
        <input type="submit" value="Go">
</form>
#


<script> (function($, deck, undefined) { $.deck.defaults.keys["previous"] = [8, 33, 37, 39]; $.deck.defaults.keys["next"] = [13, 32, 34, 39]; $.extend(true, $[deck].defaults, { countNested: false }); $.deck('.slide'); })(jQuery, 'deck'); </script>
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: Why menu, status or go options of deck.js does not work with HTML generated

ch007m
Ticket created with modification proposed for deckjs backend

https://github.com/asciidoctor/asciidoctor-backends/issues/29
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: Why menu, status or go options of deck.js does not work with HTML generated

LightGuardjp
Administrator
This is a problem with the backend, correct?


On Tue, Nov 19, 2013 at 3:16 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Ticket created with modification proposed for deckjs backend

https://github.com/asciidoctor/asciidoctor-backends/issues/29


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1019.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Why menu, status or go options of deck.js does not work with HTML generated

asotobu
Yes the problem was with backend, I think that I don't have permissions for accepting pull request, I think Dan is the admin of that repo.
Reply | Threaded
Open this post in threaded view
|

Re: Why menu, status or go options of deck.js does not work with HTML generated

LightGuardjp
Administrator
Probably. I don't think I can merge pull requests there either.


On Tue, Nov 19, 2013 at 1:12 PM, asotobu [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Yes the problem was with backend, I think that I don't have permissions for accepting pull request, I think Dan is the admin of that repo.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1027.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Why menu, status or go options of deck.js does not work with HTML generated

ch007m
In reply to this post by LightGuardjp
That was problem with the backend. Everything is solved in my pull request (add missing references to css, js files) and add missing attribute :menu

BTW, as extension split is present in last deck.js distro, documentation can be updated to remove the fact that we must copy/paste extensions split


On Tue, Nov 19, 2013 at 8:01 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
This is a problem with the backend, correct?


On Tue, Nov 19, 2013 at 3:16 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Ticket created with modification proposed for deckjs backend

https://github.com/asciidoctor/asciidoctor-backends/issues/29


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1019.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1023.html
To unsubscribe from Why menu, status or go options of deck.js does not work with HTML generated, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard
Reply | Threaded
Open this post in threaded view
|

Re: Why menu, status or go options of deck.js does not work with HTML generated

LightGuardjp
Administrator
Very cool, excellent work!


On Wed, Nov 20, 2013 at 12:16 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
That was problem with the backend. Everything is solved in my pull request (add missing references to css, js files) and add missing attribute :menu

BTW, as extension split is present in last deck.js distro, documentation can be updated to remove the fact that we must copy/paste extensions split


On Tue, Nov 19, 2013 at 8:01 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
This is a problem with the backend, correct?


On Tue, Nov 19, 2013 at 3:16 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Ticket created with modification proposed for deckjs backend

https://github.com/asciidoctor/asciidoctor-backends/issues/29


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1019.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1023.html
To unsubscribe from Why menu, status or go options of deck.js does not work with HTML generated, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1031.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Why menu, status or go options of deck.js does not work with HTML generated

mojavelinux
Administrator
Thanks for giving the deck.js backend a boost, Charles.

I've merged in your pull request. I then followed up with a few refinements:

1. Expect all extensions in the extensions directory to be named consistently (i.e., extensions/<name>/deck.<name>.js)
2. Only load extensions when the corresponding attribute is set (e.g., menu, toc, navigation, etc)
3. Cleanup some of the formatting/syntax in the Haml

I still don't see the deck.split.js extension in the main deck.js repository. Perhaps you copied it into your installation and forgot you had?

I updated the deck.js instructions on asciidoctor.org to document the new attributes. However, the instructions for how to setup the third-party extensions is still a bit fuzzy. I think a they warrant a dedicated section in the guide.

-Dan


On Wed, Nov 20, 2013 at 9:26 AM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Very cool, excellent work!


On Wed, Nov 20, 2013 at 12:16 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
That was problem with the backend. Everything is solved in my pull request (add missing references to css, js files) and add missing attribute :menu

BTW, as extension split is present in last deck.js distro, documentation can be updated to remove the fact that we must copy/paste extensions split


On Tue, Nov 19, 2013 at 8:01 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
This is a problem with the backend, correct?


On Tue, Nov 19, 2013 at 3:16 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Ticket created with modification proposed for deckjs backend

https://github.com/asciidoctor/asciidoctor-backends/issues/29


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1019.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1023.html
To unsubscribe from Why menu, status or go options of deck.js does not work with HTML generated, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1031.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1032.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Why menu, status or go options of deck.js does not work with HTML generated

ch007m
You are right. Split is not there in the current trunk of the project (https://github.com/imakewebthings/deck.js/tree/master/extensions). So we still need this remark in the guide.


On Sat, Nov 23, 2013 at 8:06 PM, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks for giving the deck.js backend a boost, Charles.

I've merged in your pull request. I then followed up with a few refinements:

1. Expect all extensions in the extensions directory to be named consistently (i.e., extensions/<name>/deck.<name>.js)
2. Only load extensions when the corresponding attribute is set (e.g., menu, toc, navigation, etc)
3. Cleanup some of the formatting/syntax in the Haml

I still don't see the deck.split.js extension in the main deck.js repository. Perhaps you copied it into your installation and forgot you had?

I updated the deck.js instructions on asciidoctor.org to document the new attributes. However, the instructions for how to setup the third-party extensions is still a bit fuzzy. I think a they warrant a dedicated section in the guide.

-Dan


On Wed, Nov 20, 2013 at 9:26 AM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Very cool, excellent work!


On Wed, Nov 20, 2013 at 12:16 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
That was problem with the backend. Everything is solved in my pull request (add missing references to css, js files) and add missing attribute :menu

BTW, as extension split is present in last deck.js distro, documentation can be updated to remove the fact that we must copy/paste extensions split


On Tue, Nov 19, 2013 at 8:01 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
This is a problem with the backend, correct?


On Tue, Nov 19, 2013 at 3:16 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Ticket created with modification proposed for deckjs backend

https://github.com/asciidoctor/asciidoctor-backends/issues/29


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1019.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1023.html
To unsubscribe from Why menu, status or go options of deck.js does not work with HTML generated, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1031.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1032.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1067.html
To unsubscribe from Why menu, status or go options of deck.js does not work with HTML generated, click here.
NAML



--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard