Navigation

    Monaca & Onsen UI
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. Евгений Гедройц
    Е
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    Евгений Гедройц

    @Евгений Гедройц

    0
    Reputation
    10
    Posts
    1464
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Евгений Гедройц Follow

    Posts made by Евгений Гедройц

    • RE: ons-sliding-menu: active item

      @munsterlander thank you for reply, but sliding menu not change location.href
      It’s Single Page Application without history api. “Preventing double fires” is not enough for this i suppose, if i’ll need to click from other pages, but i’ll try disable the onclick

      posted in Onsen UI
      Е
      Евгений Гедройц
    • RE: ons-lazy-repeat error in OnsenUI 2

      Yes, my project has angular and jQuery. i’m using this code:

      <ons-list>
          <ons-list-item modifier="chevron" class="list_respeak" ons-lazy-repeat="MyDelegate" style="height:40px">
          </ons-list-item>
      </ons-list>
      			<script>
      				var hItem = 40;
      				
      				var MyDelegate = {		  
      					createItemContent: function(index, oldContent) {
      					  if (oldContent) {
      						return oldContent;
      					  }
      
      					  var $element = $("<div><span style='opacity: 0.7;'><ons-icon icon='fa-spinner' spin='true'></ons-icon> Загрузка респиков...</span></div>");
      
      					  var request = $.getJSON('https://baconipsum.com/api/?type=meat-and-filler&sentences=1&callback=?', function(data) {
      						$element.text(data[0]);
      					  });
      
      					  $element.data('request', request);
      					  return $element[0];
      					},
      					destroyItemContent: function(index, element) {
      					  var request = $element.data('request');
      					  request.abort();
      					},
      					calculateItemHeight: function(index) {return hItem;},
      					countItems: function(){
      						return 10000000;
      					},
      					destroyItemContent: function(index, element) {
      						 console.log("Destroyed item " + index);
      					}
      				}
      				
      				
      				//$('.list_respeak').children('.ng-scope').each(function(){
      					//console.log($(this).height);
      					//if( $(this).height > hItem ){
      						//$(this).addClass('overflow');
      					//}
      				//});
      			</script>
      

      In Monaca is good(OnsenUI1) I exported my project to my localhost and changed OnsenUI2
      If it’s not enough i’ll make codepan

      posted in Onsen UI
      Е
      Евгений Гедройц
    • ons-lazy-repeat error in OnsenUI 2

      I used previous version and was ok. Example for jQuery from https://onsen.io/guide/overview.html#UsingLazyRepeat
      but now it is retrieving error:

      angular.min.js:107 ReferenceError: MyDelegate is not defined
          at eval (eval at <anonymous> (http://localhost/www/components/monaca-onsenui/js/angular-onsenui.min.js:2:10925), <anonymous>:1:1)
          at Class.extend._getDelegate (http://localhost/www/components/monaca-onsenui/js/angular-onsenui.min.js:2:10909)
          at Class.extend.init (http://localhost/www/components/monaca-onsenui/js/angular-onsenui.min.js:2:10066)
          at new Class (http://localhost/www/components/monaca-onsenui/js/onsenui.min.js:3:22935)
          at http://localhost/www/components/monaca-onsenui/js/angular-onsenui.min.js:4:2064
          at aa (http://localhost/www/components/monaca-onsenui/js/angular/angular.min.js:73:90)
          at K (http://localhost/www/components/monaca-onsenui/js/angular/angular.min.js:62:39)
          at g (http://localhost/www/components/monaca-onsenui/js/angular/angular.min.js:54:410)
          at K (http://localhost/www/components/monaca-onsenui/js/angular/angular.min.js:61:488)
          at g (http://localhost/www/components/monaca-onsenui/js/angular/angular.min.js:54:410) <ons-list-item modifier="chevron" class="list_respeak list__item list__item--chevron" ons-lazy-repeat="MyDelegate" style="-webkit-user-select: none; touch-action: pan-y; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
      
      posted in Onsen UI
      Е
      Евгений Гедройц
    • ons-sliding-menu: active item

      What a simple way is to determine “active item” in the ons-sliding-menu?
      I need this to add a class and add “prevent repeating clicks” if current page is open(it’s breaks my script). I have been checking code, forum, doc already

      hm… maybe simple is add “toggle class”

      posted in Onsen UI
      Е
      Евгений Гедройц
    • RE: ons-sliding-menu

      Why do not you do easy way with “back-button” in sliding menu, like in a navigator?
      i saw this example:
      http://codepen.io/frankdiox/pen/qEyvxB
      p.s. wrong links

      posted in v1.x
      Е
      Евгений Гедройц
    • RE: ons.platform

      @Fran-Diox thank you for explanation. I not quite understood description isWebView(). This is obvious now :)

      posted in v1.x
      Е
      Евгений Гедройц
    • RE: How to upgrade from v1 to v2 Onsen.io

      This bug was because this code

      <script>
      			document.addEventListener("init", function(event) {
      				if (event.target.id == "phrases") {
      					console.log("works");
      				}
      			}, false);
      		</script>
      

      but i do not got error in console…
      I inserted this code in v1.3 yet

      posted in Onsen UI
      Е
      Евгений Гедройц
    • RE: How to upgrade from v1 to v2 Onsen.io

      @argelius , please tell me what is new for Sliding Menu. This code not work and have not any errors, in v2

      <a href="#" onclick="menu.setMainPage('chapters.html')">
      

      I tryed to compare my code with example v2, but do not see differences

      posted in Onsen UI
      Е
      Евгений Гедройц
    • RE: ons.platform

      suggestion add methods: isApp() and isWeb()
      For example, i need set buttons in site, but hide them in app. Resolution is bad way

      posted in v1.x
      Е
      Евгений Гедройц
    • RE: ons-icon

      If icons not displaying
      https://github.com/argelius/favorite-star/issues/2

      BlizzzArt created this issue in argelius/favorite-star

      open Icon not display in Android #2

      posted in v1.x
      Е
      Евгений Гедройц