Skip to content

Commit

Permalink
search bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thamizh committed Jul 20, 2013
1 parent a62c05d commit bf79b83
Show file tree
Hide file tree
Showing 12 changed files with 287 additions and 339 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ group :assets do
gem 'uglifier', '>= 1.0.3'
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
gem 'angularjs-rails'

end
gem 'jquery-tokeninput-rails'
gem 'angular-ui-rails', :git=>'git@github.com:mike-park/angular-ui-rails.git'
gem 'angular-ui-bootstrap-rails'


group :development do
gem "better_errors"
end
Expand Down
7 changes: 7 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ GIT
rails (>= 3.1)
railties (>= 3.1)

GIT
remote: git@github.com:mike-park/angular-ui-rails.git
revision: b69997361db795831675c6a42308f90e86c45a8c
specs:
angular-ui-rails (0.4.0.2)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -190,6 +196,7 @@ PLATFORMS

DEPENDENCIES
angular-ui-bootstrap-rails
angular-ui-rails!
angularjs-rails
better_errors
coffee-rails (~> 3.2.1)
Expand Down
Binary file added app/assets/images/icon-sortby.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions app/assets/stylesheets/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,11 @@ top: 0px;
}


ul.token-input-list-facebook {
width: 218px !important;
margin-bottom: 10px !important;
}
.alert{
position: fixed;
width: 50%;
left: 25%;
text-align: center;
top: 0px;
z-index: 10000;
}
1 change: 1 addition & 0 deletions app/assets/stylesheets/search/application.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
*= require_self
*= require angular-ui
*= require_tree .
*/
ul{
Expand Down
226 changes: 125 additions & 101 deletions app/assets/stylesheets/search/custom.css
Original file line number Diff line number Diff line change
@@ -1,131 +1,155 @@
.welcomeMsg{
text-align: center;
background: #FFFEC2;
outline: 1px #eee solid;
margin-top: 50px;
margin-bottom: -25px;

.search .title{
padding: 15px 0px;
}
.key-search{
margin-top: 100px;
.search .input-keyword{
margin-bottom: 10px;
height: 30px;
}
.display_result{
background: #ddd;
margin-bottom: 10px;
color: green;
padding: 10px;
font-size: 14px;
}
.error{
color:red;
.search .candidate-list ul{
margin-left: -5px;
list-style: none;
}
.search-input{
width:75%;
height:30px !important;
.search .candidate-list a{
color: #000;
text-decoration: underline;
}

.content{
outline: #eee solid 1px;
background: #eee;
.search .candidate-list span{
display: block;
}

.quick-view-box{
background: #fff;
height: 500px;
outline: #eee solid 1px;
margin-left: 5px;
height: 500px;
overflow-y: auto;
overflow-x:hidden;
.search .candidate-list{
margin-bottom: 0px;
margin-left: -10px;
margin-top: 0px;
overflow-y: auto;
overflow-x: hidden;
width: 619px;
height: 785px;
}
.candidate-list-box span,.candidate-list span,.NameDiv span{
display: block;
.search .candidate-list .blue{
background: #eaf5fd;
}
.candidate-list{
font-size: 12px;
background: #fff;
height: 500px;
outline: #eee solid 1px;
margin-left: 0px;
list-style: none;
height: 500px;
overflow: auto;

.search .candidate-list img{
margin-left: 10px;
margin-top: -18px;
}
.candidate-list li{
padding:10px 0px 10px 0px;
outline: #eee solid 1px;
.search .candidate-list li{
width: 615px;
margin-left: 5px;
padding: 15px 0px 8px 0px;
border-bottom: 1px #eee dashed;
}

.name{
font-weight: bold;
.search .candidate-list input{
margin-top: 0px;
}
.selectcheck{
width:15px;
.search .candidatre-list-inner{
width: 614px;
}

.sortBy{
.search .candidatre-list-inner div{
display: inline-block;
margin-top: 5px;
padding-right: 10px;
}
.bottomLink{
margin-left: 10px;
margin-top: 5px;
.search .candidatre-list-inner .details{
padding-right: 0px;
}
.sortBy li,.bottomLink li{
float: left;
padding:0px 25px 0px 0px;
.search .name-title,.search .keys,.search .check,.search .phone{
margin-top: 10px;
}
.selectAll{
margin-left: 0px;
margin-top: 5px;
.search .name-title{
width: 120px;
}
.headLink{
background: #F7F7F7;
padding: 5px 0px 5px 10px;
outline: #eee solid 1px;
.search .keys{
width: 210px;
}
.QV-content,.edit-content{
padding: 20px 15px 25px 15px;
position: relative;
.search .phone{
width: 95px;
}
.search .check{
}
.sortBy{
max-width: 615px;
background: #000;
color: #fff;
margin-left: -6px;
margin-top: -5px;
height: 25px;
padding: 5px 12px;
}
.sortBy button, .bottomLink button {
border: none !important;
background: none !important;
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
color: #fff;
text-decoration: underline;
}
.bottomLink{
margin-top: 15px;
}
.bottomLink button{
font-family: fgmc;
font-size: 17px;
color: #0084ab;
padding-right: 30px;
}
.sortBy img{
padding-left: 5px;
}
.sortBy .selectall{
margin-right: -15px;
}
.sortBy span{
display: inline-block;
padding-right: 10px;
}
.width609{
width: 609px;
}
.innerDiv{
padding: 5px 0px 0px 0px;

.quickView {
margin-left: 30px;
color: #594b4e;
}
.bold{
font-weight: bold;
.quickview .info{
border-bottom: 1px #eee solid;
padding: 10px 0px;
}
.innerDiv span{

.quickView span{
display: block;
font-size: 12px;
padding: 5px;
font-size: 16px ;
}
.profile-box{
position: absolute;
right: 25px;
.quickView .name{
font-size: 21px !important;
font-family: fgmc;
color: #0297c5;
}

.edit-content{
display: none;
padding-left:20px;
.profile-box .displayBlock{
font-size: 16px;
margin-top: 8px;
}
.edit-content input {display: inline;
width: auto !important; }
.new-note-form{
display: none;
.fieldTitle{
font-family: fgmc;
font-size: 18px !important;
}
.fieldTitle a{
font-family: "Calibri";
font-size: 14px !important;
padding-left: 25px;
}
.footer-search{
height: 75px;
}

.notes_date{color: #0088cc;
margin-bottom: 0px;}

.notes_note{text-indent: 20px;
margin-bottom: 15px;}


.sortBy button, .bottomLink button{
border: none !important;
background: none !important;
-moz-box-shadow:none !important;
-webkit-box-shadow:none !important;

.no-more-list-box{
height:785px;
text-align: center;
margin-top: 100px;
font-family: fgb;
font-size: 15px;
}
.sortBy button[disabled],.bottomLink button[disabled]{
color: #888888;
}
3 changes: 0 additions & 3 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ def after_sign_in_path_for(resource)
def current_team
current_user.team if current_user
end
def get_random
([*('A'..'Z'),*('0'..'9')]-%w(0 1 I O)).sample(8).join
end
def check_subscription
status = current_team.status
if(status == "charged")
Expand Down
8 changes: 0 additions & 8 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def create
params[:user][:team_id] = team.id
params[:user][:user_type] = "User"
password = Devise.friendly_token.first(8)
password =
params[:user][:password] = password
user = User.create(params[:user])
if user
Expand Down Expand Up @@ -57,16 +56,13 @@ def update_plan
else
flash.alert = "unable to update plan"
render :action => "edit_subscription"

end

end

def cancel
@user = User.find(params[:id])
@user.update_attribute(:status, false)
redirect_to users_path , :notice => "User Cancelled"

end

def update_card
Expand All @@ -77,10 +73,6 @@ def update_card
else
flash.alert = "unable to update card"
render :action => "edit_subscription"

end


end

end
10 changes: 3 additions & 7 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ class User < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
has_attached_file :profile_pic, :styles => { :small => "150x150>" },
:url => "/assets/candidates/:id/avatar/:style/:basename.:extension",
:path => ":rails_root/public/assets/candidates/:id/avatar/:style/:basename.:extension",
:url => "/assets/users/:id/avatar/:style/:basename.:extension",
:path => ":rails_root/public/assets/users/:id/avatar/:style/:basename.:extension",
:default_url => "/assets/profile_pic.png"
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me, :first_name, :last_name, :company,:profile_pic,
:user_type, :status, :team_id, :plan_id, :register_type, :name, :stripe_card_token, :stripe_customer_token, :own_email
attr_accessor :plan_id, :register_type, :name, :stripe_card_token
default_scope where( :status=>1)
def name
"#{first_name.to_s} #{last_name.to_s}"
end
Expand All @@ -29,9 +28,7 @@ def create_team
else
@team = Team.create( :owner_id => self.id, :status => 'pending', :plan_id => self.plan_id, :stripe_customer_token => self.stripe_customer_token)
self.team = @team
self.user_type = 'owner'
#self.team_id = @team.id
self.save
self.update_attributes(:user_type => 'owner',:team_id=>@team.id)
end
end
def save_with_payment
Expand All @@ -42,7 +39,6 @@ def save_with_payment
customer = Stripe::Customer.create(description:email,
plan: plan_id, email: email, card: stripe_card_token)
self.stripe_customer_token = customer.id

end
end
rescue Stripe::InvalidRequestError => e
Expand Down
Loading

0 comments on commit bf79b83

Please sign in to comment.