Godwin
11 years ago
21 changed files with 530 additions and 134 deletions
@ -0,0 +1,75 @@ |
|||||
|
$(function() { |
||||
|
$('table#translations td.value').click(function() { |
||||
|
var $this = $(this); |
||||
|
if(!$this.find('.translation-form').length) { |
||||
|
startTranslating($this); |
||||
|
} |
||||
|
}); |
||||
|
if ($('table#translations').length) { |
||||
|
$(document).click(function(event) { |
||||
|
$target = $(event.target); |
||||
|
if ($target.closest('table#translations').length < 1 && !$target.hasClass('auto-translate')) { |
||||
|
stopTranslating(); |
||||
|
} |
||||
|
}); |
||||
|
$('.auto-translate').click(function(event) { |
||||
|
event.preventDefault(); |
||||
|
$td = $(this).parent(); |
||||
|
saveTranslation($td, null, true); |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
function saveTranslation($td, $move_to, auto_translate) { |
||||
|
var val = ''; |
||||
|
var do_auto_translate = true; |
||||
|
if (typeof auto_translate == "undefined" || !auto_translate) { |
||||
|
val = $td.find('textarea').val(); |
||||
|
do_auto_translate = false; |
||||
|
} |
||||
|
var key = $td.parent().data().key; |
||||
|
var params = { |
||||
|
translationkey: key, |
||||
|
translationvalue: val, |
||||
|
translationlang: window.location.href.replace(/^.*\/(\w+)\/$/, '$1') |
||||
|
}; |
||||
|
if (do_auto_translate) { |
||||
|
params['auto_translate'] = true; |
||||
|
} |
||||
|
params['authenticity_token'] = $('table#translations').data().token; |
||||
|
$.post('/translate/', params, function(json) { |
||||
|
$td.html(json.translation); |
||||
|
if ($td.parent().hasClass('not-exists')) { |
||||
|
$td.parent().removeClass('not-exists'); |
||||
|
$td.parent().addClass('exists'); |
||||
|
} |
||||
|
$('.translation-form').remove(); |
||||
|
if (typeof $move_to != "undefined" && $move_to) { |
||||
|
startTranslating($move_to); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
function stopTranslating() { |
||||
|
$('.translation-form').remove(); |
||||
|
} |
||||
|
|
||||
|
function startTranslating($td) { |
||||
|
stopTranslating(); |
||||
|
var value = $td.parent().hasClass('not-exists') ? '' : $td.html().trim(); |
||||
|
var $tr = $td.parent(); |
||||
|
var key = $tr.data().key; |
||||
|
$td.append('<div class="translation-form"><textarea>' + value + '</textarea><button class="small" data-key="' + key + '">Save</textarea>'); |
||||
|
var $textarea = $td.find('textarea'); |
||||
|
$textarea.select(); |
||||
|
$td.find('.translation-form button').click(function() { saveTranslation($td); }); |
||||
|
$textarea.keydown(function(event) { |
||||
|
if (event.keyCode == 9) { |
||||
|
event.preventDefault(); |
||||
|
var $new_tr = event.shiftKey ? $tr.prev() : $tr.next(); |
||||
|
saveTranslation($td, $new_tr.find('.value')); |
||||
|
} else if (event.keyCode == 27) { |
||||
|
stopTranslating(); |
||||
|
} |
||||
|
}); |
||||
|
} |
@ -0,0 +1,73 @@ |
|||||
|
- content_for :dom_ready |
||||
|
$('table#translations td.value').click(function() { |
||||
|
var $this = $(this); |
||||
|
if(!$this.find('.translation-form').length()) { |
||||
|
startTranslating($this); |
||||
|
} |
||||
|
}); |
||||
|
if ($('table#translations').length()) { |
||||
|
$(document).click(function(event) { |
||||
|
$target = $(event.target); |
||||
|
if ($target.closest('table#translations').length() < 1 && !$target.hasClass('auto-translate')) { |
||||
|
stopTranslating(); |
||||
|
} |
||||
|
$('.auto-translate').click (function(event) { |
||||
|
event.preventDefault(); |
||||
|
$td = $(this).parent(); |
||||
|
saveTranslation($td, null, true); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
- content_for :scripts |
||||
|
function saveTranslation($td, $move_to, auto_translate) { |
||||
|
var val = ''; |
||||
|
var do_auto_translate = true; |
||||
|
if (typeof auto_translate == "undefined" || !auto_translate) { |
||||
|
val = $td.find('textarea').val(); |
||||
|
do_auto_translate = false; |
||||
|
} |
||||
|
var key = $td.parent().data().key; |
||||
|
var params = { |
||||
|
translationkey: key, |
||||
|
translationvalue: val, |
||||
|
translationlang: window.location.href.replace(/^.*\/(\w+)\/$/, '$1') |
||||
|
}; |
||||
|
if (do_auto_translate) { |
||||
|
params['auto_translate'] = true; |
||||
|
} |
||||
|
$.post('/translate/', params, function(json) { |
||||
|
$td.html(json.translation); |
||||
|
if ($td.parent().hasClass('not-exists')) { |
||||
|
$td.parent().removeClass('not-exists'); |
||||
|
$td.parent().addClass('exists'); |
||||
|
} |
||||
|
$('.translation-form').remove(); |
||||
|
if (typeof $move_to != "undefined" && $move_to) { |
||||
|
startTranslating($move_to); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
function stopTranslating() { |
||||
|
$('.translation-form').remove(); |
||||
|
} |
||||
|
|
||||
|
function startTranslating($td) { |
||||
|
stopTranslating(); |
||||
|
var value = $td.parent().hasClass('not-exists') ? '' : $td.html().trim(); |
||||
|
var $tr = $td.parent(); |
||||
|
var key = $tr.data().key; |
||||
|
$td.append('<div class="translation-form"><textarea>' + value + '</textarea><button class="small" data-key="' + key + '">Save</textarea>'); |
||||
|
var $textarea = $td.find('textarea'); |
||||
|
$textarea.select(); |
||||
|
$td.find('.translation-form button').click(function() { saveTranslation($td); }); |
||||
|
$textarea.keydown(function(event) { |
||||
|
if (event.keyCode == 9) { |
||||
|
event.preventDefault(); |
||||
|
var $new_tr = event.shiftKey ? $tr.prev() : $tr.next(); |
||||
|
saveTranslation($td, $new_tr.find('.value')); |
||||
|
} else if (event.keyCode == 27) { |
||||
|
stopTranslating(); |
||||
|
} |
||||
|
}); |
||||
|
} |
@ -1,6 +1,15 @@ |
|||||
%footer |
%footer.row |
||||
|
.columns.medium-8.medium-push-1.large-6.large-push-3.text-center |
||||
|
%a{href: '/conferences/'}='Conferences' |
||||
|
\/ |
||||
|
%a{href: '/conferences/'}='Organizations' |
||||
|
\/ |
||||
|
%a{href: '/conferences/'}='Zine' |
||||
|
.columns.medium-3.large-3.text-right |
||||
|
©2014 Bike!Bike! |
||||
:javascript |
:javascript |
||||
#{yield :scripts} |
#{yield :scripts} |
||||
$(function(){ |
$(function(){ |
||||
#{yield :dom_ready} |
#{yield :dom_ready} |
||||
}); |
}); |
||||
|
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|
||||
|
AiNXGCp5upwAS36CCTV5xBWovLglX52cJt5ZdEgL/E884FsGThIjT5Z7qBnP2sW0 |
||||
|
iTqF5OHh7NGtMMUfaYImsUo2vSH4y2mF4DHjV38VvnzbqnM4ADUqPld8PkbrCHUA |
||||
|
j9H+5ggeDw6LYXvvrUicAXVaX2uoKYgkwRz4g/jgBgfuE+l8vDlFi6Rm54Lh6gDy |
||||
|
4mcgKSf/NGlocqHlzFvASih1H1BSq4jfK32orRSbYd2HNHRsYtMUgjoRSuyueQEQ |
||||
|
9pDN7J8gJrI37ypt8mg9646U1wuxDzqT4wDRQwRFunRgNGtM6nF+40PfWPAkokSa |
||||
|
tkmZfXF2VUw4nqMEa+k= |
||||
|
-----END CERTIFICATE----- |
@ -0,0 +1,19 @@ |
|||||
|
-----BEGIN CERTIFICATE REQUEST----- |
||||
|
MIIDCDCCAfACAQAwgY4xCzAJBgNVBAYTAkNBMQswCQYDVQQIEwJBQjEQMA4GA1UE |
||||
|
BxMHQ2FsZ2FyeTETMBEGA1UEChQKQmlrZSFCaWtlITEMMAoGA1UECxMDRGV2MRYw |
||||
|
FAYDVQQDEw1sb2NhbGhvc3Quc3NsMSUwIwYJKoZIhvcNAQkBFhZnb29kZ29kd2lu |
||||
|
QGhvdG1haWwuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyIIw |
||||
|
pitN51eMxkEWVyKmBp0sDgh0NMfCfklyBascn1nS+uAC9DcoI9kmvH+UQlvxtjbd |
||||
|
r/VRa21Fn89mYHVytobRsX28kH7JMfQu7/ja0xQf6d0s5EFM8yCstfqrSAfvzw50 |
||||
|
MlBSDd7RMRceEVFuE/LzAJqorEIAb7g4Om9zr6oyCMxGpzA/ltbXACeJB46AjpWj |
||||
|
lUNGpnAziWyrkqyXjghr5MmDv/EVPKCvN6KRyOmYpxgcbd/Nmr3/g+EAKTi1uzNc |
||||
|
HK6Gm+0YzzZDXo8ih6esSK4PUmbOE1GuBEQD6NoMhT5wL5hB2jhMRF1KXr8uqdEp |
||||
|
TpItxRgFFJs/OpVa0wIDAQABoDQwEwYJKoZIhvcNAQkCMQYWBEIhQiEwHQYJKoZI |
||||
|
hvcNAQkHMRAWDk5ld09ybGVhbnNAKSEjMA0GCSqGSIb3DQEBBQUAA4IBAQCTsPln |
||||
|
29vj2ygz2sD1rtsAFNxR/TKxE/9pHkbqswjenjTRScx7mYU7LXBbDsT1/0RB0LJB |
||||
|
PYLeKKBCCGSnYqSkZyUKUGv5ZdV0BxOiJ0CVOA3wfMnUwfv1bidkx4OfX3o+pLnW |
||||
|
7c3tzEHHiyst94bI9gn8BD/87zhjZn24VtQCedb4oxYvU/LTx2h+RbZYMLlRxySe |
||||
|
Rb1gsJc/nV/v1inNPbBGkZ+xz8TDgV9w/+pzfLeFn82L/GfkNEeY1M0un5ldDgOe |
||||
|
oR7zVRolp0T4qaXmGIU/TJv3iTBN8U+1ZRPu3AlATV4kzhT02l0X29ziQuBqZj3B |
||||
|
lXUOcuq9QvC+u2h8 |
||||
|
-----END CERTIFICATE REQUEST----- |
@ -0,0 +1,27 @@ |
|||||
|
-----BEGIN RSA PRIVATE KEY----- |
||||
|
MIIEogIBAAKCAQEAyIIwpitN51eMxkEWVyKmBp0sDgh0NMfCfklyBascn1nS+uAC |
||||
|
9DcoI9kmvH+UQlvxtjbdr/VRa21Fn89mYHVytobRsX28kH7JMfQu7/ja0xQf6d0s |
||||
|
5EFM8yCstfqrSAfvzw50MlBSDd7RMRceEVFuE/LzAJqorEIAb7g4Om9zr6oyCMxG |
||||
|
pzA/ltbXACeJB46AjpWjlUNGpnAziWyrkqyXjghr5MmDv/EVPKCvN6KRyOmYpxgc |
||||
|
bd/Nmr3/g+EAKTi1uzNcHK6Gm+0YzzZDXo8ih6esSK4PUmbOE1GuBEQD6NoMhT5w |
||||
|
L5hB2jhMRF1KXr8uqdEpTpItxRgFFJs/OpVa0wIDAQABAoIBAEM2qTo6z/2Z8p3O |
||||
|
2b9R5RfYfhk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qrrRZDxzYNR4wFMGZw5b6JnrVGE4Q0Xvojcil0sj5nBi1yKiLT8qv |
||||
|
G1WXAoGAV5q4BG+3Ogtzbra1g86B738tGwCugVN09+aa5CMUmHby+dxOV8TWUonU |
||||
|
WR8B0ftHNwGQbIyXH8vvUWouZc299un4GvSk2kD8QXOh7B8utEvhLUOESWZh3DK0 |
||||
|
XLt/qjOfZWroefAippJWjYzMDr7ksjbf+VOEspuswJuq9n0porY= |
||||
|
-----END RSA PRIVATE KEY----- |
@ -0,0 +1,30 @@ |
|||||
|
-----BEGIN RSA PRIVATE KEY----- |
||||
|
Proc-Type: 4,ENCRYPTED |
||||
|
DEK-Info: DES-EDE3-CBC,E2B7A45350D7EA1A |
||||
|
|
||||
|
rS1BnPRCuwtWbHERCXw2moG6YJ3sMebRS1kqG5cNYY5Id6wcQbOzUfAMbzHitOBb |
||||
|
9jxwU2P9bxKGkohdtL/4x6voJbbt1WZivHa79g2lJvgSGqkGeF36sEQ+5FQo83xQ |
||||
|
houl4MWcl+AIZiJpjuCHrj4ZAhZZLaScRdzbOc32sm+y1evWjOR6QKj6l+kaEwCx |
||||
|
cHl7zusD/AjICS7qnkc2LyqHAukF/5VA+TPQGbslaA5E6FC/1FaOZMgvjJ/1doWF |
||||
|
Oq5J4tMLDrgcX36+5zRYmEv7OPIqz5h4ynTaZJgeceuJhHwnNhD0VipbzlC0cQd7 |
||||
|
AGHnRVDb+znQve58Zev14B5QtQhYQAuNmWiE3uiFAJEgnfbCt/zYMc7doNvzfOl2 |
||||
|
tqOgD5FVRVAdCPXVlmDCXWp/LmxraxmtGsdH916fYHrBEe2VZ2Eamen5EKWjcVje |
||||
|
quwhSjqR2GPfFZexR9s6FahGLuRIL6BB4pOwwG4D9OGBfvweqiaqlXVe5XGCZf1d |
||||
|
KY4YArWhHectUJB8xHWp5nVh6vuqAygQFyn4dS5lpNGLwNyhytBPZb6GwV6OT2mY |
||||
|
W6MBGcayqM66MeFoK67ghOfBNA+BG1P5F87wVOGE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uSmVxZB9d1g== |
||||
|
-----END RSA PRIVATE KEY----- |
Loading…
Reference in new issue