Skip to content

Instantly share code, notes, and snippets.

View FlorinMotoc's full-sized avatar

Florin Motoc FlorinMotoc

View GitHub Profile
@FlorinMotoc
FlorinMotoc / jstree.plugin.customtext.js
Last active May 15, 2017 14:11
JsTree Plugin - Custom Text (you can use what you want instead of required `text` key)
// JsTree Plugin - Custom Text (you can use what you want instead of required `text` key)
(function ($) {
"use strict";
$.jstree.defaults.customtext = 'text';
$.jstree.plugins.customtext = function (text_key, parent) {
var self = this;
this.customtext_transformer = function (values) {
if (text_key === 'text') {
return values;
@FlorinMotoc
FlorinMotoc / AjaxIndicator.js
Last active March 22, 2017 12:44
AjaxIndicator
var AjaxIndicator = new function () {
this.setImgSrc = function (src) {
this.imgSrc = src;
}
this.start = function (text) {
// start indicator
if(jQuery('body').find('#resultLoading').attr('id') != 'resultLoading'){
jQuery('body').append('<div id="resultLoading" style="display:none"><div><img src="'+this.imgSrc+'"><div>'+text+'</div></div><div class="bg"></div></div>');
} else {