Permalink
Browse files

Fixed issue #1072.

  • Loading branch information...
pjackson28 committed Jan 27, 2013
1 parent dbca716 commit d33ed77cf48bd5fa98f6aaca3f348b005b2a7e87
Showing with 6 additions and 2 deletions.
  1. +3 −1 src/theme-gcwu-fegc/js/theme.js
  2. +3 −1 src/theme-gcwu-intranet/js/theme.js
@@ -64,6 +64,7 @@
mb_btn_txt = pe.dic.get('%menu'),
srch_btn_txt = pe.dic.get('%search'),
secnav_h2,
s_form,

This comment has been minimized.

Show comment
Hide comment
@nschonni

nschonni Jan 27, 2013

Member

Might as well use a more descriptive name since it gets obfuscated when minified

@nschonni

nschonni Jan 27, 2013

Member

Might as well use a more descriptive name since it gets obfuscated when minified

This comment has been minimized.

Show comment
Hide comment
@pjackson28

pjackson28 Jan 27, 2013

Member

It's just aligning with the naming convention for s_popup as it's only being used to temporarily cache a string when building s_popup (since two operations are being performed on the same string). Both s_popup and s_form could be changed to something more meaningful. Note that the naming convention is the same for all theme,js files in the four mobile-enabled themes.

@pjackson28

pjackson28 Jan 27, 2013

Member

It's just aligning with the naming convention for s_popup as it's only being used to temporarily cache a string when building s_popup (since two operations are being performed on the same string). Both s_popup and s_form could be changed to something more meaningful. Note that the naming convention is the same for all theme,js files in the four mobile-enabled themes.

This comment has been minimized.

Show comment
Hide comment
@nschonni

nschonni Jan 27, 2013

Member

Fair enough, just a comment based on just seeing the context of the diff. I could understand the selectors above as they aligned with the name of the related ID

@nschonni

nschonni Jan 27, 2013

Member

Fair enough, just a comment based on just seeing the context of the diff. I could understand the selectors above as they aligned with the name of the related ID

s_popup,
bodyAppend = '',
popup_role = 'data-role="popup" data-overlay-theme="a"',
@@ -115,7 +116,8 @@
}
if (wet_boew_theme.search.length !== 0) {
// :: Search box transform lets transform the search box to a popup
s_popup = '<div ' + popup_role + ' id="jqm-wb-search"><div data-role="header"><h1>' + srch_btn_txt + '</h1>' + popup_close + '</div><div data-role="content"><div>' + wet_boew_theme.search[0].getElementsByTagName('form')[0].innerHTML + '</div></div></div>';
s_form = wet_boew_theme.search[0].innerHTML;
s_popup = '<div ' + popup_role + ' id="jqm-wb-search"><div data-role="header"><h1>' + srch_btn_txt + '</h1>' + popup_close + '</div><div data-role="content"><div>' + s_form.substring(s_form.indexOf('<form')) + '</div></div></div>';
bodyAppend += s_popup;
_list += '<li><a data-rel="popup" data-theme="a" data-icon="search" href="#jqm-wb-search">' + srch_btn_txt + '</a></li>';
}
@@ -64,6 +64,7 @@
mb_btn_txt = pe.dic.get('%menu'),
srch_btn_txt = pe.dic.get('%search'),
secnav_h2,
s_form,
s_popup,
bodyAppend = '',
popup_role = 'data-role="popup" data-overlay-theme="a"',
@@ -115,7 +116,8 @@
}
if (wet_boew_theme.search.length !== 0) {
// :: Search box transform lets transform the search box to a popup
s_popup = '<div ' + popup_role + ' id="jqm-wb-search"><div data-role="header"><h1>' + srch_btn_txt + '</h1>' + popup_close + '</div><div data-role="content"><div>' + wet_boew_theme.search[0].getElementsByTagName('form')[0].innerHTML + '</div></div></div>';
s_form = wet_boew_theme.search[0].innerHTML;
s_popup = '<div ' + popup_role + ' id="jqm-wb-search"><div data-role="header"><h1>' + srch_btn_txt + '</h1>' + popup_close + '</div><div data-role="content"><div>' + s_form.substring(s_form.indexOf('<form')) + '</div></div></div>';
bodyAppend += s_popup;
_list += '<li><a data-rel="popup" data-theme="a" data-icon="search" href="#jqm-wb-search">' + srch_btn_txt + '</a></li>';
}

0 comments on commit d33ed77

Please sign in to comment.