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
| <% if current_user %> | |
| <h1><%= @count %> Albums</h1> | |
| </br> | |
| <% @album_ids.each do |id| %> | |
| <% album = FbGraph::Album.new(id, :access_token => current_user.fb_token) %> | |
| <h3 id="album"> <%= link_to "Album #{id}", "/albums/#{id}" %> </h3> | |
| <% end %> | |
| <% else %> | |
| <h1>You are not logged in!</h1> | |
| <% end %> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Airbrush</title> | |
| <link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
| <link href="/assets/addresses.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
| <link href="/assets/albums.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
| <link href="/assets/home.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
| <link href="/assets/photos.css?body=1" media="all" rel="stylesheet" type="text/css" /> |
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
| <%= form_for(@photo), :html => {:multipart => true} do |f| %> | |
| <% if @photo.errors.any? %> | |
| <div id="error_explanation"> | |
| <h2><%= pluralize(@photo.errors.count, "error") %> prohibited this photo from being saved:</h2> | |
| <ul> | |
| <% @photo.errors.full_messages.each do |msg| %> | |
| <li><%= msg %></li> | |
| <% end %> | |
| </ul> |
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
| alert("test" + <%= photo %>); |
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
| console.log("hi"); | |
| $("#dragndrop").html("<input type='hidden' id='<%= @photo.id %>' src='<%= @photo.image.url %>' value='Edit photo' onclick='return launchEditor('@photo.id', '<%= @photo.image.url %>');'' onmouseover='this.style.cursor='hand''/>"); | |
| launchEditor('<%= @photo.id %>', '<%= @photo.image.url %>'); |
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
| <html><head><script type="text/javascript" async="" src="http://www.google-analytics.com/ga.js"></script> | |
| <title>Airbrush</title> | |
| <link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css"> | |
| <link href="/assets/addresses.css?body=1" media="all" rel="stylesheet" type="text/css"> | |
| <link href="/assets/albums.css?body=1" media="all" rel="stylesheet" type="text/css"> | |
| <link href="/assets/home.css?body=1" media="all" rel="stylesheet" type="text/css"> | |
| <link href="/assets/photos.css?body=1" media="all" rel="stylesheet" type="text/css"> | |
| <link href="/assets/scaffolds.css?body=1" media="all" rel="stylesheet" type="text/css"> | |
| <link href="/assets/sessions.css?body=1" media="all" rel="stylesheet" type="text/css"> | |
| <link href="/assets/users.css?body=1" media="all" rel="stylesheet" type="text/css"> |
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
| $('h2 span#album_expand a').click(function() { | |
| var url=$(this).attr('href'); | |
| var id = url.split('/').pop(); | |
| $('div#'+id).load(url); | |
| return false; | |
| }); //end click |
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
| def tagged | |
| if current_user | |
| @fb_user = FbGraph::User.me(current_user.fb_token) | |
| @photos_of_you = @fb_user.photos({"limit" => "0"}) | |
| @count = @photos_of_you.count | |
| end | |
| render :layout => false | |
| end |
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
| def aviarycreate | |
| @photo = Photo.new | |
| @photo.user_id = current_user.id | |
| @photo.remote_image_url = params[:url] | |
| @photo.save | |
| respond_to do |format| | |
| format.json { render json: @photo } | |
| end | |
| end |
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
| success: function(msg) { | |
| console.log(msg); | |
| var id = msg.id; | |
| $('#share').html('<%= link_to "Share", share_path() %>'); | |
| //console.log(msg.image); | |
| //console.log(msg.image.url) | |
| } |
OlderNewer