Skip to content

KFredberg/clTouch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Climber - clTouch

Climber Touch Directives for Qlik Sense

A qvangular module to add directives for Qlik Sense input events. Useful when using ng-repeat.

clTouch 1.0 Github All Releases GitHub stars Issues

Info

Version: 1.0.0
Author: Karl Fredberg [Github] [Twitter]

cl-activate cl-swipestart cl-swipeupdate cl-swipecancel cl-swipe

Installing

Copy clTouch.js into your extension directory.

Add the file in the define function in your extensions main js file. Example below clTouch.js is in a subfolder of the extension folder /lib/js/.

define([
        'jquery',
        './properties',
        './initialproperties',
        'text!./lib/css/style.css',
        'text!./lib/partials/template.html',
        './lib/js/clTouch'
    ],

Usage

Add the attributes to the elements in your template:

<div ng-repeat="item in items" 
	 cl-swipestart="onSwipestart($event)" 
	 cl-swipeupdate="onSwipeupdate($event)" 
	 cl-swipe="onSwipe($event)">{{item.title}}</div>

In your controller in your mainExtensionFile.js add the functions you refered to in the template

$scope.onSwipestart = function($event) {
   console.log('touchstart event called');
}
$scope.onSwipeupdate = function($event) {
   console.log('touchstart event called');
}
$scope.onSwipe = function($event) {
   console.log('touchstart event called');
}
```

## License

Released under the MIT License - see [`license.txt`](https://github.com/kfredberg/clTouch/blob/master/license) for details.

[![Climber - clTouch](https://github.com/kfredberg/clTouch/blob/master/climber-logo_small.png)](https://www.climber.eu)

About

A qvangular module to add directives for Qlik Sense input events. Useful when using ng-repeat.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors