> On Sep 3, 2015, at 1:58 PM, Sam Ruby <[email protected]> wrote: > > On Thu, Sep 3, 2015 at 4:42 PM, Craig L Russell > <[email protected]> wrote: >> Mostly the diff highlighting works. But it doesn’t seem to work with some >> names, e.g. Alexis de Tréglodé. > > At the moment, I'm scanning from the left and right until I find a > difference. If the resulting length is greater than 3 in both > strings, I'm not highlighting anything. > >> And now the edit function doesn’t seem to work at all. > > I got annoyed by a single click going into edit mode when I didn't > mean to and changed it to require double clicks. Let me know if you > have a problem with this change.
No problem at all. I did have trouble editing a field that had highlighted changes. I’ll see if I can point you to a current problem. Edit William Silva with the extra text. ctrl a ctrl x to get rid of the extra text. As far as the tool is concerned, you didn’t change anything. The <commit changes> button remains inert. Craig > >> Craig > > - Sam Ruby > >>> Begin forwarded message: >>> >>> From: [email protected] >>> Subject: svn commit: r964181 - >>> /infrastructure/trunk/projects/whimsy/www/secretary/public-names.cgi >>> Date: September 3, 2015 at 7:39:25 AM PDT >>> To: [email protected] >>> >>> Author: rubys >>> Date: Thu Sep 3 14:39:24 2015 >>> New Revision: 964181 >>> >>> Log: >>> highlight small differences >>> >>> Modified: >>> infrastructure/trunk/projects/whimsy/www/secretary/public-names.cgi >>> >>> Modified: >>> infrastructure/trunk/projects/whimsy/www/secretary/public-names.cgi >>> ============================================================================== >>> --- infrastructure/trunk/projects/whimsy/www/secretary/public-names.cgi >>> (original) >>> +++ infrastructure/trunk/projects/whimsy/www/secretary/public-names.cgi Thu >>> Sep 3 14:39:24 2015 >>> @@ -19,6 +19,7 @@ _html do >>> table, th, td {border: 1px solid black} >>> td {padding: 3px 6px} >>> th {background-color: #a0ddf0} >>> + tr:hover .diff {background-color: #AAF} >>> >>> td[draggable=true] {cursor: move} >>> td.modified {background-color: #FF0} >>> @@ -150,13 +151,31 @@ _html do >>> next unless person.dn >>> >>> if person.cn != name >>> + # locate point at which names differ >>> + first, last = 0, -1 >>> + first += 1 while name[first] == person.cn[first] >>> + last -= 1 while name[last] == person.cn[last] >>> + >>> _tr_ do >>> _td! do >>> _a id, href: "https://whimsy.apache.org/roster/committer/#{id}" >>> end >>> _td legal_name, draggable: 'true' >>> - _td name, draggable: 'true' >>> - _td person.cn, draggable: 'true' >>> + if name[first..last].length > 3 and >>> person.cn[first..last].length > 3 >>> + _td name, draggable: 'true' >>> + _td person.cn, draggable: 'true' >>> + else >>> + _td! draggable: 'true' do >>> + _ name[0...first] unless first == 0 >>> + _span.diff name[first..last] >>> + _ name[last+1..-1] unless last == -1 >>> + end >>> + _td! draggable: 'true' do >>> + _ person.cn[0...first] unless first == 0 >>> + _span.diff person.cn[first..last] >>> + _ person.cn[last+1..-1] unless last == -1 >>> + end >>> + end >>> end >>> end >>> end >>> >> >> Craig L Russell >> Architect, Oracle >> http://db.apache.org/jdo >> 408 276-5638 mailto:[email protected] >> P.S. A good JDO? O, Gasp! >> Craig L Russell Architect, Oracle http://db.apache.org/jdo 408 276-5638 mailto:[email protected] P.S. A good JDO? O, Gasp!
