This is a migrated thread and some comments may be shown as answers.

edit data-views on drawer

5 Answers 65 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 15 Oct 2013, 07:39 PM
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.

5 Answers, 1 is accepted

Sort by
0
Accepted
Michael
Top achievements
Rank 1
answered on 16 Oct 2013, 02:31 PM
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.
0
Michael
Top achievements
Rank 1
answered on 16 Oct 2013, 02:40 PM
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.
0
Petyo
Telerik team
answered on 17 Oct 2013, 03:25 PM
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!
0
Accepted
Michael
Top achievements
Rank 1
answered on 17 Oct 2013, 04:42 PM
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?
0
Kiril Nikolov
Telerik team
answered on 21 Oct 2013, 07:19 AM
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!
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Petyo
Telerik team
Kiril Nikolov
Telerik team
Share this question
or