From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: Getting checkboxes in HTML output? Date: Fri, 29 Nov 2013 11:11:18 -0500 Message-ID: <16f7d77c0769177de44354bcf25abb37@mail.rickster.com> References: <20131127154534.GA12765@pdavismbp15.iscinternal.com> <8738mhal2d.fsf@alphaville.bos.redhat.com> <20131127182059.GB12765@pdavismbp15.iscinternal.com> <20131128133329.GA28945@eyeBook> <87vbzc9rmj.fsf@Rainer.invalid> <86haawtdya.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_2667527c35f78c94eb6024327311dede" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmQf8-0005eh-Kt for emacs-orgmode@gnu.org; Fri, 29 Nov 2013 11:11:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmQf3-00088p-L1 for emacs-orgmode@gnu.org; Fri, 29 Nov 2013 11:11:26 -0500 Received: from mail.rickster.com ([204.62.15.78]:41535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmQf3-00088d-GC for emacs-orgmode@gnu.org; Fri, 29 Nov 2013 11:11:21 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=_2667527c35f78c94eb6024327311dede Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8; format=flowed On 2013-11-28 16:58, Matt Price wrote: > On Thu, Nov 28, 2013 at 4:26 PM, Sebastien Vauban > wrote: > Achim Gratz wrote: > Rick Frankel writes: > For xhtml compatibility, it would need to be 'checked="checked"'. I've > done a quick look at the html dtd, and i does look like input elements > are allowed outside of forms, but i would need to double > check... Also, the fallback to "[-]" for the partially checked state > is a bit inconsistent, perhaps changing background color or other > attributre of the checkbox would be better. > > I'd much prefer if you'd be using character entities for that since you > can't do any input on the HTML anyway (WHITE MEDIUM SQUARE, SQUARE WITH > LOWER RIGHT DIAGONAL BLACK and BLACK MEDIUM SQUARE look like good > candidates). That probably makes it UTF-8 only since I don't think > these symbols are defined for plain (X)HTML, so for other encodings > things should probably stay as they are. > > FWIW, here's what I do for the HTML export: > > In JS: > > #+begin_src js > $(function () { > $('li > code:contains("[X]")') > .parent() > .addClass('checked') > .end() > .remove(); > $('li > code:contains("[-]")') > .parent() > .addClass('halfchecked') > .end() > .remove(); > $('li > code:contains("[ ]")') > .parent() > .addClass('unchecked') > .end() > .remove(); > }); > #+end_src > > In CSS: > > #+begin_src css > li.checked { > list-style-image: url('../images/checked.png'); > } > > li.halfchecked { > list-style-image: url('../images/halfchecked.png'); > } > > li.unchecked { > list-style-image: url('../images/unchecked.png'); > } > #+end_src > > with 3 nice pictures of green V, red X, and blue || (line "pause" on > recorders). > > > > so, I don't know if I'm the only one here who feels this way, but I > would like to be able to export to an HTML file with ACTUAL HECKBOXES > that I cna check off, say on a phone, when I put the milk in the > shopping art, or pack the swim goggles in the vacation bag, or > whatever. Maybe though I should be thinking in terms of some other > export application, remember the milk or something. Am I describing a > different use case than other users here, perhaps? My 3 cents: I don't see that active checkboxes would help since i don't see a use case where you can save the html back with the modified input. The github usecase mentioned in anothre thread requires a bunch of javascript to work (and write-out the modified file). While Sebastien's solution is visually appealing, i don't think requiring image assets is viable for the core exporter (note that it could be done w/o javascript, another dependency i would like to avoid). I've attached an html file which shows the various possible options. My comments: 1. As mentioned above, I don't see active checkboxes as useful since the modified state is transient. 2. I don't really like the disabled checkboxes visually. 3. Either of the other two approaches (the list item style, which parallels Sebastien's approach w/o using images) works for me. Visually I like the list item style solution, but doesn't really make the intent clear. So, my vote is to change the exporter to use the BALLOT BOX and BALLOT BOX WITH CHECK instead of the ascii character currently used and indicate partially checked boxes ([-]) with greyed text. Opinions? rick --=_2667527c35f78c94eb6024327311dede Content-Transfer-Encoding: base64 Content-Type: text/html; name=checkbox.html Content-Disposition: attachment; filename=checkbox.html; size=1234 PGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiPgogIDxoZWFkPjx0aXRs ZT5jaGVja2JveCB0ZXN0PC90aXRsZT48L2hlYWQ+CiAgPGJvZHk+CiAgICA8aDE+Q2hlY2tib3gg c2FtcGxlczwvaDE+CiAgICA8aDI+QWN0aXZlPC9oMj4KICAgIDx1bD4KICAgICAgPGxpPjxpbnB1 dCB0eXBlPSJjaGVja2JveCIvPiB1bmNoZWNrZWQ8L2xpPgogICAgICA8bGk+PGlucHV0IHR5cGU9 ImNoZWNrYm94IiBjaGVja2VkPSJjaGVja2VkIi8+IGNoZWNrZWQ8L2xpPgogICAgICA8bGkgc3R5 bGU9ImNvbG9yOmdyZXkiPgogICAgICAgIDxpbnB1dCB0eXBlPSJjaGVja2JveCIgY2hlY2tlZD0i Y2hlY2tlZCIvPiBwYXJ0aWFsPC9saT4KICAgIDwvdWw+CiAgICA8aDI+SW5hY3RpdmU8L2gyPgog ICAgPHVsPgogICAgICA8bGk+PGlucHV0IHR5cGU9ImNoZWNrYm94IiBkaXNhYmxlZD0iZGlzYWJs ZWQiLz4gdW5jaGVja2VkPC9saT4KICAgICAgPGxpPjxpbnB1dCB0eXBlPSJjaGVja2JveCIgY2hl Y2tlZD0iY2hlY2tlZCIgZGlzYWJsZWQ9ImRpc2FibGVkIi8+IGNoZWNrZWQ8L2xpPgogICAgICA8 bGkgc3R5bGU9ImNvbG9yOmdyZXkiPgogICAgICAgIDxpbnB1dCB0eXBlPSJjaGVja2JveCIgY2hl Y2tlZD0iY2hlY2tlZCIgZGlzYWJsZWQ9ImRpc2FibGVkIi8+IHBhcnRpYWw8L2xpPgogICAgPC91 bD4KICAgIDxoMj5MaXN0IGl0ZW0gc3R5bGU8L2gyPgogICAgPHV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