You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <bl...@incubator.apache.org> on 2012/05/28 08:12:10 UTC

[Apache Bloodhound] #91: Scripts , stylesheets , ... included twice ?

#91: Scripts , stylesheets , ... included twice ?
-----------------------+-------------------------------------
 Reporter:  olemis     |      Owner:  nobody
     Type:  defect     |     Status:  new
 Priority:  major      |  Milestone:  RC1 for initial release
Component:  ui design  |    Version:
 Keywords:             |
-----------------------+-------------------------------------
 Since long time ago I've been trying to implement #86 but never succeeded
 because I always got an error message like ''$(selector).popover is not a
 function'' in error console. While developing a patch for #86 for the n-th
 time I discovered the root cause of this odd behavior . After taking a
 look at ''bloodhound_theme.html'' @ r1342840 I realized that it was
 structured like this (summarized version ''';)''' :

 {{{
 #!xml

 <head>
   <!-- Section 1: Explicit insertion of links, meta tags, stylesheets, and
 scripts, ... -->
   <!-- Section 2: Theme-specific files e.g. bootstrap.css, bootstrap js
 files (e.g. bootstrap-popover.js) , theme.js, ... -->

   <!-- Section 3: ... -->
   ${Markup('&lt;!--[if lt IE 7]&gt;')}
     <script type="text/javascript"
 src="${chrome.htdocs_location}js/ie_pre7_hacks.js"></script>
   ${Markup('&lt;![endif]--&gt;')}

   ${select("*[local-name() != 'title']")}
 </head>

 }}}

 Later I paid attention to the output of the last sentence i.e. `${select
 ("*[local-name() != 'title']")}` and noticed that it includes many
 (exactly the same ?) of the files included in section 1. So this means in
 particular that ''jquery.js'' was included in section 1 , later
 ''boostrap-popover.js'' is executed as it is included in section 2, and
 finally in section 3 ''jquery.js'' is loaded once again from scratch ...
 thus removing the extensions added by ''boostrap-popover.js'' . This
 particular situation has been fixed in
 [attachment:ticket:86:t86_r1342840_fix_bhtheme_head.diff a patch] for #86
 by swaping sections 2 and 3 in order to execute those scripts after all
 other processing has been finished.

 Nonetheless I'm creating this ticket in order to ensure elements (i.e.
 script tags , stylesheets and other links, ...) are included just once in
 header. This will improve performance too.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/91>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Re: [Apache Bloodhound] #91: Scripts , stylesheets , ... included twice ?

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#91: Scripts , stylesheets , ... included twice ?
------------------------+-------------------------------------
  Reporter:  olemis     |      Owner:  nobody
      Type:  defect     |     Status:  closed
  Priority:  major      |  Milestone:  RC1 for initial release
 Component:  ui design  |    Version:
Resolution:  fixed      |   Keywords:
------------------------+-------------------------------------
Changes (by gjm):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 r1354601 applies the patch. Thanks Olemis.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/91#comment:2>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Re: [Apache Bloodhound] #91: Scripts , stylesheets , ... included twice ?

Posted by Apache Bloodhound <bl...@incubator.apache.org>.
#91: Scripts , stylesheets , ... included twice ?
------------------------+-------------------------------------
  Reporter:  olemis     |      Owner:  nobody
      Type:  defect     |     Status:  new
  Priority:  major      |  Milestone:  RC1 for initial release
 Component:  ui design  |    Version:
Resolution:             |   Keywords:
------------------------+-------------------------------------

Comment (by olemis):

 [attachment:t91_r1353652_duplicate_items_header.diff Attached patch] will
 fix this issue . Apply it against r1353652

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/91#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker