Load jquery in the head on mobile
Some pages need jquery in the head and instead of loading it twice on these pages, it is better and easier to load it in the head on all pages. It should be in the cache after the first load anyway. closes #7086
This commit is contained in:
parent
546f909658
commit
a5f538b9ae
6 changed files with 3 additions and 10 deletions
|
|
@ -7,6 +7,7 @@
|
|||
* Invalidate sessions with invalid CSRF tokens [#7050](https://github.com/diaspora/diaspora/pull/7050)
|
||||
* Liking a post will no longer update its interacted timestamp [#7030](https://github.com/diaspora/diaspora/pull/7030)
|
||||
* Improve W3C compliance [#7068](https://github.com/diaspora/diaspora/pull/7068)
|
||||
* Load jQuery in the head on mobile [#7086](https://github.com/diaspora/diaspora/pull/7086)
|
||||
|
||||
## Bug fixes
|
||||
* Post comments no longer get collapsed when interacting with a post [#7040](https://github.com/diaspora/diaspora/pull/7040)
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
= javascript_include_tag :jquery
|
||||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
var data = $.parseJSON( "#{escape_javascript(@contacts_json)}" ),
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@
|
|||
- if Rails.env.test?
|
||||
= stylesheet_link_tag :poltergeist_disable_transition, media: "all"
|
||||
|
||||
= jquery_include_tag
|
||||
|
||||
= yield(:head)
|
||||
|
||||
= include_gon(:camel_case => true)
|
||||
|
|
@ -64,7 +66,6 @@
|
|||
= yield
|
||||
|
||||
/ javascripts at the bottom
|
||||
= jquery_include_tag
|
||||
= javascript_include_tag "mobile/mobile"
|
||||
= load_javascript_locales
|
||||
= include_chartbeat
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
- content_for :head do
|
||||
- if mobile
|
||||
= javascript_include_tag :jquery
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
var data = $.parseJSON( '#{@tags_array.to_json.gsub("'", "\\\\'")}' ),
|
||||
|
|
|
|||
|
|
@ -19,6 +19,3 @@
|
|||
$("#status_message_text").val(contents);
|
||||
}
|
||||
});
|
||||
|
||||
- content_for(:head) do
|
||||
= javascript_include_tag :jquery
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :head do
|
||||
= javascript_include_tag :jquery
|
||||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
var data = $.parseJSON( '#{@tags_array.to_json.gsub("'", "\\\\'")}' ),
|
||||
|
|
|
|||
Loading…
Reference in a new issue