Skip to content

Commit

Permalink
18.47 [patch #748 - complete support for proxy-passed configurations]
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Rostovtsev committed May 6, 2017
1 parent 8aafa2b commit f2f9fd3
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 31 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## Changelog

#### 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/775985#comment-775985)
#### Version 18.47-patch15 (May 6, 2017)
* Added enhancements to page transitions, resulting in overall speed increase
* Added complete support for proxy-passed configurations [#748](https://github.com/qooob/authentic-theme/issues/748)
* Added support for encodings control 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)
Expand Down
40 changes: 21 additions & 19 deletions authentic-lib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,14 @@ sub print_left_menu
my $icon;

if ( $item->{'type'} eq 'item'
&& $link ne "/virtual-server/edit_lang.cgi"
&& $link ne "/virtual-server/edit_lang.cgi"
&& $link ne "/virtual-server/history.cgi" )
&& $link ne add_webprefix("/virtual-server/edit_lang.cgi")
&& $link ne add_webprefix("/virtual-server/edit_lang.cgi")
&& $link ne add_webprefix("/virtual-server/history.cgi") )
{

# Define an icon for the link/accordion
if ( $link eq "/virtual-server/index.cgi"
|| $link eq "/server-manager/index.cgi" )
if ( $link eq add_webprefix("/virtual-server/index.cgi")
|| $link eq add_webprefix("/server-manager/index.cgi") )
{
$icon = '<i class="fa fa-fw fa-tasks"></i>';
}
Expand All @@ -677,24 +677,24 @@ sub print_left_menu
{
$icon = '<i class="fa fa-fw fa-user-md"></i>';
}
elsif ( $link eq "/mailbox/list_folders.cgi"
|| $link eq "/mailbox/list_ifolders.cgi" )
elsif ( $link eq add_webprefix("/mailbox/list_folders.cgi")
|| $link eq add_webprefix("/mailbox/list_ifolders.cgi") )
{
$icon = '<i class="fa fa-fw fa-folder"></i>';
}
elsif ( $link eq "/mailbox/list_addresses.cgi" ) {
elsif ( $link eq add_webprefix("/mailbox/list_addresses.cgi") ) {
$icon = '<i class="fa fa-fw fa-address-book"></i>';
}
elsif ( $link eq "/filter/edit_forward.cgi" ) {
elsif ( $link eq add_webprefix("/filter/edit_forward.cgi") ) {
$icon = '<i class="fa fa-fw fa-share"></i>';
}
elsif ( $link eq "/filter/edit_auto.cgi" ) {
elsif ( $link eq add_webprefix("/filter/edit_auto.cgi") ) {
$icon = '<i class="fa fa-fw fa-reply-all"></i>';
}
elsif ( $link eq "/filter/" ) {
elsif ( $link eq add_webprefix("/filter/") ) {
$icon = '<i class="fa fa-fw fa-filter"></i>';
}
elsif ( $link eq "/mailbox/edit_sig.cgi" ) {
elsif ( $link eq add_webprefix("/mailbox/edit_sig.cgi") ) {
$icon = '<i class="fa fa-fw fa-pencil"></i>';
}
elsif ( index( $link, 'mailbox/index.cgi?id=' ) > -1 ) {
Expand Down Expand Up @@ -2854,17 +2854,14 @@ sub _settings
? ' <span class="dropup">
<button class="btn btn-info dropdown-toggle margined-left--1 no-style-hover" type="button" id="force_update_menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-fw fa-download-cloud margined-right-8"></i>'
. $Atext{'theme_force_upgrade'}
. '&nbsp;&nbsp;
. $Atext{'theme_force_upgrade'} . '&nbsp;&nbsp;
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="force_update_menu">
<li><a data-git="1" data-stable="1" class="authentic_update" href="javascript:;"><i class="fa fa-fw fa-package-install margined-right-8"></i>'
. $Atext{'theme_force_upgrade_stable'}
. '</a></li>
. $Atext{'theme_force_upgrade_stable'} . '</a></li>
<li><a data-git="1" data-stable="0" class="authentic_update" href="javascript:;"><i class="fa fa-fw fa-git-commit margined-right-8"></i>'
. $Atext{'theme_force_upgrade_beta'}
. '</a></li>
. $Atext{'theme_force_upgrade_beta'} . '</a></li>
</ul>
</span>'
: '' )
Expand Down Expand Up @@ -3003,7 +3000,12 @@ sub get_xhr_request
switch_to_remote_user();
my $data;
use Encode qw( encode decode );
eval { $data = Encode::encode( 'utf-8', Encode::decode( $in{'xhr-encoding_convert_name'}, read_file_contents( $in{'xhr-encoding_convert_file'} ) ) ) };
eval {
$data = Encode::encode( 'utf-8',
Encode::decode( $in{'xhr-encoding_convert_name'},
read_file_contents( $in{'xhr-encoding_convert_file'} )
) );
};
print $data;
}
elsif ( $in{'xhr-get_nice_size'} eq '1' ) {
Expand Down
5 changes: 3 additions & 2 deletions unauthenticated/js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,7 @@ f__lnk_t_btn(["/sysinfo.cgi", "/virtual-server/edit_newchangelog.cgi", "/server-
f__lnk_t_btn(["/virtual-server/", "/virtual-server/index.cgi", "/virtual-server/edit_plan.cgi"], "form table tbody td", 'a[href*="list_users.cgi?"], a[href*="list_aliases.cgi?"]', "btn btn-transparent btn-transparent-link-force btn-borderless btn-xxs vertical-align-top margined-top-2", 0, "(~)", " ~ ", "(~..)");
f__lnk_t_btn(["/quota/", "/quota/index.cgi"], ".table tbody td.td_tag", 'a[href*="activate.cgi"][href*="&active=3"]', "btn btn-warning btn-xxs vertical-align-top margined-top-2", "fa-ban");
f__lnk_t_btn(["/quota/", "/quota/index.cgi"], ".table tbody td.td_tag", 'a[href*="activate.cgi"][href*="&active=0"]', "btn btn-success btn-xxs vertical-align-top margined-top-2", "fa-check-circle-o");
f__lnk_t_btn(["/virtualmin-google-analytics/", "/virtualmin-google-analytics/index.cgi"], ".table tbody td.td_tag", 'a[href*="edit.cgi"]', "btn btn-warning btn-xxs vertical-align-top margined-top-2", "fa-pencil-square");
if ($('body[class*="status"]').length && $__source_file == "edit_mon.cgi" || $current_page_full == $_____link_full + "/virtual-server/list_sched.cgi" || $current_page_full == $_____link_full + "/ldap-server/edit_schema.cgi" || $current_page_full == $_____link_full + "/software/list_pack.cgi" || $current_page_full == $_____link_full + "/mailboxes/view_mail.cgi" || $current_page_full == $_____link_full + "/mailbox/view_mail.cgi" || $current_page_full == $_____link_full + "/mailbox/list_folders.cgi" || $current_page_full == $_____link_full + "/phpini/" || $current_page_full == $_____link_full + "/phpini/index.cgi" || $current_page_full == $_____link_full + "/fsdump/" || $current_page_full == $_____link_full + "/fsdump/index.cgi" || $current_page_full == $_____link_full + "/fdisk/" || $current_page_full == $_____link_full + "/fdisk/index.cgi" || $current_page_full == $_____link_full + "/virtualmin-awstats/" || $current_page_full == $_____link_full + "/virtualmin-awstats/index.cgi" || $current_page_full == $_____link_full + "/syslog/" || $current_page_full == $_____link_full + "/syslog/index.cgi") {
$.each($('tr td:last-child:contains("|")'), function() {
if ($current_page_full == $_____link_full + "/virtual-server/list_sched.cgi") {
Expand Down Expand Up @@ -1821,7 +1822,7 @@ $("table thead th:not(.table-title)").each(function() {
});
if ($("body").attr("class") && $("body").attr("class").indexOf($g__o__f_m) > -1) {
!$("body").hasClass("file-manager") && $("body").addClass("file-manager");
$("#headln2l").prepend("<a onClick='window.open(\"" + $_____link_full + '/help.cgi/authentic-theme/file-manager", "help", "toolbar=no,menubar=no,scrollbars=yes,width=600,height=400,resizable=yes"); return false\' href="/help.cgi/authentic-theme/file-manager"></a>')
$("#headln2l").prepend("<a onClick='window.open(\"" + $_____link_full + '/help.cgi/authentic-theme/file-manager", "help", "toolbar=no,menubar=no,scrollbars=yes,width=600,height=400,resizable=yes"); return false\' href="' + $_____link_full + '/help.cgi/authentic-theme/file-manager"></a>')
}
if (settings_right_iconize_header_links) {
$.each($(".panel-heading > table.header > tbody > tr > td > a"), function() {
Expand Down Expand Up @@ -3173,7 +3174,7 @@ if ($current_page_full == $_____link_full + "/mysql/exec_form.cgi" || $current_p
$('input[name="clear"]').attr("style", "margin-bottom: 3px !important;");
$('select[name="old"]').attr("style", "margin-bottom: 3px !important; margin-right: 0 !important;")
}
if ($__source_file == "config.cgi" && ($__source_query == "mysql" || $__source_query == "postgresql")) {
if (($__source_file == "config.cgi" || $__source_file == "uconfig.cgi") && ($__source_query == "mysql" || $__source_query == "postgresql")) {
$('input[name="style"]').parents("td.col_value").parent("tr").after(' <tr> <td class="col_label"><b>' + lang("theme_xhred_xsql_fit_content_screen_height") + '</b></td> <td class="col_value"><span> <span class="awradio awobject"> <input class="iawobject" name="config_portable_module_xsql_fit_content_screen_height" id="config_portable_module_xsql_fit_content_screen_height_1" value="true"' + (config_portable_module_xsql_fit_content_screen_height ? " checked" : "") + ' type="radio"> <label class="lawobject" for="config_portable_module_xsql_fit_content_screen_height_1">' + lang("theme_xhred_global_yes") + '</label> <input class="iawobject" name="config_portable_module_xsql_fit_content_screen_height" id="config_portable_module_xsql_fit_content_screen_height_0" value="false"' + (config_portable_module_xsql_fit_content_screen_height ? "" : " checked") + ' type="radio"> <label class="lawobject" for="config_portable_module_xsql_fit_content_screen_height_0">' + lang("theme_xhred_global_no") + "</label> </span> </span></td> </tr> ");
$('input[name="config_portable_module_xsql_fit_content_screen_height"]').on("change", function() {
var b = $(this).attr("name"),
Expand Down
2 changes: 1 addition & 1 deletion unauthenticated/js/content.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion unauthenticated/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,9 @@ t__wi_p.$('iframe[name="page"]').on("load", function() {
t__wi_p.location = t___wi.location.origin
}
____iframe___ = t__wi_p.$("#iframe")[0];
____iframe___ && ____iframe___.contentWindow.focus();
if (!t__wi_p.$(".form-control.sidebar-search").is(":focus")) {
____iframe___ && ____iframe___.contentWindow.focus()
}
$("body").on("shown.bs.modal", ".modal.in", function() {
$(this).focus()
});
Expand Down
2 changes: 1 addition & 1 deletion unauthenticated/js/init.min.js

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions unauthenticated/js/postinit.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,21 @@ if ($current_page_full && $current_page_full.indexOf("/servers/link.cgi/") > -1)
$_____link = $webprefix;
$_____link_full = $webprefix_full
} else {
$_____link = $webprefix;
if ($webprefix) {
$_____link = $webprefix.replace(/^\//g, "");
$_____link = ($_____link.endsWith("/") ? $_____link : ($_____link + "/"))
} else {
$_____link = $webprefix
}
$_____link_full = (("/" + $webprefix.replace(/\/$/g, "")).replace(/\/\//g, "/")).replace(/\/$/g, "")
}
} else {
$_____link = $webprefix;
if ($webprefix) {
$_____link = $webprefix.replace(/^\//g, "");
$_____link = ($_____link.endsWith("/") ? $_____link : ($_____link + "/"))
} else {
$_____link = $webprefix
}
$_____link_full = (("/" + $webprefix.replace(/\/$/g, "")).replace(/\/\//g, "/")).replace(/\/$/g, "")
}
if ($__source_host_complete.substr(-1) == "/") {
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-201705061059
18.47-git-201705061545

0 comments on commit f2f9fd3

Please sign in to comment.