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
/** | |
* Discover pane (web parts > 9.0). | |
* | |
* @namespace Tabia.DiscoverPane | |
*/ | |
var Tabia = window.Tabia || {}; | |
(function ($, _, Tabia, groucho, module) { |
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
/** | |
* @file Click a DOM element via parameter (after the page load). | |
* | |
* Example: /techspecs?click=personal-sources#data-sources | |
*/ | |
(function ($) { | |
/** | |
* @todo waitFor(). |
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
<?php | |
/** | |
* Determine relevant taxonomy terms from multi-code "utm_campaign" parameter. | |
* | |
* @example _tableau_landing_pages_parse_campaigns([type]-[topic]-[segment]-[audience]) | |
* | |
* @param string $param | |
* | |
* @return array |
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
/** | |
* Remove prefix word from camelCase strings. | |
* | |
* @example stripCamelPrefix('myOldThing'); // oldThing | |
* | |
* @param {string} str | |
* @param {string} prefix | |
* | |
* @return {string} | |
*/ |
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
$.each($._data(document, 'events'), function(i, e) { | |
console.log(i, e); | |
}); |
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
<?php | |
// Debug the PHP Drupal code in this statement with all "errors"... | |
if (arg(1) = 'node') { | |
arg(2) = $nodeID | |
load_node($nodeID); | |
echo drupal_render(node_view($nodeID,'teaser')); | |
} |
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
<!-- How would you make the following link show all content when clicked? --> | |
<p><a href="#" id="opener">Expand All</a><p> | |
<ul id="stuff"> | |
<li> | |
<strong>Some Content</strong> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. | |
Suspendisse at leo quis lectus imperdiet consectetur. |
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
/** | |
* Try properties against object and use first available value. | |
* | |
* @param {array} properties | |
* @param {object} obj | |
* | |
* @return {string|boolean} | |
*/ | |
_.firstObj = function (properties, obj) { | |
var prop = _.first(_.intersection(properties, _.keys(obj))); |
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
/** | |
* Reach nested data object properties via string. | |
* | |
* @param {object} obj | |
* @param {string} desc | |
* | |
* @return {mixed} | |
*/ | |
_.strProp = function (obj, desc) { | |
var arr = desc.split('.'); |
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
/** | |
* Try properties against object and map first value with callback. | |
* | |
* @param {array} properties | |
* @param {object} obj | |
* @param {function} callback | |
* | |
* @return {string|boolean} | |
*/ | |
_.mapFirst = function (properties, obj, callback) { |