summaryrefslogtreecommitdiff
path: root/js/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-12-23 18:07:41 +0400
committerAndrew Dolgov <[email protected]>2012-12-23 18:07:41 +0400
commit5cedb389d24861a94c1183d1562900dbe59ee3fb (patch)
treef12f3e67f698a9a55b1d736ed55efd7951f2a854 /js/prefs.js
parentb9546011d61665c26842ed133bae46c355ce19d5 (diff)
split self-updater gui to updater/ plugin
Diffstat (limited to 'js/prefs.js')
-rw-r--r--js/prefs.js68
1 files changed, 0 insertions, 68 deletions
diff --git a/js/prefs.js b/js/prefs.js
index 1d21e0cd5..51d8412fc 100644
--- a/js/prefs.js
+++ b/js/prefs.js
@@ -2208,74 +2208,6 @@ function batchSubscribe() {
}
}
-function updateSelf() {
- try {
- var query = "backend.php?op=pref-prefs&method=updateSelf";
-
- if (dijit.byId("updateSelfDlg"))
- dijit.byId("updateSelfDlg").destroyRecursive();
-
- var dialog = new dijit.Dialog({
- id: "updateSelfDlg",
- title: __("Update Tiny Tiny RSS"),
- style: "width: 600px",
- closable: false,
- performUpdate: function(step) {
- dijit.byId("self_update_start_btn").attr("disabled", true);
- dijit.byId("self_update_stop_btn").attr("disabled", true);
-
- notify_progress("Loading, please wait...", true);
- new Ajax.Request("backend.php", {
- parameters: "?op=pref-prefs&method=performUpdate&step=" + step +
- "&params=" + param_escape(JSON.stringify(dialog.attr("update-params"))),
- onComplete: function(transport) {
- try {
- rv = JSON.parse(transport.responseText);
- if (rv) {
- notify('');
-
- rv['log'].each(function(line) {
- $("self_update_log").innerHTML += "<li>" + line + "</li>";
- });
-
- dialog.attr("update-params", rv['params']);
-
- if (!rv['stop']) {
- window.setTimeout("dijit.byId('updateSelfDlg').performUpdate("+(step+1)+")", 500);
- } else {
- dijit.byId("self_update_stop_btn").attr("disabled", false);
- }
-
- } else {
- console.log(transport.responseText);
- notify_error("Received invalid data from server.");
- }
-
- dialog.attr("updated", true);
- } catch (e) {
- exception_error("updateSelf/inner", e);
- }
- } });
- },
- close: function() {
- if (dialog.attr("updated")) {
- window.location.reload();
- } else {
- dialog.hide();
- }
- },
- start: function() {
- if (prompt(__("Live updating is considered experimental. Backup your tt-rss directory before continuing. Please type 'yes' to continue.")) == 'yes') {
- dialog.performUpdate(0);
- }
- },
- href: query});
-
- dialog.show();
- } catch (e) {
- exception_error("batchSubscribe", e);
- }
-}
function toggleAdvancedPrefs() {
try {