Extension talk:Semantic Forms Inputs/LQT Archive 1

Feature Request
Is there a possibility to add a modal dialog for adding items to a category. Just like the regular 'uploadable' input field in forms. See http://hackerspaces.org/wiki/Talk:WikiSpaces#Property:Location --Clausekwis 22:08, 12 March 2010 (UTC)

Datapicker trouble
Hi,

Very helpful extension and thanks. Once installed I use the input type= data picker.It showed up in the form but it wont let me pick the dates, if I clicked on it.any idea why?

thanks


 * No, not offhand. Is it somewhere public to have a look at it? --F.trott 06:59, 9 November 2009 (UTC)


 * It's not public. But thanks for your reply..Msevero 01:34, 11 November 2009 (UTC)

Same here
For some reason it won't let me pick the dates, it seems like maybe the javascript is buggy...--Gregra 16:44, 9 February 2010 (UTC)
 * After some debugging, it seems that the Header Tabs extension is causing that bug. Has anyone else encountered this?--Gregra 17:55, 9 February 2010 (UTC)
 * Got it! It seems that you have to use the same YUI version (2.7.0) for both extensions. You should also patch HeaderTabs.php like it says on the extension page. Find:

if ($firsttab) { $style = ''; $firsttab = false; }else { $style = ' style="display:none"';}$tabhtml .= ' '.$tab['tabcontent'].' '; and replace it by: $tabhtml .= ' '.$tab['tabcontent'].' ';

--Gregra 18:13, 9 February 2010 (UTC)

Turn off brackets?
Hi. Great calendar! However, I am returning more than one field and it shows brackets around the second item in the calendar. How would I go about removing the brackets so I just have the field content? Thanks! --mitchelln 15:13, 25 February 2010 (UTC)


 * The normal use case would be to define a field of type datepicker. This should yield a string recognizable by SMW as a date value. I'm not sure what you mean by returning more than one field or what the second item in a calendar is. Could you explain in more detail what you want to do? Maybe include your field definition? F.trott 07:26, 26 February 2010 (UTC)

Date and Time picker
Could the datepicker select also the time? It would be very helpful to also have the time selectable so the datetime basic input could be completely replaced. Thanks --Mxhn 13:04, 2 March 2010 (UTC)


 * That is currently not possible. F.trott 15:28, 2 March 2010 (UTC)

More javascript trouble, datepicker not toggling
MW 1.15.1 SMW 1.4.3 SF 1.8 Firefox 3.5.x, Konqueror 4.3.x, IE 7.x, IE 8.x

I do *not* have HeaderTabs installed. When doing any invocation of DatePicker, including a simple invocation with default values such as

I can not get the datepicker to toggle so it's visible.

When I load the page with this form on it, I get a slew of javascript warnings in the Firefox console for the YUI stuff. After doing some surfing I gather these are "normal", and they're only warnings, but here they are:

Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 7 Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 7 Warning: Unknown property 'zoom'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 7 Warning: Error in parsing value for 'filter'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 7 Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 8 Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar.css Line: 8 Warning: Unknown property '-moz-opacity'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css Line: 7 Warning: Error in parsing value for 'filter'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css Line: 7 Warning: Error in parsing value for 'filter'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css Line: 7 Warning: Unknown property 'zoom'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/autocomplete/assets/skins/sam/autocomplete.css Line: 7 Warning: Unknown property 'zoom'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar-skin.css Line: 249 Warning: Error in parsing value for 'filter'. Declaration dropped. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar-skin.css Line: 262 Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar-skin.css Line: 345 Warning: Expected declaration but found '*'. Skipped to next declaration. Source File: http://yui.yahooapis.com/2.7.0/build/calendar/assets/skins/sam/calendar-skin.css Line: 347

Then, I get this error:

Error: onloadFuncts[i] is not a function Source File: http://ec2-174-129-53-18.compute-1.amazonaws.com/mediawiki-dev/skins/common/wikibits.js?207 Line: 955

That doesn't look too good, but it's still not directly related to DatePicker.

However, if I subsequently click on the datepicker icon in an attempt to get the datepicker to toggle visible, this error then appears in the Firefox javascript console:

Error: sfiElements[settings] is undefined Source File: http://ec2-174-129-53-18.compute-1.amazonaws.com/index.php/Special:FormEdit/JamFormAdd Line: 97

I've poked around a little bit, but don't see anything obvious yet. Any thoughts?

Thanks!

ahooton


 * Yeah, replying to my own post. I don't have the answer yet, but more info: Something about the order of the scripts on the page and the way things are loaded is preventing the firing of "setup_input_ ".  I inserted a js alert in there and it's not getting displayed, which is obviously why the error about sfiElements[settings] not being defined is getting thrown (which I have figured out also subsequently causes the toggle function not to work).


 * However, "datePickerSetLocale" is being fired. There's something different about where these are on the page, or something, that is causing the OnLoad event to fire one of them but not the other.


 * ahooton


 * OK, I got this figured out. The event handlers were not being defined and added to the callback hook until very late, in-line with generation of the html that actually rendered the on-screen input elements.  In many situations this will cause them to not be fired by the onLoad handler (even though they are supposed to be, this is a very common browser problem across many browsers).


 * The solution is to use $wgOut->addScript in a few places instead of generating the javascript and then eventually using $wgOut->addInlineScript. I've made a few modifications to fix this problem and don't see any issues in the testing I've done on several browsers.  There is a sub-page to this talk page with the modified version, hopefully it will get into the SFI mainline at some point: [].


 * Enjoy.


 * ahooton


 * Hello ahooton. Sorry for not replying, notification was somehow turned off. I'll look into your code and consider it for the next version. Thanks for your effort. --F.trott 11:18, 12 April 2010 (UTC)