Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code refactoring for jquery efficiency and organization #7

Merged
merged 37 commits into from
Sep 12, 2017
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8e8f6bd
Improving jquery selector efficency:
p-somers Jun 19, 2017
4f1228b
changing var -> let
p-somers Jun 19, 2017
722e827
removing console logs
p-somers Jun 19, 2017
eaab2ff
Fixing unterminated statements
p-somers Jun 19, 2017
27ed95f
Removing unnecessary return
p-somers Jun 19, 2017
aef6cf4
Fixing html typo
p-somers Jun 19, 2017
610d513
Explicitly declaring variable
p-somers Jun 19, 2017
75c2ea2
Fixing html typo
p-somers Jun 19, 2017
d76b1b2
"==" -> "===" to avoid type coercion
p-somers Jun 19, 2017
70a8e08
removing console logs
p-somers Jun 19, 2017
41f30c8
more "var" -> "let"
p-somers Jun 20, 2017
23ff9bc
jquery efficiency
p-somers Jun 20, 2017
24d15b5
"var" -> "let" and strict comparison in app.js
p-somers Jun 20, 2017
3fdc01d
Merge remote-tracking branch 'origin/master'
p-somers Jun 26, 2017
5f29f98
Merge remote-tracking branch 'origin/master'
p-somers Jun 27, 2017
8bc7480
Merge remote-tracking branch 'origin/master'
p-somers Jul 5, 2017
8bda88d
"var" -> "let" again
p-somers Jul 7, 2017
8c587ac
Merge remote-tracking branch 'origin/master'
p-somers Jul 12, 2017
c0dce3a
Merge remote-tracking branch 'origin/master'
p-somers Jul 25, 2017
f875d5f
Back end:
p-somers Aug 9, 2017
aa54f70
jquery efficiency improvement
p-somers Aug 10, 2017
aef6a93
Adding selenium standalone server
p-somers Aug 10, 2017
a12add1
Updating sample data
p-somers Aug 11, 2017
90284a6
Adding mac chromedriver for selenium
p-somers Aug 13, 2017
003c2c2
Adding initial test code
p-somers Aug 13, 2017
6c8bb42
Updating documentation for testing
p-somers Aug 15, 2017
79d0837
getting tests working:
p-somers Aug 15, 2017
f1f4663
Adding info on preparing tests
p-somers Aug 16, 2017
4665c08
-Adding test config file
p-somers Aug 16, 2017
817628c
-Enchancing test context with "suite" function and "browser" object
p-somers Aug 16, 2017
87d1960
Adding note for windows users
p-somers Aug 16, 2017
762a75d
-Initial test is now in (hopefully) final func test format
p-somers Aug 16, 2017
6fa4d3d
-Removing unused code
p-somers Aug 16, 2017
1ffd0c4
Separating app initialization and actual starting of the server into …
p-somers Aug 16, 2017
3c326c7
Adding dependencies for using phantom js to run headless func tests, …
p-somers Aug 21, 2017
2a5eb65
Adding dependencies for using phantom js to run headless func tests, …
p-somers Aug 21, 2017
452a34d
Merge branch 'master' into master
p-somers Aug 21, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
jquery efficiency improvement
  • Loading branch information
p-somers committed Aug 10, 2017
commit aa54f70633bceee1e8b5d06ef2bf4b63e91581b5
17 changes: 10 additions & 7 deletions src/js/components/teampicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ teampicker = (function() {
},
function(data) {
loadSelectOptions(function() {
$('.selectpicker').selectpicker('toggle');
$('#select-div').find('.selectpicker').trigger('change');
let selectPicker = $('#select-div').find('.selectpicker');
selectPicker.selectpicker('toggle');
selectPicker.trigger('change');
});
}
);
Expand All @@ -98,8 +99,9 @@ teampicker = (function() {
},
function(data) {
loadSelectOptions(function() {
$('#select-div .selectpicker').selectpicker('toggle');
$('#select-div .selectpicker').trigger('change');
let selectPicker = $('#select-div').find('.selectpicker');
selectPicker.selectpicker('toggle');
selectPicker.trigger('change');
});
}
);
Expand Down Expand Up @@ -149,7 +151,7 @@ teampicker = (function() {
let id = $(this).children(":selected").attr('id');
if(id) {
let selectedTeamId = _teamsArray[id]._id;
if(team.getCurrentTeamId() != selectedTeamId) {
if(team.getCurrentTeamId() !== selectedTeamId) {
_socket.emit('join room', selectedTeamId);
initializeSocket(_socket);
}
Expand All @@ -158,8 +160,9 @@ teampicker = (function() {
});

$('#select-div').click(function(){
$('.bs-searchbox>input').attr('placeholder', 'Search through your existing teams or type a new team name')
$('.bs-searchbox>input').off('input', handleSearch).on('input', handleSearch);
let searchBox = $('.bs-searchbox>input');
searchBox.attr('placeholder', 'Search through your existing teams or type a new team name')
searchBox.off('input', handleSearch).on('input', handleSearch);
});

selectpicker.trigger('change');
Expand Down