Remove stealing feature
This commit is contained in:
parent
b763d6a26b
commit
4d48e482fe
|
@ -496,60 +496,6 @@ $(function() {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#steal_form').live('submit', function() {
|
|
||||||
var answer = window.confirm("Are you sure you want to steal this <%= I18n.t("defaults.thing") %>?")
|
|
||||||
if(answer) {
|
|
||||||
var submitButton = $("#steal_form input[type='submit']");
|
|
||||||
$(submitButton).attr("disabled", true);
|
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
|
||||||
url: '/things.json',
|
|
||||||
data: {
|
|
||||||
'id': $('#thing_id').val(),
|
|
||||||
'commit': submitButton.val(),
|
|
||||||
'utf8': '✓',
|
|
||||||
'authenticity_token': $('#steal_form input[name="authenticity_token"]').val(),
|
|
||||||
'_method': 'put',
|
|
||||||
'thing': {
|
|
||||||
'user_id': $('#thing_user_id').val(),
|
|
||||||
'name': $('#thing_name').val()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
beforeSend: function() {
|
|
||||||
$('#info_window').hide();
|
|
||||||
$('#loader').show();
|
|
||||||
},
|
|
||||||
error: function(jqXHR) {
|
|
||||||
$('#loader').hide();
|
|
||||||
$('#info_window').show();
|
|
||||||
$(submitButton).attr("disabled", false);
|
|
||||||
},
|
|
||||||
success: function(data) {
|
|
||||||
$.ajax({
|
|
||||||
type: 'GET',
|
|
||||||
url: '/info_window',
|
|
||||||
data: {
|
|
||||||
'thing_id': activeThingId,
|
|
||||||
'flash': {
|
|
||||||
'notice': "<%= I18n.t("notices.stolen", :thing => I18n.t("defaults.thing").capitalize) %>"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
success: function(data) {
|
|
||||||
activeInfoWindow.setContent(data);
|
|
||||||
image = new google.maps.MarkerImage('<%= image_path 'markers/red.png' %>',
|
|
||||||
new google.maps.Size(27.0, 37.0),
|
|
||||||
new google.maps.Point(0, 0),
|
|
||||||
new google.maps.Point(13.0, 18.0)
|
|
||||||
);
|
|
||||||
activeMarker.setIcon(image);
|
|
||||||
activeMarker.setAnimation(null);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
$('#edit_profile_form').live('submit', function() {
|
$('#edit_profile_form').live('submit', function() {
|
||||||
var submitButton = $("#edit_profile_form input[type='submit']");
|
var submitButton = $("#edit_profile_form input[type='submit']");
|
||||||
$(submitButton).attr("disabled", true);
|
$(submitButton).attr("disabled", true);
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
= form_for :thing, :url => things_path, :method => :put, :html => {:id => "steal_form"} do |f|
|
|
||||||
= f.hidden_field "id"
|
|
||||||
= f.hidden_field "user_id", :value => ""
|
|
||||||
= f.hidden_field "name", :value => ""
|
|
||||||
= f.submit t("buttons.steal", :thing => t("defaults.thing"))
|
|
|
@ -6,7 +6,6 @@
|
||||||
= t("titles.ofline", :organization => @thing.user.organization) unless @thing.user.organization.blank?
|
= t("titles.ofline", :organization => @thing.user.organization) unless @thing.user.organization.blank?
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
= render :partial => 'users/reminder'
|
= render :partial => 'users/reminder'
|
||||||
= render :partial => 'things/steal'
|
|
||||||
= render :partial => 'users/edit_profile'
|
= render :partial => 'users/edit_profile'
|
||||||
= render :partial => 'sessions/sign_out'
|
= render :partial => 'sessions/sign_out'
|
||||||
- else
|
- else
|
||||||
|
|
|
@ -13,7 +13,6 @@ de:
|
||||||
sign_in: "Anmelden"
|
sign_in: "Anmelden"
|
||||||
sign_out: "Austragen"
|
sign_out: "Austragen"
|
||||||
sign_up: "Registrieren"
|
sign_up: "Registrieren"
|
||||||
steal: "Steal this %{thing}"
|
|
||||||
update: "Aktualisierung"
|
update: "Aktualisierung"
|
||||||
captions:
|
captions:
|
||||||
current_password: "(Wir brauchen Ihr aktuelles Passwort, um Ihre Änderungen zu bestätigen)"
|
current_password: "(Wir brauchen Ihr aktuelles Passwort, um Ihre Änderungen zu bestätigen)"
|
||||||
|
|
|
@ -13,7 +13,6 @@ en:
|
||||||
sign_in: "Sign in"
|
sign_in: "Sign in"
|
||||||
sign_out: "Sign out"
|
sign_out: "Sign out"
|
||||||
sign_up: "Sign up"
|
sign_up: "Sign up"
|
||||||
steal: "Steal this %{thing}"
|
|
||||||
update: "Update"
|
update: "Update"
|
||||||
captions:
|
captions:
|
||||||
current_password: "(we need your current password to confirm your changes)"
|
current_password: "(we need your current password to confirm your changes)"
|
||||||
|
|
|
@ -13,7 +13,6 @@ es:
|
||||||
sign_in: "Ingresar"
|
sign_in: "Ingresar"
|
||||||
sign_out: "Salir"
|
sign_out: "Salir"
|
||||||
sign_up: "Regístrate"
|
sign_up: "Regístrate"
|
||||||
steal: "Robar esta %{thing}"
|
|
||||||
update: "Actualización"
|
update: "Actualización"
|
||||||
captions:
|
captions:
|
||||||
current_password: "(Necesitamos su contraseña actual para confirmar los cambios)"
|
current_password: "(Necesitamos su contraseña actual para confirmar los cambios)"
|
||||||
|
|
|
@ -13,7 +13,6 @@ fr:
|
||||||
sign_in: "Connexion"
|
sign_in: "Connexion"
|
||||||
sign_out: "Inscription sur"
|
sign_out: "Inscription sur"
|
||||||
sign_up: "S'inscrire"
|
sign_up: "S'inscrire"
|
||||||
steal: "Voler cette %{thing}"
|
|
||||||
update: "Mise à jour"
|
update: "Mise à jour"
|
||||||
captions:
|
captions:
|
||||||
current_password: "(Nous avons besoin de votre mot de passe actuel pour confirmer vos modifications)"
|
current_password: "(Nous avons besoin de votre mot de passe actuel pour confirmer vos modifications)"
|
||||||
|
|
|
@ -13,7 +13,6 @@ pt:
|
||||||
sign_in: "Entrar"
|
sign_in: "Entrar"
|
||||||
sign_out: "Sair"
|
sign_out: "Sair"
|
||||||
sign_up: "Inscrever-se"
|
sign_up: "Inscrever-se"
|
||||||
steal: "Roubar este %{thing}"
|
|
||||||
update: "Atualizar"
|
update: "Atualizar"
|
||||||
captions:
|
captions:
|
||||||
current_password: "(Nós precisamos de sua senha atual para confirmar as alterações)"
|
current_password: "(Nós precisamos de sua senha atual para confirmar as alterações)"
|
||||||
|
|
Loading…
Reference in New Issue