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
/** | |
* Project : PROWJ | |
* Comments : 表格 | |
* Author : yeyi | |
* Create Date : 2010-4-15 | |
* Modified By : yeyi | |
* Modified Date : 2012-2-28 | |
*/ | |
function RichTable(id) { |
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 module = angular.module('basicsite', | |
['ngResource']). | |
config(['$routeProvider', function ($routeProvider) { | |
$routeProvider. | |
when('/', | |
{templateUrl: '/js/views/main.html', controller: 'MainCtrl'}). | |
when('/sports', | |
{templateUrl: '/js/views/sports.html', controller: 'SportsCtrl'}). | |
when('/players', | |
{templateUrl: '/js/views/players.html', controller: 'PlayersCtrl'}). |
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
module.directive('footer', function () { | |
return { | |
restrict: 'A', //这里意味着我们会把它作为一个属性而不是一个单独的页面标签来使用 | |
replace: true, | |
templateUrl: "/js/directives/footer.html", | |
controller: ['$scope', '$filter', function ($scope, $filter) { | |
// 控制器 | |
}] | |
} | |
}); |
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
module.directive('header', function () { | |
return { | |
restrict: 'A', | |
replace: true, | |
scope: {user: '='}, // 后面将会解释为何这么写 | |
templateUrl: "/js/directives/header.html", | |
controller: ['$scope', '$filter', function ($scope, $filter) { | |
// 控制器 | |
}] | |
} |
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> | |
<div header></div> | |
<div class="main-content"> | |
<p> | |
Here it's this page specific content :) | |
</p> | |
</div> | |
<div footer></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
"dependencies": { | |
"redis": "0.7.2", | |
"express": "~3.1.1", | |
"jade": "0.26.3", | |
"stylus": "0.27.2", | |
"nib": "0.5.0", | |
"reds": "0.1.4" | |
} |
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 kue = require('kue') | |
, jobs = kue.createQueue(); |
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
jobs.create('email', { | |
title: 'welcome email for tj' | |
, to: '[email protected]' , template: 'welcome-email' | |
}).save(); |
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
jobs.process('email', function(job, done){ | |
email(job.data.to, done); | |
}); |
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 request = require('request'); | |
var events = require('events'); | |
var url = require('url'); | |
var path = require('path'); | |
var crypto = require('crypto'); | |
module.exports = function(opts) { | |
if (!opts.callbackURI) opts.callbackURI = 'google/callback'; | |
if (!opts.loginURI) opts.loginURI = '/google/login'; | |
if (!opts.scope) opts.scope = 'email'; |
OlderNewer