How to use the tabris.contentView.find function in tabris

To help you get started, we’ve selected a few tabris examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipsesource / tabris-js / examples / typescript-weather-app / src / app.ts View on Github external
function presentWeather(data: WeatherData) {
  contentView.find('.weatherInfo').dispose();
  createWeatherInformation(data);
  applyLayout();
}
github eclipsesource / tabris-js / examples / typescript-weather-app / src / app.ts View on Github external
function changeGraphFocus(forecastTabView: ForecastTabView, selection: Tab, data: WeatherData) {
  let day = forecastTabView.getTabIndex(selection);
  let graph = contentView.find(WeatherGraph).first();
  if (day === 0) {
    animateGraphChange(graph, data.list[0].date.getTime(), data.list[data.list.length - 1].date.getTime());
  } else {
    let time = data.days[day][0].date.getTime();
    let newMin = new Date(time).setHours(0, 0, 0, 0);
    let newMax = new Date(time + 24 * 60 * 60 * 1000).setHours(0, 0, 0, 0);
    animateGraphChange(graph, newMin, newMax);
  }
}
github eclipsesource / tabris-js / examples / cordova / PluginPage.js View on Github external
_openPluginInfoPage() {
    contentView.find('NavigationView').first().append(
      new Page({title: 'Plugin Info'}).append(
        new WebView({
          left: 0, top: 0, right: 0, bottom: 0,
          url: 'https://www.npmjs.com/package/' + this.pluginId
        })
      )
    );
  }
github eclipsesource / tabris-js / snippets / widget-styling.js View on Github external
import {TextView, contentView} from 'tabris';

['normal', 'interactive', 'prio-high', 'missing', 'prio-high missing'].forEach((style) => {
  new TextView({
    left: 10, top: 'prev() 10',
    class: style,
    text: 'class "' + style + '"'
  }).appendTo(contentView);
});

contentView.find(TextView).set({font: '24px Arial, sans-serif', textColor: '#333'});
contentView.find(TextView).filter('.interactive').set({textColor: 'blue'});
contentView.find(TextView).filter('.prio-high').set({font: 'bold 24px Arial, Sans-Serif'});
contentView.find(TextView).filter('.missing').set({textColor: '#ccc'});
github eclipsesource / tabris-js / examples / bookstore / AboutPage.js View on Github external
_showCoversGallery() {
    new CoversGalleryPage().appendTo(contentView.find('NavigationView').first());
  }
github eclipsesource / tabris-js / examples / bookstore / BooksList.js View on Github external
_showBookDetailsPage() {
    const BookDetailsPage = require('./BookDetailsPage');
    new BookDetailsPage({title: this.book.title, book: this.book}).appendTo(contentView.find('NavigationView').first());
  }
github eclipsesource / tabris-js / examples / bookstore / CoversGalleryPage.js View on Github external
    this.on('appear', () => contentView.find('#aboutAction').first().visible = false);
  }
github eclipsesource / tabris-js / examples / bookstore / AboutPage.js View on Github external
      appear: () => contentView.find('#aboutAction').first().visible = false,
      disappear: () => contentView.find('#aboutAction').first().visible = true