fixed best_in_place issue, fixed toolbar functionality

This commit is contained in:
Connor Turland 2014-02-10 19:32:05 -05:00
parent 13780defff
commit f26d13fb5f
4 changed files with 21 additions and 120 deletions

View file

@ -5,21 +5,22 @@ gem 'rails', '3.2.11'
# Bundle edge Rails instead: # Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git' # gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'devise'
gem 'redis'
gem 'pg' gem 'pg'
gem 'authlogic'
gem 'cancan' gem 'cancan'
gem 'formula' gem 'formula'
gem 'formtastic' gem 'formtastic'
gem 'json' gem 'json'
gem 'rails3-jquery-autocomplete' gem 'rails3-jquery-autocomplete'
gem 'best_in_place' gem 'best_in_place'
gem 'therubyracer' #optional #gem 'therubyracer' #optional
gem 'rb-readline' #gem 'rb-readline'
# Gems used only for assets and not required # Gems used only for assets and not required
# in production environments by default. # in production environments by default.
group :assets do group :assets do
gem 'sass-rails', '3.2.3' gem 'sass-rails'
gem 'coffee-rails', '~> 3.2.1' gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes # See https://github.com/sstephenson/execjs#readme for more supported runtimes
@ -34,7 +35,7 @@ gem 'jquery-rails', '2.1.2'
# gem 'bcrypt-ruby', '~> 3.0.0' # gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON # To use Jbuilder templates for JSON
gem 'jbuilder' gem 'jbuilder', '0.8.2'
# Use unicorn as the web server # Use unicorn as the web server
# gem 'unicorn' # gem 'unicorn'

View file

@ -145,6 +145,7 @@ class TopicsController < ApplicationController
respond_to do |format| respond_to do |format|
format.js { render :json => @topic.self_as_json } format.js { render :json => @topic.self_as_json }
format.json { render :json => @topic.self_as_json }
end end
end end

View file

@ -65,62 +65,6 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
function bindWandHover() {
var wandIsOpen = false
// controls the sliding hover of the bottom left menu
var sliding1 = false;
var lT;
var closeWand = function() {
lT = setTimeout(function() {
if (! sliding1) {
sliding1 = true;
$('.sidebarWandIcon').css('background-color','#0F1519');
$('.sidebarWandBox').fadeOut(200, function() {
sliding1 = false;
wandIsOpen = false;
});
}
},300);
}
var openWand = function() {
clearTimeout(lT);
if (! sliding1) {
sliding1 = true;
// hide the other two
$('.sidebarAccountBox').hide();
$('.sidebarFilterBox').hide();
$('.sidebarFilterIcon').css('background-color','#0F1519');
$('.sidebarAccountIcon').css('background-color','#0F1519');
$('.sidebarWandIcon').css('background-color','#000');
$('.sidebarWandBox').fadeIn(200, function() {
sliding1 = false;
wandIsOpen = true;
});
}
}
// bind the hover events
$(".sidebarWand").hover(openWand, closeWand);
// attach events for clicking on wand actions
$('li.wandSaveLayout').click(function() {
saveLayoutAll();
});
$('li.wandForkMap').click(function() {
saveToMap();
closeWand();
});
$('li.wandFilter').click(function() {
return;
});
} // end bindWandHover
function bindFilterHover() { function bindFilterHover() {
var filterIsOpen = false var filterIsOpen = false
@ -200,11 +144,18 @@
$("div.index").hover(openInfo, closeInfo); $("div.index").hover(openInfo, closeInfo);
} // end bindWandHover } // end bindInfoHover
bindWandHover();
bindFilterHover(); bindFilterHover();
bindInfoHover(); bindInfoHover();
$('.sidebarSave').click(function() {
saveLayoutAll();
});
$('.sidebarFork').click(function() {
saveToMap();
});
$(".sidebarCollaborateIcon").click(function(event) { $(".sidebarCollaborateIcon").click(function(event) {
goRealtime = !goRealtime; goRealtime = !goRealtime;
$(".sidebarCollaborateIcon").toggleClass("blue"); $(".sidebarCollaborateIcon").toggleClass("blue");

View file

@ -54,61 +54,6 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
function bindWandHover() {
var wandIsOpen = false
// controls the sliding hover of the bottom left menu
var sliding1 = false;
var lT;
var closeWand = function() {
lT = setTimeout(function() {
if (! sliding1) {
sliding1 = true;
$('.sidebarWandIcon').css('background-color','#0F1519');
$('.sidebarWandBox').fadeOut(200, function() {
sliding1 = false;
wandIsOpen = false;
});
}
},300);
}
var openWand = function() {
clearTimeout(lT);
if (! sliding1) {
sliding1 = true;
// hide the other two
$('.sidebarAccountBox').hide();
$('.sidebarFilterBox').hide();
$('.sidebarFilterIcon').css('background-color','#0F1519');
$('.sidebarAccountIcon').css('background-color','#0F1519');
$('.sidebarWandIcon').css('background-color','#000');
$('.sidebarWandBox').fadeIn(200, function() {
sliding1 = false;
wandIsOpen = true;
});
}
}
// bind the hover events
$(".sidebarWand").hover(openWand, closeWand);
// attach events for clicking on wand actions
$('li.wandSaveLayout').click(function() {
saveLayoutAll();
});
$('li.wandForkMap').click(function() {
saveToMap();
closeWand();
});
$('li.wandFilter').click(function() {
return;
});
} // end bindWandHover
function bindFilterHover() { function bindFilterHover() {
@ -153,9 +98,12 @@
$(".sidebarFilter").hover(openFilter, closeFilter); $(".sidebarFilter").hover(openFilter, closeFilter);
} // end bindFilterHover } // end bindFilterHover
bindWandHover();
bindFilterHover(); bindFilterHover();
$('.sidebarFork').click(function() {
saveToMap();
});
// initialize best_in_place editing // initialize best_in_place editing
$('.authenticated div.permission.canEdit .best_in_place').best_in_place(); $('.authenticated div.permission.canEdit .best_in_place').best_in_place();