Merge commit 'stash' into develop
This commit is contained in:
commit
fbdef0108e
7 changed files with 69 additions and 13 deletions
2
Gemfile
2
Gemfile
|
@ -19,7 +19,7 @@ gem 'json'
|
||||||
gem 'rails3-jquery-autocomplete'
|
gem 'rails3-jquery-autocomplete'
|
||||||
gem 'best_in_place'
|
gem 'best_in_place'
|
||||||
gem 'kaminari' # pagination
|
gem 'kaminari' # pagination
|
||||||
|
gem 'uservoice-ruby'
|
||||||
gem 'paperclip'
|
gem 'paperclip'
|
||||||
gem 'aws-sdk'
|
gem 'aws-sdk'
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ GEM
|
||||||
warden (~> 1.2.3)
|
warden (~> 1.2.3)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (2.0.2)
|
execjs (2.0.2)
|
||||||
|
ezcrypto (0.7.2)
|
||||||
formtastic (2.2.1)
|
formtastic (2.2.1)
|
||||||
actionpack (>= 3.0)
|
actionpack (>= 3.0)
|
||||||
formula (1.0.1)
|
formula (1.0.1)
|
||||||
|
@ -84,6 +85,7 @@ GEM
|
||||||
mini_portile (= 0.6.0)
|
mini_portile (= 0.6.0)
|
||||||
nokogiri (1.6.2.1-x86-mingw32)
|
nokogiri (1.6.2.1-x86-mingw32)
|
||||||
mini_portile (= 0.6.0)
|
mini_portile (= 0.6.0)
|
||||||
|
oauth (0.4.7)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
paperclip (4.1.1)
|
paperclip (4.1.1)
|
||||||
activemodel (>= 3.0.0)
|
activemodel (>= 3.0.0)
|
||||||
|
@ -141,6 +143,10 @@ GEM
|
||||||
uglifier (2.5.0)
|
uglifier (2.5.0)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
json (>= 1.8.0)
|
json (>= 1.8.0)
|
||||||
|
uservoice-ruby (0.0.11)
|
||||||
|
ezcrypto (>= 0.7.2)
|
||||||
|
json (>= 1.7.5)
|
||||||
|
oauth (>= 0.4.7)
|
||||||
warden (1.2.3)
|
warden (1.2.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
|
|
||||||
|
@ -167,3 +173,4 @@ DEPENDENCIES
|
||||||
redis (= 2.2.2)
|
redis (= 2.2.2)
|
||||||
sass-rails
|
sass-rails
|
||||||
uglifier (>= 1.0.3)
|
uglifier (>= 1.0.3)
|
||||||
|
uservoice-ruby
|
||||||
|
|
|
@ -3,7 +3,7 @@ if(BAROMETER == undefined) {
|
||||||
BAROMETER = {};
|
BAROMETER = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
BAROMETER.load = function(barometer_id) {
|
//BAROMETER.load = function(barometer_id) {
|
||||||
this.barometer_id = barometer_id;
|
this.barometer_id = barometer_id;
|
||||||
this.empty_url = "http://getbarometer.s3.amazonaws.com/assets/barometer/images/transparent.gif";
|
this.empty_url = "http://getbarometer.s3.amazonaws.com/assets/barometer/images/transparent.gif";
|
||||||
this.feedback_url = 'http://getbarometer.com/system/feedback_form/' + this.barometer_id;
|
this.feedback_url = 'http://getbarometer.com/system/feedback_form/' + this.barometer_id;
|
49
app/assets/javascripts/lib/uservoice.js
Normal file
49
app/assets/javascripts/lib/uservoice.js
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
var USERVOICE;
|
||||||
|
if(USERVOICE == undefined) {
|
||||||
|
USERVOICE = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
USERVOICE.load = function (barometer_id) {
|
||||||
|
// Include the UserVoice JavaScript SDK (only needed once on a page)
|
||||||
|
UserVoice=window.UserVoice||[];(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/wybK0nSMNuhlWkIKzTyWg.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})();
|
||||||
|
|
||||||
|
//
|
||||||
|
// UserVoice Javascript SDK developer documentation:
|
||||||
|
// https://www.uservoice.com/o/javascript-sdk
|
||||||
|
//
|
||||||
|
|
||||||
|
// Set colors
|
||||||
|
UserVoice.push(['set', {
|
||||||
|
accent_color: '#448dd6',
|
||||||
|
trigger_color: 'white',
|
||||||
|
trigger_background_color: 'rgba(46, 49, 51, 0.6)'
|
||||||
|
}]);
|
||||||
|
|
||||||
|
// Identify the user and pass traits
|
||||||
|
// To enable, replace sample data with actual user traits and uncomment the line
|
||||||
|
//TODO NEED HELP HERE MAKING SURE CORRECT USER DATA GETS PUSHED
|
||||||
|
UserVoice.push(['identify', {
|
||||||
|
//email: 'getElementsByTagName(userid)', // User’s email address
|
||||||
|
name: "userid", // User’s real name
|
||||||
|
//created_at: 1364406966, // Unix timestamp for the date the user signed up
|
||||||
|
id: "Metamaps.Active.Mapper.id", // Optional: Unique id of the user (if set, this should not change)
|
||||||
|
//type: 'Owner', // Optional: segment your users by type
|
||||||
|
//account: {
|
||||||
|
// id: 123, // Optional: associate multiple users with a single account
|
||||||
|
// name: 'Acme, Co.', // Account name
|
||||||
|
// created_at: 1364406966, // Unix timestamp for the date the account was created
|
||||||
|
// monthly_rate: 9.99, // Decimal; monthly rate of the account
|
||||||
|
// ltv: 1495.00, // Decimal; lifetime value of the account
|
||||||
|
// plan: 'Enhanced' // Plan name for the account
|
||||||
|
//}
|
||||||
|
}]);
|
||||||
|
|
||||||
|
// Add default trigger to the bottom-right corner of the window:
|
||||||
|
UserVoice.push(['addTrigger', { mode: 'contact', trigger_position: 'bottom-left' }]);
|
||||||
|
|
||||||
|
// Or, use your own custom trigger:
|
||||||
|
//UserVoice.push(['addTrigger', '#barometer_tab', { mode: 'contact' }]);
|
||||||
|
|
||||||
|
// Autoprompt for Satisfaction and SmartVote (only displayed under certain conditions)
|
||||||
|
UserVoice.push(['autoprompt', {}]);
|
||||||
|
};
|
|
@ -40,6 +40,7 @@ Metamaps.Settings = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Metamaps.Touch = {
|
Metamaps.Touch = {
|
||||||
touchPos: null, // this stores the x and y values of a current touch event
|
touchPos: null, // this stores the x and y values of a current touch event
|
||||||
touchDragNode: null // this stores a reference to a JIT node that is being dragged
|
touchDragNode: null // this stores a reference to a JIT node that is being dragged
|
||||||
|
@ -3827,3 +3828,4 @@ Metamaps.Admin = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,21 @@
|
||||||
/* =Barometer feedback tab
|
/* =USERVOICE ICON DEFINE
|
||||||
--------------------------------------------------------*/
|
--------------------------------------------------------*/
|
||||||
|
|
||||||
a#barometer_tab {
|
div.uv-icon.uv-bottom-left {
|
||||||
background-image:url(../images/feedback_tab.png);
|
background-image:url(feedback_sprite.png);
|
||||||
background-color:#222222;
|
background-color:#222222;
|
||||||
color:#FFFFFF;
|
color:#FFFFFF;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
height:102px;
|
height:108px;
|
||||||
left:0;
|
left:0;
|
||||||
margin-left:-7px;
|
margin-left:0px;
|
||||||
overflow:hidden;
|
|
||||||
position:fixed;
|
|
||||||
text-indent:-100000px;
|
text-indent:-100000px;
|
||||||
top:25%;
|
top:25%;
|
||||||
width:42px;
|
width:25px;
|
||||||
z-index:100000;
|
z-index:100000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* =Barometer Overlay
|
/* =NOTHING AFTER THIS POINT IS BEING USED
|
||||||
--------------------------------------------------------*/
|
--------------------------------------------------------*/
|
||||||
|
|
||||||
#barometer_overlay {
|
#barometer_overlay {
|
|
@ -66,8 +66,8 @@
|
||||||
<%= render :partial => 'layouts/templates' %>
|
<%= render :partial => 'layouts/templates' %>
|
||||||
<%= render :partial => 'shared/metacodeBgColors' %>
|
<%= render :partial => 'shared/metacodeBgColors' %>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
BAROMETER.load('Scqak8nyHdFEkezKMNeQp');
|
//BAROMETER.load('Scqak8nyHdFEkezKMNeQp');
|
||||||
|
USERVOICE.load();
|
||||||
<% if authenticated? %>
|
<% if authenticated? %>
|
||||||
Metamaps.Active.Mapper = <%= user.to_json.html_safe %>
|
Metamaps.Active.Mapper = <%= user.to_json.html_safe %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
Loading…
Reference in a new issue