fixed best_in_place issue, fixed toolbar functionality
This commit is contained in:
parent
13780defff
commit
f26d13fb5f
4 changed files with 21 additions and 120 deletions
11
Gemfile~
11
Gemfile~
|
@ -5,21 +5,22 @@ gem 'rails', '3.2.11'
|
|||
# Bundle edge Rails instead:
|
||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
||||
|
||||
gem 'devise'
|
||||
gem 'redis'
|
||||
gem 'pg'
|
||||
gem 'authlogic'
|
||||
gem 'cancan'
|
||||
gem 'formula'
|
||||
gem 'formtastic'
|
||||
gem 'json'
|
||||
gem 'rails3-jquery-autocomplete'
|
||||
gem 'best_in_place'
|
||||
gem 'therubyracer' #optional
|
||||
gem 'rb-readline'
|
||||
#gem 'therubyracer' #optional
|
||||
#gem 'rb-readline'
|
||||
|
||||
# Gems used only for assets and not required
|
||||
# in production environments by default.
|
||||
group :assets do
|
||||
gem 'sass-rails', '3.2.3'
|
||||
gem 'sass-rails'
|
||||
gem 'coffee-rails', '~> 3.2.1'
|
||||
|
||||
# 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'
|
||||
|
||||
# To use Jbuilder templates for JSON
|
||||
gem 'jbuilder'
|
||||
gem 'jbuilder', '0.8.2'
|
||||
|
||||
# Use unicorn as the web server
|
||||
# gem 'unicorn'
|
||||
|
|
|
@ -145,6 +145,7 @@ class TopicsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.js { render :json => @topic.self_as_json }
|
||||
format.json { render :json => @topic.self_as_json }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -64,63 +64,7 @@
|
|||
<% end %>
|
||||
|
||||
<script>
|
||||
$(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
|
||||
|
||||
$(document).ready(function() {
|
||||
function bindFilterHover() {
|
||||
|
||||
var filterIsOpen = false
|
||||
|
@ -200,11 +144,18 @@
|
|||
$("div.index").hover(openInfo, closeInfo);
|
||||
|
||||
|
||||
} // end bindWandHover
|
||||
bindWandHover();
|
||||
} // end bindInfoHover
|
||||
|
||||
bindFilterHover();
|
||||
bindInfoHover();
|
||||
|
||||
$('.sidebarSave').click(function() {
|
||||
saveLayoutAll();
|
||||
});
|
||||
$('.sidebarFork').click(function() {
|
||||
saveToMap();
|
||||
});
|
||||
|
||||
$(".sidebarCollaborateIcon").click(function(event) {
|
||||
goRealtime = !goRealtime;
|
||||
$(".sidebarCollaborateIcon").toggleClass("blue");
|
||||
|
|
|
@ -54,61 +54,6 @@
|
|||
|
||||
<script>
|
||||
$(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() {
|
||||
|
||||
|
@ -153,9 +98,12 @@
|
|||
$(".sidebarFilter").hover(openFilter, closeFilter);
|
||||
|
||||
} // end bindFilterHover
|
||||
bindWandHover();
|
||||
bindFilterHover();
|
||||
|
||||
$('.sidebarFork').click(function() {
|
||||
saveToMap();
|
||||
});
|
||||
|
||||
// initialize best_in_place editing
|
||||
$('.authenticated div.permission.canEdit .best_in_place').best_in_place();
|
||||
|
||||
|
|
Loading…
Reference in a new issue