Skip to content

Instantly share code, notes, and snippets.

View colemanw's full-sized avatar
🎯
Focusing

colemanw

🎯
Focusing
View GitHub Profile
diff --git a/js/Common.js b/js/Common.js
index 6fa4589..a882280 100644
--- a/js/Common.js
+++ b/js/Common.js
@@ -409,6 +409,15 @@ if (!CRM.vars) CRM.vars = {};
if (settings.ajax) {
$el.addClass('crm-ajax-select');
}
+
+ if (settings.placeholder || settings.placeholderOption || $el.data('placeholder') || $el.a
@colemanw
colemanw / Fee.php
Created May 6, 2015 21:17
Change payment_processor field to use EntityRef
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
// Currently going to latest.civicrm.org/stable.php outputs:
4.5.4
// Proposed new output
{
"4.2": {
"status": "lts", // one of "lts", "eol", "stable" or "testing"
"releases": [
{"version": "4.2.alpha1", "date": "2012-06-08"},
{"version": "4.2.alpha2", "date": "2012-06-20"},
@colemanw
colemanw / gist:4f00dc8892e1ad449f81
Created November 3, 2014 22:52
Proposed structure for latest.civicrm.org
// Currently going to latest.civicrm.org/stable.php outputs:
4.5.2
// Proposed new output:
{
"stable": {"security": null, "latest": "4.5.2"},
"lts": {"security": "4.4.7", "latest": "4.4.8"},
"unstable": null, // we don't have any beta releases out currently, is this what that should look like?
}
@colemanw
colemanw / civicrm45examples.js
Created April 25, 2014 15:27
CiviCRM 4.5 Examples
// A closure is a function that provides scope for your variables
// and can provide an abbreviated alias of globals.
// In this case we are importing Civi's copy of jQuery and lo-dash.
// @see http://wiki.civicrm.org/confluence/display/CRMDOC/Javascript+Reference
function something($, _) {
// Code goes here
}
// Run the function
something(CRM.$, CRM._);
@colemanw
colemanw / activityPopup.js
Created April 17, 2014 15:52
Open civicrm activity view in popup
cj(function($) {
$('#crm-container').on('click', '.crm-contact-activity-links a.action-item-first', function(e) {
var url = $(this).attr('href');
$('<div class="crm-container" />').dialog({
title: 'View Activity',
open: function() {
$(this).load(url + '&snippet=1');
}
});
e.preventDefault();