Skip to content

Commit

Permalink
18.48 [ability to choose editor's color palettes; fixed multiple bugs]
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Rostovtsev committed May 17, 2017
1 parent f55f2a2 commit 1e9e655
Show file tree
Hide file tree
Showing 37 changed files with 169 additions and 146 deletions.
29 changes: 25 additions & 4 deletions authentic-lib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,7 @@ sub print_left_menu
elsif ( index( $link, '/virtual-server/edit_newresels.cgi' ) > -1 ) {
$icon = '<i class="fa fa-fw fa-cog"></i>';
}
elsif ( index( $link, '/virtual-server/bwgraph.cgi' ) > -1 && $id ne 'cat_logs' )
{
elsif ( index( $link, '/virtual-server/bwgraph.cgi' ) > -1 && $id ne 'cat_logs' ) {
$icon = '<i class="fa fa-fw fa-line-chart"></i>';
}
}
Expand Down Expand Up @@ -2151,6 +2150,25 @@ sub settings_get_select_navigation_color

}

sub settings_get_select_editor_color
{
my ( $v, $k ) = @_;
return '<select class="ui_select" name="' . $k . '">
<option value="monokai"'
. ( $v eq 'monokai' && ' selected' ) . '>'
. $Atext{'theme_xhred_global_dark'} . ' ('
. $Atext{'theme_xhred_global_default'}
. ')</option>
<option value="elegant"'
. ( $v eq 'elegant' && ' selected' ) . '>' . $Atext{'theme_xhred_global_light'} . '</option>
</select>';

}

sub _settings
{
my ( $t, $k, $v ) = @_;
Expand Down Expand Up @@ -2200,6 +2218,8 @@ sub _settings
'1',
'settings_hue_level_content',
'0',
'settings_cm_editor_palette',
'monokai',
'settings_hide_top_loader',
'false',
'settings_animation_left',
Expand Down Expand Up @@ -2292,8 +2312,6 @@ sub _settings

'__',
_settings( 'fa', 'table', &Atext('settings_right_table_options_title') ),
'settings_right_iconize_header_links',
'true',
'settings_right_hide_table_icons',
'false',
'settings_right_small_table_icons',
Expand Down Expand Up @@ -2796,6 +2814,9 @@ sub _settings
elsif ( $k eq 'settings_background_color' ) {
$v = settings_get_select_background_color( $v, $k );
}
elsif ( $k eq 'settings_cm_editor_palette' ) {
$v = settings_get_select_editor_color( $v, $k );
}
elsif ( $k eq 'settings_side_slider_palette' ) {
$v = '<select class="ui_select" name="' . $k . '">
Expand Down
3 changes: 1 addition & 2 deletions authentic.pm
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ sub theme_header
print &get_html_status_line(1);
print "</td></tr> <tr>\n";
}
print '<td id="headln2l" width="25%" align="left"'
. ( $__settings{'settings_right_iconize_header_links'} ne 'false' && ' class="invisible"' ) . '>';
print '<td id="headln2l" width="25%" align="left" class="invisible">';
if ( get_env('http_webmin_servers') && !$tconfig{'framed'} ) {
print "<a href='get_env('http_webmin_servers')'>", "$text{'header_servers'}</a><br>\n";
}
Expand Down
4 changes: 2 additions & 2 deletions extensions/csf/csf.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function csf_init() {
value: R,
lineNumbers: Q,
mode: null,
theme: (with_frame ? f.settings_cm_view_palette : "monokai"),
theme: ((with_frame && !f.__isNM) ? f.settings_cm_editor_palette : "monokai"),
readOnly: true,
viewportMargin: Infinity
});
Expand Down Expand Up @@ -485,7 +485,7 @@ function csf_init() {
},
styleActiveLine: true,
lineWrapping: true,
theme: (with_frame ? f.settings_cm_editor_palette : "monokai")
theme: ((with_frame && !f.__isNM) ? f.settings_cm_editor_palette : "monokai")
});
$window_height = ($(window).outerHeight() - ($(window).outerHeight() / 2));
g.setSize($parent_width, $window_height);
Expand Down
2 changes: 1 addition & 1 deletion extensions/csf/csf.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions extensions/file-manager/fetcher.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ if ( is_root() ) {
print_json( {'home_base' => $user_home_base} );
}
}
} else {
print_json({});
}
6 changes: 4 additions & 2 deletions extensions/file-manager/file-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ function ___f__tw() {
data: false,
dataType: "JSON",
success: function(f) {
$g__v__home_base = encodeURIComponentSafe(f.home_base)
$g__v__home_base = jQuery.isEmptyObject(f) ? $g__user__home : encodeURIComponentSafe(f.home_base)
},
error: function(f) {}
});
Expand Down Expand Up @@ -3200,7 +3200,9 @@ function ___f__tw() {
});
$(k + " " + m).modal("show")
},
error: function(k) {}
error: function(k) {
console.log(k)
}
})
});
$("body").on("click", "#file-manager-new-instance:not(.disabled_no_styling)", function(f) {
Expand Down
2 changes: 1 addition & 1 deletion extensions/file-manager/file-manager.min.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions lang/ca.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ settings_right_small_table_icons_description=Mostra icones petites en les taules
settings_right_animate_table_icons=Habilita l'animació de les icones
settings_right_grayscaled_table_icons=Mostra les icones sense color

settings_right_iconize_header_links=Mostrar icones en els encapçalaments
settings_right_iconize_header_links_description=Aquesta opció et permet visualitzar els enllaços dels encapçalaments de les taules com a icones.

settings_window_autoscroll=Habilita el desplaçament automàtic
settings_window_autoscroll_description=Habilitant aquesta opció la pàgina es desplaça automàticament cap avall amagant la barra de desplaçament.

Expand Down Expand Up @@ -717,3 +714,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/cz.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ settings_right_small_table_icons_description=Nahradit standardní velikost ikon
settings_right_animate_table_icons=Animovat ikony tabulek při výberu
settings_right_grayscaled_table_icons=Nechat ikony černobílé a zbarvit je pouze při najetí myši

settings_right_iconize_header_links=Nahradit odkazy v hlavičkách tabulek ikonami
settings_right_iconize_header_links_description=Zvolte, jestli chcete nahradit starý styl odkazů v hlavičkách tabulek ikonamy nebo ponechat textové odkazy

settings_window_autoscroll=Automatické skrolování okna
settings_window_autoscroll_description=Provádět automatické skrolování okna při načtení dalších dat ze serveru. Posuvník bude automaticky skryt. Záměrné skrolování uživatelem vypne automatické skrolování. Pro jeho znovuzapnutí je třeba posunout se na úplný konec stránky.

Expand Down Expand Up @@ -717,3 +714,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/da.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ settings_right_small_table_icons_description=Substitute standard size table icon
settings_right_animate_table_icons=Animate table icons on focus
settings_right_grayscaled_table_icons=Grayscale table icons and bring color on focus only

settings_right_iconize_header_links=Replace table header's links with icons
settings_right_iconize_header_links_description=Choose whether to replace old style table header's links with icons or keep old style text links

settings_window_autoscroll=Automatic window scroll
settings_window_autoscroll_description=Perform window automatic scroll down, upon page is populated from server-side. Spinner will be automatically hidden upon this feature is triggered. Intended mouse-scroll done by user, will make autoscroll stop; to restart it, make double mouse-scroll, being at the very bottom of the page.

Expand Down Expand Up @@ -717,3 +714,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/de.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ settings_right_small_table_icons_description=Mache Tabellen Symbole kleiner und
settings_right_animate_table_icons=Animiere Tabellen Symbole bei Eingabe
settings_right_grayscaled_table_icons=Farbige Tabellen Symbole nur bei Eingabe anzeigen

settings_right_iconize_header_links=Ersetzte Links im Tabellenkopf durch Symbole
settings_right_iconize_header_links_description=Wähle ob im Tabellenkopf Symbole oder Links angezeigt werden sollen.

settings_window_autoscroll=Bewege Fenster automatisch
settings_window_autoscroll_description=Das Fenster wird automatisch nach unten bewegt wenn neue Inhalte vom Server empfangen werden. Beim automatischen Bewegen wird der Aktivitätsanzeige angezeigt. Das automatische Bewegen wird deaktiviert solbald der Benutzer den Scollbalken selbst bewegt.

Expand Down Expand Up @@ -708,3 +705,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/en.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ settings_right_small_table_icons_description=Substitute standard size table icon
settings_right_animate_table_icons=Animate table icons on focus
settings_right_grayscaled_table_icons=Grayscale table icons and bring color on focus only

settings_right_iconize_header_links=Replace table header's links with icons
settings_right_iconize_header_links_description=Choose whether to replace old style table header's links with icons or keep old style text links

settings_window_autoscroll=Automatic window scroll
settings_window_autoscroll_description=Perform window automatic scroll down, upon page is populated from server-side. Spinner will be automatically hidden upon this feature is triggered. Intended mouse-scroll done by user, will make autoscroll stop; to restart it, make double mouse-scroll, being at the very bottom of the page.

Expand Down Expand Up @@ -714,3 +711,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/es.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ settings_right_small_table_icons_description=Substitute standard size table icon
settings_right_animate_table_icons=Animate table icons on focus
settings_right_grayscaled_table_icons=Grayscale table icons and bring color on focus only

settings_right_iconize_header_links=Replace table header's links with icons
settings_right_iconize_header_links_description=Choose whether to replace old style table header's links with icons or keep old style text links

settings_window_autoscroll=Automatic window scroll
settings_window_autoscroll_description=Perform window automatic scroll down, upon page is populated from server-side. Spinner will be automatically hidden upon this feature is triggered. Intended mouse-scroll done by user, will make autoscroll stop; to restart it, make double mouse-scroll, being at the very bottom of the page.

Expand Down Expand Up @@ -717,3 +714,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/fr.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ settings_right_small_table_icons_description=Substitute standard size table icon
settings_right_animate_table_icons=Animate table icons on focus
settings_right_grayscaled_table_icons=Grayscale table icons and bring color on focus only

settings_right_iconize_header_links=Replace table header's links with icons
settings_right_iconize_header_links_description=Choose whether to replace old style table header's links with icons or keep old style text links

settings_window_autoscroll=Automatic window scroll
settings_window_autoscroll_description=Perform window automatic scroll down, upon page is populated from server-side. Spinner will be automatically hidden upon this feature is triggered. Intended mouse-scroll done by user, will make autoscroll stop; to restart it, make double mouse-scroll, being at the very bottom of the page.

Expand Down Expand Up @@ -717,3 +714,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/it.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ settings_right_small_table_icons_description=Substitute standard size table icon
settings_right_animate_table_icons=Animate table icons on focus
settings_right_grayscaled_table_icons=Grayscale table icons and bring color on focus only

settings_right_iconize_header_links=Replace table header's links with icons
settings_right_iconize_header_links_description=Choose whether to replace old style table header's links with icons or keep old style text links

settings_window_autoscroll=Automatic window scroll
settings_window_autoscroll_description=Perform window automatic scroll down, upon page is populated from server-side. Spinner will be automatically hidden upon this feature is triggered. Intended mouse-scroll done by user, will make autoscroll stop; to restart it, make double mouse-scroll, being at the very bottom of the page.

Expand Down Expand Up @@ -717,3 +714,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/nl.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ settings_right_small_table_icons_description=Substitute standard size table icon
settings_right_animate_table_icons=Animate table icons on focus
settings_right_grayscaled_table_icons=Grayscale table icons and bring color on focus only

settings_right_iconize_header_links=Replace table header's links with icons
settings_right_iconize_header_links_description=Choose whether to replace old style table header's links with icons or keep old style text links

settings_window_autoscroll=Automatic window scroll
settings_window_autoscroll_description=Perform window automatic scroll down, upon page is populated from server-side. Spinner will be automatically hidden upon this feature is triggered. Intended mouse-scroll done by user, will make autoscroll stop; to restart it, make double mouse-scroll, being at the very bottom of the page.

Expand Down Expand Up @@ -717,3 +714,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/no.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ settings_right_small_table_icons_description=Substitute standard size table icon
settings_right_animate_table_icons=Animate table icons on focus
settings_right_grayscaled_table_icons=Grayscale table icons and bring color on focus only

settings_right_iconize_header_links=Replace table header's links with icons
settings_right_iconize_header_links_description=Choose whether to replace old style table header's links with icons or keep old style text links

settings_window_autoscroll=Automatic window scroll
settings_window_autoscroll_description=Perform window automatic scroll down, upon page is populated from server-side. Spinner will be automatically hidden upon this feature is triggered. Intended mouse-scroll done by user, will make autoscroll stop; to restart it, make double mouse-scroll, being at the very bottom of the page.

Expand Down Expand Up @@ -717,3 +714,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/pl.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ settings_right_small_table_icons_description=Substitute standard size table icon
settings_right_animate_table_icons=Animate table icons on focus
settings_right_grayscaled_table_icons=Grayscale table icons and bring color on focus only

settings_right_iconize_header_links=Replace table header's links with icons
settings_right_iconize_header_links_description=Choose whether to replace old style table header's links with icons or keep old style text links

settings_window_autoscroll=Automatic window scroll
settings_window_autoscroll_description=Perform window automatic scroll down, upon page is populated from server-side. Spinner will be automatically hidden upon this feature is triggered. Intended mouse-scroll done by user, will make autoscroll stop; to restart it, make double mouse-scroll, being at the very bottom of the page.

Expand Down Expand Up @@ -717,3 +714,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
5 changes: 2 additions & 3 deletions lang/pt.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@ settings_right_small_table_icons_description=Substitute standard size table icon
settings_right_animate_table_icons=Animate table icons on focus
settings_right_grayscaled_table_icons=Grayscale table icons and bring color on focus only

settings_right_iconize_header_links=Replace table header's links with icons
settings_right_iconize_header_links_description=Choose whether to replace old style table header's links with icons or keep old style text links

settings_window_autoscroll=Automatic window scroll
settings_window_autoscroll_description=Perform window automatic scroll down, upon page is populated from server-side. Spinner will be automatically hidden upon this feature is triggered. Intended mouse-scroll done by user, will make autoscroll stop; to restart it, make double mouse-scroll, being at the very bottom of the page.

Expand Down Expand Up @@ -717,3 +714,5 @@ theme_xhred_filemanager_editor_toggle_soft_wrap=Toggle Soft Wrap
theme_xhred_filemanager_editor_refresh_content=Refresh Content
theme_xhred_filemanager_save_to_refresh_content=File must be saved, in order to allow its content to be refreshed.
theme_xhred_filemanager_save_to_refresh_content_proc=Refreshing file content.
theme_xhred_global_dark=Dark
theme_xhred_global_light=Light
Loading

0 comments on commit 1e9e655

Please sign in to comment.