Subversion Repositories oidplus

Rev

Rev 833 | Rev 1292 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 833 Rev 1036
Line 62... Line 62...
62
                                        $("#update_infobox").html($("#update_infobox").html() + '\n\n<input type="button" onclick="location.reload()" value="'+_L('Reload page')+'">');
62
                                        $("#update_infobox").html($("#update_infobox").html() + '\n\n<input type="button" onclick="location.reload()" value="'+_L('Reload page')+'">');
63
                                }
63
                                }
64
                        },
64
                        },
65
                        success: function(data) {
65
                        success: function(data) {
66
                                //hide_waiting_anim();
66
                                //hide_waiting_anim();
67
                                if ("error" in data) {
67
                                if (typeof data === "object" && "error" in data) {
68
                                        $("#update_header").text(_L("Update failed"));
68
                                        $("#update_header").text(_L("Update failed"));
69
                                        //alertError(_L("Error: %1",data.error));
69
                                        //alertError(_L("Error: %1",data.error));
70
                                        if ("content" in data) {
70
                                        if (typeof data === "object" && "content" in data) {
71
                                                $("#update_infobox").html($("#update_infobox").html() + "\n\n" + data.content + "\n\n" + '<span class="severity_4"><strong>' + _L('FATAL ERROR') + ':</strong></span> ' + data.error + "\n\n");
71
                                                $("#update_infobox").html($("#update_infobox").html() + "\n\n" + data.content + "\n\n" + '<span class="severity_4"><strong>' + _L('FATAL ERROR') + ':</strong></span> ' + data.error + "\n\n");
72
                                        } else {
72
                                        } else {
73
                                                $("#update_infobox").html($("#update_infobox").html() + "\n\n" + '<span class="severity_4"><strong>' + _L('FATAL ERROR') + ':</strong></span> ' + data.error + "\n\n");
73
                                                $("#update_infobox").html($("#update_infobox").html() + "\n\n" + '<span class="severity_4"><strong>' + _L('FATAL ERROR') + ':</strong></span> ' + data.error + "\n\n");
74
                                        }
74
                                        }
75
                                        $("#update_infobox").html($("#update_infobox").html() + '\n\n<input type="button" onclick="location.reload()" value="'+_L('Reload page')+'">');
75
                                        $("#update_infobox").html($("#update_infobox").html() + '\n\n<input type="button" onclick="location.reload()" value="'+_L('Reload page')+'">');
76
                                } else if (data.status >= 0) {
76
                                } else if (typeof data === "object" && data.status >= 0) {
77
 
77
 
78
                                        if (!("update_file" in data)) {
78
                                        if (!(typeof data === "object" && "update_file" in data)) {
79
 
79
 
80
                                                output = data.content.trim();
80
                                                output = data.content.trim();
81
                                                output = output.replace(/INFO:/g, '<span class="severity_2"><strong>' + _L('INFO') + ':</strong></span>');
81
                                                output = output.replace(/INFO:/g, '<span class="severity_2"><strong>' + _L('INFO') + ':</strong></span>');
82
                                                output = output.replace(/WARNING:/g, '<span class="severity_3"><strong>' + _L('WARNING') + ':</strong></span>');
82
                                                output = output.replace(/WARNING:/g, '<span class="severity_3"><strong>' + _L('WARNING') + ':</strong></span>');
83
                                                output = output.replace(/FATAL ERROR:/g, '<span class="severity_4"><strong>' + _L('FATAL ERROR') + ':</strong></span>');
83
                                                output = output.replace(/FATAL ERROR:/g, '<span class="severity_4"><strong>' + _L('FATAL ERROR') + ':</strong></span>');