Skip to content

Instantly share code, notes, and snippets.

View jbest84's full-sized avatar
🏠
Working from home

Jason jbest84

🏠
Working from home
View GitHub Profile
@jbest84
jbest84 / SlowItemFileReadStore.js
Created March 10, 2012 21:27
Mock a slow connection
define([
"dojo/data/ItemFileReadStore",
"dojo/_base/declare",
"dojo/_base/lang"
], function (ItemFileReadStore, declare, lang) {
return declare("dojox.grid.tests.support.SlowItemFileReadStore", ItemFileReadStore, {
delay: 1000, // delay in milliseconds for each fetch
constructor: function (options) {
if (options) {
this.delay = options.delay > 0 ? options.delay : this.delay;
_setStore: function(store){
if(this.store && this._store_connects){
array.forEach(this._store_connects, this.disconnect, this);
}
this.store = store;
if(this.store){
var f = this.store.getFeatures();
...
Author: Jason Best <skeeterbug@gmail.com> 2012-05-29 17:19:41
Committer: Jason Best <skeeterbug@gmail.com> 2012-05-29 17:19:41
Parent: 1df18a71120094867ec886d7c7c42ad60b378d21 (improve order of boolean expression to make meeting attendees happy; refs #15096; !strict)
Child: b1b07083661e2a857dfa0a4a4843b043f3d60ebe (trashme; refs #14092)
Branches: SLX8.0, remotes/slx/SLX8.0
Follows: 1.7.2
Precedes:
trashme; Fix i18n loader issues with 1.6 build profile. This commit can be trashed when updating to 1.8.
using System;
namespace Sage.Platform.Application.Caching
{
// Summary:
// Implementers provides support for caching
public interface ICache
{
// Summary:
// Gets the name of the cache region
@jbest84
jbest84 / dijit _TemplatedMixin.js
Created September 24, 2012 18:23
_fillContent
_fillContent: function(/*DomNode*/ source){
// summary:
// Relocate source contents to templated container node.
// this.containerNode must be able to receive children, or exceptions will be thrown.
// tags:
// protected
var dest, frag, hasChildren;
dest = this.containerNode;
frag = document.createDocumentFragment();
lang.extend(Mobile.SalesLogix.Views.Account.List, {
queryWhere: 'some sdata query'
});
@jbest84
jbest84 / gist:4990928
Created February 19, 2013 22:49
Contact/Edit cuisine preferences textRenderer and formatValue function; fixed
formatCuisinePrefs: function(selections) {
if (typeof selections === 'string') {
return selections;
}
var values = [];
for (var key in selections) {
var data = selections[key].data;
if (data && data.text) {
values.push(data.text);
@jbest84
jbest84 / App_Code\Sample.cs
Last active September 27, 2018 15:41
CORS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;
namespace Sample
{
public class CrossOriginSupportModule : IHttpModule
{
#!/bin/bash
if [ .$1. == .. ]; then
echo "USAGE: $0 [product name]"
exit 1
fi
PRODUCT=argos-$1
echo
@jbest84
jbest84 / gist:5595682
Created May 16, 2013 22:43
Opportunity Metric Widget Configuration
(function() { App.preferences.metrics = JSON.parse('{"opportunities":[{"resourceKind":"opportunities","metricTitleText":"Total Won Opportunities","queryName":"executeMetric","queryArgs":{"_filterName":"AccountManager","_metricName":"CountOpportunities","_activeFilter":"Status eq \'Closed - Won\'"},"formatType":"Mobile/SalesLogix/Format","formatFunc":"bigNumber","valueType":"Mobile/SalesLogix/Aggregate","valueFunc":"sum","reportViewId":"","chartType":"bar","metricDisplayName":"Count Opportunities","filterDisplayName":"Account Manager"},{"resourceKind":"opportunities","metricTitleText":"Total Sales","queryName":"executeMetric","queryArgs":{"_filterName":"AccountManager","_metricName":"SumActualAmount","_activeFilter":"Status eq \'Closed - Won\'"},"formatType":"Mobile/SalesLogix/Format","formatFunc":"bigNumber","valueType":"Mobile/SalesLogix/Aggregate","valueFunc":"sum","reportViewId":"","chartType":"bar","metricDisplayName":"Total Actual Amount","filterDisplayName":"Account Manager"},{"resourceKind":"opportunit