add more hotkey tooltips
This commit is contained in:
		
							parent
							
								
									9e988041b8
								
							
						
					
					
						commit
						629f537d06
					
				@ -158,7 +158,7 @@ small collection of user feedback
 | 
				
			|||||||
* Windows: python 3.7 and older cannot read tags with ffprobe, so use mutagen or upgrade
 | 
					* Windows: python 3.7 and older cannot read tags with ffprobe, so use mutagen or upgrade
 | 
				
			||||||
* Windows: python 2.7 cannot index non-ascii filenames with `-e2d`
 | 
					* Windows: python 2.7 cannot index non-ascii filenames with `-e2d`
 | 
				
			||||||
* Windows: python 2.7 cannot handle filenames with mojibake
 | 
					* Windows: python 2.7 cannot handle filenames with mojibake
 | 
				
			||||||
* MacOS: `--th-ff-jpg` may fix thumbnails using macports-FFmpeg
 | 
					* `--th-ff-jpg` may fix video thumbnails on some FFmpeg versions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## general bugs
 | 
					## general bugs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1376,7 +1376,7 @@ class HttpCli(object):
 | 
				
			|||||||
            for c, v in [[b"&", 4], [b"<", 3], [b">", 3]]:
 | 
					            for c, v in [[b"&", 4], [b"<", 3], [b">", 3]]:
 | 
				
			||||||
                sz_md += (len(buf) - len(buf.replace(c, b""))) * v
 | 
					                sz_md += (len(buf) - len(buf.replace(c, b""))) * v
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        file_ts = max(ts_md, ts_html)
 | 
					        file_ts = max(ts_md, ts_html, E.t0)
 | 
				
			||||||
        file_lastmod, do_send = self._chk_lastmod(file_ts)
 | 
					        file_lastmod, do_send = self._chk_lastmod(file_ts)
 | 
				
			||||||
        self.out_headers["Last-Modified"] = file_lastmod
 | 
					        self.out_headers["Last-Modified"] = file_lastmod
 | 
				
			||||||
        self.out_headers.update(NO_CACHE)
 | 
					        self.out_headers.update(NO_CACHE)
 | 
				
			||||||
 | 
				
			|||||||
@ -149,8 +149,8 @@ ebi('op_cfg').innerHTML = (
 | 
				
			|||||||
ebi('tree').innerHTML = (
 | 
					ebi('tree').innerHTML = (
 | 
				
			||||||
	'<div id="treeh">\n' +
 | 
						'<div id="treeh">\n' +
 | 
				
			||||||
	'	<a href="#" id="detree" tt="show breadcrumbs$NHotkey: B">🍞...</a>\n' +
 | 
						'	<a href="#" id="detree" tt="show breadcrumbs$NHotkey: B">🍞...</a>\n' +
 | 
				
			||||||
	'	<a href="#" class="btn" step="2" id="twobytwo">+</a>\n' +
 | 
						'	<a href="#" class="btn" step="2" id="twobytwo" tt="Hotkey: A">+</a>\n' +
 | 
				
			||||||
	'	<a href="#" class="btn" step="-2" id="twig">–</a>\n' +
 | 
						'	<a href="#" class="btn" step="-2" id="twig" tt="Hotkey: D">–</a>\n' +
 | 
				
			||||||
	'	<a href="#" class="tgl btn" id="dyntree" tt="autogrow as tree expands">a</a>\n' +
 | 
						'	<a href="#" class="tgl btn" id="dyntree" tt="autogrow as tree expands">a</a>\n' +
 | 
				
			||||||
	'</div>\n' +
 | 
						'</div>\n' +
 | 
				
			||||||
	'<ul id="treeul"></ul>\n' +
 | 
						'<ul id="treeul"></ul>\n' +
 | 
				
			||||||
@ -1458,8 +1458,8 @@ var thegrid = (function () {
 | 
				
			|||||||
	gfiles.innerHTML = (
 | 
						gfiles.innerHTML = (
 | 
				
			||||||
		'<div id="ghead">' +
 | 
							'<div id="ghead">' +
 | 
				
			||||||
		'<a href="#" class="tgl btn" id="gridsel" tt="enable file selection; ctrl-click a file to override$NHotkey: S">multiselect</a>   zoom ' +
 | 
							'<a href="#" class="tgl btn" id="gridsel" tt="enable file selection; ctrl-click a file to override$NHotkey: S">multiselect</a>   zoom ' +
 | 
				
			||||||
		'<a href="#" class="btn" z="-1.2" tt="Hotkey: A">–</a> ' +
 | 
							'<a href="#" class="btn" z="-1.2" tt="Hotkey: shift-A">–</a> ' +
 | 
				
			||||||
		'<a href="#" class="btn" z="1.2" tt="Hotkey: D">+</a>   sort by: ' +
 | 
							'<a href="#" class="btn" z="1.2" tt="Hotkey: shift-D">+</a>   sort by: ' +
 | 
				
			||||||
		'<a href="#" s="href">name</a>, ' +
 | 
							'<a href="#" s="href">name</a>, ' +
 | 
				
			||||||
		'<a href="#" s="sz">size</a>, ' +
 | 
							'<a href="#" s="sz">size</a>, ' +
 | 
				
			||||||
		'<a href="#" s="ts">date</a>, ' +
 | 
							'<a href="#" s="ts">date</a>, ' +
 | 
				
			||||||
@ -2520,7 +2520,7 @@ function apply_perms(newperms) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	var o = QSA('#ops>a[data-perm], #u2footfoot');
 | 
						var o = QSA('#ops>a[data-perm], #u2footfoot');
 | 
				
			||||||
	for (var a = 0; a < o.length; a++) {
 | 
						for (var a = 0; a < o.length; a++) {
 | 
				
			||||||
		var display = 'inline';
 | 
							var display = '';
 | 
				
			||||||
		var needed = o[a].getAttribute('data-perm').split(' ');
 | 
							var needed = o[a].getAttribute('data-perm').split(' ');
 | 
				
			||||||
		for (var b = 0; b < needed.length; b++) {
 | 
							for (var b = 0; b < needed.length; b++) {
 | 
				
			||||||
			if (!has(perms, needed[b])) {
 | 
								if (!has(perms, needed[b])) {
 | 
				
			||||||
 | 
				
			|||||||
@ -8,6 +8,47 @@ html, body {
 | 
				
			|||||||
	font-family: sans-serif;
 | 
						font-family: sans-serif;
 | 
				
			||||||
	line-height: 1.5em;
 | 
						line-height: 1.5em;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#tt {
 | 
				
			||||||
 | 
						position: fixed;
 | 
				
			||||||
 | 
						max-width: 34em;
 | 
				
			||||||
 | 
						background: #222;
 | 
				
			||||||
 | 
						border: 0 solid #777;
 | 
				
			||||||
 | 
						overflow: hidden;
 | 
				
			||||||
 | 
						margin-top: 1em;
 | 
				
			||||||
 | 
						padding: 0 1.3em;
 | 
				
			||||||
 | 
						height: 0;
 | 
				
			||||||
 | 
						opacity: .1;
 | 
				
			||||||
 | 
						transition: opacity 0.14s, height 0.14s, padding 0.14s;
 | 
				
			||||||
 | 
						box-shadow: 0 .2em .5em #222;
 | 
				
			||||||
 | 
						border-radius: .4em;
 | 
				
			||||||
 | 
						z-index: 9001;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#tt.b {
 | 
				
			||||||
 | 
						padding: 0 2em;
 | 
				
			||||||
 | 
						border-radius: .5em;
 | 
				
			||||||
 | 
						box-shadow: 0 .2em 1em #000;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#tt.show {
 | 
				
			||||||
 | 
						padding: 1em 1.3em;
 | 
				
			||||||
 | 
						border-width: .4em 0;
 | 
				
			||||||
 | 
						height: auto;
 | 
				
			||||||
 | 
						opacity: 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#tt.show.b {
 | 
				
			||||||
 | 
						padding: 1.5em 2em;
 | 
				
			||||||
 | 
						border-width: .5em 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#tt code {
 | 
				
			||||||
 | 
						background: #3c3c3c;
 | 
				
			||||||
 | 
						padding: .1em .3em;
 | 
				
			||||||
 | 
						border-top: 1px solid #777;
 | 
				
			||||||
 | 
						border-radius: .3em;
 | 
				
			||||||
 | 
						font-family: monospace, monospace;
 | 
				
			||||||
 | 
						line-height: 1.7em;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#tt em {
 | 
				
			||||||
 | 
						color: #f6a;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
#mtw {
 | 
					#mtw {
 | 
				
			||||||
	display: none;
 | 
						display: none;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -14,9 +14,9 @@
 | 
				
			|||||||
		<a id="lightswitch" href="#">go dark</a>
 | 
							<a id="lightswitch" href="#">go dark</a>
 | 
				
			||||||
		<a id="navtoggle" href="#">hide nav</a>
 | 
							<a id="navtoggle" href="#">hide nav</a>
 | 
				
			||||||
		{%- if edit %}
 | 
							{%- if edit %}
 | 
				
			||||||
			<a id="save" href="?edit">save</a>
 | 
								<a id="save" href="?edit" tt="Hotkey: ctrl-s">save</a>
 | 
				
			||||||
			<a id="sbs" href="#">sbs</a>
 | 
								<a id="sbs" href="#" tt="editor and preview side by side">sbs</a>
 | 
				
			||||||
			<a id="nsbs" href="#">editor</a>
 | 
								<a id="nsbs" href="#" tt="switch between editor and preview$NHotkey: ctrl-e">editor</a>
 | 
				
			||||||
			<div id="toolsbox">
 | 
								<div id="toolsbox">
 | 
				
			||||||
				<a id="tools" href="#">tools</a>
 | 
									<a id="tools" href="#">tools</a>
 | 
				
			||||||
				<a id="fmt_table" href="#">prettify table (ctrl-k)</a>
 | 
									<a id="fmt_table" href="#">prettify table (ctrl-k)</a>
 | 
				
			||||||
@ -26,8 +26,8 @@
 | 
				
			|||||||
				<a id="help" href="#">help</a>
 | 
									<a id="help" href="#">help</a>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
		{%- else %}
 | 
							{%- else %}
 | 
				
			||||||
			<a href="?edit">edit (basic)</a>
 | 
								<a href="?edit" tt="good: higher performance$Ngood: same document width as viewer$Nbad: assumes you know markdown">edit (basic)</a>
 | 
				
			||||||
			<a href="?edit2">edit (fancy)</a>
 | 
								<a href="?edit2" tt="not in-house so probably less buggy">edit (fancy)</a>
 | 
				
			||||||
			<a href="?raw">view raw</a>
 | 
								<a href="?raw">view raw</a>
 | 
				
			||||||
		{%- endif %}
 | 
							{%- endif %}
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
 | 
				
			|||||||
@ -530,3 +530,6 @@ dom_navtgl.onclick = function () {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if (sread('hidenav') == 1)
 | 
					if (sread('hidenav') == 1)
 | 
				
			||||||
    dom_navtgl.onclick();
 | 
					    dom_navtgl.onclick();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if (window['tt'])
 | 
				
			||||||
 | 
					    tt.init();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user