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
require 'src/facebook.php'; | |
$facebook = new Facebook(array( | |
'appId' => 'app_ip', | |
'secret' => 'app_secret_id', | |
)); | |
$message = 'hello world'; | |
$user = $facebook->getUser(); | |
$token = $facebook->getAccessToken(); |
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 that = this; | |
this.HoteisColl.on('reset', function(response) { | |
var obj = _.first(response.toJSON()); | |
var searchId = obj.searchId; | |
var fileCod = obj.fileCod; | |
that.HoteisColl.options.fileCod = fileCod; | |
if(searchId) { | |
that.navigate('hoteis/'+searchId, {trigger: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
showHoteis: function() { | |
var that = this; | |
// Layout options | |
this.Navigation.select('hoteis'); | |
this.Section.render(); | |
this.Section.holdBackground(); | |
this.Section.changeHeadingContent('As nossas Sugestões'); | |
this.Section.startLoading(); | |
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
showEscapadinhaDetalhe: function(id, provider) { | |
Application.Views.Common.destroy(); | |
Application.Views.Common.startLoading(); | |
var item = Application.Collections.Escapadinhas.get(id); | |
Application.Views.Escapadinhas.Detalhe = new DetalheView({model:item}); | |
Application.Views.Escapadinhas.SideView = new SideView({model:Application.Collections.Escapadinhas, section:"escapadinhas", id:id}); | |
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
define([ | |
'jquery', | |
'underscore', | |
'backbone', | |
'router', | |
'collections/voos', | |
'collections/hoteis', | |
'collections/ferias', | |
'collections/escapadinhas', |
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
require.config({ | |
baseUrl: 'js', | |
shim: { | |
'jquery': { exports: '$' }, | |
backbone: { deps: ['jquery','underscore'], exports: 'Backbone' }, | |
underscore: { exports: '_' }, | |
'underscore-string': { deps: ['underscore'] } | |
}, | |
paths: { | |
jquery: 'vendor/jquery.min', |
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
dim = [19, 119]; // exemplo | |
var group, lastgroupsize; | |
_.each(dim, function(item, index) { | |
if(index == 0) { | |
lastgroupsize = item; | |
if(i < item) { | |
group = index; |
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
define([ | |
'underscore', | |
'backbone', | |
], function(_, Backbone){ | |
var ViagemModel = Backbone.Model.extend({ | |
idAttribute: 'id', | |
initialize: function() { | |
that.getDetalhes(); | |
}, |
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
// Filename: home.js | |
define(['jquery','underscore','backbone', 'text!tpl/home.html', 'text!tpl/start.html'], | |
function($, _, Backbone, homeTpl, startTpl) { | |
var HomeView = Backbone.View.extend({ | |
el: 'body', | |
special: true, | |
events: { | |
'click a.special': 'special', |
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
hoteis: function() { | |
App.CurrentView = 'hoteis'; | |
App.Collections.Hoteis.getDestaques(); | |
App.Collections.Hoteis.on('destaque', function(response) { | |
if(App.Views.Home && App.Views.Start) { | |
var home = App.Views.Home; | |
var start = App.Views.Start; | |
home.hide(); |
OlderNewer