From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Getting checkboxes in HTML output? Date: Sun, 1 Dec 2013 07:46:37 +0100 Message-ID: <43B44636-263C-47D1-8853-55BFEFFCE576@gmail.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> <16f7d77c0769177de44354bcf25abb37@mail.rickster.com> <87A2DB5F-009B-4C8E-8058-D9A5DA78748B@gmail.com> <20131130140703.GA45985@eyeBook> Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vn0nk-0002EG-To for emacs-orgmode@gnu.org; Sun, 01 Dec 2013 01:46:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vn0nf-0002C7-V4 for emacs-orgmode@gnu.org; Sun, 01 Dec 2013 01:46:44 -0500 Received: from mail-wg0-x232.google.com ([2a00:1450:400c:c00::232]:60382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vn0nf-0002Bt-KI for emacs-orgmode@gnu.org; Sun, 01 Dec 2013 01:46:39 -0500 Received: by mail-wg0-f50.google.com with SMTP id a1so8897471wgh.5 for ; Sat, 30 Nov 2013 22:46:37 -0800 (PST) In-Reply-To: <20131130140703.GA45985@eyeBook> 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: Rick Frankel Cc: emacs-orgmode@gnu.org Hi Rick, On 30.11.2013, at 15:07, Rick Frankel wrote: > On Sat, Nov 30, 2013 at 07:54:42AM +0100, Carsten Dominik wrote: >=20 >> I don't thing the partial ones work - we should just make then >> unchecked in export if there is nothing better. the grey dos not >> convey the right information. >=20 > I agree, but couldn't think of any other way. There are 3 other > unicode options: >=20 > 1. A box with an X (=E2=98=92 U+2612 BALLOT BOX WITH X) > 2. A bare (unboxed) X (=E2=9C=97 U+2717 BALLOT X) > 3 A bare checkmark (=E2=9C=93 U+2713 CHECK MARK) >=20 > I also found this character: >=20 > U+237B =E2=8D=BB not check mark >=20 > If you think one of those would work we could use it instead. No, I don't think any of them does it. >=20 >=20 >> My vote: >> - Unicode characters as default >> - Both active and inactive checkboxes as option for people who want >> them, via a customize variable. >> - Partial checkboxes should be shown as unchecked. >=20 > I will implement the replacement of the ascii characters with the > unicode and the look at the html checkbox options. >=20 > FWIW, there are other issues w/ the active version besides the changes > not being saved -- If you are using hierarchical list or rollups > indicators ([x/y], [x%]), they will not be updated w/o some > javascript. Thank you Rick! - Carsten >=20 > rick >>=20 >>=20 >> On 29.11.2013, at 17:11, Rick Frankel wrote: >>=20 >>> 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=3D"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? >>>=20 >>> My 3 cents: >>>=20 >>> 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). >>>=20 >>> 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). >>>=20 >>> I've attached an html file which shows the various possible options. = My >>> comments: >>>=20 >>> 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. >>>=20 >>> 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. >>>=20 >>> Opinions? >>>=20 >>> rick >>>=20 >>>