When you’re using the Visual Studio Code’s ESLint plugin (with TypeScript), you might get this error in the first character of the document.
Continue reading How to fix VSC ESLint error “The file must be included in at least one of the projects provided”?Category: JavaScript
Display element from the set using probability (Vanilla JS)
This is simple Vanilla JS script that will allow you to show one element from the set using basic percentage probability.
Continue reading Display element from the set using probability (Vanilla JS)Cool vaporizing notification for form inputs
Read more and check how cool your forms might be! Click multiple times and ratatatatatatatatata…
Continue reading Cool vaporizing notification for form inputsJS Glitcher
Differences between character counting in PHP and Javascript
I’ve recently codded my own validation rules for forms. I’m checking length of a string on a client side and also on a server side (obviously it’s a good practice). After my script went on a production, users started to complain about validation errors (even if data in a form was passed proper). This is really strange but…
Continue reading Differences between character counting in PHP and Javascript
Javascript inline function parser
Since the dawn of time I’ve needed method to put a Javascript code into HTML node in a nice manner. Finally it’s here! I shall present to you inline function parser for JS callbacks…
Horizontal color fill loop for a preloader
Here’s a method to create horizontal color fill preloader using svg, js and a bit of CSS.
Enjoy:
How to add Bower component when it’s not in the repository?
Sometimes component that you want to use in your project isn’t available in Bower repo. There is a way to install it, even in very specified version. Go to project’s Github, in my case it’s here. Copy URL from the browser, and paste it somewhere. Now go to relases and click commit id that you’re interested in (this random blue colored string):
After that you’ll see full commit id, in this case it’s fef978b279c546923ad4f4118acea4d503e7596c. Paste that to the end of repository URL you’ve copied earlier. Remember to prefix it with # char and add .git to the URL:
https://github.com/bfintal/Counter-Up.git#fef978b279c546923ad4f4118acea4d503e7596c
Finally mix it with your bower.json file. Here’s full example:
{ "name": "Realhero report", "description": "Report template based on New Age", "main": "index.js", "authors": ["Konrad Fedorczyk"], "license": "ISC", "homepage": "http://realhe.ro", "private": true, "ignore": ["**/.*", "node_modules", "bower_components", "test", "tests"], "dependencies": { "bootstrap": "^3.3.7", "font-awesome": "^4.6.3", "jquery": "^1.11.3", "simple-line-icons": "^2.3.2", "morris.js": "^0.5.1", "jqvmap-fedek6": "https://github.com/fedek6/jqvmap.git#774c12a57916ab82e17406203bb41522dfe0e38b", "Counter-Up": "https://github.com/bfintal/Counter-Up.git#fef978b279c546923ad4f4118acea4d503e7596c" } }
Look at the last line of dependencies part, here’s component that I’ve added.
How to change mass edit limit in Vtiger 6.5
Sometimes you need to make mass operation on houndreds of records in Vtiger. Well in this case it’s 500 ones maximum… Well this is kinda stupid because it can surely handle up to thousands. How do I know? I’ve hacked the code and successfully converted 2000 leads 🙂 Well it takes some time but it definitely works!
Let us return to the merits. You need to edit a file from root folder of your Vtiger 6.5 CRM, placed here /layouts/vlayout/modules/Vtiger/resources/List.js. Simply find the code below and edit number according to your needs:
File: List.js
-------------
var selectedCount = this.getSelectedRecordCount();
if(selectedCount > 2000) {
var params = {
title : app.vtranslate('JS_MESSAGE'),
text: app.vtranslate('JS_MASS_EDIT_LIMIT'),
animation: 'show',
type: 'error'
};
Vtiger_Helper_Js.showPnotify(params);
return;
}
jQuery UI dialog with form fields passing data into single input
I’ve recently ran into this scenario: there is a single input field with dimensions in a height x width x depth format. What we can do to force/guide user to use propper format? Continue reading jQuery UI dialog with form fields passing data into single input