|
@@ -1551,23 +1551,18 @@ $(document).ready(function(){
|
1551
|
1551
|
});
|
1552
|
1552
|
$('form[name="add"]').ajaxForm(function(response) {
|
1553
|
1553
|
|
1554
|
|
- var callback_login = null;
|
1555
|
|
- // Dans le cas d'un ajout depuis l'extérieur (iframe)
|
1556
|
|
- if ($('form[name="add"] input[name="shared_from"]').val() === "1")
|
1557
|
|
- {
|
1558
|
|
- callback_login = function(){
|
1559
|
|
- $('#form_add_loader').show();
|
1560
|
|
- JQueryJson(url_csrf, {}, function(response){
|
1561
|
|
- if (response.status == 'success')
|
1562
|
|
- {
|
1563
|
|
- $('form[name="add"] input[name="element_add[_token]"]').val(response.data);
|
1564
|
|
- $('form[name="add"]').submit();
|
1565
|
|
- $('#form_add_loader').hide();
|
1566
|
|
- }
|
1567
|
|
- });
|
1568
|
|
-
|
1569
|
|
- };
|
1570
|
|
- }
|
|
1554
|
+ var callback_login = function(){
|
|
1555
|
+ $('#form_add_loader').show();
|
|
1556
|
+ JQueryJson(url_csrf, {}, function(response){
|
|
1557
|
+ if (response.status == 'success')
|
|
1558
|
+ {
|
|
1559
|
+ $('form[name="add"] input[name="element_add[_token]"]').val(response.data);
|
|
1560
|
+ $('form[name="add"]').submit();
|
|
1561
|
+ $('#form_add_loader').hide();
|
|
1562
|
+ }
|
|
1563
|
+ });
|
|
1564
|
+ };
|
|
1565
|
+
|
1571
|
1566
|
|
1572
|
1567
|
$('form[name="add"] img.tag_loader').hide();
|
1573
|
1568
|
window.ResponseController.execute(
|
|
@@ -1969,10 +1964,23 @@ $(document).ready(function(){
|
1969
|
1964
|
li_element.find('form.add_comment').show();
|
1970
|
1965
|
|
1971
|
1966
|
li_element.find('form.add_comment').ajaxForm(function(response) {
|
|
1967
|
+
|
1972
|
1968
|
window.ResponseController.execute(
|
1973
|
1969
|
response,
|
1974
|
1970
|
function(){},
|
1975
|
|
- function(){}
|
|
1971
|
+ function(){},
|
|
1972
|
+ function(){
|
|
1973
|
+
|
|
1974
|
+ JQueryJson(url_csrf, {}, function(response){
|
|
1975
|
+ if (response.status === 'success')
|
|
1976
|
+ {
|
|
1977
|
+ li_element.find('form.add_comment').attr('action', str_replace('unknown', response.data, li_element.find('form.add_comment').attr('action')));
|
|
1978
|
+ li_element.find('form.add_comment').submit();
|
|
1979
|
+ }
|
|
1980
|
+ });
|
|
1981
|
+ scrollTo(li_element);
|
|
1982
|
+
|
|
1983
|
+ }
|
1976
|
1984
|
);
|
1977
|
1985
|
|
1978
|
1986
|
li_element.find('img.comments_loader').hide();
|
|
@@ -3045,7 +3053,9 @@ $(document).ready(function(){
|
3045
|
3053
|
* MUSTBECONNECTED links
|
3046
|
3054
|
*/
|
3047
|
3055
|
|
3048
|
|
- $('a.mustbeconnected').live('click', function(){open_connection_or_subscription_window();});
|
|
3056
|
+ $('a.mustbeconnected').live('click', function(){
|
|
3057
|
+ open_connection_or_subscription_window();
|
|
3058
|
+ });
|
3049
|
3059
|
$('a.mustbeconnected').off('click').on('click',function(){
|
3050
|
3060
|
open_connection_or_subscription_window();
|
3051
|
3061
|
});
|
|
@@ -3424,6 +3434,7 @@ function open_connection_or_subscription_window(open_login_part, data, login_suc
|
3424
|
3434
|
{
|
3425
|
3435
|
$('a#helpbox_close').click();
|
3426
|
3436
|
login_success_callback();
|
|
3437
|
+ reload_top_and_side();
|
3427
|
3438
|
}
|
3428
|
3439
|
else
|
3429
|
3440
|
{
|
|
@@ -3449,6 +3460,7 @@ function open_connection_or_subscription_window(open_login_part, data, login_suc
|
3449
|
3460
|
{
|
3450
|
3461
|
$('a#helpbox_close').click();
|
3451
|
3462
|
login_success_callback();
|
|
3463
|
+ reload_top_and_side();
|
3452
|
3464
|
}
|
3453
|
3465
|
else
|
3454
|
3466
|
{
|
|
@@ -3501,4 +3513,27 @@ function sidebar_fix_to_bottom_finish()
|
3501
|
3513
|
$('.sidebar').css('bottom', '')
|
3502
|
3514
|
});
|
3503
|
3515
|
}
|
|
3516
|
+}
|
|
3517
|
+
|
|
3518
|
+function reload_top_and_side()
|
|
3519
|
+{
|
|
3520
|
+ JQueryJson(url_reload_top_and_side, {}, function(response){
|
|
3521
|
+ if (response.status == 'success')
|
|
3522
|
+ {
|
|
3523
|
+ if ($('div#header'))
|
|
3524
|
+ {
|
|
3525
|
+ $('div#header').html(response.data.top);
|
|
3526
|
+ }
|
|
3527
|
+
|
|
3528
|
+ if ($('aside#sidebar div.sidebar'))
|
|
3529
|
+ {
|
|
3530
|
+ $('aside#sidebar div.sidebar').html(response.data.right);
|
|
3531
|
+ }
|
|
3532
|
+ }
|
|
3533
|
+ });
|
|
3534
|
+}
|
|
3535
|
+
|
|
3536
|
+function scrollTo(element)
|
|
3537
|
+{
|
|
3538
|
+ $('html, body').animate({ scrollTop: element.offset().top }, 'fast');
|
3504
|
3539
|
}
|