Permalink
Browse files

Bug 918260 - Update jQuery to 1.10.1 in mozorg

  • Loading branch information...
1 parent bc997b1 commit 829c827d1e8c12862da8d2e2c06ba636729da1ac @cinemascop89 cinemascop89 committed Jan 31, 2014
@@ -441,7 +441,7 @@ <h2 id="landing-heading">{{_('Made for the moments of your life')}}</h2>
{% endblock %}
{% block site_js %}
- {{ js('mozorg-resp') }}
+ {{ js('firefox-resp') }}
{% endblock %}
{% block js %}
@@ -28,7 +28,7 @@
{% endblock %}
{% block site_js %}
- {{ js('mozorg-resp') }}
+ {{ js('firefox-resp') }}
{% endblock %}
{% block js %}
View
@@ -507,7 +507,6 @@ def JINJA_CONFIG():
'js/firefox/new.js',
),
'firefox_os': (
- 'js/base/mozilla-input-placeholder.js',
'js/base/mozilla-modal.js',
'js/libs/jquery.waypoints.min.js',
'js/libs/jquery.waypoints-sticky.min.js',
@@ -562,7 +561,7 @@ def JINJA_CONFIG():
'js/base/mozilla-input-placeholder.js',
),
'mozorg-resp': (
- 'js/libs/jquery-1.7.1.min.js',
+ 'js/libs/jquery-1.11.0.min.js',
'js/base/global.js',
'js/base/nav-main-resp.js',
'js/base/footer-email-form.js',
@@ -229,8 +229,7 @@ Mozilla.VideoPlayer = function(id, sources, flv_url, autoplay, extra_content)
Mozilla.VideoPlayer.height = 385;
Mozilla.VideoPlayer.width = 640;
-Mozilla.VideoPlayer.ie6 =
- ($.browser.msie && parseInt($.browser.version, 10) <= 6);
+Mozilla.VideoPlayer.ie6 = /MSIE\s[1-6]\./.test(navigator.userAgent);
Mozilla.VideoPlayer.close_text = 'Close';
@@ -406,7 +406,7 @@ NavMain.openSmallMenu = function()
.click(NavMain.handleSubmenuClick);
// focus first item
- $('#nav-main-menu [tabindex=0]').get(0).focus();
+ $('#nav-main-menu a:first').get(0).focus();
NavMain.smallMenuOpen = true;
};

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -105,7 +105,7 @@
setInitialPageNavState: function () {
var $entry = $('#entry-container .entry');
var tab = $entry.data('tab');
- var id = $entry.attr('id');
+ var id = $entry.prop('id');
//set the current tab navigation item
$('ul.category-tabs li[data-id="' + tab + '"]').addClass('current');
@@ -179,7 +179,7 @@
* Generate nav dropdown from list
*/
initMobileNav: function () {
- var id = $('#entry-container .entry').attr('id');
+ var id = $('#entry-container .entry').prop('id');
// Create select form inputs for primary mobile navigation
$('.nav-category').each(function() {
var $this = $(this);
@@ -196,7 +196,7 @@
.val($(this).data('id'))
.appendTo($select);
});
- $select.attr('id', $(this).attr('id') + '-select');
+ $select.prop('id', $(this).prop('id') + '-select');
});
// Set the selected item in the mobile nav option menu
@@ -256,14 +256,14 @@
// update the selected item
if (state === 'spaces' && id !== 'spaces') {
$('#nav-spaces-select').find('option:selected').prop("selected", false);
- $('#nav-spaces-select option[value="' + id + '"]').attr('selected', 'selected');
+ $('#nav-spaces-select option[value="' + id + '"]').prop('selected', 'selected');
} else if (state === 'communities' && id !== 'communities') {
$('#nav-communities-select').find('option:selected').prop("selected", false);
- $('#nav-communities-select option[value="' + id + '"]').attr('selected', 'selected');
+ $('#nav-communities-select option[value="' + id + '"]').prop('selected', 'selected');
} else {
$('#nav-communities-select').find('option:selected').prop("selected", false);
$('#nav-spaces-select').find('option:selected').prop("selected", false);
- $('.nav-category-select option[disabled]').attr('selected', 'selected');
+ $('.nav-category-select option[disabled]').prop('selected', 'selected');
}
// rebind change listener
mozMap.bindMobileNavChange();
@@ -692,7 +692,7 @@
// if the user clicks on a marker that is not related to the current space
// we need to do push state to update the page content.
if (markerId !== $itemId) {
- var url = $('#nav-spaces li[data-id="' + markerId + '"] a').attr('href');
+ var url = $('#nav-spaces li[data-id="' + markerId + '"] a').prop('href');
History.pushState({
id: markerId,
tab: 'spaces'
@@ -714,7 +714,7 @@
var current = $('#nav-spaces li.current');
// get the current space id and href based on the nav
var id = current.data('id');
- var contentUrl = url || current.attr('href');
+ var contentUrl = url || current.prop('href');
// if the content is already cached display it
if (contentCache.hasOwnProperty(cacheId)) {
@@ -723,7 +723,7 @@
mozMap.doClickMarker(cacheId);
// update the page title
mozMap.setPageTitle(cacheId);
- } else if (id === $('section.entry').attr('id')) {
+ } else if (id === $('section.entry').prop('id')) {
// if we're already on the right page, just center
// the marker
mozMap.doClickMarker(id);
@@ -770,15 +770,15 @@
var current = $('#nav-communities li.current');
// get the current space id and href based on the nav
var id = current.data('id');
- var contentUrl = url || current.attr('href');
+ var contentUrl = url || current.prop('href');
if (contentCache.hasOwnProperty(cacheId)) {
// if the content is already cached display it
$('#entry-container').html(contentCache[cacheId]);
mozMap.showCommunityRegion(cacheId);
// update the page title
mozMap.setPageTitle(cacheId);
- } else if (id === $('section.entry').attr('id')) {
+ } else if (id === $('section.entry').prop('id')) {
// if we're already on the right page,
// just show the map layer
mozMap.showCommunityRegion(id);
@@ -1045,9 +1045,9 @@
cache: 'false',
success: function(data) {
// pull out data we need
- var content = $(data).find('section.entry');
+ var content = $($.parseHTML(data)).find('section.entry');
var title = data.match(/<title>(.*?)<\/title>/);
- var id = content.attr('id');
+ var id = content.prop('id');
// add content to the cache for future retrieval
contentCache[id] = content;

0 comments on commit 829c827

Please sign in to comment.