Skip to content

Commit

Permalink
Merge pull request #7 from UNB-GPPMDS-2014/approval
Browse files Browse the repository at this point in the history
Approval
  • Loading branch information
MaxAlmeida committed Nov 28, 2014
2 parents de8b654 + 3179245 commit b4781f7
Show file tree
Hide file tree
Showing 105 changed files with 6,737 additions and 1,953 deletions.
10 changes: 8 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
source 'https://rubygems.org'

gem "chartkick"
gem 'rails', '3.2.15'
gem 'highcharts-rails', '~> 4.0.4'
gem 'ransack'
gem 'gmaps4rails'
gem 'geocoder'

gem 'simplecov', :require => false, :group => :test

Expand All @@ -21,8 +25,10 @@ group :development, :test do
end

group :test do
gem 'factory_girl_rails', '4.1.0'
gem 'selenium-webdriver'
gem 'capybara'
gem 'cucumber-rails', '1.2.1', :require => false
gem 'database_cleaner', '0.7.0'
end

# Gems used only for assets and not required
Expand Down
28 changes: 27 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ GEM
xpath (~> 2.0)
celluloid (0.16.0)
timers (~> 4.0.0)
chartkick (1.3.2)
childprocess (0.5.3)
ffi (~> 1.0, >= 1.0.11)
coderay (1.1.0)
Expand All @@ -52,12 +53,30 @@ GEM
execjs
coffee-script-source (1.8.0)
commonjs (0.2.7)
cucumber (1.3.17)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.1)
cucumber-rails (1.2.1)
capybara (>= 1.1.2)
cucumber (>= 1.1.3)
nokogiri (>= 1.5.0)
database_cleaner (0.7.0)
diff-lcs (1.2.5)
docile (1.1.5)
erubis (2.7.0)
execjs (2.2.1)
factory_girl (4.1.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.1.0)
factory_girl (~> 4.1.0)
railties (>= 3.0.0)
ffi (1.9.3)
formatador (0.2.5)
gherkin (2.12.2)
multi_json (~> 1.3)
guard (2.6.1)
formatador (>= 0.2.4)
listen (~> 2.7)
Expand All @@ -67,6 +86,8 @@ GEM
guard-rspec (4.3.1)
guard (~> 2.1)
rspec (>= 2.14, < 4.0)
highcharts-rails (4.0.4)
railties (>= 3.1)
hike (1.2.3)
hitimes (1.2.2)
i18n (0.6.11)
Expand All @@ -93,6 +114,7 @@ GEM
mime-types (1.25.1)
mini_portile (0.6.0)
multi_json (1.10.1)
multi_test (0.1.1)
mysql2 (0.3.16)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
Expand Down Expand Up @@ -206,9 +228,13 @@ PLATFORMS
DEPENDENCIES
bcrypt-ruby (~> 3.0.0)
bootstrap-will_paginate (= 0.0.6)
capybara
chartkick
coffee-rails (~> 3.2.1)
cucumber-rails (= 1.2.1)
database_cleaner (= 0.7.0)
factory_girl_rails (= 4.1.0)
guard-rspec
highcharts-rails (~> 4.0.4)
jquery-rails
less-rails
mysql2
Expand Down
Binary file added app/assets/images/logoBackground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@
//
//= require jquery
//= require jquery_ujs
//= require highcharts
//= require highcharts/highcharts-3d
//= require highcharts/adapters/mootools-adapter
//= require highcharts/adapters/prototype-adapter
//= require highcharts/modules/annotations
//= require highcharts/modules/canvas-tools
//= require highcharts/modules/data
//= require highcharts/modules/drilldown
//= require highcharts/modules/exporting
//= require highcharts/modules/funnel
//= require highcharts/modules/heatmap
//= require highcharts/modules/no-data-to-display
//= require highcharts/adapters/standalone-framework
//= require highcharts/highcharts-more
//= require highcharts/modules/exporting
//= require underscore
//= require gmaps/google
//= require_tree .
//= require bootstrap
//= require bootstrap.min
15 changes: 15 additions & 0 deletions app/assets/javascripts/cdcs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$(function () {
$('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
$('.tree li ul > li').hide();
$('.tree li.parent_li > span').on('click', function (e) {
var children = $(this).parent('li.parent_li').find(' > ul > li');
if (children.is(":visible")) {
children.hide('fast');
$(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
} else {
children.show('fast');
$(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
}
e.stopPropagation();
});
});
7 changes: 7 additions & 0 deletions app/assets/javascripts/faqs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function changeIcon(o){
obj = document.getElementById(o);
if (obj.className=="icon icon-chevron-down")
setTimeout(function(){obj.className= "icon icon-chevron-up"}, 800);
else if (obj.className=="icon icon-chevron-up")
obj.className= "icon icon-chevron-down";
}
4 changes: 4 additions & 0 deletions app/assets/javascripts/jquery-2.1.1.min.js

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions app/assets/javascripts/suppliers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
(function()
{
function build_row(data)
{
var html = "<tr>";

html += "<td><a href='/suppliers/"+data.id+"'>"+data.fantasy_name_supplier+"</a>"+"</td>";
html += "<td> "+data.cnpj+"</td>";

html += "</tr>";
return html;
}

function custom_search(search, type_search)
{
$.ajax(
{
url: "/supplier/custom_search",
type: "GET",
data: { "search":search, "type_search":type_search,"page":1 },
success : function(response)
{
var html = "";
for(var i = 0; i < response.length; i++)
{
html += build_row(response[i]);
}
$("#suppliers").html(html);
}
});
}
$(document).ready(function()
{
$("#supplier_search_button").click(function()
{
var search = $("#supplier_search_text").val();
var type_search = $(".search_type:checked").val();

custom_search(search, type_search);

});
});
})();
Loading

0 comments on commit b4781f7

Please sign in to comment.