Why does adding a bag displayer blow away the list table?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Why does adding a bag displayer blow away the list table?

Sam Hokin-3
Hi, devs! I just noticed something that I can't seem to rectify: when I added a bag displayer to my Gene entry in
webconfig-model.xml, the table that summarizes the list vanishes from the top. If I comment the displayer out, the table returns.
I've included screenshots of the two cases, and here's the XML:

   <class className="org.intermine.model.bio.Gene">
     <fields>
       <fieldconfig fieldExpr="organism.name" label="Organism" />
       <fieldconfig fieldExpr="primaryIdentifier" label="DB identifier" />
       <fieldconfig fieldExpr="length" displayer="/model/sequenceShortDisplayerWithField.jsp" showInInlineCollection="true"
showInSummary="true" />
     </fields>
     <bagdisplayers>
       <displayer src="heatMap.tile" showOnLeft="true" />
     </bagdisplayers>
   </class>

The bag displayer works fine when it's not commented out, but then the table is gone. Any ideas? I'd like both! And yes, I've
validated the HTML, it checks out fine, the divs are all closed, etc.

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev

gene-list-with-bag-displayer.png (153K) Download Attachment
gene-list-without-bag-displayer.png (141K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Why does adding a bag displayer blow away the list table?

Sam Hokin-3
Never mind, figured it out. I added a current JQuery 3.1.1 load because of some newer code that I'm using; JQuery no longer supports
the jQuery('textarea#textarea').autoResize() function, which broke the list description textarea and table. So, I guess a word to
the wise about using JQuery 3.

On 11/01/2016 06:08 PM, Sam Hokin wrote:

> Hi, devs! I just noticed something that I can't seem to rectify: when I added a bag displayer to my Gene entry in
> webconfig-model.xml, the table that summarizes the list vanishes from the top. If I comment the displayer out, the table returns.
> I've included screenshots of the two cases, and here's the XML:
>
>   <class className="org.intermine.model.bio.Gene">
>     <fields>
>       <fieldconfig fieldExpr="organism.name" label="Organism" />
>       <fieldconfig fieldExpr="primaryIdentifier" label="DB identifier" />
>       <fieldconfig fieldExpr="length" displayer="/model/sequenceShortDisplayerWithField.jsp" showInInlineCollection="true"
> showInSummary="true" />
>     </fields>
>     <bagdisplayers>
>       <displayer src="heatMap.tile" showOnLeft="true" />
>     </bagdisplayers>
>   </class>
>
> The bag displayer works fine when it's not commented out, but then the table is gone. Any ideas? I'd like both! And yes, I've
> validated the HTML, it checks out fine, the divs are all closed, etc.
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Why does adding a bag displayer blow away the list table?

Sam Hokin-3
Oh, and I forgot to mention, you CAN load a recent JQuery and then reload the textarea resize code after it to recover that function
for bagDetails.jsp:

<!-- reload this because it is broken by JS loads above; used by bagDetails.jsp -->
<script type="text/javascript" src="js/textarea-resize.js"></script>

textarea-resize.js is already conveniently housed in intermine/webapp/main/resources/webapp/js/textarea-resize.js

OK I'll shut up about this now. :)

On 11/02/2016 09:15 AM, Sam Hokin wrote:

> Never mind, figured it out. I added a current JQuery 3.1.1 load because of some newer code that I'm using; JQuery no longer supports
> the jQuery('textarea#textarea').autoResize() function, which broke the list description textarea and table. So, I guess a word to
> the wise about using JQuery 3.
>
> On 11/01/2016 06:08 PM, Sam Hokin wrote:
>> Hi, devs! I just noticed something that I can't seem to rectify: when I added a bag displayer to my Gene entry in
>> webconfig-model.xml, the table that summarizes the list vanishes from the top. If I comment the displayer out, the table returns.
>> I've included screenshots of the two cases, and here's the XML:
>>
>>   <class className="org.intermine.model.bio.Gene">
>>     <fields>
>>       <fieldconfig fieldExpr="organism.name" label="Organism" />
>>       <fieldconfig fieldExpr="primaryIdentifier" label="DB identifier" />
>>       <fieldconfig fieldExpr="length" displayer="/model/sequenceShortDisplayerWithField.jsp" showInInlineCollection="true"
>> showInSummary="true" />
>>     </fields>
>>     <bagdisplayers>
>>       <displayer src="heatMap.tile" showOnLeft="true" />
>>     </bagdisplayers>
>>   </class>
>>
>> The bag displayer works fine when it's not commented out, but then the table is gone. Any ideas? I'd like both! And yes, I've
>> validated the HTML, it checks out fine, the divs are all closed, etc.
> _______________________________________________
> dev mailing list
> [hidden email]
> https://lists.intermine.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Why does adding a bag displayer blow away the list table?

Josh Heimbach
Hi Sam,

Yup, reloading the autoResize plugin should do the trick.

If you find yourself needing jQuery 3 often, jQuery has a noConflict
function that can be (ab)used to load multiple versions of jQuery at
once. What could go wrong, right? ;)

https://api.jquery.com/jquery.noconflict/

It looks like Intermine is loading 1.11.0 which is pretty old in
JavaScript years. We've probably managed to avoid problems because most
of our widgets are self contained with their own, newer versions of
jQuery bundled inside. The trade off, of course, is reliability at the
expense of file size.

I've opened a ticket for us to investigate an upgrade to jQuery 3:
https://github.com/intermine/intermine/issues/1448

Thanks for letting us know your solution!

- Josh


On 02/11/16 15:26, Sam Hokin wrote:

> Oh, and I forgot to mention, you CAN load a recent JQuery and then
> reload the textarea resize code after it to recover that function for
> bagDetails.jsp:
>
> <!-- reload this because it is broken by JS loads above; used by
> bagDetails.jsp -->
> <script type="text/javascript" src="js/textarea-resize.js"></script>
>
> textarea-resize.js is already conveniently housed in
> intermine/webapp/main/resources/webapp/js/textarea-resize.js
>
> OK I'll shut up about this now. :)
>
> On 11/02/2016 09:15 AM, Sam Hokin wrote:
>> Never mind, figured it out. I added a current JQuery 3.1.1 load
>> because of some newer code that I'm using; JQuery no longer supports
>> the jQuery('textarea#textarea').autoResize() function, which broke
>> the list description textarea and table. So, I guess a word to
>> the wise about using JQuery 3.
>>
>> On 11/01/2016 06:08 PM, Sam Hokin wrote:
>>> Hi, devs! I just noticed something that I can't seem to rectify:
>>> when I added a bag displayer to my Gene entry in
>>> webconfig-model.xml, the table that summarizes the list vanishes
>>> from the top. If I comment the displayer out, the table returns.
>>> I've included screenshots of the two cases, and here's the XML:
>>>
>>>   <class className="org.intermine.model.bio.Gene">
>>>     <fields>
>>>       <fieldconfig fieldExpr="organism.name" label="Organism" />
>>>       <fieldconfig fieldExpr="primaryIdentifier" label="DB
>>> identifier" />
>>>       <fieldconfig fieldExpr="length"
>>> displayer="/model/sequenceShortDisplayerWithField.jsp"
>>> showInInlineCollection="true"
>>> showInSummary="true" />
>>>     </fields>
>>>     <bagdisplayers>
>>>       <displayer src="heatMap.tile" showOnLeft="true" />
>>>     </bagdisplayers>
>>>   </class>
>>>
>>> The bag displayer works fine when it's not commented out, but then
>>> the table is gone. Any ideas? I'd like both! And yes, I've
>>> validated the HTML, it checks out fine, the divs are all closed, etc.
>> _______________________________________________
>> dev mailing list
>> [hidden email]
>> https://lists.intermine.org/mailman/listinfo/dev
> _______________________________________________
> dev mailing list
> [hidden email]
> https://lists.intermine.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Loading...