From fd2ae13b17c2066360e2788b1622145e093a0917 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 24 Feb 2014 20:50:29 -0500 Subject: [PATCH 1/4] VRFS-1230 fix Cancel button color --- web/app/views/clients/_alert.html.erb | 2 +- web/app/views/clients/_leaveSessionWarning.html.erb | 2 +- web/app/views/clients/_terms.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/views/clients/_alert.html.erb b/web/app/views/clients/_alert.html.erb index c2f554683..4f0b7de12 100644 --- a/web/app/views/clients/_alert.html.erb +++ b/web/app/views/clients/_alert.html.erb @@ -8,7 +8,7 @@

- CANCEL + CANCEL
diff --git a/web/app/views/clients/_leaveSessionWarning.html.erb b/web/app/views/clients/_leaveSessionWarning.html.erb index 6bf5005ec..98392579a 100644 --- a/web/app/views/clients/_leaveSessionWarning.html.erb +++ b/web/app/views/clients/_leaveSessionWarning.html.erb @@ -14,7 +14,7 @@ OK
- CANCEL + CANCEL

diff --git a/web/app/views/clients/_terms.html.erb b/web/app/views/clients/_terms.html.erb index cdc1be070..a549bb690 100644 --- a/web/app/views/clients/_terms.html.erb +++ b/web/app/views/clients/_terms.html.erb @@ -13,7 +13,7 @@ ACCEPT
- CANCEL + CANCEL

From 586b130138644e3fea73a396da841e82d6b51e31 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 24 Feb 2014 20:51:59 -0500 Subject: [PATCH 2/4] fix search rabl --- web/app/views/api_search/index.rabl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/views/api_search/index.rabl b/web/app/views/api_search/index.rabl index 4d0dc0317..3a45d8a31 100644 --- a/web/app/views/api_search/index.rabl +++ b/web/app/views/api_search/index.rabl @@ -52,7 +52,7 @@ if @search.musicians_text_search? end node :pending_friend_request do |musician| - musician.pending_friend_request?(musician) + musician.pending_friend_request?(current_user) end node :biography do |musician| From e3c4b09c3f0bdc940bc8d64e67a1235022c8e96b Mon Sep 17 00:00:00 2001 From: Seth Call Date: Tue, 25 Feb 2014 02:20:17 +0000 Subject: [PATCH 3/4] * promptLeave --- web/app/assets/javascripts/jamkazam.js | 1 + web/app/assets/javascripts/session.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/web/app/assets/javascripts/jamkazam.js b/web/app/assets/javascripts/jamkazam.js index 570968f84..0a1771068 100644 --- a/web/app/assets/javascripts/jamkazam.js +++ b/web/app/assets/javascripts/jamkazam.js @@ -232,6 +232,7 @@ } } else { + logger.error("Unexpected ajax error: " + textStatus + ", msg:" + errorMessage); app.notify({title: textStatus, text: errorMessage, detail: jqXHR.responseText}); } } diff --git a/web/app/assets/javascripts/session.js b/web/app/assets/javascripts/session.js index 887b4b98d..768004dae 100644 --- a/web/app/assets/javascripts/session.js +++ b/web/app/assets/javascripts/session.js @@ -432,6 +432,7 @@ }); } + // not leave session but leave screen function beforeLeave(data) { if(promptLeave) { var leaveSessionWarningDialog = new context.JK.LeaveSessionWarningDialog(context.JK.app, @@ -1209,6 +1210,15 @@ } } + function sessionLeave(evt) { + evt.preventDefault(); + + promptLeave = false; + context.window.location = '/client#/home'; + + return false; + } + function sessionResync(evt) { evt.preventDefault(); var response = context.jamClient.SessionAudioResync(); @@ -1388,7 +1398,8 @@ } function events() { - $('#session-resync').on('click', sessionResync); + $('#session-leave').on('click', sessionLeave); + $('#session-resync').on('click', sessionResync); $('#session-contents').on("click", '[action="delete"]', deleteSession); $('#tracks').on('click', 'div[control="mute"]', toggleMute); $('#recording-start-stop').on('click', startStopRecording); From 051fcd8b044d22b49f531fa9b69465cf9d6f96ea Mon Sep 17 00:00:00 2001 From: Seth Call Date: Tue, 25 Feb 2014 03:25:34 +0000 Subject: [PATCH 4/4] * working around conn.update --- db/manifest | 1 + db/up/user_bio.sql | 1 + ruby/lib/jam_ruby/connection_manager.rb | 9 ++++++++- web/spec/support/utilities.rb | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 db/up/user_bio.sql diff --git a/db/manifest b/db/manifest index 143b2b9d6..f82a62034 100755 --- a/db/manifest +++ b/db/manifest @@ -124,3 +124,4 @@ remove_is_downloadable.sql scores_mod_connections2.sql track_download_counts.sql scores_mod_users2.sql +user_bio.sql diff --git a/db/up/user_bio.sql b/db/up/user_bio.sql new file mode 100644 index 000000000..a83009a9b --- /dev/null +++ b/db/up/user_bio.sql @@ -0,0 +1 @@ +ALTER TABLE users ALTER COLUMN biography TYPE TEXT; \ No newline at end of file diff --git a/ruby/lib/jam_ruby/connection_manager.rb b/ruby/lib/jam_ruby/connection_manager.rb index 4b7bc2de6..91368427c 100644 --- a/ruby/lib/jam_ruby/connection_manager.rb +++ b/ruby/lib/jam_ruby/connection_manager.rb @@ -86,7 +86,14 @@ module JamRuby city = location.city end - conn.update(ip_address: ip_address, locidispid: locidispid, latitude: latitude, longitude: longitude, countrycode: countrycode, region:region, city: city) + conn.ip_address = ip_address + conn.locidispid = locidispid + conn.latitude = latitude + conn.longitude = longitude + conn.countrycode = countrycode + conn.region = region + conn.city = city + conn.save!(validate: false) end sql =<