- Minor fixes following previous merge.

- Fixed regression: "Clone" button was visible for IE.
This commit is contained in:
Sebastien SAUVAGE 2012-04-22 20:43:11 +02:00
parent b57995474a
commit 50272a678f

View File

@ -205,7 +205,7 @@ function send_comment(parentid) {
var ciphernickname = ''; var ciphernickname = '';
var nick=$('input#nickname').val(); var nick=$('input#nickname').val();
if (nick != '' && nick != 'Optional nickname...') { if (nick != '' && nick != 'Optional nickname...') {
ciphernickname = ciphernickname = zeroCipher(pageKey(), nick); ciphernickname = zeroCipher(pageKey(), nick);
} }
var data_to_send = { data:cipherdata, var data_to_send = { data:cipherdata,
parentid: parentid, parentid: parentid,
@ -213,8 +213,7 @@ function send_comment(parentid) {
nickname: ciphernickname nickname: ciphernickname
}; };
$ $.post(scriptLocation(), data_to_send, 'json')
.post(scriptLocation(), data_to_send, 'json')
.error(function() { .error(function() {
showError('Comment could not be sent (serveur error or not responding).'); showError('Comment could not be sent (serveur error or not responding).');
}) })
@ -247,8 +246,7 @@ function send_data() {
expire: $('select#pasteExpiration').val(), expire: $('select#pasteExpiration').val(),
opendiscussion: $('input#opendiscussion').is(':checked') ? 1 : 0 opendiscussion: $('input#opendiscussion').is(':checked') ? 1 : 0
}; };
$ $.post(scriptLocation(), data_to_send, 'json')
.post(scriptLocation(), data_to_send, 'json')
.error(function() { .error(function() {
showError('Data could not be sent (serveur error or not responding).'); showError('Data could not be sent (serveur error or not responding).');
}) })
@ -278,14 +276,14 @@ function send_data() {
* Put the screen in "New paste" mode. * Put the screen in "New paste" mode.
*/ */
function stateNewPaste() { function stateNewPaste() {
$('#sendbutton').show(); $('button#sendbutton').show();
$('#clonebutton').hide(); $('button#clonebutton').hide();
$('div#expiration').show(); $('div#expiration').show();
$('div#remainingtime').hide(); $('div#remainingtime').hide();
$('div#language').hide(); // $('#language').show(); $('div#language').hide(); // $('#language').show();
$('input#password').hide(); //$('#password').show(); $('input#password').hide(); //$('#password').show();
$('div#opendisc').show(); $('div#opendisc').show();
$('#newbutton').show(); $('button#newbutton').show();
$('div#pastelink').hide(); $('div#pastelink').hide();
$('textarea#message').text(''); $('textarea#message').text('');
$('textarea#message').show(); $('textarea#message').show();
@ -298,23 +296,21 @@ function stateNewPaste() {
* Put the screen in "Existing paste" mode. * Put the screen in "Existing paste" mode.
*/ */
function stateExistingPaste() { function stateExistingPaste() {
$('#sendbutton').hide(); $('button#sendbutton').hide();
// No "clone" for IE<10. // No "clone" for IE<10.
if (!$('div#oldienotice').is(":visible")) { if ($('div#oldienotice').is(":visible")) {
$('button#clonebutton').hide();
}
else {
$('button#clonebutton').show(); $('button#clonebutton').show();
} }
/**
* @FIXME
*/
$('#clonebutton').show();
$('div#expiration').hide(); $('div#expiration').hide();
$('div#language').hide(); $('div#language').hide();
$('input#password').hide(); $('input#password').hide();
$('div#opendisc').hide(); $('div#opendisc').hide();
$('#newbutton').show(); $('button#newbutton').show();
$('div#pastelink').hide(); $('div#pastelink').hide();
$('textarea#message').hide(); $('textarea#message').hide();
$('div#cleartext').show(); $('div#cleartext').show();