Skip to content

Instantly share code, notes, and snippets.

angular.module('sdk.directives.ccVariantSelector', []);
angular.module('sdk.directives.ccVariantSelector')
.filter('ccVariantFilter', ['$filter', function($filter) {
'use strict';
return function(values, selectedValues, key) {
var selected = {},
applyFilters = false;
@cburgdorf
cburgdorf / gist:5594447
Last active December 17, 2015 10:28
special tag
git checkout master
git checkout temp
...jetzt alle files so organisieren wie sie seien sollen
git add -A
git commit -m "foo"
git tag foo
git branch -D temp
Im Prinzip ähnlich wie bei einer gh-pages branch. Da möchte man ja in der Regel nur den output aus dem dist verzeichnis auf der rooteben haben.
angular.module('sdk.directives.ccZippy')
.directive('ccZippy', function() {
var defaultIfUndefined = function(scope, property, defaultVal){
return scope[property] = scope[property] === undefined ? defaultVal : scope[property];
};
return {
restrict: 'E',
replace: true,
'use strict';
module.exports = function(grunt) {
var fs = require("fs"),
path = require("path"),
phantom = require("grunt-lib-phantomjs").init(grunt);
grunt.registerMultiTask('seo','fetch html snapshots', function(){
module.exports = function(grunt) {
grunt.initConfig({
seo: {
site: 'index.html'
}
});
grunt.loadTasks('grunt-contrib-seo/tasks');
'use strict';
angular.module('sdk.directives.ccZippy', []);
/**
* this is a generic directive that creates an view with
* optional fixed header and toolbars
*
*/
//<debug>
Ext.Loader.setPath({
'Ext':'../sencha/src',
'Ext.ux': 'libs/ux',
'CouchCommerce':'app'
});
Ext.Loader.setConfig('disableCaching', false);
//</debug>
Ext.require([
@cburgdorf
cburgdorf / ViewCache.js
Last active December 12, 2015 08:59
Sneak peek of the new ViewCache that will be the heart of our new optimized caching :)
Ext.define('CouchCommerce.infrastructure.ViewCache', {
xtype: 'viewcache',
extend: 'Ext.Component',
constructor: function(){
this._viewStore = {};
this._viewStack = [];
},
/**
* @public
* This method pushes new views on the cache
@cburgdorf
cburgdorf / gist:4402616
Last active December 10, 2015 07:38
A simple plugin that brings async sugar to any component that uses a card layout
/**
* This plugin brings missing async features to card layouts. It can be applied
* on any component that uses a card layout (e.g. a NavigationView)
*
* With this plugin you can do the following:
*
* navigationView.setActiveItem(fooCard, function(){ alert('after transition'); });
* navigationView.push(fooCard, function(){ alert('after transition'); });
* navigationView.pop(function(){ alert('after transition'); });
*
YOU:
Hey #jQuery guys! What's the best way to check if an element has a specific data attribute? Is there only $.attr() ?
YOU SAY:
(typeof($el.data('name')) != 'undefined') { … }
..is what you currently use.
ME: