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
'use strict'; | |
var express = require('express'); | |
var controller = require('./alert.controller'); | |
var auth = require('../../auth/auth.service'); | |
var router = express.Router(); | |
router.get('/', auth.isAuthenticated(), controller.index); | |
router.get('/:id', auth.isAuthenticated(), controller.show); |
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
var config = require('../../config/environment'); | |
var Alert = require('./alert.model'); | |
var EmailCampaign = require('../emailCampaign/emailCampaign.model'); | |
var _ = require('lodash'); | |
exports.index = function(req, res) { | |
Alert.find({ account: req.user.account }).exec() | |
.then(function(data){ | |
return res.json(200, data); |
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
'use strict'; | |
/* | |
PurchaseIntent Controller - used for paypal transactions | |
*/ | |
var Q = require('q'), | |
config = require("../config/config"); |
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
/* your angular controller file */ | |
angular.module('myApp') | |
.controller('ThingCtrl', function ($scope, $routeParams, ThingService) { | |
$scope.maxSize = 20; | |
$scope.itemsPerPage = 50; | |
$scope.showView = false; | |
$scope.findResults = function(){ |
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
angular.module('myApp').service('MediaService', function($http, $upload, $q) { | |
//future function isDocument(file){} PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX | |
var isAudio = function(file){ | |
var returnBool = true; | |
if (!file || file.size === 0) { | |
returnBool = false; | |
// MP3, WAV, AIF, AU, M4A | |
}else if( file.type !== 'audio/mpeg' && | |
file.type !== 'audio/mp3 ' && |
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
/** | |
* Module dependencies. | |
*/ | |
var mongoose = require('mongoose'), | |
Photo = mongoose.model('Photo'), | |
_ = require('lodash'), | |
fs = require('fs'), | |
formidable = require('formidable'), | |
Q = require('q'); |
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
<input class="form-control custom-datepicker" | |
ng-model="myDate" | |
ng-click="opened = true" | |
type="text" | |
datepicker-popup="MM/dd/yyyy" | |
is-open="opened" | |
show-button-bar="false" | |
datepicker-options="{'show-button-bar': false, 'show-weeks':false}" | |
ng-required="true" /> |
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
'use strict'; | |
//Leads service used for leads REST endpoint | |
angular.module('myApp').factory('Things', ['$resource', function($resource) { | |
return $resource('api/things/:thingId', { | |
thingId: '@_id' | |
}, { | |
update: { | |
method: 'PUT' | |
} |
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
'use strict'; | |
// General Modal Service to use for pop-ups | |
// Example openTemplate: Popup.openTemplate("/views/common/modal.html","","","",function(){alert('hello')}); | |
angular.module('myApp').service('Popup', function($modal) { | |
//The alert function only has 1 customizable button | |
var alert = function(title, body, button, cb) { | |
var 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
'use strict'; | |
angular.module('myApp').controller('exampleCtrl', function ($rootScope, $scope, $stateParams, $location, $http, Things, CourseService) { | |
$scope.create = function () { | |
var thing = new Things({ | |
message: this.message | |
}); | |
thing.$save(function (thing) { | |
$location.path('/admin'); |
NewerOlder