-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
10,867 additions
and
99 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* line 1, ../../app/styles/main.scss */ | ||
#carousel { | ||
height: 680px; | ||
background: black; | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/*global define*/ | ||
|
||
define([ | ||
'underscore', | ||
'backbone', | ||
], function (_, Backbone) { | ||
'use strict'; | ||
|
||
var CommentModel = Backbone.Model.extend({ | ||
defaults:{ | ||
} | ||
}); | ||
|
||
return CommentModel; | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/*global define*/ | ||
|
||
define([ | ||
'underscore', | ||
'backbone', | ||
'models/comments-model' | ||
], function (_, Backbone, CommentsModel) { | ||
'use strict'; | ||
|
||
var CommentsCollection = Backbone.Collection.extend({ | ||
model: CommentsModel | ||
}); | ||
|
||
return CommentsCollection; | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/*global require*/ | ||
'use strict'; | ||
|
||
require.config({ | ||
deps: ['main'], | ||
paths: { | ||
'jquery': '../components/jquery/jquery', | ||
'underscore': '../components/underscore-amd/underscore', | ||
'backbone': '../components/backbone-amd/backbone', | ||
'backbone.wreqr': '../components/backbone.wreqr/lib/amd/backbone.wreqr', | ||
'backbone.eventbinder': '../components/backbone.eventbinder/lib/amd/backbone.eventbinder', | ||
'backbone.babysitter': '../components/backbone.babysitter/lib/amd/backbone.babysitter', | ||
'marionette': '../components/marionette/lib/core/amd/backbone.marionette', | ||
'backbone-sharepoint': 'vendor/backbone-sharepoint.odata-amd', | ||
'bootstrap': 'vendor/bootstrap', | ||
'galleria': '../components/jquery-galleria/src/galleria' | ||
}, | ||
shim: { | ||
'underscore': { | ||
exports: '_' | ||
}, | ||
'bootstrap': { | ||
deps: ['jquery'], | ||
exports: 'jquery' | ||
}, | ||
'galleria': { | ||
deps: ['jquery'], | ||
exports: 'jquery' | ||
} | ||
} | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/*global define*/ | ||
|
||
define([ | ||
'jquery', | ||
'marionette', | ||
'gallery/slides-collection', | ||
'gallery/gallery-view', | ||
'backbone-sharepoint' | ||
], function ($, Marionette, SlidesCollection, GalleryView) { | ||
'use strict'; | ||
var Gallery = Marionette.Layout.extend({ | ||
template: "#gallery-template", | ||
|
||
regions: { | ||
carousel: "#carousel" | ||
}, | ||
loading: new $.Deferred(), | ||
onRender: function() { | ||
var self = this; | ||
this.slides = new SlidesCollection(); | ||
|
||
this.galleria = new GalleryView({ | ||
collection: this.slides | ||
}); | ||
this.galleria.loading.done(function() { | ||
self.loading.resolve(); | ||
}); | ||
// pass the event up the from the view to the layout | ||
this.galleria.on('slideChange', function(slideIndex){ | ||
var slide = self.slides.get(slideIndex + 1); | ||
self.trigger('slideChange', slide); | ||
}); | ||
|
||
this.carousel.show(this.galleria); | ||
} | ||
}); | ||
|
||
return Gallery; | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/*global define*/ | ||
|
||
require([ | ||
'marionette' | ||
], function (Marionette) { | ||
var GalleryRouter = Marionette.AppRouter.extend({ | ||
appRoutes : { | ||
'': 'gotoStart', | ||
'photo/:slug': 'gotoPhoto' | ||
} | ||
}); | ||
|
||
return GalleryRouter; | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/*global define*/ | ||
|
||
define([ | ||
'jquery', | ||
'underscore', | ||
'backbone', | ||
'marionette', | ||
'gallery/slide-view', | ||
'galleria' | ||
], function ($, _, Backbone, Marionette, SlideView) { | ||
'use strict'; | ||
|
||
_.templateSettings = { | ||
evaluate : /\{\[([\s\S]+?)\]\}/g, | ||
interpolate : /\{\{([\s\S]+?)\}\}/g | ||
}; | ||
|
||
var GalleryView = Marionette.CollectionView.extend({ | ||
itemView: SlideView, | ||
loading: new $.Deferred(), | ||
initialize: function(galleryView) { | ||
this.collection.fetch({ | ||
orderby: 'Name asc' | ||
}) | ||
.done(_.bind(this.initGal, this, galleryView)); | ||
}, | ||
initGal: function() { | ||
var self = this; | ||
// needed to give Galleria a target | ||
self.$el.attr('id', 'images'); | ||
|
||
Galleria.loadTheme('scripts/vendor/galleria-theme/galleria.classic.js'); | ||
Galleria.run('#carousel', { dataSource: '#images' }); | ||
Galleria.on('loadstart', function(e) { | ||
var galleria = this | ||
self.trigger('slideChange', galleria.getIndex()); | ||
}); | ||
Galleria.ready(function() { | ||
// delay until after first image | ||
_.defer(function(){ | ||
self.loading.resolve(); | ||
}); | ||
}); | ||
} | ||
}); | ||
|
||
return GalleryView; | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*global define*/ | ||
|
||
define([ | ||
'backbone', | ||
'gallery/utils', | ||
'backbone-sharepoint' | ||
], function (Backbone, utils) { | ||
'use strict'; | ||
|
||
var SlideModel = Backbone.SP.Item.extend({ | ||
initialize: function() { | ||
var pic = this.attributes; | ||
var name = pic.Name.substring(0, pic.Name.lastIndexOf('.')); | ||
|
||
this.set({ | ||
src: pic.__metadata.media_src, | ||
slug: utils.string_to_slug(name), | ||
alt: pic.Title, | ||
width: pic.PictureWidth, | ||
height: pic.PictureHeight, | ||
thumb: pic.Path + utils.thumbFromName(pic.Name) | ||
}); | ||
} | ||
}); | ||
|
||
return SlideModel; | ||
}); |
Oops, something went wrong.