Skip to content

Commit eb51cfc

Browse files
Merged master into ROI-master
2 parents f0f479e + a84f2f9 commit eb51cfc

File tree

88 files changed

+2025
-457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2025
-457
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ gem 'newrelic_rpm'
2222
gem 'chartkick'
2323
gem 'groupdate'
2424

25+
gem "bootstrap-switch-rails"
26+
2527
gem 'font-awesome-rails'
2628
gem 'jquery-ui-rails'
2729
gem "wysiwyg-rails"

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ GEM
4747
debug_inspector (>= 0.0.1)
4848
bootstrap-sass (3.2.0.0)
4949
sass (~> 3.2)
50+
bootstrap-switch-rails (3.3.2)
5051
bootstrap-will_paginate (0.0.10)
5152
will_paginate
5253
breadcrumbs_on_rails (2.3.0)
@@ -273,6 +274,7 @@ PLATFORMS
273274
DEPENDENCIES
274275
bcrypt (= 3.1.7)
275276
bootstrap-sass (= 3.2.0.0)
277+
bootstrap-switch-rails
276278
bootstrap-will_paginate (= 0.0.10)
277279
breadcrumbs_on_rails
278280
byebug (= 3.4.0)
261 KB
Loading
85 KB
Loading

app/assets/javascripts/application.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@
2020
//= require plugins/font_size.min.js
2121
//= require plugins/file_upload.min.js
2222
//= require plugins/lists.min.js
23+
//= require bootstrap-switch
2324
//= require_tree .
2425

2526
var ready;
2627
ready = (function() {
2728
$('a[href="' + this.location.pathname + '"]').parent().addClass('active');
2829
$("#navbar-search-input").autocomplete({
2930
source: '/categories/autocomplete.json',
31+
select: function(event, ui) {
32+
$('#navbar-search-input').val(ui.item.label);
33+
$('#search-questions-form').submit();
34+
}
3035
});
3136
});
3237

33-
// $('#search-questions-form').bind("change keyup",function() {
34-
// alert('change keyup called');
35-
// $('#search-questions-form').submit();
36-
// });
37-
3838
$(document).ready(ready);
3939
$(document).on('page:load', ready);
4040

app/assets/javascripts/tests.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
function toggleSelectedQuestions() {
2+
var selectAll = $('#selected_questions_selectall');
3+
if (!selectAll.prop("checked")) {
4+
$('#selected_questions_table tbody tr td:nth-child(1) input[type=checkbox]').each( function(index, item){
5+
$(item).prop('checked', false);
6+
});
7+
}
8+
else {
9+
$('#selected_questions_table tbody tr td:nth-child(1) input[type=checkbox]').each( function(index, item){
10+
$(item).prop('checked', true);
11+
12+
});
13+
14+
}
15+
}
16+
17+
function toggleAvailableQuestions() {
18+
var selectAll = $('#available_questions_selectall');
19+
if (!selectAll.prop("checked")) {
20+
$('#available_questions_table tbody tr td:nth-child(1) input[type=checkbox]').each( function(index, item){
21+
$(item).prop('checked', false);
22+
});
23+
}
24+
else {
25+
$('#available_questions_table tbody tr td:nth-child(1) input[type=checkbox]').each( function(index, item){
26+
$(item).prop('checked', true);
27+
});
28+
29+
}
30+
}

app/assets/stylesheets/application.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*= require froala_editor.min.css
1515
*= require froala_style.min.css
1616
*= require font-awesome
17+
*= require bootstrap3-switch
1718
*= require_tree .
1819
*= require_self
1920
*/

0 commit comments

Comments
 (0)