Drawer problem. how to open fresh view and close, hide, destroy old view

6 posts, 0 answers
  1. Markus
    Markus avatar
    205 posts
    Member since:
    Nov 2005

    Posted 24 Oct 2013 Link to this post

    www.marktold.com/screencast/icenium_drawer.swf shows it best.

    Tried 

    window.location.href= "#drawer-daily-prayers";

    then

    I tried .destroy() and .hide() on the login view but that did somewhat not work.

    Markus

    <div data-role="view" id="drawer-log-in" data-layout="drawer-layout" data-title="Log-in">
               <div id="not-logged-in">
     
                   <ul data-role="listview" data-style="inset" data-bind="invisible: isLoggedIn">
                       <li>
                           <label>
                               Database-ID
                               <input type="text" name="dpdID" id="dpdID" value="" placeholder="Database ID" />
                           </label>
                       </li>
                       <li>
                           <label>
                               E-Mail
                               <input type="text" name="uEmail" id="uEmail" value="" placeholder="E-mail" />
                           </label>
                       </li>
                       <li>
                           <label>
                               Password
                               <input type="password" name="uPasswort" id="uPasswort" value="" placeholder="Password" />
                           </label>
                       </li>
                       <li>
                           <a data-role="button"  onclick="getTheUserData(dpdID.value, uEmail.value, uPasswort.value)" data-icon="contacts" href="drawer-log-in">log-in</a>
                           <br /><br />
                           <span id="login-error" style="color:red;font-size:0.8em"></span>
     
                       </li>
                   </ul>
     
               </div>
     
               <div id="logged-in" style="display:none;">
                 Logged in View
                    
                  
               </div>
     
           </div>
     
     
     
      <div data-role="view" id="drawer-daily-prayers" data-layout="drawer-layout" data-title="Daily Prayers">
            <div> Daily prayers</div
           </div>




  2. Markus
    Markus avatar
    205 posts
    Member since:
    Nov 2005

    Posted 24 Oct 2013 Link to this post

    As soon as I posted I might have found the answer :-)

    http://docs.kendoui.com/api/mobile/application#methods-navigate

    ---------------

    no working :-(

    app.navigateTo = function(URL) {
      //     window.location.href= URL;
      app.navigate(URL); // this trows an error: Uncaught TypeError: Object #<Object> has no method 'navigate'
     }
  3. Markus
    Markus avatar
    205 posts
    Member since:
    Nov 2005

    Posted 25 Oct 2013 Link to this post

    It might be a simulater problem

    Markus
  4. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 25 Oct 2013 Link to this post

    Hi Markus,

    According to the Kendo UI docs, app in your code snippet should be new kendo.mobile.Application();

    If you're using the Icenium Kendo UI template, app is a global wrapper and you should use app.application.navigate instead. Debugging your Icenium app to find out such problems is easy using the built-in developer tools in the Icenium simulator (see screehshot).

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  5. Markus
    Markus avatar
    205 posts
    Member since:
    Nov 2005

    Posted 25 Oct 2013 Link to this post

    Dear Steve

    As mentioned in my previous post it seems to be a simulator problem.

    On my S3 it works as expected with both versions

    window.location.href= URL; 

    app.application.navigate(URL);

    Markus
  6. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 25 Oct 2013 Link to this post

    Hello Markus,

    Both work fine in the Icenium simulator, but in your previous post you indicated that you've tried app.navigate(URL); and not app.application.navigate(URL); I've already explained where the difference lies.

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
Back to Top