This file contains 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
/** | |
* This function mimics PHP's array_combine function | |
* @param {array} keys Array to be used as new object's keys | |
* @param {array} values Array to be mapped to respective keys | |
* @example | |
* array_combine(['Rick', 'Morty'], ['Sanchez', 'Smith']); // returns { Rick:'Smith', Morty:'Smith' } | |
*/ | |
function array_combine(keys, values) { | |
let obj = {}; | |
keys.forEach((k, i) => obj[k] = values[i]); |
This file contains 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
let topics = {}, subUid = -1; | |
// https://gist.github.com/fatihacet/1290216 | |
export default { | |
subscribe(topic, func) { | |
if (!topics[topic]) { | |
topics[topic] = []; | |
} | |
let token = (++subUid).toString(); | |
topics[topic].push({ | |
token, |
This file contains 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
{ | |
"__note": "keys with value of 'null' have been removed", | |
"aaData" : "data", | |
"aaSorting" : "order", | |
"aaSortingFixed" : "orderFixed", | |
"aDataSort" : "columns.orderData", | |
"aLengthMenu" : "lengthMenu", | |
"aTargets" : "columnDefs.targets", | |
"aoColumns" : "columns", | |
"aoColumnDefs" : "columnDefs", |
This file contains 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
return View.extend({ | |
initialize: function () { | |
this.el.attr("draggable", "true") | |
this.el.bind("dragstart", _.bind(this._dragStartEvent, this)) | |
}, | |
_dragStartEvent: function (e) { | |
var data | |
if (e.originalEvent) e = e.originalEvent | |
e.dataTransfer.effectAllowed = "copy" // default to copy |
This file contains 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
/*----- Before Minit -----*/ | |
/* line 12, sassy_s/_theme.scss */ | |
body { | |
background: url("http://domain.com/_subdir_/wp-content/themes/_themename_/images/header_graphic_fin.png") repeat-x transparent; | |
} | |
/*------ After Minit -----*/ | |
/* line 12, sassy_s/_theme.scss */ | |
body { | |
background: url('http://domain.com/_subdir_/wp-content/themes/_themename_//_subdir_/wp-content/themes/_themename_/images/header_graphic_fin.png') repeat-x transparent; |