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 AppColors = (function () { | |
var s; | |
return { | |
settings: { | |
el: $('#btnColor'), | |
that: $('#currentClass'), | |
last: $('[name="lastColor"]') | |
}, | |
init: function () { | |
s = AppColors.settings; |
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 HandleSortable = (function () { | |
var s; | |
return { | |
settings: { | |
box: $('#nestable'), | |
li: $('.dd-item'), | |
btn: $('#addAppPage'), | |
selectBox: $('#appPages'), | |
removeBtn: $('#removeAppBtn'), | |
currentItems: [] |
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
scripts = module.exports = | |
settings: | |
verbose: false # set this to true to turn on verbosity | |
internal: true # this will accept an external array, doesn't work yet... intentions are there. | |
items: [ | |
{src: '/js/lib/ga.js', name: 'ga.js', where: 'head', uri: null, type: 'js', exclude: null} | |
{src: '//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css', name: 'bootstrap.css', where: 'head', uri: null, type: 'css', exclude: null} | |
{src: '//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css', name: 'font-awesome.css', where: 'head', uri: null, type: 'css', exclude: null} | |
{src: '/css/style.css', name: 'style.css', where: 'head', uri: null, type: 'css', exclude: null} | |
{src: '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', name: 'jquery.js', where: 'foot', uri: null, type: 'js', exclude: null} |
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
# Auto detect text files and perform LF normalization | |
* text=auto | |
# Custom for Visual Studio | |
*.cs diff=csharp | |
*.sln merge=union | |
*.csproj merge=union | |
*.vbproj merge=union | |
*.fsproj merge=union | |
*.dbproj merge=union |
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
# routes for json/ajax calls | |
App = require "../../models/applications" | |
ajax = module.exports = | |
slugCount: (req, res) -> | |
if req.body? && req.body.slug | |
App.count slug: new RegExp("^#{req.body.slug}$|^#{req.body.slug}-([1-9]{1}$|[1-4]{1}[0-9]{1}$|50$)"), (err, count) -> | |
if err? | |
req.flash "info", type: "error", title: "Ooops", msg: "No count Found" | |
res.json count |
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
mongoose = require "mongoose" | |
paginate = require('paginate')({ | |
mongoose: mongoose | |
}); | |
mongoose.set "debug", true | |
# connection sharing thanks to [connection-sharing mongoose examples](https://github.com/LearnBoost/mongoose/tree/master/examples/express/connection-sharing) | |
db = global.db = mongoose.createConnection(conf.db.mongoUrl); |
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
trim = (str) -> str.replace(/^\s\s*/, '').replace /\s\s*$/, '' | |
stripVowelAccent = (str) -> | |
s = str | |
rExps = [ | |
/[\xC0-\xC4]/g, /[\xE0-\xE5]/g, | |
/[\xC8-\xCB]/g, /[\xE8-\xEB]/g, | |
/[\xCC-\xCF]/g, /[\xEC-\xEF]/g, | |
/[\xD2-\xD6]/g, /[\xF2-\xF6]/g, |
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
# init required folders | |
initPath = path.join __dirname, "public", "uploads" | |
init = require("./config/init").init initPath |
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 GeoClass = (function () { | |
var s; | |
return { | |
settings: {}, | |
init: function () { | |
s = this.settings; | |
this.testGeo(); | |
}, | |
testGeo: function () { | |
if ("geolocation" in navigator) { |