Skip to content

Instantly share code, notes, and snippets.

View StErMi's full-sized avatar
🔥
let's go!

StErMi StErMi

🔥
let's go!
View GitHub Profile
@StErMi
StErMi / sapui5-toastr-example.json
Created September 8, 2017 08:24
sapui5-toastr- Example
Toastr.info('This is a call title', 'And this is a call message', {
"closeButton": false,
"debug": false,
"progressBar": false,
"preventDuplicates": false,
"tapToDismiss": true,
"newestOnTop": true,
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
@StErMi
StErMi / manifest.json
Created September 8, 2017 08:21
openui5-toastr manifest.json
"sap.ui5": {
...
"dependencies": {
"minUI5Version": "1.30.0",
"libs": {
...
"it.designfuture.toastr": {}
}
},
"resourceRoots": {
@StErMi
StErMi / library-preload.js
Created August 7, 2017 09:41
openui5-flatpickr library-preload.js
jQuery.sap.registerPreloadedModules({
"version": "2.0",
"name": "it.designfuture.flatpickr.library-preload",
"modules": {
"it/designfuture/flatpickr/FlatDatePicker.js": "/*!\r\n * ${copyright}\r\n */\r\n\r\n// Provides control it.designfuture.flatpickr.FlatDatePicker\r\nsap.ui.define([\r\n\t\t'jquery.sap.global',\r\n\t\t'sap/m/InputBase',\r\n\t\t'./3rdparty/flatpickr',\r\n\t\t'./library'\r\n\t], function(jQuery, InputBase, flatpickr, library) {\r\n\t\"use strict\";\r\n\r\n\t/**\r\n\t * Constructor for a new FlatDatePicker.\r\n\t *\r\n\t * @param {string} [sId] id for the new control, generated automatically if no id is given \r\n\t * @param {object} [mSettings] initial settings for the new control\r\n\t *\r\n\t * @class\r\n\t * FlatDatePicker TODO ADD HERE A DESCRIPTION\r\n\t * @extends sap.m.InputBase\r\n\t * @version ${version}\r\n\t *\r\n\t * @constructor\r\n\t * @public\r\n\t * @since 1.40\r\n\t * @name it.designfuture.flatpickr.FlatDatePicker\r\n\t */\r\n\r\n\tvar FlatDatePicker = InputBase.extend(\
@StErMi
StErMi / Gruntfile.js
Created August 2, 2017 15:28
Flatpickr Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
dir: {
src: 'src',
dest: 'dist',
demo: 'test/demo',
src_flatpickr: 'node_modules/flatpickr/dist',
bower_components: 'bower_components',
node_modules: 'node_modules',
@StErMi
StErMi / library.source.less
Created August 2, 2017 15:22
Flatpickr library.source.less
/*!
* ${copyright}
*/
@import (less) "../../../../../flatpickr/dist/flatpickr.min.css";
@StErMi
StErMi / package.json
Created August 2, 2017 15:09
Flatpickr package.json
{
"name": "openui5-flatpickr",
"version": "0.0.1",
"description": "An openui5 custom control to use flatpickr (https://github.com/chmln/flatpickr)",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/StErMi/openui5-flatpickr"
},
"keywords": [
init: function() {
this.setAggregation("__qrcodeHTML", new HTML({
content: "<div class='openui5-qrcode' id='" + this.getId() + "-qrcode'></div>"
}));
},
onAfterRendering: function() {
var iCorrectLevel = this.getCorrectLevel() < 0 || this.getCorrectLevel() > 3 ? QRCode.CorrectLevel.H : this.getCorrectLevel();
if( this.__qrcode ) {
this.__qrcode._htOption.width = this.getWidth();
@StErMi
StErMi / QRCode.js
Created May 23, 2017 15:09
Instantiate a new QRCode.js
this.__qrcode = new QRCode( this.getDomRef(), {
text: this.getText(),
width: this.getWidth(),
height: this.getHeight(),
colorDark: this.getColorDark(),
colorLight: this.getColorLight(),
correctLevel: iCorrectLevel
});
@StErMi
StErMi / QRCode.js
Last active June 22, 2017 11:22
QRCode QRCode.js
// Provides control it.designfuture.qrcode.QRCode
sap.ui.define([
"sap/ui/core/Control",
"sap/ui/core/HTML",
"./3rdparty/qrcode"
], function (Control, HTML, qrcode) {
"use strict";
/**
* Constructor for a new QRCode.
@StErMi
StErMi / QRCodeRenderer.js
Last active June 22, 2017 11:18
QRCode QRCodeRenderer.js
sap.ui.define(['jquery.sap.global'],
function(jQuery) {
"use strict";
/**
* QRCode renderer.
* @static
* @namespace
*/