2016-04-01 12 views
0

Şartlar ve Koşullar web sayfasına "Lütfen aşağı kaydırın" metnini ekliyorum ve sayfanın altına ulaştıktan sonra metin gizlenmelidir. View (Sencha Architect) altındaki tüm sayfadaki metni gösteren bir kap oluşturdum, ancak aşağıya kaydırdıktan sonra onu nasıl gizleyeceğinizi bilmiyorum. Denetleyiciler altında bir denetleyici eylemi oluşturmaya çalışıyorum ama çalışmıyor. Attached, TermsConditions denetleyicisinin kodudur. konteyner içeren metnin ItemID ben Extjs Panel için benzer gereksinimleri vardı ve ben ızgara yüksekliğini alma ve ızgara mevcut Y Pozisyonu yüksekliğini karşılaştırarak onları ele scrollContainerSayfanın altındaki sayfayı aşağı kaydırın, Sencha 3 ExtJS

onAgreeClick: function(button, e, eOpts) { 
     var store = Ext.data.StoreManager.lookup('UserObjectStore'); 
     var match = store.first(), 
      showAnnouncements = match.get('announcementPageToVisit'); 
     if (showAnnouncements) { 
      button = this.getBtnAnnouncements(); 
     } else { 
      button = this.getBtnCustomerSearch(); 
     } 
     this.simulateHeaderButtonClick(button); 

     Ext.Ajax.request({ 
      url: '../abc/services/users/saveUser', 
      method: 'GET', 
      headers: { 'Content-Type': 'application/json' }, 
      success: function (response, action) { 

      }, 
      failure: function (response, action) { 

      } 
     }); 
    }, 
onDisagreeClick: function(button, e, eOpts) { 
     Ext.Msg.confirm('','You must agree to the Terms and Conditions in order to continue. Press YES to go back or NO to exit.', 
      function(answer) { 
       if (answer === "no") { 
        var h = abc.app.getController('HeaderButton'); 
        h.terminateApp('ok', null, null); 
       } 
      } 
     ); 
    }, 
BackToTaC: function(button, e, eOpts) { 
     this.getTermsBtnContainer().hide(); 
     this.getTermsBackContainer().show(); 
     this.getScrollContainer().hide(); 
     this.getBtnAnnouncements().toggle(); 
     this.getBody().getLayout().setActiveItem(6); 
    }, 
var me = this; 
dataview.getEl().on('scroll', function(e, t) { 
    if(t.scrollHeight - t.scrollTop - t.clientHeight === 0) { 
    } 

});// I already tried to hide under this but it doesn't work 
    onTermsBeforeShow: function(component, eOpts) { 
     var me = this; 
     var termsView = component.down('dataview'); 
     var termsStore = termsView.getStore(); 
     termsStore.getProxy().actionMethods = {create: 'POST', read: 'POST', update: 'POST', destroy: 'POST'}; 
     termsStore.load(); 
      }, 

cevap

0

olduğunu. Panel sayfasında

, ben

var toBeAbsoluted = this.getHeight()/95 * 100; // approximation 95% seemed optimum in my case 
if(this.getY() >= (this.getHeight() - toBeAbsoluted)) 
buttonToHide.hide() 
vardı
İlgili konular