Skip to content

Commit

Permalink
18.47 [patch #749 - error handler for saving files in background]
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Rostovtsev committed May 6, 2017
1 parent 1b3a622 commit 8aafa2b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 20 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Changelog

#### Version 18.47-patch13 (May 5, 2017)
#### Version 18.47-patch14 (May 6, 2017)
* Added no animations for page transitions, resulting in overall speed increase
* Added support for choosing/preserving encoding for edited files in File Manager [#52020](https://virtualmin.com/comment/775888#comment-775888)
* Added support for choosing/preserving encoding for edited files in File Manager [#52020](https://virtualmin.com/comment/775985#comment-775985)
* Added ability to force update the theme from settings [#741](https://github.com/qooob/authentic-theme/issues/741)
* Added bigger checkboxes for tables [#743](https://github.com/qooob/authentic-theme/issues/743)
* Added alternative method for calling context menu in File Manager [#739](https://github.com/qooob/authentic-theme/issues/739)
* Fixed bugs [#736](https://github.com/qooob/authentic-theme/issues/736) [#737](https://github.com/qooob/authentic-theme/issues/737) [#738](https://github.com/qooob/authentic-theme/issues/738) [#742](https://github.com/qooob/authentic-theme/issues/742) [#745](https://github.com/qooob/authentic-theme/issues/745) [#751](https://github.com/qooob/authentic-theme/issues/751)
* Fixed bugs [#736](https://github.com/qooob/authentic-theme/issues/736) [#737](https://github.com/qooob/authentic-theme/issues/737) [#738](https://github.com/qooob/authentic-theme/issues/738) [#742](https://github.com/qooob/authentic-theme/issues/742) [#745](https://github.com/qooob/authentic-theme/issues/745) [#749](https://github.com/qooob/authentic-theme/issues/749) [#751](https://github.com/qooob/authentic-theme/issues/751)

#### Version 18.47 (April 29, 2017)
* Added desktop notifications [#734](https://github.com/qooob/authentic-theme/issues/734)
Expand Down
7 changes: 5 additions & 2 deletions extensions/file-manager/file-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -2642,12 +2642,15 @@ function ___f__tw() {
$.each(Q, function(x, X) {
S += '<option value="' + x + '"' + (((R.toLowerCase() == x.toLowerCase()) || (!x)) ? " selected" : "") + ">" + X + "</option>"
});
T.find(".jsPanel-hdr .jsPanel-hdr-r").append('<div data-encoding-label class="margined-top-3 margined-right-13 text-light cursor-default"><label class="select-styled select-styled-small select-styled-no-border select-styled-no-icon' + (K ? " pointer-events-none" : "") + '"> <select required data-encoding dir="rtl">' + S + "</select> </label></div>");
T.find(".jsPanel-hdr .jsPanel-hdr-r").append('<div data-encoding-label class="margined-top-3 margined-right-13 text-light cursor-default"><label class="select-styled select-styled-small select-styled-no-border select-styled-no-icon' + (K ? " pointer-events-none hidden" : "") + '"> <select required data-encoding dir="rtl">' + S + "</select> </label></div>");
var L = T.find("select[data-encoding]"),
H = L.val(),
s = T.find("._filemanager_file_editor_save");
H == Object.keys(Q)[2] && L.val(Object.keys(Q)[1]);
L.on("change", function(x) {
if (K) {
return
}
if (s.hasClass("text-danger") && s.hasClass("__locked__")) {
return
}
Expand All @@ -2668,7 +2671,7 @@ function ___f__tw() {
})
});
var W = localStorage.getItem(o);
if (!q && W) {
if (!K && !q && W) {
if (W && Q.hasOwnProperty(W)) {
L.val(W).trigger("change")
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/file-manager/file-manager.min.js

Large diffs are not rendered by default.

34 changes: 22 additions & 12 deletions unauthenticated/js/postinit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1277,32 +1277,33 @@ function __p__pe_sm() {
$("button").addClass("disabled").find(".fa.fa-arrow-circle-o-left").addClass((d ? "visible" : "invisible")).after(h);
a.attr("data-form-onbeforeunload", 0)
});
$("body").on("click", 'button[data-form="submitter"]:not(.disabled)', function(m) {
m.preventDefault();
var l = $(this),
n = (l.parents("form").attr("enctype") && l.parents("form").attr("enctype").indexOf("form-data") > -1 ? 0 : 1),
k = (n ? l.parents("form").serialize() : (new FormData(l.parents("form")[0])));
$("body").on("click", 'button[data-form="submitter"]:not(.disabled)', function(n) {
n.preventDefault();
var m = $(this),
k = m.parents("form"),
o = (k.attr("enctype") && k.attr("enctype").indexOf("form-data") > -1 ? 0 : 1),
l = (o ? k.serialize() : (new FormData(k[0])));
$("button").addClass("disabled").find(".fa.fa-floppy-o").addClass("invisible").after(i);
setTimeout(function() {
$.ajax({
type: "POST",
url: $__current_directory + c.attr("action"),
data: k,
data: l,
dataType: "text",
cache: false,
contentType: false,
processData: false,
success: function(o) {
success: function(p) {
a.removeClass("btn-warning").addClass("btn-success").attr("data-form-onbeforeunload", 0);
$("button").removeClass("disabled").find(".fa").removeClass("invisible").parent().find(".cspinner_container").remove();
if ($(o).find(".panel-body > hr + h3").length) {
messenger('<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>' + $(o).find(".panel-body hr + h3").html(), 60, "error", "magic_save_error");
if ($(p).find(".panel-body > hr + h3").length && !$(p).find(".panel-body .table").length && !$(p).find(".panel-body form[action]").length) {
messenger('<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>' + $(p).find(".panel-body hr + h3").html(), 60, "error", "magic_save_error");
a.removeClass("btn-success").addClass("btn-warning").attr("data-form-onbeforeunload", 1);
return
}
messenger('<i class="fa fa-fw fa-check-circle"></i>' + lang("theme_xhred_filemanager_file_saved").replace("%value", g), 3, "success")
},
error: function(o) {}
error: function(p) {}
})
}, 300)
})
Expand Down Expand Up @@ -2298,15 +2299,21 @@ function f__g_notifications(b, d, a) {
var c = new Notification(b, {
body: d,
icon: $_____link_full + "/images/notifications_" + a + ".png"
})
});
c.onclick = function() {
window.focus()
}
} else {
if (Notification.permission !== "denied") {
Notification.requestPermission(function(e) {
if (e === "granted") {
var f = new Notification(b, {
body: d,
icon: $_____link_full + "/images/notifications_" + a + ".png"
})
});
f.onclick = function() {
window.focus()
}
}
})
}
Expand All @@ -2315,6 +2322,9 @@ function f__g_notifications(b, d, a) {
(jQuery.browser = jQuery.browser || {}).mobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(b) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(b.substr(0, 4))
})(navigator.userAgent || navigator.vendor || window.opera);
(___is_iOSSafari && ($("html").css("overflow", "auto")));
if (is__mf("syslog", "save_log.cgi")) {
$(".container-fluid.col-lg-10.col-lg-offset-1").removeClass("col-lg-10 col-lg-offset-1").addClass("margined-top-15")
}
if (___is_iOS) {
$("head").append(' <style media="all" id="ipad-css" type="text/css"> .modal-backdrop.in { display: none !important; } </style> ')
}
Expand Down
2 changes: 1 addition & 1 deletion unauthenticated/js/postinit.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.47-git-201705051909
18.47-git-201705061059

0 comments on commit 8aafa2b

Please sign in to comment.