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
history: | |
im on: | |
/cars | |
the navigation shows, | |
cars, houses, baseball, horses | |
im on: | |
/cars/1 | |
the navigation is hidden |
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
{ | |
results: [ | |
{ | |
_id: "54a1cb3b4d5366f565e988ff", | |
name: "Principal Viaje y Viáticos", | |
parent: "dfb5833b-1a9a-4c09-b575-3d27ae868423", | |
description: "", | |
png: "https://s3.amazonaws.com/g4-qa/images/thumbnails/processes/dcb41c70-8fa3-11e4-9fcb-b79a15b9e978.png", | |
author: "Jaime", | |
user: "546febce4b987f438415b9be", |
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 express = require('express'), | |
app = express(), | |
bodyParser = require('body-parser'), | |
methodOverride = require('method-override'), | |
compression = require('compression'), | |
session = require('express-session'), | |
RedisStore = require('connect-redis')(session), | |
app.use(session({ | |
saveUninitialized: 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
$.ajaxSetup({ | |
beforeSend: function(jqXHR, settings) { | |
if (!settings.raw) { | |
settings.xhrFields = { withCredentials: false }; | |
} |
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
myArray = [] | |
_id = 'e427a9b6-328c-4b95-a6e3-421ab74d5163' | |
key = "bpm.processes." + _id | |
obj = {} | |
obj[key] = 'b4503eb5-7e8b-44da-bca1-73735bd3a92a'; | |
myArray[0] = {'root': true} | |
myArray.push(obj) | |
query = {}; | |
query['$and'] = myArray | |
console.log JSON.stringify(query) |
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
Backbone.history.start({ pushState: true }); | |
$(document).on('click', 'a:not([data-bypass])', function (evt) { | |
var href = $(this).attr('href'); | |
var protocol = this.protocol + '//'; | |
if (href.slice(protocol.length) !== protocol) { | |
evt.preventDefault(); | |
app.router.navigate(href, 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
$.load('/' + id, function(reseponseText) { | |
$('#main').html(responseText); | |
$('#main').trigger('create'); // (no recuerdo 100% si era asi esta linea suya.) | |
}); |
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
# example 1 | |
class AppRouter extends Mn.AppRouter | |
appRoutes: | |
'': DefaultRoute | |
module.exports = new AppRouter | |
# example 2 | |
module.exports = new Mn.AppRouter | |
appRoutes: |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script> |
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 App = new Marionette.Application({ | |
regions: { | |
'detail': '#detail' | |
} | |
}); | |
var doc1 = { | |
"_id": "123", | |
"type": "customer", | |
"datosGenerales": { |