fluid-work IRC Logs-2013-09-13

fluid-work IRC Logs-2013-09-13

[08:39:26 CDT(-0500)] <amilchev> Justin_o: hi there

[08:39:36 CDT(-0500)] <amilchev> Justin_o: thanks for the comment in the list

[08:39:47 CDT(-0500)] <Justin_o> amilchev: hello, no problem. hope it was helpful

[08:41:01 CDT(-0500)] <amilchev> Justin_o: on the question you asked, I didn't write combobox.js myself, I got it ready and modificated one or two things

[08:43:26 CDT(-0500)] <amilchev> Justin_o: it was helpful indeed, I learned how to declaratively call jQuery funcs

[08:44:27 CDT(-0500)] <Justin_o> amilchev: where did you get combobox.js from and what changes did you make to it?

[08:45:26 CDT(-0500)] <amilchev> Justin_o: http://jqueryui.com/autocomplete/#combobox - click on "view source"

[08:47:29 CDT(-0500)] <Justin_o> amilchev: oh i see

[08:48:17 CDT(-0500)] <amilchev> Justin_o: what I edited was mainly to trigger change event after line 67 (and remove some unneeded stuff like like 164-5-6)

[08:50:05 CDT(-0500)]

<amilchev> Justin_o: however, the combobox() function isn't added to the dom object - what you suggested throws

Unknown macro: {that}

.dom.auditoryOutLanguage has no member named combobox which is a function

[08:51:08 CDT(-0500)] <amilchev> Justin_o: in the console, when I type hook.locate("auditoryOutLanguage").combobox() still doesn't find it (any other jQuery func like hide or show works) (hook is the panel)

[08:51:32 CDT(-0500)] <amilchev> so it's not like the func is added after it was called, it isn't added at all

[08:52:03 CDT(-0500)] <Justin_o> amilchev: i would image that this would actually have created a combobox hook.locate("auditoryOutLanguage").combobox()

[08:52:20 CDT(-0500)] <Justin_o> but it didn't?

[08:52:23 CDT(-0500)] <amilchev> no

[08:52:25 CDT(-0500)] <amilchev> it doesn't

[08:52:51 CDT(-0500)] <amilchev> returns TypeError: Object [object Object] has no method 'combobox'

[08:53:35 CDT(-0500)] <amilchev> $("#auditoryOutLanguage").combobox() works

[08:54:05 CDT(-0500)] <Justin_o> amilchev: okay.. i think i know what the issue is.. but for starters you don't need this line $(function() {

[08:54:06 CDT(-0500)] <Justin_o> $( "#combobox" ).combobox();

[08:54:07 CDT(-0500)] <Justin_o> });

[08:54:20 CDT(-0500)] <Justin_o> amilchev: I think that's just the initialization from the demo..

[08:54:44 CDT(-0500)] <Justin_o> amilchev: also the problem you are having probably has to do with the issue i mentioned with two versions of jQuery on the page

[08:56:15 CDT(-0500)] <Justin_o> amilchev: what you have done is to basically create a jQuery plugin that you've added to the jQuery object, but this is the 1.9.1 version that you imported. However infusion is using its own version of infusion, which doesn't have this plugin attached to it.

[08:57:05 CDT(-0500)] <Justin_o> amilchev: because the 1.9.1 version was added after infusion.. all new calls to jQuery use it. which is why calling $("#auditoryOutLanguage").combobox() works

[08:57:31 CDT(-0500)] <amilchev> Justin_o: yes, I thought of that..

[08:59:16 CDT(-0500)] <Justin_o> amilchev: you should be able to drop jQuery 1.9.1 without any issues, as I think jQueryUI works with older versions of jQuery. However, you may run into issues as I see you are also using the new version of jQueryUI.

[08:59:41 CDT(-0500)] <Justin_o> infusion also includes an older version of this, so you may still run into the version conflicts with it.

[09:00:32 CDT(-0500)] <amilchev> Justin_o: in the next month or two that perhaps would not be a problem, sure?

[09:01:56 CDT(-0500)] <Justin_o> amilchev: yes.. we should be upgrading our jQuery dependencies in roughly that time frame..

[09:02:32 CDT(-0500)] <Justin_o> amilchev: so it looks like the autocomplete component existed in jQuery 1.8 which is what is currently in infusion http://api.jqueryui.com/1.8/autocomplete/

[09:04:26 CDT(-0500)] <amilchev> Justin_o: hm.. $.fn.jquery in the console returns "1.7.2" to me .. I guess I'm not using the latest infusion

[09:06:18 CDT(-0500)] <Justin_o> amilchev: so you can try just removing the jQuery and jQueryUI imports you have and see if things still work.. although there may have been changes to the widget factory which may cause your plugin to break. You might also want to explore making this an infusion type component instead of a jQuery function. you can just create a wrapper around it similar to what has been done in textfieldslider

[09:06:19 CDT(-0500)] <Justin_o> https://github.com/fluid-project/infusion/blob/master/src/components/uiOptions/js/TextfieldSlider.js. It's often a good idea to wrap 3rd party dependencies when you can.

[09:06:51 CDT(-0500)] <Justin_o> amilchev: that's correct.. the version of jQuery is 1.7.2, but we use jQuery UI 1.8.18

[09:07:01 CDT(-0500)] <Justin_o> amilchev: https://github.com/fluid-project/infusion/blob/master/ReleaseNotes.txt

[09:07:57 CDT(-0500)]

<amilchev> Justin_o: and as far as removing $(function()

Unknown macro: { $( "#combobox" ).combobox(); }

); - I guess I forgot that, but there I have $.noConflict(); call, without which $("").combobox() in the console either

[09:08:14 CDT(-0500)] <amilchev> doesn't work

[09:09:19 CDT(-0500)] <Justin_o> amilchev: noConflict won't really help you here I don't think, but anyways, that prevents conflicts from happening later.. so you would have used that in between infusion and the new jQuery. it basically just frees up the jQuery namespace

[09:11:01 CDT(-0500)] <amilchev> Justin_o: so what do you suggest?

[09:12:09 CDT(-0500)] <amilchev> don't tell me I have to change the whole of it...

[09:20:50 CDT(-0500)] <Justin_o> amilchev: personally i would have written it as a infusion component. But i can understand why you would want to use this style. colinclark, Bosmon, yzen, and michelled might have opinions on which route to take. In the meantime if you want to continue using the plugin style my first suggestion would be to drop the new jQuery and jQuery UI dependencies that you are bringing in and instead just bring in the 1.8

[09:20:50 CDT(-0500)] <Justin_o> version of the autocomplete widget (as well as any of its dependencies that we don't already have in infusion, if any). If this works then you are good. If not, you will need to figure out what changes are needed probably from looking at the release notes or upgrade docs between the versions. Also, you should make sure you properly attribute where the code came from that you are modifying and make sure that it i

[09:20:51 CDT(-0500)] <Justin_o> appropriately licensed.

[09:22:23 CDT(-0500)] <Justin_o> amilchev: these are the jQueryUI parts we bring in https://github.com/fluid-project/infusion/tree/master/src/lib/jquery/ui/js

[09:26:37 CDT(-0500)] <amilchev> Justin_o: so I should stick to http://api.jqueryui.com/1.8/autocomplete/

[09:27:39 CDT(-0500)] <amilchev> in other words, use

[09:27:39 CDT(-0500)] <amilchev> <script src="http://code.jquery.com/jquery-1.8.2.js"></script>

[09:27:39 CDT(-0500)] <amilchev> <script src="http://code.jquery.com/ui/1.8.24/jquery-ui.js"></script>

[09:27:51 CDT(-0500)] <amilchev> is that right

[09:28:09 CDT(-0500)] <Justin_o> amilchev: ah.. no.. you can drop both of those

[09:29:31 CDT(-0500)] <Justin_o> amilchev: it would mean pulling in just the autocomplete file https://github.com/jquery/jquery-ui/blob/1-8-stable/ui/jquery.ui.autocomplete.js

[09:29:44 CDT(-0500)] <amilchev> does jQuery UI 1.8.18 support the autocomplete

[09:29:48 CDT(-0500)] <Justin_o> you'll probably need to download and add it to the lib directory and reference it from there

[09:30:37 CDT(-0500)] <Justin_o> amilchev: seems like it, in infusion we have only pulled in the widgets we use, which is why you'd have to add this one in sepearately

[09:30:52 CDT(-0500)] <amilchev> Justin_o: now I get it, ok

[09:33:02 CDT(-0500)] <Justin_o> amilchev: cool… let us know how that goes… and i guess we can chat at the next meeting about whether we should use the jQueryUI plugin style or infusion component wrapper..

[09:35:15 CDT(-0500)] <amilchev> Justin_o: I'm about to leave soon.. if you have any more ideas, suggestions, anything that could help .. I'd love to hear it as deadlines are approaching

[09:35:42 CDT(-0500)] <Justin_o> amilchev: can't think of anything at the moment

[09:37:04 CDT(-0500)] <amilchev> Justin_o: ok, thank you for the time then

[09:37:19 CDT(-0500)] <Justin_o> no problem.. any time

[09:37:28 CDT(-0500)] <amilchev> bye

[13:56:53 CDT(-0500)] <Bosmon> Hi Justin_o, cindyli

[13:57:04 CDT(-0500)] <Bosmon> How is work going with your composite renderin gradE?

[13:57:52 CDT(-0500)] <Justin_o> Bosmon: actually cindyli and I needed to talk to you about that.. we are still kind of confused about how things should all be put together.

[13:58:27 CDT(-0500)] <Justin_o> Bosmon: here's the jira again http://issues.fluidproject.org/browse/FLUID-5131

[13:59:44 CDT(-0500)] <Justin_o> Bosmon: from our previous chat in the channel on sept 10 you said "Well, ironically, you don't really want a "combined template" since that's exactly what the renderer for the component panels can't accept" what did you mean by this exactly?