ZoomApps / Liveapp

Liveapp Framework :rocket:
https://www.liveapp.com.au
2 stars 1 forks source link

qtip functionality for mobile #25

Closed JasonBev closed 6 years ago

JasonBev commented 7 years ago

Currently qtip is set to on hover for tooltips around the site, this needs to be changed to on click for mobile view.

qtip config- show: 'click'

Example: Progress Notes - Role Centre (i.e Green Flags)

paulfisher53 commented 6 years ago

I've made a change to load the QTip library in mobile mode. Please load these files: Mobile QTip.zip

I have tested using this code:

if(viewer.GetPageGrid()){
  viewer.GetPageGrid().OnBindRow = function(rowid,data,element){
    $(element).children().each( function( index, e ){
      var cell = $(e);
      var opts = { 
        position: { at: 'bottom left' },
        style: { tip: { corner: false}, classes: "app-tooltip-text" },
        content: {text: cell.html()}
      };
      if(Application.IsInMobile()){
        opts.show =  {event: 'taphold'};
      }
      cell.qtip(opts);
    });    
  };
}

Note: I used taphold instead of click, as click was already used on my grid to edit the row

JasonBev commented 6 years ago

Qtip functionality for mobile working as expected

paulfisher53 commented 6 years ago

Thanks