2016-04-01 11 views
0

ページ下部にスクロールする際のテキストを非表示にする「Terms and Conditions」のWebページに「Please scroll down」というテキストを追加しています。 View(Sencha Architect)の下のページ全体にテキストを表示するコンテナを作成しましたが、一番下にスクロールした後でそれを隠す方法はわかりません。コントローラの下にコントローラアクションを作成しようとしていますが、機能していません。条件付きコントローラのコードが添付されています。テキストを含むコンテナのアイテムIDは、私はExtJSのパネルのための同様の要件を持っていると私は、グリッドの高さを取得し、グリッドの現在のY位置と高さを比較することによって、それらを取り扱うscrollContainerSencha 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(); 
      }, 

答えて

0

です。パネルページで

、私は

var toBeAbsoluted = this.getHeight()/95 * 100; // approximation 95% seemed optimum in my case 
if(this.getY() >= (this.getHeight() - toBeAbsoluted)) 
buttonToHide.hide() 
を持っていた
関連する問題