Skip to content
Browse files

Merge branch 'master' of github.com:risingsun/maass2

  • Loading branch information...
2 parents 8bd2f71 + 04df005 commit 94b9f24c11ae9059078f41ccd8d486cc8e9045d8 @Kirtiparihar24 Kirtiparihar24 committed May 19, 2011
View
4 app/controllers/admin/events_controller.rb
@@ -1,13 +1,11 @@
class Admin::EventsController < ApplicationController
- load_and_authorize_resource :except=> [:show, :rsvp, :event_members]
+ load_and_authorize_resource :except=> [:rsvp, :event_members]
before_filter :load_event, :except => [:index, :new, :create]
respond_to :html, :json, :only =>[:rsvp]
- layout "application"
-
def index
@events = Event.all
if @events.blank?
View
5 app/controllers/admin/home_controller.rb
@@ -9,9 +9,6 @@ class Admin::HomeController < ApplicationController
def index
end
- def admin
- end
-
def blogs
@blogs = @profile.sent_blogs
end
@@ -36,7 +33,7 @@ def send_blog
end
def google_map_locations
- profiles = Profile.active.all.select{|f|f.can_see_field('marker',@p)}
+ profiles = @p.friends_on_google_map()
@friends = profiles.select{|p| p.marker}
end
View
13 app/controllers/albums_controller.rb
@@ -2,7 +2,6 @@ class AlbumsController < ApplicationController
layout "admin"
-
load_and_authorize_resource
before_filter :load_album, :only => [:edit, :update, :show, :destroy, :upload_photo]
@@ -48,17 +47,7 @@ def facebook_album
end
def facebook_album_photos
- @a = Photo.get_photosets(current_user)
- @a.each do |a|
- @al= a if a.name.eql?(params[:name])
- end
- @album = @p.albums.new(:name => @al.name)
- @album.save
- @al.photos.count.times do |c|
- a=@album.photos.build()
- a.photo_from_url(@al.photos[c].source)
- a.save
- end
+ @album = Album.create_facebook_photos_album(current_user,params[:name])
redirect_to album_path(@album)
end
View
1 app/controllers/blogs_controller.rb
@@ -13,6 +13,7 @@ def index
end
def show
+ debugger
@blog = Blog.find(params[:id])
end
View
22 app/controllers/messages_controller.rb
@@ -1,12 +1,17 @@
class MessagesController < ApplicationController
- load_and_authorize_resource :except=> :new
-
before_filter :load_profile
before_filter :load_message, :only => [:show, :destroy, :reply_message]
+ load_and_authorize_resource :except=> :new
+
def index
- @messages = @profile.received_messages.all.paginate(:per_page => BLOGS_PER_PAGE, :page => params[:page])
+ if @profile == @p
+ @messages = @profile.received_messages.all.paginate(:per_page => BLOGS_PER_PAGE, :page => params[:page])
+ else
+ flash[:error] = 'It looks like you don\'t have permission to view that page.'
+ redirect_to root_url
+ end
end
def new
@@ -42,7 +47,7 @@ def destroy
end
def delete_messages
- if !params[:check].blank?
+ unless params[:check].blank?
params[:check].each do |ch|
message = Message.find(ch)
message.delete_message(@p)
@@ -57,8 +62,13 @@ def reply_message
end
def sent_messages
- @messages = @profile.sent_messages.all.paginate(:per_page => BLOGS_PER_PAGE, :page => params[:page])
- render 'messages/index'
+ if @profile == @p
+ @messages = @profile.sent_messages.all.paginate(:per_page => BLOGS_PER_PAGE, :page => params[:page])
+ render 'messages/index'
+ else
+ flash[:error] = 'It looks like you don\'t have permission to view that page.'
+ redirect_to root_url
+ end
end
private
View
3 app/controllers/polls_controller.rb
@@ -1,6 +1,6 @@
class PollsController < ApplicationController
- before_filter :load_profile, :except=>[:create]
+ before_filter :load_profile
before_filter :load_resource, :except=>[:index, :show, :edit]
load_and_authorize_resource
@@ -74,7 +74,6 @@ def load_profile
end
def load_resource
- @profile= current_user.profile
unless params[:id].blank?
@poll = @profile.polls.find(params[:id])
else
View
13 app/controllers/profiles_controller.rb
@@ -5,15 +5,10 @@ class ProfilesController < ApplicationController
before_filter :load_profile, :only => [:create, :edit, :update, :edit_account, :show, :user_friends, :active_user]
respond_to :html, :json, :only =>[:active_user]
- def index
- if @is_admin
- @profiles = Profile.all.paginate(:page => params[:page], :per_page => PROFILE_PER_PAGE)
- @title = "Users"
- render :layout => "admin"
- else
- flash[:error] = 'It looks like you don\'t have permission to view that page.'
- redirect_to root_url
- end
+ def index
+ @profiles = Profile.all.paginate(:page => params[:page], :per_page => PROFILE_PER_PAGE)
+ @title = "Users"
+ render :layout => "admin"
end
def edit
View
27 app/models/ability.rb
@@ -8,13 +8,13 @@ def initialize(user)
if user.role.eql?('admin')
- can [:index, :create, :edit, :update], Nomination do |nomination|
+ can [:index, :create, :edit, :update], Nomination do |nomination|
nomination.try(:profile) == user.profile
end
can :read, [Profile, Blog, Poll]
- can :active_user, [Profile]
-
+ can :active_user, [Profile]
+
can [:update, :edit_account, :user_friends, :update_email], Profile do |profile|
profile.try(:user) == user
end
@@ -27,16 +27,26 @@ def initialize(user)
poll.try(:profile) == user.profile
end
+ can [:create, :sent_messages], Message
+
+ can [:read, :destroy, :reply_message, :delete_messages], Message do |message|
+ message.try(:receiver) == user.profile || message.try(:sender) == user.profile
+ end
+
can :manage, ADMIN_ENTITIES
elsif user.role.eql?('user') && user.profile.is_active
+ can [:create, :sent_messages], Message
+
can [:create, :edit, :update], Nomination do |nomination|
nomination.try(:profile) == user.profile
end
- can :read, [Profile, Blog, Poll]
-
+ can :read, [Blog, Poll]
+ can :show, Profile
+ can :show, Event
+
can [:update, :edit_account, :user_friends, :update_email], Profile do |profile|
profile.try(:user) == user
end
@@ -48,8 +58,13 @@ def initialize(user)
can [:update, :create, :destroy, :poll_close], Poll do |poll|
poll.try(:profile) == user.profile
end
+
+ can [:create, :sent_messages], Message
+
+ can [:read, :destroy, :reply_message, :delete_messages], Message do |message|
+ message.try(:receiver) == user.profile || message.try(:sender) == user.profile
+ end
end
-
end
end
View
11 app/models/album.rb
@@ -1,6 +1,5 @@
class Album < ActiveRecord::Base
-
belongs_to :profile
has_many :photos, :dependent => :destroy
validates :name, :presence => true
@@ -10,4 +9,14 @@ def self.check_album(name)
find_by_name(name)
end
+ def self.create_facebook_photos_album(user,name)
+ f_album = Photo.get_photosets(user, name)
+ @album = user.albums.create(:name => f_album.name)
+ f_album.photos.count.times do |c|
+ a = @album.photos.build()
+ a.photo_from_url(@al.photos[c].source).create()
+ end
+ return @album
+ end
+
end
View
41 app/models/ar_notifier.rb
@@ -6,90 +6,75 @@ class ArNotifier < ActionMailer::Base
def sent_news(blog,profile)
@blog=blog
@profile=profile
- mail(:to=> @profile.user.email,
- :subject=> "[#{SITE_NAME} News] #{@blog.title} by #{@blog.sent_by}")
+ mail(:to=> @profile.user.email, :subject=> "[#{SITE_NAME} News] #{@blog.title} by #{@blog.sent_by}")
end
def send_event_mail(profile,event)
@event=event
@profile=profile
- mail(:to=> @profile.user.email,
- :subject=> "[#{SITE_NAME} Events] Latest event")
+ mail(:to=> @profile.user.email, :subject=> "[#{SITE_NAME} Events] Latest event")
end
def message_send(message,p)
@message = message
@p = p
- mail(:to=> @message.receiver.user.email,
- :subject=> "[#{SITE_NAME} Message] #{@p.full_name} sent you a message : #{@message.subject}")
+ mail(:to=> @message.receiver.user.email, :subject=> "[#{SITE_NAME} Message] #{@p.full_name} sent you a message : #{@message.subject}")
end
def comment_send_on_blog(comment,profile,p)
@comment=comment
@p=p
- mail(:to=> profile.user.email,
- :subject=> "[#{SITE_NAME} Blog] #{@p.full_name} wrote on your blog")
+ mail(:to=> profile.user.email, :subject=> "[#{SITE_NAME} Blog] #{@p.full_name} wrote on your blog")
end
def comment_send_on_blog_to_others(comment,profile,p,blog_profile)
@comment=comment
- mail(:to=> profile.user.email,
- :subject=> "[#{SITE_NAME} Blog] #{@comment.profile.full_name} wrote on #{blog_profile.full_name} blog")
+ mail(:to=> profile.user.email, :subject=> "[#{SITE_NAME} Blog] #{@comment.profile.full_name} wrote on #{blog_profile.full_name} blog")
end
def comment_send_on_profile(comment,profile,p)
@comment=comment
@p=p
- mail(:to=> profile.user.email,
- :subject=> "[#{SITE_NAME} Wall] #{@p.full_name} wrote on your wall")
+ mail(:to=> profile.user.email, :subject=> "[#{SITE_NAME} Wall] #{@p.full_name} wrote on your wall")
end
def feedback_mail(feedback,rec_profile)
@feedback=feedback
@name = feedback.profile ? feedback.profile.full_name : feedback.name
@email = feedback.profile ? feedback.profile.user.email : feedback.email
- mail(:to=> rec_profile,
- :cc => rec_profile,
- :subject => "[#{SITE_NAME} Feedback] #{@feedback.subject}")
+ mail(:to=> rec_profile, :cc => rec_profile, :subject => "[#{SITE_NAME} Feedback] #{@feedback.subject}")
end
def follow(inviter, invited, description)
@inviter=inviter
@description=description
- mail(:to=> invited.user.email,
- :subject=> "[#{SITE_NAME} Notice] #{@inviter.full_name} is now following you")
+ mail(:to=> invited.user.email, :subject=> "[#{SITE_NAME} Notice] #{@inviter.full_name} is now following you")
end
def delete_friend(user,friend)
@user=user
- mail(:to=> friend.user.email,
- :subject=> "[#{SITE_NAME} Notice] Delete friend notice")
+ mail(:to=> friend.user.email, :subject=> "[#{SITE_NAME} Notice] Delete friend notice")
end
def user_status(profile)
@profile=profile
- mail(:to=> @profile.user.email,
- :subject=> "[#{SITE_NAME} Notice] New status change")
+ mail(:to=> @profile.user.email, :subject=> "[#{SITE_NAME} Notice] New status change")
end
def invite(student)
@student=student
- mail(:to=> @student.emails,
- :subject=> "Hi #{@student.full_name}, Get back to the future with #{SITE_NAME} on http://#{SITE}")
+ mail(:to=> @student.emails, :subject=> "Hi #{@student.full_name}, Get back to the future with #{SITE_NAME} on http://#{SITE}")
end
def invite_batchmates(invitation)
@inviter= invitation.profile
- mail(:to=> invitation.email,
- :subject=> "[#{SITE_NAME} Invitation] Your batch mates are looking for you!")
+ mail(:to=> invitation.email, :subject=> "[#{SITE_NAME} Invitation] Your batch mates are looking for you!")
end
def nomination_mail(nomination,rec_profile)
@nomination=nomination
@name = @nomination.profile.full_name
- mail(:to=> rec_profile,
- :cc=> rec_profile,
- :subject=> "[#{SITE_NAME} Nomination] #{@nomination.profile.full_name} (#{@nomination.profile.group})")
+ mail(:to=> rec_profile, :cc=> rec_profile, :subject=> "[#{SITE_NAME} Nomination] #{@nomination.profile.full_name} (#{@nomination.profile.group})")
end
end
View
6 app/models/event.rb
@@ -16,11 +16,11 @@ class Event < ActiveRecord::Base
accepts_nested_attributes_for :marker
def role_of_user(profile)
- profile_events.where(:profile_id=>profile).first
+ profile_events.where(:profile_id => profile).first
end
def set_organizer(profile)
- profile_events.create(:profile => profile, :role =>"Organizer")
+ profile_events.create(:profile => profile, :role => "Organizer")
end
def responded?(profile)
@@ -44,7 +44,7 @@ def set_role_of_user(profile, type)
unless pe
pe = profile_events.create(:profile => profile)
end
- pe.update_attribute('role',type)unless is_organizer?(profile)
+ pe.update_attribute('role',type) unless is_organizer?(profile)
return pe
end
end
View
2 app/models/feedback.rb
@@ -1,8 +1,8 @@
class Feedback < ActiveRecord::Base
- validates :name, :email, :message, :subject, :presence => true
belongs_to :profile
after_save :send_feedback_to_admin
+ validates :name, :email, :message, :subject, :presence => true
private
View
6 app/models/forum_topic.rb
@@ -1,10 +1,8 @@
class ForumTopic < ActiveRecord::Base
- validates :title, :presence => true, :length => { :maximum => 20 }
-
belongs_to :forum
belongs_to :owner, :class_name => "Profile"
-
has_many :posts, :class_name => "ForumPost", :foreign_key => "topic_id", :dependent => :destroy
-
+ validates :title, :presence => true, :length => { :maximum => 20 }
+
end
View
4 app/models/notification_control.rb
@@ -31,10 +31,10 @@ def parse_bit(value)
end
def check_email_notification?(type)
- self.send(type) == EMAIL_BIT || self.send(type) == ALL_NOTIFICATION
+ self.send(type).eql?(EMAIL_BIT) || self.send(type).eql?(ALL_NOTIFICATION)
end
def check_message_notification?(type)
- self.send(type) == INTERNAL_MESSAGE_BIT || self.send(type) == ALL_NOTIFICATION
+ self.send(type).eql?(INTERNAL_MESSAGE_BIT) || self.send(type).eql?(ALL_NOTIFICATION)
end
end
View
20 app/models/photo.rb
@@ -1,21 +1,27 @@
class Photo < ActiveRecord::Base
require "open-uri"
-
- validates_attachment_content_type :image, :content_type => ['image/jpeg', 'image/png', 'image/gif']
+
belongs_to :album
+ accepts_nested_attributes_for :album
attr_accessor :crop_x, :crop_y, :crop_w, :crop_h
- has_attached_file :image, :styles => {:thumbnail=>"100x100>", :original => "975x800>" }, :processors => [:cropper], :default_url => "/images/image_missing.png"
after_update :reprocess_avatar, :if => :cropping?
- accepts_nested_attributes_for :album
+ validates_attachment_content_type :image, :content_type => ['image/jpeg', 'image/png', 'image/gif']
+ has_attached_file :image, :styles => {:thumbnail=>"100x100>", :original => "975x800>" }, :processors => [:cropper], :default_url => "/images/image_missing.png"
def cropping?
!crop_x.blank? && !crop_y.blank? && !crop_w.blank? && !crop_h.blank?
end
- def self.get_photosets(user)
- auth= user.authentications.where(:provider => 'facebook').first
- return auth.blank? ? '' : FbGraph::User.fetch(auth.uid, :access_token => auth.access_token).albums
+ def self.get_photosets(user, name = '')
+ auth = user.check_authentication('facebook')
+ if !auth.blank?
+ if name.blank?
+ return FbGraph::User.fetch(auth.uid, :access_token => auth.access_token).albums
+ else
+ return FbGraph::User.fetch(auth.uid, :access_token => auth.access_token).albums.find{|a| a.name.eql?(name)}
+ end
+ end
end
def photo_from_url(url)
View
24 app/models/profile.rb
@@ -21,14 +21,14 @@ class Profile < ActiveRecord::Base
has_many :events, :through => :profile_events
has_many :profile_comments, :class_name => "Comment"
has_many :feedbacks
- has_one :notification_control
+ has_one :notification_control
has_many :polls, :dependent => :destroy
has_many :poll_responses, :dependent => :destroy
has_many :forum_posts, :foreign_key => 'owner_id', :dependent => :destroy
has_many :invitations
- has_one :student_check
+ has_one :student_check
has_many :sent_blogs, :class_name => 'Blog', :order => 'created_at desc', :conditions => "is_sent = #{false}"
- has_one :nomination
+ has_one :nomination
accepts_nested_attributes_for :notification_control
accepts_nested_attributes_for :blogs
@@ -182,7 +182,7 @@ def self.active_profiles
end
def female?
- gender.downcase == 'female'
+ gender.downcase.eql?('female')
end
def maiden_name
@@ -241,19 +241,19 @@ def self.admin_emails
def wants_email_notification?(type)
- notification_control &&
- (notification_control.send(type) == NotificationControl::EMAIL_BIT ||
- notification_control.send(type) == NotificationControl::ALL_NOTIFICATION )
+ notification_control && notification_control.check_email_notification?(type)
end
def wants_message_notification?(type)
- notification_control &&
- (notification_control.send(type) == NotificationControl::INTERNAL_MESSAGE_BIT ||
- notification_control.send(type) == NotificationControl::ALL_NOTIFICATION)
+ notification_control && notification_control.check_message_notification?(type)
end
- def friends_on_google_map(profile)
- all_friends.select {|p| p.can_see_field('marker', profile) && p.marker}
+ def friends_on_google_map(profile = nil)
+ if user.is_admin
+ active.all.select {|p| p.can_see_field('marker', self) && p.marker}
+ else
+ all_friends.select {|p| p.can_see_field('marker', profile) && p.marker}
+ end
end
def spouse_name
View
2 app/models/profile_event.rb
@@ -2,6 +2,6 @@ class ProfileEvent < ActiveRecord::Base
belongs_to :profile
belongs_to :event
- #validates :role, :profile, :event, :presence => true
+ validates :role, :profile, :event, :presence => true
end
View
2 app/models/site_content.rb
@@ -9,7 +9,7 @@ def self.get_content(name,child = "")
if c && !child.blank?
c = c.children.find_by_name(child)
end
- return c.content
+ return c.content if c
end
end
View
24 app/models/user.rb
@@ -3,6 +3,11 @@ class User < ActiveRecord::Base
ROLES = ['admin', 'user']
include Humanizer
+ require_human_on :create
+ has_one :profile
+ has_many :authentications
+ before_save :require_references
+ after_create :set_role
devise :database_authenticatable, :registerable, :confirmable,
:recoverable, :rememberable, :trackable, :validatable
attr_accessible :email, :password, :password_confirmation, :remember_me, :login,
@@ -11,23 +16,18 @@ class User < ActiveRecord::Base
:third_referral_person_name,:third_referral_person_year,
:additional_message, :profile_attributes, :terms_of_service, :role,
:humanizer_answer, :humanizer_question_id
-
- require_human_on :create
- before_save :require_references
- after_create :set_role
-
+
validates :login, :presence => true,
- :length => {:within => 3..25},
- :uniqueness => true, :format=> {:with => /^\w+$/i, :message=>"can only contain letters and numbers."}
+ :length => {:within => 3..25},
+ :uniqueness => true,
+ :format=> {:with => /^\w+$/i, :message=>"can only contain letters and numbers."}
validates_acceptance_of :terms_of_service, :message => "Must be accepted"
validates :requested_new_email, :format=> {:with => /^([^@\s]{1}+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message=>'does not look like an email address.', :if => proc {|obj| !obj.requested_new_email.blank?}}
- has_one :profile
- has_many :authentications
accepts_nested_attributes_for :profile
def set_role
- if User.all.size==0
+ if User.all.blank?
self.role = 'admin'
else
self.role = 'user'
@@ -36,7 +36,7 @@ def set_role
end
def is_admin?
- self.admin == true
+ self.admin
end
def generate_confirmation_hash!(secret_word= "pimpim")
@@ -57,7 +57,7 @@ def request_email_change!(new_email)
end
def check_authentication(type)
- self.authentications.where(:provider => type)
+ authentications.where(:provider => type).first
end
def match_details
View
9 app/views/homes/index.html.haml
@@ -24,10 +24,11 @@
= raw image_tag(photo.image.url, :class => "image_on_blurb")
%span.widget_lrg_btm
- if @p
- - if @nomination.new_record?
- = render 'nominations/form', :nomination => @nomination
- - else
- = render 'nominations/show', :nomination => @nomination
+ - unless DISABLE_NOMINATION_FORM
+ - if @nomination.new_record?
+ = render 'nominations/form', :nomination => @nomination
+ - else
+ = render 'nominations/show', :nomination => @nomination
- unless @home_data.blank?
- @home_data.each do|d|
- if d.class.name == 'Event'
View
4 app/views/photos/_album_photo.html.haml
@@ -10,4 +10,6 @@
%button.buttons.ui-icon-cancel.ui-button.ui-widget.ui-state-default.ui-corner-all.ui-button-text-icon-primary.ui-button-icon-only{:role=>"button", :title=>"Delete"}
%span{:class=>"ui-button-icon-primary ui-icon ui-icon-trash"}
%span{:class=>"ui-button-text"}
- Delete
+ Delete
+ %td{:class => 'spinner'}
+ = image_tag('spinner.gif')
View
3 app/views/photos/_form.html.haml
@@ -20,7 +20,6 @@
%button.buttons{:type => "submit"}
= image_tag("save.png")
%span.widget_complete_btm
- = image_tag('loader.gif', :class=>'hide_info spinner1')
.widget_complete
%span.widget_complete_top
%h3.blog_head.event_head_width
@@ -55,6 +54,8 @@
%td{:class=>"file_download_delete", :colspan=>"3"}
%button.buttons
Delete
+ %td{:class => 'spinner'}
+ = image_tag('spinner.gif')
= render 'album_photo' , :photos => @album.photos
%span.widget_complete_btm
:javascript
View
7 config/initializers/load_app_config.rb
@@ -7,9 +7,6 @@
SITE_FULL_NAME = THEME_CONFIG[:site_full_name]
SITE_NAME = THEME_CONFIG[:site_name]
SITE_DESC = THEME_CONFIG[:site_desc]
-GOOGLE_MAP_DEFAULT_LAT = THEME_CONFIG[:google_map_default_lat]
-GOOGLE_MAP_DEFAULT_LON = THEME_CONFIG[:google_map_default_lon]
-GOOGLE_MAP_DEFAULT_ZOOM = THEME_CONFIG[:google_map_default_zoom]
GOOGLE_CHART_COLOUR_ARRAY = %w(3CD983 C4D925 BABF1B BFA20F A66D03 732C02)
SEX = ["Male","Female"]
BLOOD_GROUP = ["A+","A-","B+","B-","AB+","AB-","O+","O-"]
@@ -33,10 +30,6 @@
BLOGS_ON_PROFILE = THEME_CONFIG[:blogs_on_profile]
BLOGS_PER_PAGE = THEME_CONFIG[:blogs_per_page]
BLOGS_ON_HOME_PAGE = THEME_CONFIG[:blogs_on_home_page]
-GOOGLE_MAP_DEFAULT_LAT = THEME_CONFIG[:google_map_default_lat]
-GOOGLE_MAP_DEFAULT_LON = THEME_CONFIG[:google_map_default_lon]
-GOOGLE_MAP_DEFAULT_ZOOM = THEME_CONFIG[:google_map_default_zoom]
-
INDIA_STATES = [ "Other",
"Andhra Pradesh",
"Arunachal Pradesh",
View
32 db/schema.rb
@@ -48,12 +48,12 @@
create_table "blogs", :force => true do |t|
t.string "profile_id"
t.string "title"
- t.text "body", :limit => 2147483647
+ t.string "body"
t.datetime "created_at"
t.datetime "updated_at"
- t.integer "comments_count", :default => 0
- t.boolean "public", :default => false
- t.boolean "is_sent", :default => false
+ t.integer "comments_count", :default => 0
+ t.boolean "public", :default => false
+ t.boolean "is_sent", :default => false
end
create_table "ckeditor_assets", :force => true do |t|
@@ -210,7 +210,7 @@
t.text "body"
t.integer "sender_id"
t.integer "receiver_id"
- t.boolean "read", :default => false, :null => false
+ t.boolean "read", :default => false
t.boolean "sender_flag", :default => true
t.boolean "receiver_flag", :default => true
t.boolean "system_message", :default => false
@@ -241,19 +241,6 @@
t.datetime "updated_at"
end
- create_table "notifications", :force => true do |t|
- t.string "account_id"
- t.string "news_notification"
- t.string "event_notification"
- t.string "message_notification"
- t.string "blog_comment_notification"
- t.string "profile_comment_notification"
- t.string "follow_notification"
- t.string "delete_friend_notification"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
-
create_table "permissions", :force => true do |t|
t.string "profile_id"
t.string "permission_field"
@@ -298,6 +285,13 @@
t.integer "votes_count", :default => 0
end
+ create_table "posts", :force => true do |t|
+ t.string "title"
+ t.text "body"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
create_table "profile_events", :force => true do |t|
t.integer "profile_id"
t.integer "event_id"
@@ -342,7 +336,6 @@
t.string "landline"
t.string "mobile"
t.string "professional_qualification"
- t.string "default_permission", :default => "Everyone"
t.string "middle_name"
t.string "linkedin_name"
t.string "msn_username"
@@ -357,6 +350,7 @@
t.string "icon_content_type"
t.datetime "created_at"
t.datetime "updated_at"
+ t.string "default_permission"
end
create_table "site_contents", :force => true do |t|
View
2 public/javascripts/jquery.fileupload-uix.js
@@ -234,7 +234,7 @@
uploadHandler.downloadTable.find('.file_download_delete button')
.live('click', function (e) {
var row = $(this).closest('tr');
- var spr = $('#file_upload').children('img.hide_info').show();
+ var spr = $(row).children('td.spinner');
$.ajax({
beforeSend: function(){
$(spr).show();

0 comments on commit 94b9f24

Please sign in to comment.
Something went wrong with that request. Please try again.