edit data-views on drawer

6 posts, 2 answers
  1. Michael
    Michael avatar
    151 posts
    Member since:
    Jan 2012

    Posted 15 Oct 2013 Link to this post

    I have a drawer with a default list of data-views. after a user signs in, I would like to add additional views to this list. how can i accomplish that?

    EDIT:

    a) sorry this is in the wrong forum.

    b) I used data-before-show="prevent" to hide it at the onset. now, how do I get it to appear?

    EDIT 2:

    I would have thought: $("#left_drawer").data("kendoMobileDrawer").show(); would do the trick, but that doesn't do anything.
  2. Answer
    Michael
    Michael avatar
    151 posts
    Member since:
    Jan 2012

    Posted 16 Oct 2013 Link to this post

    I also have a related question about: <a href="#left_drawer" style="background: #dddddd;" data-rel="drawer" data-align="left" data-role="button" data-icon="action"></a>

    I set up the code so that after login, another view gets shown through the navigation function. for whatever reason, as a result, the drawer trigger button now has to be clicked twice before it will do anything. after that it is fine, but obviously we dont want a button that just dosnt do anything the first time it is clicked. the other buttons, events, etc on that page all work fine.

    EDIT:

    It was because this: $("#left_drawer").data("kendoMobileDrawer").show(); was still firing before the navigation.
  3. Michael
    Michael avatar
    151 posts
    Member since:
    Jan 2012

    Posted 16 Oct 2013 Link to this post

    Interesting random side effect (bug)? If you run this code from an initial view:

                $("#left_drawer").data("kendoMobileDrawer").show();
                $("#left_drawer").data("kendoMobileDrawer").hide();
                app.application.navigate('#another_place');

    to get to another view.. instead of the drawer, swiping will display the initial view off to the left instead of the drawer menu items.
  4. Petyo
    Admin
    Petyo avatar
    2444 posts

    Posted 17 Oct 2013 Link to this post

    Hello Michael,

    From the thread so far, I am not sure what is the current problem you are experiencing. Can you please showcase it in a jsbin or jsfiddle sample? it should be relatively easy to achieve. 

    Regards,
    Petyo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Answer
    Michael
    Michael avatar
    151 posts
    Member since:
    Jan 2012

    Posted 17 Oct 2013 Link to this post

    If I use: data-before-show="prevent" to hide a drawer, how do I get the drawer to appear again? Basically, after a user logs into the app, I want the drawer to be usable on all views. I thought I could just call show() to activate it, but that doesn't do anything.

    Or, what amounts to the same behavior: If I have a data-views list set on a drawer, is it possible to add another view to that list later?
  6. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2598 posts

    Posted 21 Oct 2013 Link to this post

    Hello Michael,

    I can see that you have asked the same question in the other thread, where I responded. Please check the answer there. 

    I would like to ask you to ask your question just once, as it will be easier for us to track them down and response as fast as possible.
     
    Regards,
    Kiril Nikolov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top