This file contains 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
Darkswarm.directive "ofnModal", ($modal)-> | |
restrict: 'E' | |
replace: true | |
transclude: true | |
template: "<a>{{title}}</a>" | |
link: (scope, elem, attrs, ctrl, transclude)-> | |
scope.title = attrs.title | |
scope.contents = transclude() | |
console.log scope.contents |
This file contains 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
Darkswarm.directive "ofnModal", ($modal)-> | |
restrict: 'E' | |
replace: true | |
transclude: true | |
template: "<a>{{title}}</a>" | |
link: (scope, elem, attrs, ctrl, transclude)-> | |
scope.title = attrs.title | |
scope.cancel = -> |
This file contains 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
%ng-include{src: "login.html"} | |
%ng-include{src: "signup.html"} | |
%ng-include{src: "forgot.html"} |
This file contains 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
Darkswarm.controller "ForgotCtrl", ($scope, $http, $location, SpreeUser, AuthenticationService) -> | |
$scope.spree_user = SpreeUser.spree_user | |
$scope.path = "/forgot" | |
$scope.sent = false | |
$scope.active = -> | |
$location.path() == $scope.path | |
$scope.select = -> | |
AuthenticationService.select($scope.path) |
This file contains 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
Darkswarm.directive "ofnModal", ($modal)-> | |
restrict: 'E' | |
replace: true | |
transclude: true | |
template: "<a>{{title}}</a>" | |
link: (scope, elem, attrs, ctrl, transclude)-> | |
scope.title = attrs.title | |
contents = null |
This file contains 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
.columns.small-12.large-6{"ng-bind-html" => "producer.long_description"} | |
// producer.long_description is <p>text here</p> |
This file contains 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
console.log $scope | |
ChildScope {$id: "00F", this: ChildScope, $$listeners: Object, $$listenerCount: Object, $parent: ChildScope…} | |
$id: "00F" | |
$parent: ChildScope | |
accordion: Object | |
checkout: Constructor | |
show: function (name) { | |
this: ChildScope | |
__proto__: ChildScope |
This file contains 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
Darkswarm.factory "Loading", -> | |
new class Loading | |
message: null | |
Darkswarm.directive "loading", (Loading)-> | |
scope: {} | |
restrict: 'E' | |
templateUrl: 'loading.html' | |
controller: ($scope)-> | |
window.Loading = Loading |
This file contains 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
# I used to do this with Rabl | |
class BaseController < ApplicationController | |
before_filter @load_active_distributors | |
def load_active_distributors | |
# RABL template uses this | |
@active_distributors ||= Enterprise.distributors_with_active_order_cycles | |
end | |
end |
This file contains 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
class Parent(object): | |
def log_message(self, string): | |
self.c_instance.log_message(string) # Calling a C bridge | |
def create_children(self): | |
self.child1 = Child(self) | |
self.child2 = Child2(self) | |
class Child(object): | |
def __init__(self, parent): |