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 charts = function () { | |
// Chart.defaults.global.responsive = true; | |
var data = { | |
labels: ["Physical Body", "Emotions & Meaning", "Relationships", "Time", "Work/Career/Mission", "Finances", "Celebrate & Continue"], | |
datasets: [ | |
{ | |
label: "My First dataset", | |
fillColor: "rgba(244, 232, 244,0.7)", | |
strokeColor: "rgba(244, 232, 244,0.7)", | |
pointColor: "rgba(244, 232, 244,0.7)", |
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 | |
/** | |
* Implements hook_form_FORMID_alter(). | |
*/ | |
// Checkout Form Alter | |
function seedco_form_commerce_checkout_form_checkout_alter(&$form, &$form_state, $form_id) { | |
// SECTION IN QUESTION | |
$account_section = $form['account']; | |
$form['customer_profile_billing']['commerce_customer_address']['und'][0]['account'] = $account_section; | |
$form['customer_profile_billing']['commerce_customer_address']['und'][0]['account']['#weight'] = -99; |
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 | |
// Form Alter | |
function qhr_form_search_block_form_alter(&$form, &$form_state, $form_id) { | |
$form['search_block_form']['#default_value'] = t('search'); // Set a default value for the textfield | |
$form['actions']['submit']['#value'] = t('GO!'); // Change the text on the submit button | |
} |
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
# disable superfish on mobile and add mobile interaction | |
if $("#main-content").css("float") isnt "left" | |
$(".block-superfish > ul").removeClass("sf-menu").addClass "mobile" | |
$(".block-superfish li").unbind() | |
$(".block-superfish > ul > li > a").click -> | |
$(".block-superfish li").removeClass "sfHover" | |
$(".block-superfish a").removeClass "sf-clicked" | |
$(this).addClass("sf-clicked").parent().addClass("sfHover") | |
$(".block-superfish li ul").removeAttr "style" |
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 | |
/** | |
* @file | |
* Module for defining custom context condition | |
*/ | |
/** | |
* Implements hook_context_plugins(). | |
*/ | |
function MYMODULE_context_plugins() { |
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
<!-- ClickTale Bottom part --> | |
<script type='text/javascript'> | |
// The ClickTale Balkan Tracking Code may be programmatically customized using hooks: | |
// | |
// function ClickTalePreRecordingHook() { /* place your customized code here */ } | |
// | |
// For details about ClickTale hooks, please consult the wiki page http://wiki.clicktale.com/Article/Customizing_code_version_2 |
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
<!-- ClickTale Top part --> | |
<script type="text/javascript"> | |
var WRInitTime=(new Date()).getTime(); | |
</script> | |
<!-- ClickTale end of Top part --> |
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 | |
function states_submit($form, &$form_state) { | |
for($i = 0; $i < 100; $i++) { | |
if(isset($form_state['values']['states_' . $i])) { | |
variable_set('state_' . $i, $form_state['values']['states_' . $i]); | |
} | |
else { | |
break; | |
} | |
} |
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 | |
// Views Pre-Render Function | |
function YOUR_THEME_views_pre_render(&$view) { | |
if($view->name == 'VIEW_MACHINE_NAME') { | |
if ($view->current_display == 'VIEW_DISPLAY_MACHINE_NAME') { | |
drupal_add_js(drupal_get_path('theme', 'YOUR_THEME') .'/js/SPECIFIC_VIEW.js'); | |
} | |
} | |
} |
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
Query | |
SELECT node.nid AS nid, node.title AS node_title, commerce_product_field_data_field_product_reference.product_id AS commerce_product_field_data_field_product_reference_product_, node.created AS node_created, 'node' AS field_data_field_product_images_node_entity_type, 'node' AS field_data_body_node_entity_type, 'node' AS field_data_field_product_discount_blurb_node_entity_type, 'commerce_product' AS field_data_field_eligible_for_offers_commerce_product_entity | |
FROM | |
{node} node | |
LEFT JOIN {field_data_field_product_reference} field_data_field_product_reference ON node.nid = field_data_field_product_reference.entity_id AND (field_data_field_product_reference.entity_type = 'node' AND field_data_field_product_reference.deleted = '0') | |
LEFT JOIN {commerce_product} commerce_product_field_data_field_product_reference ON field_data_field_product_reference.field_product_reference_product_id = commerce_product_field_data_field_product_reference.product_id | |
INNER JOIN {field_data_field_on_sale_now} field_data_field_on |
NewerOlder