This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| getEditorAPI(){ | |
| { | |
| getPosition(selection) : Promise<x, y> { | |
| } | |
| getSelection(){ | |
| this._seelction | |
| } | |
| add({}, selection){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| C='' | |
| whitespace="[[:space:]]" | |
| for i in "$@" | |
| do | |
| if [[ $i =~ $whitespace ]] | |
| then | |
| i=\"$i\" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Show component names in layout | |
| var t = document.querySelectorAll("[view_id]"); for (var i=0; i<t.length; i++) { | |
| var box = $$(t[i].getAttribute("view_id")); | |
| if (!box.getChildViews || !box.getChildViews().length) | |
| t[i].innerHTML = "<div style='font-size:14px; text-align:center; position: relative; top: 50%; margin-top:-20px;'>"+box.name+"</div>"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ready = function(fn){ if ( document.readyState === 'complete' ) return fn(); else document.addEventListener( 'DOMContentLoaded', fn, false ); }; | |
| var click = function(a, fn){ var node = document.querySelector(a); if (node) node.addEventListener("click", fn, false); } | |
| ready(function(){ | |
| click('селектор нужного объекта', function() { | |
| dataLayer.push({'event':'GAevent', 'eventCategory':'Заданное нами значение', 'eventAction':'Заданное нами значение', 'eventLabel':'Заданное нами значение'}); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define([],function(){ | |
| var collection = new webix.DataCollection({ | |
| url:"rest->server/records.php", | |
| save:"rest->server/records.php" | |
| }); | |
| return { | |
| data: collection, | |
| refresh:function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ActionResult Data(int start = 0, int count = 0) | |
| { | |
| if (start == 0) | |
| { | |
| //initial data loading | |
| return Json(new | |
| { | |
| data = db.Movies.OrderBy(c => c.Rating).Take(50).ToList(), | |
| total_count = db.Movies.Count() | |
| }, JsonRequestBehavior.AllowGet); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| webix.ready(function(){ | |
| var sort = function(array, method) { | |
| var len = array.length; | |
| if(len < 2) { | |
| return array; | |
| } | |
| var pivot = Math.ceil(len/2); | |
| return merge(sort(array.slice(0,pivot), method), sort(array.slice(pivot), method), method); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var is_debug_name = function(name){ | |
| var test = name.toString(); | |
| if ((test.indexOf("debug") === 0) || (test.indexOf("log") === 0) || (test.indexOf("assert") === 0)) | |
| return true; | |
| }; | |
| var is_private_name = function(name){ | |
| if (name.toString().charAt(0) == "_") return true; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| webix.ready(function(){ | |
| var pivot = { | |
| container:"testA", | |
| view:"pivot", | |
| datatable:{ | |
| pager:"pivotPager" | |
| }, | |
| height:400, | |
| width:1000, | |
| data:pivot_dataset, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $$("admin-customer-grid").exportToExcel("excel/generate.php",{ | |
| id:true, //add id column to the export | |
| columns:{ //columns which need to be exported | |
| customer:{ //we can define different width and template for exported data | |
| template:webix.template("#customer#"), | |
| width:500 | |
| }, | |
| region_id:true, | |
| country_id:true, | |
| } |