Fix saved state cucumber feature
This commit is contained in:
parent
693ad112ba
commit
3fb6b0e072
2 changed files with 5 additions and 7 deletions
|
|
@ -42,7 +42,7 @@
|
|||
-unless @landing_page
|
||||
%ul#aspect_nav
|
||||
%li{:class => ('selected' if @aspect == :all)}
|
||||
= link_to t('_home'), root_path, :class => 'home_selector'
|
||||
= link_to t('_home'), aspects_path, :class => 'home_selector'
|
||||
|
||||
- for aspect in @all_aspects
|
||||
%li{:data=>{:guid=>aspect.id}, :class => ("selected" if @object_aspect_ids.include?(aspect.id))}
|
||||
|
|
|
|||
|
|
@ -102,10 +102,6 @@ $(document).ready(function(){
|
|||
return baseURL;
|
||||
}
|
||||
|
||||
$("a.home_selector").live("click", function(e){
|
||||
performAspectUpdate("home");
|
||||
});
|
||||
|
||||
function performAspectUpdate(home){
|
||||
// update the open aspects in the user
|
||||
updateURL = "/users/" + $('div.avatar').children('img').attr("data-owner_id");
|
||||
|
|
@ -118,7 +114,6 @@ $(document).ready(function(){
|
|||
}
|
||||
}
|
||||
|
||||
//alert(updateURL);
|
||||
$.ajax({
|
||||
url : updateURL,
|
||||
type: "PUT",
|
||||
|
|
@ -126,6 +121,9 @@ $(document).ready(function(){
|
|||
|
||||
}
|
||||
|
||||
if($("a.home_selector").parent().hasClass("selected")){
|
||||
performAspectUpdate("home");
|
||||
}
|
||||
|
||||
function performAjax(newURL) {
|
||||
var post = $("#publisher textarea").val(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue