Skip to content

Commit

Permalink
Fixed issue #1072.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Jackson authored and Paul Jackson committed Jan 27, 2013
1 parent dbca716 commit d33ed77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/theme-gcwu-fegc/js/theme.js
Expand Up @@ -64,6 +64,7 @@
mb_btn_txt = pe.dic.get('%menu'), mb_btn_txt = pe.dic.get('%menu'),
srch_btn_txt = pe.dic.get('%search'), srch_btn_txt = pe.dic.get('%search'),
secnav_h2, secnav_h2,
s_form,

This comment has been minimized.

Copy link
@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.

Copy link
@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.

Copy link
@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, s_popup,
bodyAppend = '', bodyAppend = '',
popup_role = 'data-role="popup" data-overlay-theme="a"', popup_role = 'data-role="popup" data-overlay-theme="a"',
Expand Down Expand Up @@ -115,7 +116,8 @@
} }
if (wet_boew_theme.search.length !== 0) { if (wet_boew_theme.search.length !== 0) {
// :: Search box transform lets transform the search box to a popup // :: 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; bodyAppend += s_popup;
_list += '<li><a data-rel="popup" data-theme="a" data-icon="search" href="#jqm-wb-search">' + srch_btn_txt + '</a></li>'; _list += '<li><a data-rel="popup" data-theme="a" data-icon="search" href="#jqm-wb-search">' + srch_btn_txt + '</a></li>';
} }
Expand Down
4 changes: 3 additions & 1 deletion src/theme-gcwu-intranet/js/theme.js
Expand Up @@ -64,6 +64,7 @@
mb_btn_txt = pe.dic.get('%menu'), mb_btn_txt = pe.dic.get('%menu'),
srch_btn_txt = pe.dic.get('%search'), srch_btn_txt = pe.dic.get('%search'),
secnav_h2, secnav_h2,
s_form,
s_popup, s_popup,
bodyAppend = '', bodyAppend = '',
popup_role = 'data-role="popup" data-overlay-theme="a"', popup_role = 'data-role="popup" data-overlay-theme="a"',
Expand Down Expand Up @@ -115,7 +116,8 @@
} }
if (wet_boew_theme.search.length !== 0) { if (wet_boew_theme.search.length !== 0) {
// :: Search box transform lets transform the search box to a popup // :: 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; bodyAppend += s_popup;
_list += '<li><a data-rel="popup" data-theme="a" data-icon="search" href="#jqm-wb-search">' + srch_btn_txt + '</a></li>'; _list += '<li><a data-rel="popup" data-theme="a" data-icon="search" href="#jqm-wb-search">' + srch_btn_txt + '</a></li>';
} }
Expand Down

0 comments on commit d33ed77

Please sign in to comment.