Skip to content
Extraits de code Groupes Projets
Valider 3fb6b0e0 rédigé par Raphael's avatar Raphael
Parcourir les fichiers

Fix saved state cucumber feature

parent 693ad112
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
-unless @landing_page -unless @landing_page
%ul#aspect_nav %ul#aspect_nav
%li{:class => ('selected' if @aspect == :all)} %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 - for aspect in @all_aspects
%li{:data=>{:guid=>aspect.id}, :class => ("selected" if @object_aspect_ids.include?(aspect.id))} %li{:data=>{:guid=>aspect.id}, :class => ("selected" if @object_aspect_ids.include?(aspect.id))}
......
...@@ -102,10 +102,6 @@ $(document).ready(function(){ ...@@ -102,10 +102,6 @@ $(document).ready(function(){
return baseURL; return baseURL;
} }
$("a.home_selector").live("click", function(e){
performAspectUpdate("home");
});
function performAspectUpdate(home){ function performAspectUpdate(home){
// update the open aspects in the user // update the open aspects in the user
updateURL = "/users/" + $('div.avatar').children('img').attr("data-owner_id"); updateURL = "/users/" + $('div.avatar').children('img').attr("data-owner_id");
...@@ -118,7 +114,6 @@ $(document).ready(function(){ ...@@ -118,7 +114,6 @@ $(document).ready(function(){
} }
} }
//alert(updateURL);
$.ajax({ $.ajax({
url : updateURL, url : updateURL,
type: "PUT", type: "PUT",
...@@ -126,6 +121,9 @@ $(document).ready(function(){ ...@@ -126,6 +121,9 @@ $(document).ready(function(){
} }
if($("a.home_selector").parent().hasClass("selected")){
performAspectUpdate("home");
}
function performAjax(newURL) { function performAjax(newURL) {
var post = $("#publisher textarea").val(), var post = $("#publisher textarea").val(),
...@@ -176,7 +174,7 @@ $(document).ready(function(){ ...@@ -176,7 +174,7 @@ $(document).ready(function(){
// reinit listeners on stream // reinit listeners on stream
photozone.html(photos_html); photozone.html(photos_html);
Stream.initialize(); Stream.initialize();
// fade contents back in // fade contents back in
if(requests == 0){ if(requests == 0){
$("#aspect_stream_container").fadeTo(100, 1); $("#aspect_stream_container").fadeTo(100, 1);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter