mirror of
				https://github.com/fspc/BikeShed-1.git
				synced 2025-10-31 08:55:36 -04:00 
			
		
		
		
	Removing puts and console.logs
This commit is contained in:
		
							parent
							
								
									3ac630f9f3
								
							
						
					
					
						commit
						b11d04a397
					
				| @ -7,7 +7,7 @@ class BikeLogs < Netzke::Basepack::Grid | |||||||
|     c.model = "ActsAsLoggable::Log" |     c.model = "ActsAsLoggable::Log" | ||||||
|     c.title = "Bike History" |     c.title = "Bike History" | ||||||
|     c.data_store = {auto_load: false} |     c.data_store = {auto_load: false} | ||||||
|     c.scope = lambda { |rel| puts session.inspect; rel.where(:loggable_type => 'Bike',:loggable_id => session[:selected_bike_id]);} |     c.scope = lambda { |rel| rel.where(:loggable_type => 'Bike',:loggable_id => session[:selected_bike_id]);} | ||||||
|     c.strong_default_attrs = { |     c.strong_default_attrs = { | ||||||
|       :loggable_type => 'Bike', |       :loggable_type => 'Bike', | ||||||
|       :loggable_id => session[:selected_bike_id], |       :loggable_id => session[:selected_bike_id], | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ class BikeModels < Netzke::Basepack::Grid | |||||||
|     c.model = "BikeModel" |     c.model = "BikeModel" | ||||||
|     c.title = "Models" |     c.title = "Models" | ||||||
|     c.data_store = {auto_load: false} |     c.data_store = {auto_load: false} | ||||||
|     c.scope = lambda { |rel| puts session.inspect; rel.where(:bike_brand_id => session[:selected_bike_brand_id]);} |     c.scope = lambda { |rel| rel.where(:bike_brand_id => session[:selected_bike_brand_id]);} | ||||||
|     c.strong_default_attrs = { |     c.strong_default_attrs = { | ||||||
|       :bike_brand_id => session[:selected_bike_brand_id] |       :bike_brand_id => session[:selected_bike_brand_id] | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -45,11 +45,8 @@ class Bikes < Netzke::Basepack::Grid | |||||||
|             // setting the 'rowclick' event |             // setting the 'rowclick' event | ||||||
|             var view = this.getView(); |             var view = this.getView(); | ||||||
|             view.on('itemclick', function(view, record){ |             view.on('itemclick', function(view, record){ | ||||||
|               console.log(view); |  | ||||||
|               console.log(record); |  | ||||||
|               // The beauty of using Ext.Direct: calling 3 endpoints in a row, which results in a single call to the server! |               // The beauty of using Ext.Direct: calling 3 endpoints in a row, which results in a single call to the server! | ||||||
|               this.selectBikeBrand({bike_brand_id: record.get('bike_brand__brand')}); |               this.selectBikeBrand({bike_brand_id: record.get('bike_brand__brand')}); | ||||||
|               console.log(record.get('bike_brand__brand')); |  | ||||||
|             }, this); |             }, this); | ||||||
|           } |           } | ||||||
|         JS |         JS | ||||||
| @ -58,8 +55,5 @@ class Bikes < Netzke::Basepack::Grid | |||||||
|   endpoint :select_bike_brand do |params, this| |   endpoint :select_bike_brand do |params, this| | ||||||
|     # store selected boss id in the session for this component's instance |     # store selected boss id in the session for this component's instance | ||||||
|     session[:selected_bike_brand_id] = params[:bike_brand_id] |     session[:selected_bike_brand_id] = params[:bike_brand_id] | ||||||
|     puts "BikeID-----------------------------" |  | ||||||
|     puts params[:bike_brand_id] |  | ||||||
|     puts session.inspect |  | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  | |||||||
| @ -37,7 +37,5 @@ class BikesBorder < Netzke::Base | |||||||
|   endpoint :select_bike do |params, this| |   endpoint :select_bike do |params, this| | ||||||
|     # store selected boss id in the session for this component's instance |     # store selected boss id in the session for this component's instance | ||||||
|     session[:selected_bike_id] = params[:bike_id] |     session[:selected_bike_id] = params[:bike_id] | ||||||
|     puts "BikeID-----------------------------" |  | ||||||
|     puts session.inspect |  | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  | |||||||
| @ -36,9 +36,6 @@ class BrandsAndModelsBorder < Netzke::Base | |||||||
|   endpoint :select_bike_brand do |params, this| |   endpoint :select_bike_brand do |params, this| | ||||||
|     # store selected boss id in the session for this component's instance |     # store selected boss id in the session for this component's instance | ||||||
|     session[:selected_bike_brand_id] = params[:bike_brand_id] |     session[:selected_bike_brand_id] = params[:bike_brand_id] | ||||||
|     puts "BikeBrandID-----------------------------" |  | ||||||
|     #puts params[:bike_brand_id] |  | ||||||
|     puts session.inspect |  | ||||||
|   end |   end | ||||||
|    |    | ||||||
| end | end | ||||||
|  | |||||||
| @ -21,7 +21,7 @@ class UserLogs < Netzke::Basepack::Grid | |||||||
|       user_log_data_store = {auto_load: true } |       user_log_data_store = {auto_load: true } | ||||||
|     #admins and staff |     #admins and staff | ||||||
|     else |     else | ||||||
|       user_log_scope = lambda { |rel| puts session.inspect; rel.where(:loggable_type => 'User',:loggable_id => session[:selected_user_id]);} |       user_log_scope = lambda { |rel| rel.where(:loggable_type => 'User',:loggable_id => session[:selected_user_id]);} | ||||||
|       user_log_strong_default_attrs.merge!( { :loggable_id => session[:selected_user_id] } ) |       user_log_strong_default_attrs.merge!( { :loggable_id => session[:selected_user_id] } ) | ||||||
|       user_log_data_store = {auto_load: true } |       user_log_data_store = {auto_load: true } | ||||||
|     end |     end | ||||||
| @ -30,9 +30,8 @@ class UserLogs < Netzke::Basepack::Grid | |||||||
|     c.title = "User History" |     c.title = "User History" | ||||||
|     c.data_store = user_log_data_store |     c.data_store = user_log_data_store | ||||||
|     c.scope = user_log_scope |     c.scope = user_log_scope | ||||||
|     puts "user_log_strong_default_attrs" |  | ||||||
|     puts user_log_strong_default_attrs.inspect |  | ||||||
|     c.strong_default_attrs = user_log_strong_default_attrs |     c.strong_default_attrs = user_log_strong_default_attrs | ||||||
|  | 
 | ||||||
|     c.columns = [ |     c.columns = [ | ||||||
|       { :name => :start_date, :format => "g:ia - D, M j - Y", :width => 165, :default_value => Time.now.to_formatted_s(:db) }, |       { :name => :start_date, :format => "g:ia - D, M j - Y", :width => 165, :default_value => Time.now.to_formatted_s(:db) }, | ||||||
|       { :name => :end_date, :hidden => true, :default_value => Time.now.to_formatted_s(:db) }, |       { :name => :end_date, :hidden => true, :default_value => Time.now.to_formatted_s(:db) }, | ||||||
|  | |||||||
| @ -24,8 +24,6 @@ class UserProfileBorder < Netzke::Base | |||||||
|       function(){ |       function(){ | ||||||
|         // calling superclass's initComponent |         // calling superclass's initComponent | ||||||
|         this.callParent(); |         this.callParent(); | ||||||
|         console.log("init component"); |  | ||||||
|         console.log(this); |  | ||||||
|         this.getComponent('user_stats').updateStats(); |         this.getComponent('user_stats').updateStats(); | ||||||
| 
 | 
 | ||||||
|         var store = this.getComponent('user_logs').getStore() |         var store = this.getComponent('user_logs').getStore() | ||||||
| @ -33,26 +31,6 @@ class UserProfileBorder < Netzke::Base | |||||||
|             console.log("Bitches"); |             console.log("Bitches"); | ||||||
|             this.getComponent('user_stats').updateStats(); |             this.getComponent('user_stats').updateStats(); | ||||||
|           }, this); |           }, this); | ||||||
|         /** |  | ||||||
|         this.getComponent('user_logs').getStore().load({ |  | ||||||
|           callback : function(records, operation, success) { |  | ||||||
|             console.log(self); |  | ||||||
|             console.log(this); |  | ||||||
|             console.log("records"); |  | ||||||
|             console.log(records); |  | ||||||
|             console.log("operation"); |  | ||||||
|             console.log(operation); |  | ||||||
|             console.log("success"); |  | ||||||
|             console.log(success); |  | ||||||
| 
 |  | ||||||
|             self.getComponent('user_stats').updateStats(); |  | ||||||
|           } |  | ||||||
|         });*/ |  | ||||||
|          |  | ||||||
|       //  var view = this.getComponent('user_logs').getView(); |  | ||||||
|       //  view.on('itemclick', function(view, record){ |  | ||||||
|       //    this.getComponent('user_stats').updateStats(); |  | ||||||
|       //  }, this); |  | ||||||
|       } |       } | ||||||
|     JS |     JS | ||||||
|   end |   end | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ class UserProfiles < Netzke::Basepack::Grid | |||||||
|       user_profiles_scope = lambda { |rel| rel.where(:user_id => controller.current_user.id);} |       user_profiles_scope = lambda { |rel| rel.where(:user_id => controller.current_user.id);} | ||||||
|       user_profiles_data_store = { auto_load: true } |       user_profiles_data_store = { auto_load: true } | ||||||
|     else |     else | ||||||
|       user_profiles_scope = lambda { |rel| puts session.inspect; rel.where(:user_id => session[:selected_user_id]);} |       user_profiles_scope = lambda { |rel| rel.where(:user_id => session[:selected_user_id]);} | ||||||
|       user_profiles_data_store = { auto_load: false} |       user_profiles_data_store = { auto_load: false} | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -41,9 +41,6 @@ class UsersAndProfilesBorder < Netzke::Base | |||||||
|   endpoint :select_user do |params, this| |   endpoint :select_user do |params, this| | ||||||
|     # store selected boss id in the session for this component's instance |     # store selected boss id in the session for this component's instance | ||||||
|     session[:selected_user_id] = params[:user_id] |     session[:selected_user_id] = params[:user_id] | ||||||
|     puts "UserID-----------------------------" |  | ||||||
|     puts params[:user_id] |  | ||||||
|     puts session.inspect |  | ||||||
|   end |   end | ||||||
|    |    | ||||||
| end | end | ||||||
|  | |||||||
| @ -21,7 +21,6 @@ class ActsAsLoggable::BikeActionsController < AuthenticatedController | |||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   def update |   def update | ||||||
|     puts bike_action.inspect |  | ||||||
|     if bike_action.save |     if bike_action.save | ||||||
|       redirect_to acts_as_loggable_bike_actions_url |       redirect_to acts_as_loggable_bike_actions_url | ||||||
|     else |     else | ||||||
|  | |||||||
| @ -21,7 +21,6 @@ class ActsAsLoggable::TransactionActionsController < AuthenticatedController | |||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   def update |   def update | ||||||
|     puts transaction_action.inspect |  | ||||||
|     if transaction_action.save |     if transaction_action.save | ||||||
|       redirect_to acts_as_loggable_transaction_actions_url |       redirect_to acts_as_loggable_transaction_actions_url | ||||||
|     else |     else | ||||||
|  | |||||||
| @ -21,7 +21,6 @@ class ActsAsLoggable::UserActionsController < AuthenticatedController | |||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   def update |   def update | ||||||
|     puts user_action.inspect |  | ||||||
|     if user_action.save |     if user_action.save | ||||||
|       redirect_to acts_as_loggable_user_actions_url |       redirect_to acts_as_loggable_user_actions_url | ||||||
|     else |     else | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user