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
// This depends on a custom element polyfill for browsers | |
// other than chrome and opera - 9/1/14 | |
angular.module('CustomElemFactory', []) | |
.service('customElem', [ | |
'$window', | |
function($window){ | |
// hash of registered element types | |
// that Angular knows about | |
// note that this would NOT include CEs registered from | |
// elsewhere |
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
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
minifycss = require('gulp-minify-css'), | |
jshint = require('gulp-jshint'), | |
uglify = require('gulp-uglify'), | |
imagemin = require('gulp-imagemin'), | |
rename = require('gulp-rename'), | |
clean = require('gulp-clean'), |
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
<div class="action-links"> | |
<!-- Include our Angular web component in the page as html markup | |
passing in (injecting) any data, config, or styling objects from the bckbone app--> | |
<span angular-web-component | |
og-id="{{model.id}}" | |
og-url="{{model.url}}" | |
og-key="{{model.key}}" | |
og-title="{{model.title}}" | |
og-image="{{model.image}}" |
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
//Tibbr plugins html directives and associated controllers | |
(function () { | |
'use strict'; | |
//declare the plugins module with dependancies | |
var tibbrPlugins = angular.module('TibbrPlugins', [ | |
'TibbrFilters', | |
'Tibbr', | |
'EventsBus', | |
'PageBus', | |
'TibbrAPI', |
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
//Tibbr plugins html directives and associated controllers | |
(function () { | |
'use strict'; | |
//declare the plugins module with dependancies | |
var tibbrPlugins = angular.module('TibbrPlugins', ['TibbrFilters', 'Tibbr', 'EventsBus', 'PageBus', 'TibbrAPI']); | |
//code to run when a like tag is encountered | |
tibbrPlugins.directive('tibrLike', function factory($window) { | |
var directiveDefinitionObject = { | |
//template: '<div>hi</div>', |
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 arrayChunk = [], | |
//an array of models possibly with 100s or 1000s of items | |
//that need to be tranformed into views | |
combinedArray = users.models.concat( subjects.models).concat(broadcasts.models); | |
while( !_.isEmpty(combinedArray)){ | |
//process 10 at a time | |
arrayChunk = combinedArray.splice(0, 10); | |
//wrapper around setTimeout 0 to defer execution to the end of the call stack | |
_.defer( function(chunk){ |
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
(function () { | |
//make an array of Widgets | |
var widgetArray = [], //array of widgets | |
widget, //widget | |
w, i; //temp vars | |
//widget constructor | |
function Widget(name, gears, angle) { | |
//assign parameters or defaults | |
this.name = name || 'widget'; |
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 objectToQueryString = function (a) { | |
var prefix, s, add, name, r20, output; | |
s = []; | |
r20 = /%20/g; | |
add = function (key, value) { | |
// If value is a function, invoke it and return its value | |
value = ( typeof value == 'function' ) ? value() : ( value == null ? "" : value ); | |
s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value); | |
}; | |
if (a instanceof 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
//define a dependancy | |
Ext.define( 'My.dependancyModule', { | |
//prevents unnecessary class construction methods | |
singleton: true, | |
//wrap logic scoped in self executing function | |
module: (function(){ | |
//protected vars |
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
/* Copywrite 2012, David Shapiro - portions added to existing Backbone code*/ | |
/* Subject to FFRUYL licensing - Feel free to rip and use as you like. */ | |
/*globals Backbone:true, _:true, $:true*/ | |
// @name: Configurator | |
// | |
// @tagline: Configurator for Backbone Apps- models, views and routers | |
// |
NewerOlder