Skip to content

Commit

Permalink
checkboxes for search dispalyed
Browse files Browse the repository at this point in the history
  • Loading branch information
n3k0rA committed Apr 17, 2012
1 parent 225e831 commit e1492e5
Show file tree
Hide file tree
Showing 26 changed files with 142 additions and 57 deletions.
5 changes: 1 addition & 4 deletions app/assets/javascripts/application.js
Expand Up @@ -3,11 +3,8 @@
//= require jquery-ui
//= require_tree .
//= require_directory .
//= require gmaps4rails/bing.js
//= require gmaps4rails/googlemaps.js
//= require gmaps4rails/mapquest.js
//= require gmaps4rails/openlayers.js
//= require gmaps4rails/all_apis.js
//= require checkbox



Expand Down
7 changes: 0 additions & 7 deletions app/assets/javascripts/autocomplete.js
@@ -1,10 +1,3 @@
$(function () {
$('#alert').click(function () {
alert('Hello, world!');
return false;
})
});

$(function() {
var availableTags = [
"ActionScript",
Expand Down
18 changes: 18 additions & 0 deletions app/assets/javascripts/checkbox.js
@@ -0,0 +1,18 @@
var clicked = 0
function selectAll(){
if(clicked==0){
$("input:checkbox").each(function(){
$(this).attr('checked', true);
});
clicked=1;
return false;
}
else {
$("input:checkbox").each(function(){
$(this).attr('checked', false);
});
clicked=0;
return false;
}
}

24 changes: 21 additions & 3 deletions app/assets/stylesheets/layout.css.scss
Expand Up @@ -46,8 +46,10 @@ body {
#header {
position:relative;
max-height:110px;
font-family:"Arial Narrow","Times New Roman",Georgia,Serif;
font-family: theFont;
text-transform:uppercase;

}

#logo {
Expand All @@ -60,7 +62,7 @@ body {
position:absolute;
top:90px;
left: 90px;
z-index:1;
z-index:-1;
font-size:110%;
letter-spacing: 0.8px;
color:404041;
Expand Down Expand Up @@ -205,6 +207,7 @@ body {
/* Submenu
*/
#submenu {
font-family:"Arial Narrow","Times New Roman",Georgia,Serif;
color:white;
font-size:110%;
font-family: theFont;
Expand Down Expand Up @@ -267,13 +270,28 @@ body {
/* This is SIDE SEARCH BOX
*/
#search_box{
font-family:"Arial Narrow","Times New Roman",Georgia,Serif;
background-color:404041;
position:absolute;
right:5px;
right:7px;
top:-33px;
z-index:1;
width:230px;
width:216px;
height:350px;
padding: 10px;
font-family: theFont;
color:white;
font-size:80%;
letter-spacing: 1.5px;
p {
margin-bottom:-5px;
}

}

.category_field {
float:left;
width:98px;
}


Expand Down
2 changes: 2 additions & 0 deletions app/controllers/application_controller.rb
Expand Up @@ -19,6 +19,8 @@ class ApplicationController < ActionController::Base
# redirect_to url_for(locale: locale)
#end



# Defines the variable for the menu tab
def set_up(page)
@page_id = page
Expand Down
6 changes: 3 additions & 3 deletions app/views/events/_form.html.haml
Expand Up @@ -47,23 +47,23 @@
.field
= f.label t :event_price
%br
= f.text_field :price
= f.number_field :price
.field
= f.label t :event_description
%br
= f.text_area :description, :class => 'autogrow', :rows => 10
.field
= f.label t :email
%br
= f.text_field :email
= f.email_field :email
.field
= f.label t :event_website
%br
= f.text_field :website
.field
= f.label t :event_phone
%br
= f.text_field :phone
= f.telephone_field :phone
%p
= f.label t :event_pic
%br
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/show.html.haml
Expand Up @@ -59,7 +59,7 @@
%p
%b
= t :event_description
= @event.description
= simple_format(@event.description)
%p
%b
=t :email
Expand Down
45 changes: 37 additions & 8 deletions app/views/layouts/application.html.haml
@@ -1,4 +1,6 @@



%html{:lang => "en", "xml:lang" => "en", :xmlns => "http://www.w3.org/1999/xhtml"}

%head
Expand All @@ -11,6 +13,10 @@
= csrf_meta_tags
<link type="text/css" href="http://yourwebsite.com/css/ui-lightness/jquery-ui-1.8.custom.css" rel="stylesheet" />
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4f832c682c196183"></script>




%body{:class => "#{controller.controller_name} container"}
.container
#header
Expand Down Expand Up @@ -130,14 +136,37 @@
#right
#search_box.shadow
= form_tag search_path do
= text_field_tag :query
%p
= select_date Date.today, :prefix => :search_start_date
%p
%p
= text_field_tag :town
%p
= submit_tag I18n.t(:search)
#s_keyword.capital
= label_tag I18n.t(:search_keyword)
%br
= text_field_tag :query
%p
#s_date01.capital
= label_tag I18n.t(:search_when)
%br
= select_date Date.today, :prefix => :search_start_date , :size =>"90"
%p
#s_categories.capital
= label_tag I18n.t(:search_categories)
%br
- Category.all.each do |category|
.category_field
= check_box_tag "category_ids[]", category.id
= I18n.t("categories.#{category.name}")
.category_field
= check_box("all", 'pm_xray', {:onclick=>"selectAll()"} )
= I18n.t(:all)



%p
#s_where.capital
= label_tag I18n.t(:search_where)
%br
= text_field_tag :town
%p
#s_button
= submit_tag I18n.t(:search)



Expand Down
2 changes: 1 addition & 1 deletion app/views/users/_form.html.haml
Expand Up @@ -14,7 +14,7 @@
.field
= f.label t :user_email
%br
= f.text_field :email
= f.email_field :email
.field
= f.label t :user_town
%br
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/new.html.haml
Expand Up @@ -21,7 +21,7 @@
%p
= f.label t :user_email
%br
= f.text_field :email
= f.email_field :email
%p
= f.label t :user_password
%br
Expand Down
8 changes: 4 additions & 4 deletions config/locales/en.yml
Expand Up @@ -83,10 +83,10 @@ en:
upload_event_button: Upload an Event

#Search_Box
search_keyword: Keyword
search_when: When
search_categories: Related to...
search_where: Where
search_keyword: WHAT ARE YOU AFTER?
search_when: WHEN?
search_categories: IN WHICH CATEGORIES?
search_where: WHERE?
search_placeholder_where: town or province
search: SEARCH

Expand Down
9 changes: 5 additions & 4 deletions config/locales/es.yml
Expand Up @@ -241,11 +241,12 @@ es:

#Other
upload_event_button: Anadir evento

#Search_Box
search_keyword: Palabra a buscar
search_when: Cuando
search_categories: Pertenece a...
search_where: Donde
search_keyword: ¿QUE BUSCAS?
search_when: ¿CUANDO?
search_categories: ¿EN QUÉ CATEGORÍA?
search_where: ¿DONDE?
search_placeholder_where: localidad o provincia
search: GOAZEN

Expand Down
8 changes: 4 additions & 4 deletions config/locales/eu.yml
Expand Up @@ -235,10 +235,10 @@ eu:
upload_event_button: Ekitaldia gehitu

#Search_Box
search_keyword: Hitz bilaketa
search_when: Noiz
search_categories: Zein kategoriatan
search_where: Non
search_keyword: HITZ BILAKETA
search_when: NOIZ
search_categories: ZEIN KATEGORIATAN
search_where: NON
search_placeholder_where: herri edo probintzia
search: GOAZEN

Expand Down
6 changes: 3 additions & 3 deletions config/routes.rb
Expand Up @@ -29,7 +29,7 @@
get "account" => "users#microposts", :as => "account"

match 'events/category/:category' => 'events#category', :as => :category
match 'events/province/:province' => 'events#province', :as => :province
match 'events/locations/:province' => 'events#province', :as => :province
#match 'users/events_created/:user'=> 'users#events', :as => "events_created", :via=> :get
get 'user/profile' => 'users#profile', :as => "profile"
get 'events_created' => 'users#events', :as =>"events_created"
Expand All @@ -42,7 +42,7 @@
get 'alarm_switch' => "alarms#switch", :as => "alarm_switch"
get 'cancel_event' => "events#cancel", :as => "cancel_event"
get 'report_spam' => "comments#report_spam", :as => "report_spam"

get "locations" => "events#locations", :as => "locations"
end

# Google verify.
Expand Down Expand Up @@ -74,7 +74,7 @@


#temp
get "locations" => "events#locations", :as => "locations"

# The priority is based upon order of creation:
# first created -> highest priority.

Expand Down
Binary file added pics/41/medium.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/41/original.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pics/41/thumb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions public/assets/application-0eaf9764d6e351d57a40fa3e2f7534ad.js

Large diffs are not rendered by default.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

0 comments on commit e1492e5

Please sign in to comment.