This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
6796
Features / Re: New revs
« on December 26th, 2011, 10:02 AM »
rev 1223
(3 files +1, 5kb)
+ Added (or restored?) the ability to change options while refreshing the custom select boxes. It's just a few bytes... (sbox.js)
* Set the default 'fixed' param in select boxes to 'true', because... Well, I've tried it, improved it a bit and it's better. Plus, I'm going to go through all select boxes anyway so I'll quickly spot any box that needs fixing. (sbox.js)
* Did more proper calculation of maximum select box width in non-fixed mode, taking padding and margin into account. (sbox.js, index.css)
* Moved the testStyle function out of the script and into the wip folder. Turns out I hadn't been using can_borderradius or can_boxshadow for quite some time. If someone wants to use them, well... I guess I can distribute the file on the forum or something. (script.js, Unused-testStyle.js)
(3 files +1, 5kb)
+ Added (or restored?) the ability to change options while refreshing the custom select boxes. It's just a few bytes... (sbox.js)
* Set the default 'fixed' param in select boxes to 'true', because... Well, I've tried it, improved it a bit and it's better. Plus, I'm going to go through all select boxes anyway so I'll quickly spot any box that needs fixing. (sbox.js)
* Did more proper calculation of maximum select box width in non-fixed mode, taking padding and margin into account. (sbox.js, index.css)
* Moved the testStyle function out of the script and into the wip folder. Turns out I hadn't been using can_borderradius or can_boxshadow for quite some time. If someone wants to use them, well... I guess I can distribute the file on the forum or something. (script.js, Unused-testStyle.js)
6797
Features / Re: New revs
« on December 26th, 2011, 01:14 AM »
rev 1222
(3 files +1, 2kb)
* If select box width is set to fixed, ensure the dropdown's width is set not to break individual items. (sbox.js)
! Fixed width of select box display area. Was a bit off due to my adding some padding... (sbox.js, index.css)
! Forgot that IE6/7 don't support string indexing like str[0], so I restored the .charAt(0) thingy. (script.js)
* Moved linkMagic function to the wip folder. (Unused-linkMagic.js, script.js)
@ Note: sbox.js is currently at 2028 bytes... And it's unlikely it'll go under 2000 bytes at this point. At least it's still under 2 kilobytes... :P
(3 files +1, 2kb)
* If select box width is set to fixed, ensure the dropdown's width is set not to break individual items. (sbox.js)
! Fixed width of select box display area. Was a bit off due to my adding some padding... (sbox.js, index.css)
! Forgot that IE6/7 don't support string indexing like str[0], so I restored the .charAt(0) thingy. (script.js)
* Moved linkMagic function to the wip folder. (Unused-linkMagic.js, script.js)
@ Note: sbox.js is currently at 2028 bytes... And it's unlikely it'll go under 2000 bytes at this point. At least it's still under 2 kilobytes... :P
6798
Features / Re: New revs
« on December 25th, 2011, 10:54 PM »
rev 1221
(14 files +1 -1, 15kb -- my Christmas-weekend commit.)
! Fixed the label attribution code in the PM area to... well, actually work. Also converted it to use the new select box system. Made various optimizations or jQuery conversions in the PM template. (PersonalMessage.template.php, PersonalMessage.language.php, index.member.css)
! Fixed permission profile deletion code in the Media area. (mediadmin.js)
! Don't trigger the original select box's focus event if refreshing the item, to avoid an infinite loop. (sbox.js)
! Select box refreshing would get incorrect $sb.is(':open') values, that was quite obviously wrong of me. (sbox.js)
! Various select box styling glitches. Mostly avoiding a FOUC before the select box is transformed, by hiding all regular select boxes from view. (index.css, sections.css)
* Moved John's own take of the select box code to the wip folder (a good place to die. It's really too short and smart to kill it any other way.) (Unused-SelectBox.js, script.js)
* Renamed a wip file while I was at it. (Unused.php, Unused-imgBlank.php)
+ An example of the select box's 'details' feature. (ManageSettings.language.php)
* Unclear translation needed an extra comment, I reckon. (PersonalMessage.language.php)
* Spacinazi. (ManageMedia.language.php)
(14 files +1 -1, 15kb -- my Christmas-weekend commit.)
! Fixed the label attribution code in the PM area to... well, actually work. Also converted it to use the new select box system. Made various optimizations or jQuery conversions in the PM template. (PersonalMessage.template.php, PersonalMessage.language.php, index.member.css)
! Fixed permission profile deletion code in the Media area. (mediadmin.js)
! Don't trigger the original select box's focus event if refreshing the item, to avoid an infinite loop. (sbox.js)
! Select box refreshing would get incorrect $sb.is(':open') values, that was quite obviously wrong of me. (sbox.js)
! Various select box styling glitches. Mostly avoiding a FOUC before the select box is transformed, by hiding all regular select boxes from view. (index.css, sections.css)
* Moved John's own take of the select box code to the wip folder (a good place to die. It's really too short and smart to kill it any other way.) (Unused-SelectBox.js, script.js)
* Renamed a wip file while I was at it. (Unused.php, Unused-imgBlank.php)
+ An example of the select box's 'details' feature. (ManageSettings.language.php)
* Unclear translation needed an extra comment, I reckon. (PersonalMessage.language.php)
* Spacinazi. (ManageMedia.language.php)
6799
Features / Re: Selectbox
« on December 25th, 2011, 08:07 PM »
So... My test code is actually the label attribution code in PMs.
Interestingly, I've found out that you can enter this kind of thing for a label name:
<option value="rem_7"/>
Even more interestingly, because of the way it's all done (and, frankly, not very good security-wise), this will ACTUALLY be entered as a new option in the original select box.
Now... I don't really see a reason for this kind of 'hack' to be done by anyone, but do you think it's worth being concerned about...?
I'd rewritten the code to be shorter and use a string.match(...) instead of (x in toRemove) at some point. I changed my code to test for a longer string (starting with "<option" because the < sign is correctly html-entitified in the database), which I don't like, but should we go further and test for silly names..?
Interestingly, I've found out that you can enter this kind of thing for a label name:
<option value="rem_7"/>
Even more interestingly, because of the way it's all done (and, frankly, not very good security-wise), this will ACTUALLY be entered as a new option in the original select box.
Now... I don't really see a reason for this kind of 'hack' to be done by anyone, but do you think it's worth being concerned about...?
I'd rewritten the code to be shorter and use a string.match(...) instead of (x in toRemove) at some point. I changed my code to test for a longer string (starting with "<option" because the < sign is correctly html-entitified in the database), which I don't like, but should we go further and test for silly names..?
6800
The Pub / Re: Logo Madness
« on December 25th, 2011, 03:40 PM »I love the shape off the second one, and the colour is subtle and nice, but it kinda reminds me a lot of Curve/SMF.
That might be a good thing, considering, or it might not.
Frankly I'm sick of that light blue from having stared at Curve a hundred billion times.
I'm a fan of the green colour on the first one, though, (I actually voted for it at first) so I'd love to see the second shape with the first colour scheme, if that makes sense. A little more subtleness may be desirable, though.
6801
Features / Re: Selectbox
« on December 25th, 2011, 03:38 PM »
Found the reason... $orig.removeData("sb"), very bad idea when the element is never set at all in loadSB... :P
Still, it remains a bit buggy even after deleting that... :-/ In my particular test case where I'm doing complex manipulations at least.
Problem is indeed fixed, but the area I was testing is a bit fragile. Hmm... It's annoying when SMF uses complicated code they don't comment... :P
Still, it remains a bit buggy even after deleting that... :-/ In my particular test case where I'm doing complex manipulations at least.
Posted: December 25th, 2011, 11:43 AM
Problem is indeed fixed, but the area I was testing is a bit fragile. Hmm... It's annoying when SMF uses complicated code they don't comment... :P
6802
Features / Re: New revs
« on December 25th, 2011, 12:32 PM »
rev 1220
(1 file, 1kb)
! Oops, committed by mistake a few lines of code that aren't working for now. (sbox.js)
(They were commented out, but still... Faulty is faulty, even when not executed :P)
(1 file, 1kb)
! Oops, committed by mistake a few lines of code that aren't working for now. (sbox.js)
(They were commented out, but still... Faulty is faulty, even when not executed :P)
6803
Features / Re: New revs
« on December 25th, 2011, 12:31 PM »
rev 1219
(2 files, 2kb)
+ Added support for additional lines of text in selectbox lists. These lines won't show up in the display area when selected, so it's the perfect place to give custom details like explaining what the option does, etc. It's also very easy to add them to the original text. Because it's likely to break the layout if JavaScript is disabled, I at least made sure that IE6 can support our custom select boxes, which is why I worked on IE6 support recently. (sbox.js, index.css)
- Removed all public methods for the select box, for simplicity. Now calling $(object).sb() will either create the custom select box, or simply refresh it based on any changes applied to the original select box. Also removed a superfluous call to .removeClass('above'). (sbox.js)
! Fixed this annoying bug where select boxes would be duplicated instead of refreshed. This was due to the associated DOM element being cleaned up a bit too thoroughly. (sbox.js)
@ Current size for sbox is 1995 bytes, the lowest yet. And that's taking into account the 30+ bytes needed for the 'details' feature described above. Oh, and Merry Christmas :)
(2 files, 2kb)
+ Added support for additional lines of text in selectbox lists. These lines won't show up in the display area when selected, so it's the perfect place to give custom details like explaining what the option does, etc. It's also very easy to add them to the original text. Because it's likely to break the layout if JavaScript is disabled, I at least made sure that IE6 can support our custom select boxes, which is why I worked on IE6 support recently. (sbox.js, index.css)
- Removed all public methods for the select box, for simplicity. Now calling $(object).sb() will either create the custom select box, or simply refresh it based on any changes applied to the original select box. Also removed a superfluous call to .removeClass('above'). (sbox.js)
! Fixed this annoying bug where select boxes would be duplicated instead of refreshed. This was due to the associated DOM element being cleaned up a bit too thoroughly. (sbox.js)
@ Current size for sbox is 1995 bytes, the lowest yet. And that's taking into account the 30+ bytes needed for the 'details' feature described above. Oh, and Merry Christmas :)
6804
Features / Re: Selectbox
« on December 25th, 2011, 12:11 AM »
Try doing $(..).sb('refresh') on a click. Does it remove the item or duplicate it?
6805
Features / Re: New revs - Public comments
« on December 25th, 2011, 12:10 AM »
I think doing default labels could also encourage us to make them more prominent ie show them as sidebar folders or whatever rather than menu things.
6806
Features / Re: Selectbox
« on December 24th, 2011, 10:48 PM »
I'm pirating my in-laws' wifi on my iPod Eheh.
I think maybe I'll rewrite the refresh code to only delete the unordered list. Repopulate it. That way it'd work but it'd take more js obviously. I dunno why this happens. Can anyone test the svn version?
I think maybe I'll rewrite the refresh code to only delete the unordered list. Repopulate it. That way it'd work but it'd take more js obviously. I dunno why this happens. Can anyone test the svn version?
6807
Features / Re: New revs - Public comments
« on December 24th, 2011, 10:45 PM »
I used to use it a couple years ago. The feature would benefit from having default labels like {to_answer} etc. No?
6808
Features / Re: Selectbox
« on December 24th, 2011, 06:15 PM »
For some unknown reason, doing a $sb.remove() on the select box doesn't work in Opera 11 and 12... It isn't removed.
Went as far as debugging jQuery, and elem.parentNode.removeChild(elem) is executed -- no error, and nothing removed!
Grmpf......
Went as far as debugging jQuery, and elem.parentNode.removeChild(elem) is executed -- no error, and nothing removed!
Grmpf......
6809
Features / Re: New revs - Public comments
« on December 24th, 2011, 05:20 PM »
Actually that feature was broken even before the new select box code. Hmm. Maybe it's broken in SMF as well?
6810
Features / Re: New revs - Public comments
« on December 24th, 2011, 03:56 PM »
Really impressed with the number of glitches due to the new select box code..... :( :( :(
Just have a look at the 'add/remove label' select box from the PM area. It's completely broken... Argh. I'm starting to have second thoughts about all this...
Just have a look at the 'add/remove label' select box from the PM area. It's completely broken... Argh. I'm starting to have second thoughts about all this...