Permalink
Browse files

Work on error messages for missing users search by fbid. Add bg to th…

…e modal
  • Loading branch information...
1 parent 814bb25 commit 61e76e97c503e560681fb395c674030508446509 Alan Garcia committed Feb 23, 2012
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -31,14 +31,16 @@ function submitMedia(city_code,mediatype){
if( mediatype=="video") uploadtype="?video=accept";
$('#swf_div')[0].pauseSwf();
var src = "http://"+request_HTTP_HOST+"/cities/"+city_code.split('-')[1]+"/pictures/new"+uploadtype;
- $.modal('<iframe src="' + src + '" height="340" width="390" style="border:0">', {
- closeHTML:"",
+ $.modal('<iframe src="' + src + '" height="350" width="420" style="border:0">', {
+ closeHTML:"close",
containerCss:{
- backgroundColor:"fff",
+ background:"url(/assets/upload-modal-global.png) transparent",
width: 420,
height:360,
- padding:0
+ paddingTop: 15,
+ paddingBottom: 5
},
+
overlayClose:true,
onOpen: function(dialog){
console.log('DIALOG');
@@ -1,4 +1,9 @@
class UsersController < ApplicationController
+ rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found
+
+ def record_not_found(exception=nil)
+ render :xml => { :message => exception.message, :status => 404 }
+ end
# GET /users
# GET /users.json
def index
@@ -27,7 +32,13 @@ def show
# GET /users/1/fbuser.json
# GET /users/1/fbuser.xml
def fbuser
- @user = User.find_by_fbid(params[:id])
+ @user = User.find_by_fbid!(params[:id])
+
+ logger.debug('not found')
+ logger.debug( @user.inspect )
+ if( @user.nil? )
+ logger.debug('error')
+ end
respond_to do |format|
format.html # show.html.erb
@@ -12,7 +12,7 @@
var mosaic_fb_share = false;
</script>
</head>
- <body>
+ <body <%= "class='page_picture_upload'" unless (params[:action]!="new" && params[:controller]!="pictures") %>>
<div id="fb-root"></div>
<script>
@@ -1,9 +1,12 @@
body{
- background-color: #00aeef;
+ background-color: #daebf5;
font-family:Verdana,Helvetica,Arial;
font-size:14px;
margin: 0px;
}
+body.page_picture_upload{
+ background-color: #00aeef;
+}
a img{border:none;}
a{color:#0000FF;}

0 comments on commit 61e76e9

Please sign in to comment.