Remove stealing feature

This commit is contained in:
Erik Michaels-Ober 2011-10-10 14:09:51 -07:00
parent b763d6a26b
commit 4d48e482fe
8 changed files with 0 additions and 65 deletions

View File

@ -496,60 +496,6 @@ $(function() {
}
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() {
var submitButton = $("#edit_profile_form input[type='submit']");
$(submitButton).attr("disabled", true);

View File

@ -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"))

View File

@ -6,7 +6,6 @@
= t("titles.ofline", :organization => @thing.user.organization) unless @thing.user.organization.blank?
- if user_signed_in?
= render :partial => 'users/reminder'
= render :partial => 'things/steal'
= render :partial => 'users/edit_profile'
= render :partial => 'sessions/sign_out'
- else

View File

@ -13,7 +13,6 @@ de:
sign_in: "Anmelden"
sign_out: "Austragen"
sign_up: "Registrieren"
steal: "Steal this %{thing}"
update: "Aktualisierung"
captions:
current_password: "(Wir brauchen Ihr aktuelles Passwort, um Ihre Änderungen zu bestätigen)"

View File

@ -13,7 +13,6 @@ en:
sign_in: "Sign in"
sign_out: "Sign out"
sign_up: "Sign up"
steal: "Steal this %{thing}"
update: "Update"
captions:
current_password: "(we need your current password to confirm your changes)"

View File

@ -13,7 +13,6 @@ es:
sign_in: "Ingresar"
sign_out: "Salir"
sign_up: "Regístrate"
steal: "Robar esta %{thing}"
update: "Actualización"
captions:
current_password: "(Necesitamos su contraseña actual para confirmar los cambios)"

View File

@ -13,7 +13,6 @@ fr:
sign_in: "Connexion"
sign_out: "Inscription sur"
sign_up: "S'inscrire"
steal: "Voler cette %{thing}"
update: "Mise à jour"
captions:
current_password: "(Nous avons besoin de votre mot de passe actuel pour confirmer vos modifications)"

View File

@ -13,7 +13,6 @@ pt:
sign_in: "Entrar"
sign_out: "Sair"
sign_up: "Inscrever-se"
steal: "Roubar este %{thing}"
update: "Atualizar"
captions:
current_password: "(Nós precisamos de sua senha atual para confirmar as alterações)"