Permalink
Browse files

Strip Beta Features

  • Loading branch information...
1 parent 5372e86 commit 49ea8c856342ec9e6085a7c5915b6e97e1b8627c @DeadSuperHero DeadSuperHero committed Sep 1, 2012
Showing with 14 additions and 3,044 deletions.
  1. +0 −154 app/assets/javascripts/app/pages/framer.js
  2. +0 −128 app/assets/javascripts/app/pages/profile.js
  3. +0 −73 app/assets/javascripts/app/pages/stream.js
  4. +0 −70 app/assets/javascripts/app/views/canvas_view.js
  5. +0 −36 app/assets/stylesheets/new-templates.css.scss
  6. +0 −62 app/assets/stylesheets/new_styles/_animations.scss
  7. +0 −327 app/assets/stylesheets/new_styles/_base.scss
  8. +0 −485 app/assets/stylesheets/new_styles/_canvas.scss
  9. +0 −259 app/assets/stylesheets/new_styles/_composer.scss
  10. +0 −13 app/assets/stylesheets/new_styles/_flash_messages.scss
  11. +0 −112 app/assets/stylesheets/new_styles/_forms.scss
  12. +0 −339 app/assets/stylesheets/new_styles/_interactions.scss
  13. +0 −64 app/assets/stylesheets/new_styles/_isotope_transitions.scss
  14. +0 −113 app/assets/stylesheets/new_styles/_landing.scss
  15. +0 −28 app/assets/stylesheets/new_styles/_login.scss
  16. +0 −86 app/assets/stylesheets/new_styles/_new_mixins.scss
  17. 0 app/assets/stylesheets/new_styles/_other.scss
  18. +0 −245 app/assets/stylesheets/new_styles/_profile.scss
  19. +0 −42 app/assets/stylesheets/new_styles/_registration.scss
  20. +0 −52 app/assets/stylesheets/new_styles/_spinner.scss
  21. +0 −27 app/assets/stylesheets/new_styles/_typography.scss
  22. +0 −22 app/assets/stylesheets/new_styles/_variables.scss
  23. +0 −71 app/assets/stylesheets/new_styles/_viewer_nav.scss
  24. +0 −3 app/controllers/home_controller.rb
  25. +0 −10 app/controllers/people_controller.rb
  26. +1 −1 app/controllers/posts_controller.rb
  27. +0 −24 app/controllers/profiles_controller.rb
  28. +0 −5 app/controllers/streams_controller.rb
  29. +0 −28 app/models/feature_flagger.rb
  30. +0 −1 app/presenters/person_presenter.rb
  31. +0 −5 app/presenters/user_presenter.rb
  32. +0 −30 app/uploaders/wallpaper_uploader.rb
  33. +7 −0 db/migrate/20120909053122_remove_wallpaper_from_profile.rb
  34. +6 −4 db/schema.rb
  35. +0 −22 features/new_hotness/new_stream.feature
  36. +0 −15 features/new_hotness/post_viewer.feature
  37. +0 −88 features/new_hotness/trumpeter.feature
@@ -1,154 +0,0 @@
-//= require ../views/post/small_frame
-
-app.pages.Framer = app.views.Base.extend({
- templateName : "flow",
-
- id : "post-content",
-
- subviews : {
- ".flow-content" : "framerContent",
- ".flow-controls .controls" : "framerControls"
- },
-
- initialize : function(){
- this.model = app.frame
- if(!this.model.get("frame_name")) this.model.setFrameName()
-
- this.model.authorIsCurrentUser = function(){ return true }
- this.model.bind("sync", this.navigateNext, this)
-
- this.framerContent = new app.views.framerContent({model : this.model})
- this.framerControls = new app.views.framerControls({model : this.model})
- },
-
- unbind : function(){
- this.model.off()
- },
-
- navigateNext : function(){
- if(parent.location.pathname == '/new_bookmarklet') {
- this.bookmarkletNavigation()
- } else {
- this.defaultNavigation()
- }
- },
-
- bookmarkletNavigation : function() {
- parent.close()
- },
-
- defaultNavigation : function() {
- var url = app.currentUser.expProfileUrl()
- app.router.navigate(url, {trigger: true, replace: true})
- }
-});
-
-app.views.framerContent = app.views.Base.extend({
- templateName : "framer-content",
-
- events : {
- "change input" : "setFormAttrs"
- },
-
- subviews : {
- ".preview" : "smallFrameView",
- ".template-picker" : 'templatePicker'
- },
-
- formAttrs : {
- "input.mood:checked" : "frame_name"
- },
-
- initialize : function(){
- this.model.bind("change:frame_name", this.render, this)
- },
-
- smallFrameView : function() {
- return new app.views.Post.EditableSmallFrame({model : this.model})
- },
-
- presenter : function() {
- var selectedFrame = this.model.get("frame_name")
- , templates = this.model.applicableTemplates(); //new app.models.Post.TemplatePicker(this.model).frameMoods;
-
- return _.extend(this.defaultPresenter(), {
- templates : _.map(templates, function(template) {
- return {
- name : template,
- checked : selectedFrame === template
- }
- })
- })
- }
-});
-
-app.views.Post.EditableSmallFrame = app.views.Post.SmallFrame.extend({
- className : "canvas-frame editable",
-
- events : {
- "keyup [contentEditable]" : "setFormAttrs"
- },
-
- formAttrs : {
- ".text-content p" : "text"
- },
-
- postRenderTemplate : function(){
- this.$(".text-content p").attr("contentEditable", true)
- }
-});
-
-app.views.framerControls = app.views.Base.extend({
- templateName : 'framer-controls',
-
- events : {
- "click input.done" : "saveFrame",
- "click input.back" : "editFrame",
- "change input" : "setFormAttrs"
- },
-
- subviews:{
- ".aspect-selector" : "aspectsDropdown",
- ".service-selector" : "servicesSelector"
- },
-
- formAttrs : {
- "input.aspect_ids" : "aspect_ids[]",
- "input.services" : "services[]"
- },
-
- initialize : function(){
- this.aspectsDropdown = new app.views.AspectsDropdown({model:this.model});
- this.servicesSelector = new app.views.ServicesSelector({model:this.model});
- },
-
- saveFrame : function(){
- this.setFormAttrs()
- if(this.inValidFrame()) {
- return false;
- }
- this.$('input').prop('disabled', 'disabled')
- this.model.save()
-
- this.trackPost()
- },
-
- trackPost : function() {
- var model = this.model
-
- app.instrument("track", "Posted", {
- text : model.hasText(),
- photos : model.hasPhotos(),
- template : model.get("frame_name")
- })
- },
-
- inValidFrame : function(){
- return (this.model.get('text').trim().length == 0) && (this.model.get('photos').length == 0)
- },
-
- editFrame : function(){
- app.router.renderPage(function(){return new app.pages.Composer({model : app.frame})})
- app.router.navigate("/posts/new")
- }
-});
@@ -1,128 +0,0 @@
-//= require ../views/profile_info_view
-
-app.pages.Profile = app.views.Base.extend({
- templateName : "profile",
- id : "profile",
-
- subviews : {
- "#profile-info" : "profileInfo",
- "#canvas" : "canvasView",
- "#wallpaper-upload" : "wallpaperForm",
- "#composer" : "composerView"
- },
-
- events : {
- "click #edit-mode-toggle" : "toggleEdit",
- "click #logout-button" : "logOutConfirm",
- "click #composer-button" : "showComposer"
- },
-
- tooltipSelector : "*[rel=tooltip]",
-
- personGUID : null,
- editMode : false,
- composeMode : false,
-
- initialize : function(options) {
- this.personGUID = options.personId
-
- this.model = this.model || app.models.Profile.preloadOrFetch(this.personGUID)
- this.stream = options && options.stream || new app.models.Stream()
- this.stream.preloadOrFetch()
-
- this.initViews()
-
- /* binds */
- this.stream.items.bind("remove", this.pulsateNewPostControl, this)
- $(window).on("keydown", _.bind(this.closeComposer, this))
- },
-
- initViews : function(){
- this.canvasView = new app.views.Canvas({ model : this.stream })
- this.wallpaperForm = new app.forms.Wallpaper()
- this.profileInfo = new app.views.ProfileInfo({ model : this.model })
- this.composerView = new app.pages.Composer();
- },
-
- render :function () {
- var self = this;
- this.model.deferred
- .done(function () {
- self.setPageTitleAndBackground()
- app.views.Base.prototype.render.call(self)
- })
- .done(function () {
- self.stream.deferred.done(_.bind(self.pulsateNewPostControl, self));
- })
-
- return self
- },
-
- presenter : function(){
- var bio = this.model.get("bio") || ''
-
- return _.extend(this.defaultPresenter(),
- {text : this.model && app.helpers.textFormatter(bio, this.model) })
- },
-
- pulsateNewPostControl : function() {
- this.$("#composer-button")[
- this.stream.items.length == 0
- ? 'addClass'
- : 'removeClass'
- ]("pulse")
- },
-
- setPageTitleAndBackground : function() {
- console.log(this.model.attributes)
- if(this.model.get("name")) {
- document.title = this.model.get("name")
- this.$el.css("background-image", "url(" + this.model.get("wallpaper") + ")")
- }
- },
-
- toggleEdit : function(evt) {
- if(evt) { evt.preventDefault() }
- this.editMode = !this.editMode
- this.$el.toggleClass("edit-mode")
- },
-
- showComposer : function(evt) {
- if(evt) { evt.preventDefault() }
-
- this.toggleComposer()
- this.$("#post_text").focus()
-
- app.router.navigate("/posts/new")
- },
-
- closeComposer : function(evt) {
- if(!evt) { return }
-
- if(this.composeMode && evt.keyCode == 27) {
- this.toggleComposer()
- evt.preventDefault()
-
- // we should check for text and fire a warning prompt before exiting & clear the form
- app.router.navigate(app.currentUser.expProfileUrl(), {replace : true})
- }
- },
-
- toggleComposer : function(){
- this.composeMode = !this.composeMode
- $("body").toggleClass("lock")
-
- if(!this.composeMode) {
- this.$("#composer").toggleClass("zoom-out")
- setTimeout('this.$("#composer").toggleClass("hidden").toggleClass("zoom-out")', 200)
- } else {
- this.$("#composer").toggleClass("hidden")
- }
- this.$("#composer").toggleClass("zoom-in")
- },
-
- logOutConfirm : function(evt) {
- if(!confirm("Are you sure you want to log out?"))
- evt.preventDefault();
- },
-});
@@ -1,73 +0,0 @@
-app.pages.Stream = app.views.Base.extend({
- templateName : "stream",
-
- events : {
- 'activate .stream-frame-wrapper' : 'triggerInteractionLoad'
- },
-
- subviews : {
- "#stream-content" : "streamView",
- "#stream-interactions" : "interactionsView"
- },
-
- initialize : function(){
- this.stream = this.model = new app.models.Stream()
- this.stream.preloadOrFetch()
-
- this.streamView = new app.pages.Stream.InfiniteScrollView({ model : this.stream })
- this.interactionsView = new app.views.StreamInteractions()
-
- this.streamView.on('loadMore', this.updateUrlState, this);
- this.stream.on("fetched", this.refreshScrollSpy, this)
- this.stream.on("frame:interacted", this.selectFrame, this)
- },
-
- postRenderTemplate : function() {
- this.$("#header").css("background-image", "url(" + app.currentUser.get("wallpaper") + ")")
- _.defer(function(){$('body').scrollspy({target : '.stream-frame-wrapper', offset : 205})})
- },
-
- selectFrame : function(post){
- if(this.selectedPost == post) { return }
- this.selectedPost = post
-
- this.$(".stream-frame-wrapper").removeClass("selected-frame")
- this.$(".stream-frame-wrapper[data-id=" + this.selectedPost.id +"]").addClass("selected-frame")
- this.interactionsView.setInteractions(this.selectedPost)
- },
-
- updateUrlState : function(){
- var post = this.stream.items.last();
- if(post){
- this.navigateToPost(post)
- }
- },
-
- navigateToPost : function(post){
- app.router.navigate(location.pathname + "?ex=true&max_time=" + post.createdAt(), {replace: true})
- },
-
- triggerInteractionLoad : function(evt){
- this._throttledInteractions = this._throttledInteractions || _.bind(_.throttle(function(id){
- this.selectFrame(this.stream.items.get(id))
- }, 500), this)
-
- this._throttledInteractions($(evt.target).data("id"))
- },
-
- refreshScrollSpy : function(){
- _.defer($('body').scrollspy('refresh'))
- }
-},
-
-//static methods
-{
- InfiniteScrollView : app.views.InfScroll.extend({
- initialize: function(){
- this.stream = this.model
- this.collection = this.stream.items
- this.postClass = app.views.Post.StreamFrame
- this.setupInfiniteScroll()
- }
- })
-});
Oops, something went wrong.

0 comments on commit 49ea8c8

Please sign in to comment.