Navigation

    Monaca & Onsen UI
    • Register
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. meisam3322
    M
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    meisam3322

    @meisam3322

    0
    Reputation
    11
    Posts
    1343
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    meisam3322 Follow

    Posts made by meisam3322

    • how to cache page content !!

      hi, i have some pages that need get some data from server by internet. i use pushPage and tried bringPageTop to navigate pages. all works well. but when i back or go to a page i will try to load contens from server again. i try to call function for getting content from internet in page init or show event but unfortunately contents get lost and need to load and request from server again and again when back to page.

      is there any way to cache content, because onsen only keep contents before ons.ready after that every contents added to pages will lost when page back or go to another pages.

      thank you for help and idea.

      posted in Onsen UI
      M
      meisam3322
    • RE: Really Problem with infinite list lazy list in pages

      I need to say i use pushPage to navigate between pages but when i use resetToPage all infinite list or lazy repeat list will work correctly.

      i really confuse !!!

      is there any way to show data in lazy repeat or infinite scroll beside delegate method ???

      posted in Onsen UI
      M
      meisam3322
    • Really Problem with infinite list lazy list in pages

      I use requireJs to create a project. i need to have infinite scroll list in some pages. i use these for example to run page. for first time works correclty but when i back to that page not work ( i mean nothing shown in infinite list):

      I use it for run some function when page shown:

          document.addEventListener("show", function(event) {
              var page = event.target;
              if (event.target.id == "pageSpecialOffer") {
                  createMainList();
              }
          }, false);
      

      and the function to create infinite list:

          function createMainList() {
              var data = {};
              data.cityId = parseInt(bigFoot.variable.cityID);
              api.getMainList(data).done(function(list) {
                      var iListSpecialOffer = document.getElementById('SpecialOfferByCategoryInfiniteList');
                      iListSpecialOffer.delegate = {
                          createItemContent: function(index, template) {
                              var t2 = '<ons-list-item tappable modifier="longdivider" server-id="' + list[index].CategoryId + '">';
                              t2 += list[index].CategoryIcon;
                              t2 += '<div class="title">' + list[index].CategoryName + '</div>';
                              if (list[index].SpecialOffersTotal == 0) {
                                  t2 += '<span class="notification notification--material empty">' + list[index].SpecialOffersTotal + '</span>';
                              } else {
                                  t2 += '<span class="notification notification--material">' + list[index].SpecialOffersTotal + '</span>';
                              }
                              t2 += '</ons-list-item>';
                              // console.log(ons.createElement(t));
                              return ons.createElement(t2);
                          },
                          countItems: function() {
                              return list.length;
                          },
                          destroyItem: function(index, element) {
                              // console.log(index);
                          }
                      };
              });
          }
      
      

      above code i delete some unnecessary codes , that works for first time but when back and come again nothing shown in infinite list, but i have some data to show.

      please help me for that. i thing there is problem with delegate i used because i use the same code in other pages where needs to have infinite list scroll. thank you

      posted in Onsen UI
      M
      meisam3322
    • how to cache page without using angular

      hi,
      i don’t use angular and need to cache some page contents when user back to it. of course i am using requireJs on my project. is there any help ? or i should hard code ??

      posted in Onsen UI
      M
      meisam3322
    • trouble with tab, splitter and navigation working together

      I have global splitter , i put navigation into splitter content as onsen-tutorial samples. it’s work well. but i need to have global tab bar. ofcourse one of my item tab page is for home. so how can i work tab as globe ??

      posted in Onsen UI
      M
      meisam3322
    • RE: Zooming on text

      i think you can use canvas beside js plugin to manage user touch like interactjs

      posted in Onsen UI
      M
      meisam3322
    • How to raise page scroll event

      is there any way to raise or eventlistener when page scrolling ?

      posted in Onsen UI
      M
      meisam3322
    • how to keep page scroll position ?

      when i use ons back button the shown page kept scroll position, but when i use javascript like this code

                  document.querySelector('#myNavigator').pushPage('tempRegister', {
                      data: {
                          title: ''
                      }
                  });
      

      shown page scroll moved to the first, but i need to have prevoius position. is there any idea ? thank you

      posted in Onsen UI
      M
      meisam3322
    • RE: maxlength with an input field?

      thanks for your help. but it doesn’t work when i use type attribute as number. is there any way to solve it please ?

      posted in Onsen UI
      M
      meisam3322
    • how to handle maxlength of numberic input

      i use ons-input in my form and need to have number type attribute for some of them. but unfortunately it couldn’t handle maxlength. this is my code :

      <ons-input class="txt" maxlength="5" type="number" placeholder="Cell Number" input-id="txtRecover" />
      
      posted in Onsen UI
      M
      meisam3322