Skip to content

Instantly share code, notes, and snippets.

@zroger
Created December 17, 2012 21:27
Show Gist options
  • Save zroger/4322426 to your computer and use it in GitHub Desktop.
Save zroger/4322426 to your computer and use it in GitHub Desktop.
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/includes/templates.inc b/drupal-7.9/sites/lamer/modules/custom/lm_common/includes/templates.inc
index bcecff4..12aff64 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_common/includes/templates.inc
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/includes/templates.inc
@@ -129,7 +129,7 @@ function lm_common_get_templates($path) {
'content' => $path . '/hp_basic_mobile_v1/hp_basic_mobile_v1.html',
'tags' => array('contenttype-page', 'device-mobile'),
'inputs' => array(
- 'image' => array(
+ 'background_image' => array(
'type' => 'file',
'label' => t('Image'),
),
@@ -137,13 +137,29 @@ function lm_common_get_templates($path) {
'type' => 'string',
'label' => t('Title'),
),
- 'action' => array(
+ 'title2' => array(
+ 'type' => 'string',
+ 'label' => t('Title (Line 2)'),
+ ),
+ 'title3' => array(
+ 'type' => 'string',
+ 'label' => t('Title (Line 3)'),
+ ),
+ 'title_color' => array(
+ 'type' => 'color',
+ 'label' => t('Title Color'),
+ ),
+ 'sub_title' => array(
'type' => 'string',
- 'label' => t('Action'),
+ 'label' => t('Sub-Title'),
),
- 'action_url' => array(
+ 'button_text' => array(
+ 'type' => 'string',
+ 'label' => t('Button Text'),
+ ),
+ 'button_url' => array(
'type' => 'url',
- 'label' => t('Action URL'),
+ 'label' => t('Button URL'),
),
),
'attached' => array(
@@ -345,7 +361,12 @@ function lm_common_get_templates($path) {
'attached' => array(
'js' => $path . '/homepage_carousel_mobile_v1/homepage_carousel_mobile_v1.js',
'css' => $path . '/homepage_carousel_mobile_v1/homepage_carousel_mobile_v1.css',
- 'libraries' => array(),
+ 'libraries' => array(
+ array(
+ 'name' => 'touchwipe',
+ 'module' => 'lm_common',
+ ),
+ ),
),
);
@@ -565,6 +586,48 @@ function lm_common_get_templates($path) {
),
);
+ $templates['experience_video_mobile_v1'] = array(
+ 'name' => 'experience_video_mobile_v1',
+ 'label' => t('Experience Video Mobile - v1'),
+ 'renderer' => 'mustache',
+ 'tags' => array('contenttype-page', 'device-mobile'),
+ 'inputs' => array(
+ 'title' => array(
+ 'type' => 'string',
+ 'label' => t('Title'),
+ ),
+ 'text_content' => array(
+ 'type' => 'text_format',
+ 'label' => t('Text Content'),
+ ),
+ 'video' => array(
+ 'type' => 'video',
+ 'label' => t('Video'),
+ ),
+ ),
+ 'content' => $path . '/experience_video_mobile_v1/experience_video_mobile_v1.html',
+ 'attached' => array(
+ 'css' => $path . '/experience_video_mobile_v1/experience_video_mobile_v1.css',
+ ),
+ );
+
+ $templates['experience_landing_mobile_v1'] = array(
+ 'name' => t('experience_landing_mobile_v1'),
+ 'label' => t('Experience Landing Page Mobile - v1'),
+ 'renderer' => 'mustache',
+ 'tags' => array('formatter', 'contenttype-page', 'device-mobile'),
+ 'inputs' => array(
+ 'title' => array(
+ 'type' => 'string',
+ 'label' => t('Title'),
+ ),
+ ),
+ 'content' => $path . '/experience_landing_mobile_v1/experience_landing_mobile_v1.html',
+ 'attached' => array(
+ 'css' => $path . '/experience_landing_mobile_v1/experience_landing_mobile_v1.css',
+ ),
+ );
+
$templates['experience_landing_v1'] = array(
'name' => t('experience_landing_v1'),
'label' => t('Experience Landing Page - v1'),
@@ -1387,11 +1450,6 @@ function lm_common_get_templates($path) {
'renderer' => 'mustache',
'content' => $path . '/store_locator_mobile/store_locator_mobile.html',
'inputs' => array(
- 'merch_content' => array(
- 'label' => 'Merch Content',
- 'type' => 'text_format',
- 'remove' => 0,
- ),
'name' => array(
'label' => 'Name',
'type' => 'string',
@@ -1427,6 +1485,16 @@ function lm_common_get_templates($path) {
'type' => 'string',
'remove' => 0,
),
+ 'local_search_header' => array(
+ 'label' => 'Domestic Form Header',
+ 'type' => 'string',
+ 'remove' => 0,
+ ),
+ 'intl_search_header' => array(
+ 'label' => 'International Form Header',
+ 'type' => 'string',
+ 'remove' => 0,
+ ),
'find_store' => array(
'label' => 'Find a Store',
'type' => 'string',
@@ -1447,6 +1515,11 @@ function lm_common_get_templates($path) {
'type' => 'string',
'remove' => 0,
),
+ 'country' => array(
+ 'label' => 'Country',
+ 'type' => 'string',
+ 'remove' => 0,
+ ),
'state_province' => array(
'label' => 'State or Province',
'type' => 'string',
@@ -1673,6 +1746,49 @@ function lm_common_get_templates($path) {
'tags' => array('contenttype-page', 'device-pc'),
);
+ $templates['customer_service_landing_mobile_v1'] = array(
+ 'renderer' => 'mustache',
+ 'name' => 'customer_service_landing_mobile_v1',
+ 'label' => t('Customer Service Landing Mobile - v1'),
+ 'description' => t('This template is for the mobile customer service landing page.'),
+ 'tags' => array('contenttype-page', 'device-mobile'),
+ 'content' => $path . '/customer_service_landing_mobile_v1/customer_service_landing_mobile.html',
+ 'inputs' => array(
+ 'col1_title' => array(
+ 'label' => t('Section 1 - Title & Link'),
+ 'type' => 'link',
+ ),
+ 'col1_content' => array(
+ 'label' => t('Section 1 - Content'),
+ 'type' => 'text_format',
+ 'format' => 'rich_text',
+ ),
+
+ 'col2_title' => array(
+ 'label' => t('Section 2 - Title & Link'),
+ 'type' => 'link',
+ ),
+ 'col2_content' => array(
+ 'label' => t('Section 2 - Content'),
+ 'type' => 'text_format',
+ 'format' => 'rich_text',
+ ),
+
+ 'col3_title' => array(
+ 'label' => t('Section 3 - Title & Link'),
+ 'type' => 'link',
+ ),
+ 'col3_content' => array(
+ 'label' => t('Section 3 - Content'),
+ 'type' => 'text_format',
+ 'format' => 'rich_text',
+ ),
+ ),
+ 'attached' => array(
+ 'css' => $path . '/customer_service_landing_mobile_v1/customer_service_landing_mobile.css',
+ ),
+ );
+
$templates['store_locator_v1'] = array(
'name' => 'store_locator_v1',
'label' => t('Store Locator - v1'),
@@ -2028,6 +2144,31 @@ function lm_common_get_templates($path) {
),
);
+ $templates['content_with_menu_mobile_v1'] = array(
+ 'name' => 'content_with_menu_mobile_v1',
+ 'label' => t('Content with Menu Mobile - v1'),
+ 'renderer' => 'mustache',
+ 'tags' => array('formatter', 'contenttype-page', 'device-mobile'),
+ 'content' => $path . '/content_with_menu_mobile_v1/content_with_menu_mobile.html',
+ 'inputs' => array(
+ 'menu_title' => array(
+ 'type' => 'string',
+ 'label' => t('Menu Header'),
+ ),
+ 'menu' => array(
+ 'type' => 'menu',
+ 'label' => t('Menu'),
+ ),
+ 'menu_first' => array(
+ 'type' => 'checkbox_value',
+ 'label' => t('Render Menu Before Content'),
+ ),
+ ),
+ 'attached' => array(
+ 'css' => $path . '/content_with_menu_mobile_v1/content_with_menu_mobile.css',
+ ),
+ );
+
$templates['1col_layout_v1'] = array(
'name' => '1col_layout_v1',
'label' => t('1 Column Layout - v1'),
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/content_with_menu_mobile_v1/content_with_menu_mobile.css b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/content_with_menu_mobile_v1/content_with_menu_mobile.css
new file mode 100644
index 0000000..a7e9432
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/content_with_menu_mobile_v1/content_with_menu_mobile.css
@@ -0,0 +1,52 @@
+#content-with-menu #menu-wrapper {
+ border-top: solid 1px #aaa;
+ margin-top: 20px;
+ padding: 10px 0 0;
+}
+#content-with-menu.menu-first #menu-wrapper {
+ border-top: none;
+ margin-top: 0;
+ border-bottom: solid 1px #aaa;
+ margin-bottom: 20px;
+ padding-bottom: 10px;
+}
+#content-with-menu #menu-wrapper ul,
+#content-with-menu #menu-wrapper li {
+ margin: 0;
+ padding: 0;
+}
+#content-with-menu #menu-wrapper a {
+ display: block;
+ text-decoration: none;
+ text-transform: uppercase;
+ height: 30px;
+ line-height: 30px;
+}
+#content-with-menu #menu-wrapper a.active {
+ /* background-color: #e5e5e5; */
+ color: #000;
+}
+#content-with-menu #menu-wrapper a:after {
+ content: " \203A";
+ position: relative;
+ top: -2px;
+ left: 5px;
+}
+
+#content-with-menu #content-wrapper h2 {
+ font-size: 20px;
+ text-align: center;
+}
+
+#content-with-menu #content-wrapper h3 {
+ font-size: 13px;
+ font-family: Times Georgia serif;
+ border-bottom: solid 1px #aaa;
+ margin: 0 0 10px;
+ padding: 0 0 7px;
+}
+
+#content-with-menu #content-wrapper a[href="#top"] {
+ display: block;
+ text-align: right;
+}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/content_with_menu_mobile_v1/content_with_menu_mobile.html b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/content_with_menu_mobile_v1/content_with_menu_mobile.html
new file mode 100644
index 0000000..06664b6
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/content_with_menu_mobile_v1/content_with_menu_mobile.html
@@ -0,0 +1,18 @@
+<div id="content-with-menu"{{#menu_first}} class="menu-first"{{/menu_first}}>
+ {{^menu_first}}
+ <div id="content-wrapper">
+ {{#templates}} {{{ rendered }}} {{/templates}}
+ </div>
+ {{/menu_first}}
+
+ <div id="menu-wrapper">
+ {{#menu_title}}<h4>{{{menu_title}}}</h4>{{/menu_title}}
+ {{{menu}}}
+ </div>
+
+ {{#menu_first}}
+ <div id="content-wrapper">
+ {{#templates}} {{{ rendered }}} {{/templates}}
+ </div>
+ {{/menu_first}}
+</div>
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/customer_service_landing_mobile_v1/customer_service_landing_mobile.css b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/customer_service_landing_mobile_v1/customer_service_landing_mobile.css
new file mode 100644
index 0000000..c9a53de
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/customer_service_landing_mobile_v1/customer_service_landing_mobile.css
@@ -0,0 +1,21 @@
+#customer-service-landing {
+ text-align: center;
+ margin: 20px 0 0;
+}
+#content-with-menu #content-wrapper #customer-service-landing h3 {
+ margin: 20px 0;
+ border: none;
+ padding: 0;
+ font-size: 20px;
+ font-family: "LinotypeDidotRoman";
+}
+#content-with-menu #content-wrapper #customer-service-landing .item:first-child h3 {
+ margin-top: 0;
+}
+#customer-service-landing h3 a {
+ text-decoration: none;
+}
+
+#customer-service-landing p {
+ margin: 0;
+}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/customer_service_landing_mobile_v1/customer_service_landing_mobile.html b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/customer_service_landing_mobile_v1/customer_service_landing_mobile.html
new file mode 100644
index 0000000..acfd287
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/customer_service_landing_mobile_v1/customer_service_landing_mobile.html
@@ -0,0 +1,27 @@
+<div id="customer-service-landing">
+ <div id="call-chat-email">
+ <div class="item">
+ {{#col1_title}}
+ <h3>{{{col1_title}}}</h3>
+ {{/col1_title}}
+
+ {{{col1_content}}}
+ </div>
+
+ <div class="item">
+ {{#col2_title}}
+ <h3>{{{col2_title}}}</h3>
+ {{/col2_title}}
+
+ {{{col2_content}}}
+ </div>
+
+ <div class="item">
+ {{#col3_title}}
+ <h3>{{{col3_title}}}</h3>
+ {{/col3_title}}
+
+ {{{col3_content}}}
+ </div>
+ </div>
+</div>
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_landing_mobile_v1/experience_landing_mobile_v1.css b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_landing_mobile_v1/experience_landing_mobile_v1.css
new file mode 100644
index 0000000..22cbb6e
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_landing_mobile_v1/experience_landing_mobile_v1.css
@@ -0,0 +1,18 @@
+.formatter-experience-landing-mobile h2 {
+ font-size: 20px;
+ line-height: 20px;
+ text-align: center;
+ margin: 20px 0;
+}
+
+.formatter-experience-landing-mobile .row {
+ border-bottom: solid 1px #ababab;
+ padding: 20px 0;
+}
+.formatter-experience-landing-mobile .row:first-child {
+ padding-top: 0;
+}
+.formatter-experience-landing-mobile .row:last-child {
+ border-bottom: none;
+ padding-bottom: 0;
+}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_landing_mobile_v1/experience_landing_mobile_v1.html b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_landing_mobile_v1/experience_landing_mobile_v1.html
new file mode 100644
index 0000000..f9acc80
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_landing_mobile_v1/experience_landing_mobile_v1.html
@@ -0,0 +1,12 @@
+<div class="formatter-experience-landing-mobile">
+ {{#title}}
+ <h2>{{title}}</h2>
+ {{/title}}
+ <div>
+ {{#templates}}
+ <div class="row">
+ {{{ rendered }}}
+ </div>
+ {{/templates}}
+ </div>
+</div>
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_video_mobile_v1/experience_video_mobile_v1.css b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_video_mobile_v1/experience_video_mobile_v1.css
new file mode 100644
index 0000000..02862f5
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_video_mobile_v1/experience_video_mobile_v1.css
@@ -0,0 +1,32 @@
+h3.experience-title {
+ font-size: 20px;
+ line-height: 20px;
+ text-align: center;
+ margin: 20px 0;
+}
+
+div.experience-text {
+ text-align: center;
+ line-height: 16px;
+}
+div.experience-text p:last-child {
+ margin-bottom: 0;
+}
+
+.experience-video .video_player_container,
+.experience-video .video-player-wrapper,
+.experience-video .video_player,
+.experience-video .video_player .video_player_poster,
+.experience-video .video_player .video_player_poster img.poster {
+ width: 100%;
+ height: 100%;
+ float: none;
+ max-width: none;
+ background: #fff;
+}
+.experience-video .video_player video {
+ height: 165px; /* iOS needs this set or it displays black borders */
+}
+
+.experience-video .video-player-wrapper .video_player_button { width: 11%; }
+.experience-video .video-player-wrapper .progress_container_wrapper { width: 57%; }
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_video_mobile_v1/experience_video_mobile_v1.html b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_video_mobile_v1/experience_video_mobile_v1.html
new file mode 100644
index 0000000..63a0420
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/experience_video_mobile_v1/experience_video_mobile_v1.html
@@ -0,0 +1,3 @@
+{{#video}}<div class="experience-video">{{{video}}}</div>{{/video}}
+{{#title}}<h3 class="experience-title">{{title}}</h3>{{/title}}
+{{#text_content}}<div class="experience-text">{{{text_content}}}</div>{{/text_content}}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/homepage_carousel_mobile_v1/homepage_carousel_mobile_v1.css b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/homepage_carousel_mobile_v1/homepage_carousel_mobile_v1.css
index ffa179f..43ba5ae 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/homepage_carousel_mobile_v1/homepage_carousel_mobile_v1.css
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/homepage_carousel_mobile_v1/homepage_carousel_mobile_v1.css
@@ -1,6 +1,6 @@
#lm-hp-container { }
-#lm-hp-container { width: 280px; overflow: hidden; position: relative; margin: 10px auto 20px; }
+#lm-hp-container { width: 280px; overflow: hidden; position: relative; margin: 10px auto 0; }
#hp-slides li { width: 280px; margin: 0; padding: 0; float: left; }
#hp-prev,
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/homepage_carousel_mobile_v1/homepage_carousel_mobile_v1.js b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/homepage_carousel_mobile_v1/homepage_carousel_mobile_v1.js
index 00f1db4..96af424 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/homepage_carousel_mobile_v1/homepage_carousel_mobile_v1.js
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/homepage_carousel_mobile_v1/homepage_carousel_mobile_v1.js
@@ -41,6 +41,21 @@
$('body').one('mousemove', function() {
carousel.startAuto(0);
});
+
+ // Support ios swipe events
+ Drupal.HPFormatter.DOMNodes.carousel.touchwipe({
+ wipeLeft: function() {
+ carousel.next();
+ carousel.startAuto(0);
+ },
+ wipeRight: function() {
+ carousel.prev();
+ carousel.startAuto(0);
+ },
+ min_move_x: 20,
+ min_move_y: 20,
+ preventDefaultEvents: false
+ });
};
Drupal.behaviors.HPFormatter = {
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/hp_basic_mobile_v1/hp_basic_mobile_v1.css b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/hp_basic_mobile_v1/hp_basic_mobile_v1.css
index 23431df..6bff6fa 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/hp_basic_mobile_v1/hp_basic_mobile_v1.css
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/hp_basic_mobile_v1/hp_basic_mobile_v1.css
@@ -1,23 +1,28 @@
.lm-hp-basic-mobile-container { }
-.slide-image-container { min-height: 165px; }
-.slide-image { width: 280px; }
+.slide-image { width: 280px; height: 165px; display: table; }
.lm-hp-basic-mobile-container h2 {
+ font-size: 26px;
+ line-height: 25px;
+ text-align: center;
+ display: table-cell;
+ vertical-align: middle;
+}
+.lm-hp-basic-mobile-container h2 .title-2,
+.lm-hp-basic-mobile-container h2 .title-3 {
+ white-space: nowrap;
+}
+.lm-hp-basic-mobile-container h3 {
width: 212px;
- margin: 0 auto;
- font-size: 24px;
- line-height: 32px;
+ margin: 0 auto 15px;
+ font-size: 20px;
+ line-height: 20px;
}
.lm-hp-basic-mobile-container .slide-strip {
text-align: center;
background: #fff;
- padding: 10px 0;
+ padding: 21px 0;
min-height: 45px;
}
-.lm-hp-basic-mobile-container .slide-strip a {
- text-transform: uppercase;
- font-size: 13px;
- text-decoration: none;
-}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/hp_basic_mobile_v1/hp_basic_mobile_v1.html b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/hp_basic_mobile_v1/hp_basic_mobile_v1.html
index fbec7ed..1dba9d3 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/hp_basic_mobile_v1/hp_basic_mobile_v1.html
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/hp_basic_mobile_v1/hp_basic_mobile_v1.html
@@ -1,17 +1,27 @@
<div class="lm-hp-basic-mobile-container">
<div class="slide-image-container">
- {{#image}}
- <img src="{{image}}" class="slide-image" />
- {{/image}}
+ <div {{#background_image}}style="background-image: url({{background_image}});" {{/background_image}}class="slide-image">
+ {{#title}}
+ <h2 style="{{#title_color}}{{#hex}}color: {{{hex}}};{{/hex}}{{/title_color}} {{#title2}}white-space: nowrap;{{/title2}}">
+ <div class="title-1">{{{title}}}</div>
+ {{#title2}}
+ <div class="title-2">{{{title2}}}</div>
+ {{/title2}}
+ {{#title3}}
+ <div class="title-3">{{{title3}}}</div>
+ {{/title3}}
+ </h2>
+ {{/title}}
+ </div>
</div>
<div class="slide-strip">
- {{#title}}
- <h2>{{{title}}}</h2>
- {{/title}}
+ {{#sub_title}}
+ <h3>{{{sub_title}}}</h3>
+ {{/sub_title}}
- {{#action}}
- <a href="{{{action_url}}}">{{{action}}}</a>
- {{/action}}
+ {{#button_text}}
+ <a href="{{button_url}}">{{{button_text}}}</a>
+ {{/button_text}}
</div>
</div>
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.css b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.css
index e1d72e1..f715f4d 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.css
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.css
@@ -1,103 +1,16 @@
-/* Global styles */
-html body { color:#333; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 11px; background-color: #eff4fa;}
-div.body-container {margin: 0 auto; padding: 10px; background-color: white;}
-h1 { font-size: 26px; font-weight: normal; }
-h2 {text-transform: uppercase; font-size: 1.2em; padding-bottom: 1px; margin: 0 0 8px 0;border-bottom: 1px solid #000; }
-h3 { font-size: 1.2em; font-weight:bold; border-bottom: 1px solid #000; padding-bottom: 1px; margin-bottom: 8px;}
-h4 { font-size: 1.2em; font-weight:bold; }
-a { color:#5C88E1; cursor:pointer; text-decoration: underline; }
-input { border: 1px solid #ccc; font-size: 1.2em; white-space: normal; }
-em { font-style: italic; }
+h2.store_locator { font-size: 20px; text-align: center; padding-top: 20px; }
+h3.store_locator { font-size: 13px; border-bottom: solid 1px #ababab; text-transform: uppercase; padding-bottom: 5px; }
+.locator_content h4 { text-transform: none; font: 13px Times, Georgia, Arial, sans-serif; }
+input.zip { width: 100%; margin: 5px 0 20px !important; }
+select.state { width: 105px; float: left; margin: 20px 0 !important; }
+select.city { width: 160px; float: right; margin: 20px 0 !important; }
+select.country { width: 105px; float: left; margin: 5px 0 20px !important; }
+select.city_intl { width: 160px; float: right; margin: 5px 0 20px !important; }
+.locator_content label { font-weight: normal; }
+.locator_content .button { float: right; }
-/* Messaging - how to display error / informational messages */
-ul.error_messages_display { display: inline-block; margin: 0 auto; }
-ul.error_messages_display li {background-color: #c0d1ec; padding: 10px; font-weight: bold; margin: 3px 0; }
-.error { color: #B50404; }
-input.error { border: 1px solid #b50404; }
-label.error { color: #B50404; }
-ul.error_messages {color: #a00; margin-bottom: 8px;}
-
-/* Global Content Styles */
-#content h1 {display: none;}
-
-/* Global Form Styles */
-input,
-textarea,
-select {display: block; width:100%; float: none; margin: 0; padding: 11px 5px; font-size: 1.2em; border: 1px solid #ccc; border-radius: 5px; border-radius: 5px; }
-.checkbox input, .radio input {width: auto; display: inline;}
-select.error::-webkit-input-placeholder, input.error::-webkit-input-placeholder {color: #900;}
-.form-item, .form_element {margin: 1em 0; clear: both;}
-.required_mark, .radio input {float:left;margin-right:5px;}
-.ship_type_container input {width: auto; float: left;}
-.ship_type_container label {display: block; float: left; width: auto; margin-right: 10px; font-size: 1em;}
-.state_container {float: left; width: 55%; margin-right: 10px;}
-.state_container select {width: 100%;}
-.phone_label_container {clear: both;}
-
-/* Buttons */
-.blue_button, input.form-submit {
- clear:left; text-align: center; text-decoration: none; background-color: #2162b6; cursor:pointer; padding: 12px 10px; font-size: 1.2em; text-transform: uppercase; color: white; display: block; font-weight: bold; margin: 5px 0; cursor: pointer; -webkit-appearance: none; border-width: 0;
- border-radius: 5px; border-radius: 5px;}
-.grey_button {
- display: block; text-align: center; width: auto; background-color: #999; color: white; cursor:pointer; text-decoration: none; font-weight: bold; text-transform: uppercase; padding: 12px 10px; margin: 6px 0 5px 0; border-width: 0px; font-size: 1em;
- border-radius: 5px; border-radius: 5px; }
-.slider-open {color: #900; background-color: #a99;}
-.overlay-link.slider-open {color: #5C88E1;background:none;}
-
-body .overlay_content, body .overlay_container {display: block; position: static;}
-
-
-/* mobile.reset.css */
-/*** Blueprint's css reset ****/
-html{margin:0;padding:0;border:0;}
-body,div,span,object,iframe,
-h1,h2,h3,h4,h5,h6,p,blockquote,pre,
-a,abbr,acronym,address,code,
-del,dfn,em,img,q,dl,dt,dd,ol,ul,li,
-fieldset,form,label,legend,
-table,caption,tbody,tfoot,thead,tr,th,td,
-article,aside,dialog,figure,footer,header,
-hgroup,nav,section{margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
-article,aside,dialog,figure,footer,header,
-hgroup,nav,section{display:block;}
-body{line-height:1.5;background:white;}
-table{border-collapse:separate;border-spacing:0;}
-caption,th,td{text-align:left;font-weight:normal;float:none !important;}
-table,th,td{vertical-align:middle;}
-blockquote:before,blockquote:after,q:before,q:after{content:'';}
-blockquote,q{quotes:"" "";}
-a img{border:none;}
-ul {list-style-type: none;}
-
-
-/**** clearfix ****/
-.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
-.clearfix, .container {display:block;}
-.clear { clear: both; zoom: 1;}
-.cright { clear: right; }
-.cleft { clear: left; }
-/* Hides from IE-mac \*/
-* html .clearfix { height: 1%; }
-/*.clearfix { display: block; }*/
-/* End hide from IE-mac */
-
-/* Hidden
----------------------------- */
-.hidden { display:none !important; }
-
-/**** Site framework ****/
-div.body-container {width: 100%; overflow: hidden; margin: 0px auto; -webkit-box-sizing: border-box; max-width: 900px;}
-body {-webkit-text-size-adjust: none; -ms-text-size-adjust: none; font-size: 100%; color: #555;}
-#header, #footer, #navigation, #bg-wrapper {width: 100%;}
-.nocallout {-webkit-touch-callout: none;}
-
-
-/*** forms ****/
-input, textarea {-webkit-appearance: none;box-sizing: border-box; -webkit-box-sizing: border-box;}
-input[type=hidden], input[type=image] { border: 0; padding: 0; }
-.radio input, fieldset.sample input {-webkit-appearance: radio;}
-input[type=checkbox] {-webkit-appearance: checkbox;}
-input[type=radio] {-webkit-appearance: radio;}
-label {font-weight: bold; display: block;}
+h3.doors_results_header { clear: both; border-bottom: solid 1px #ababab; font-size: 13px; text-transform: uppercase; padding: 20px 0 5px; }
+.store_extra { padding: 10px 0; }
+.extra_address { padding-bottom: 5px; }
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.html b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.html
index 04f78d0..2f15e42 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.html
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.html
@@ -1,6 +1,10 @@
-<script type="text/javascript" charset="UTF-8" src="/locator/store_data.tmpl"></script>
+<!--script type="text/javascript" charset="UTF-8" src="/locator/store_data.tmpl"></script-->
<!--script type="text/javascript" charset="UTF-8" src="http://maps.google.com/maps/api/js?sensor=false"></script-->
-<script type="text/javascript">
+<script type="text/javascript">
+ //store data from perlgem side
+ var pg_reqs = Drupal.settings.perlgem.pg_reqs;
+ document.write('<' + 'script src="/locator/store_data.tmpl?' + ((pg_reqs) ? pg_reqs : "") + '" type="text/javascript"><' + '/script>');
+
var g_language = '{{google_language}}'.substring(0, '{{google_language}}'.indexOf(' '));
document.write('<' + 'script src="http://maps.googleapis.com/maps/api/js?client={{google_client_id}}&sensor=false&language=' + g_language + '&v=3.8" type="text/javascript"><' + '/script>');
//http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE
@@ -45,69 +49,83 @@
<div class="store_extra clearfix">
<div class="extra_address">
- <a href="http://maps.google.com/maps?q=#{ADDRESSURL}" class="directions grey_button">Get Directions</a>
+ <a href="http://maps.google.com/maps?q=#{ADDRESSURL}" class="directions">Get Directions</a>
</div>
<div class="extra_phone">
- <p><a href="tel:#{PHONEURL}" class="grey_button">Call #{PHONE1}</a></p>
+ <p><a href="tel:#{PHONEURL}">#{PHONE1}</a></p>
</div>
+
+ <div class="extra_hours">
+ #{STORE_HOURS}
+ </div>
+
</div>
</div>
</script>
-
<div class="locator_content">
<h2 class="store_locator">{{{find_store_header}}}</h2>
<div class="locations_form_panel">
- <fieldset class="fs locator">
- <h3 class="store_locator">{{{find_store}}}</h3>
- <p id="find_stores">{{{find_store_sub}}}</p>
- <ul class="locator_error_messages error_messages"></ul>
- <div class="zip_section_container">
- <label>{{{zip_postal}}}:</label>
-
- <div class="form_element zip_container">
- <input type="text" class="zip"></input>
- </div>
- <a class="search_button blue_button">
- {{find_store}}
- </a>
- </div>
- <div class="or">- {{or}} -</div>
- <div class="address_section_container">
- <div class="form_element state_container">
- <label>{{{state_province}}}:</label>
- <select size="1" class="state"></select>
- </div>
- <div class="form_element city_container">
- <label>{{{city}}}:</label>
- <select size="1" class="city"></select>
- </div>
- <div class="form_element door_container">
- <label>{{{store}}}:</label>
- <select size="1" class="door"></select>
- </div>
- <div class="form_element distance_container clearfix">
- <label>{{{search_area}}}:</label>
- <select class="distance">
- <option value="5">5</option>
- <option value="10">10</option>
- <option value="25" selected>25</option>
- <option value="100">100</option>
- </select>
- <p>{{{distance_type}}}</p>
- </div>
- <a class="search_button blue_button range-btn">
- {{find_store}}
- </a>
- </div>
- </fieldset>
+ <h3 class="store_locator">{{{find_store_sub}}}</h3>
+
+ <h4>{{local_search_header}}</h4>
+ <div class="zip_section_container">
+ <!--label>{{{zip_postal}}}</label-->
+ <div class="form_element zip_container">
+ <input type="text" class="zip" placeholder="{{{zip_postal}}}"></input>
+ </div>
+ <!--a class="search_button blue_button">
+ {{find_store}}
+ </a-->
+ </div>
+ <div class="or">{{or}}</div>
+ <div class="address_section_container">
+ <div class="form_element state_container">
+ <!--label>{{{state_province}}}:</label-->
+ <select size="1" class="state selectBox" title="{{state_province}}"></select>
+ </div>
+ <div class="form_element city_container">
+ <!--label>{{{city}}}:</label-->
+ <select size="1" class="city selectBox" title="{{city}}"></select>
+ </div>
+ <div class="form_element door_container hidden">
+ <label>{{{store}}}:</label>
+ <select size="1" class="door selectBox"></select>
+ </div>
+ <div class="form_element distance_container clearfix hidden">
+ <label>{{{search_area}}}:</label>
+ <select class="distance">
+ <option value="5">5</option>
+ <option value="10">10</option>
+ <option value="25" selected>25</option>
+ <option value="100">100</option>
+ </select>
+ <p>{{{distance_type}}}</p>
+ </div>
+ <!--a class="search_button blue_button range-btn button">
+ {{find_store}}
+ </a-->
+ </div>
+
+ <h4>{{intl_search_header}}</h4>
+ <ul class="locator_error_messages_intl error_messages"></ul>
+ <div class="address_section_container">
+ <div class="form_element country_container">
+ <!--label>{{country}}</label-->
+ <select size="1" class="country selectBox" title="{{country}}"></select>
+ </div>
+ <div class="form_element city_container">
+ <!--label>{{city}}</label-->
+ <select size="1" class="city_intl selectBox" title="{{city}}"></select>
+ <a class="search_button button" href="javascript:void(0);">{{find_store}}</a>
+ </div>
+ </div>
+
</div>
- <div class="locations_map_panel" style="display:none;">
- <div id="map">{{{merch_content}}}</div>
- </div>
+ <div class="clear">&nbsp;</div>
<!-- <div id="events"></div> -->
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.js b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.js
index 6129483..2e92c7d 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.js
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_common/templates/store_locator_mobile/store_locator_mobile.js
@@ -4,17 +4,22 @@ site.locator.ui = site.locator.ui || {};
site.locator.data = site.locator.data || {};
site.locator.map = null; // Google map object
+site.locator.mapDir = null; // Google map object
site.locator.markers = []; // Array of google.maps.marker objects, ordered the same way as their corresponding doors in site.locator.resultData.results
site.locator.locationsHtml = []; // Array of HTML snippets for info windows, ordered the same way as their corresponding doors in site.locator.resultData.results
-site.locator.resultData = {}; // contains results from doors query.
+site.locator.resultData = {}; // contains results from doors query.
site.locator.resultData.results = []; // contains ordered results from doors query.
site.locator.infoWindow = null; // google.maps.InfoWindow object
-site.locator.queryFields = "DOOR_ID, DOORNAME, EVENT_NAME, EVENT_START_DATE, EVENT_END_DATE, EVENT_IMAGE, EVENT_FEATURES, EVENT_TIMES, SERVICES, STORE_HOURS, ADDRESS, ADDRESS2, STATE_OR_PROVINCE, CITY, COUNTRY, ZIP_OR_POSTAL, PHONE1"
+site.locator.infoWindowDir = null; // google.maps.InfoWindow object
+site.locator.queryFields = "DOOR_ID, DOORNAME, EVENT_NAME, EVENT_START_DATE, EVENT_END_DATE, EVENT_IMAGE, EVENT_FEATURES, EVENT_TIMES, SERVICES, STORE_HOURS, ADDRESS, ADDRESS2, STATE_OR_PROVINCE, CITY, REGION, COUNTRY, ZIP_OR_POSTAL, PHONE1"
site.locator.directionsDisplay = null; // google.maps.DirectionsRenderer object
+site.locator.markerCounter = 0;
+
+site.locator.defaultCountry = 'United States';
+site.locator.queryArgs = '';
site.locator.ui.getRBs = function() {
var rb = generic.rb("language");
- var error_rb = generic.rb("error_messages");
site.locator.rb = {
view_details : rb.get("view_details"),
store : rb.get("store"),
@@ -24,26 +29,22 @@ site.locator.ui.getRBs = function() {
search_results : rb.get("search_results"),
no_criteria : rb.get("no_criteria"),
search_error : rb.get("search_error"),
- select : rb.get("select"),
- state_select : rb.get("state"),
- city_select : rb.get("city"),
- store_select : rb.get("store")
- };
- site.locator.error_rb = {
- insufficient_query_data : error_rb.get("insufficient_query_data")
+ select : rb.get("select")
};
};
site.locator.getDomNodes = function() {
site.locator.nodes = {
- stateMenu : $("select.state"),
+ stateMenu : $(".state_container select"),
+ countryMenu : $("select.country"),
+ cityMenuIntl : $("select.city_intl"),
cityMenu : $("select.city"),
doorMenu : $("select.door"),
zipInput : $("input.zip"),
distanceMenu : $("select.distance"),
searchBtn : $('a.search_button'),
mapPanel : $('div.locations_map_panel'),
- closePanel : $('a.panel_close'),
+ closePanel : $('a.panel_close'),
map : $('div#map'),
storeResults : $('div#store_results'),
doorsBodySel : 'div.doors_body',
@@ -82,18 +83,15 @@ site.locator.ui.init = function() {
* This function takes a select menu, removes its options, then adds an option with name="Default" and value = ""
*/
var _clearMenu = function(menu) {
- var currentSelect = "Select";
- if (menu[0] == site.locator.nodes.stateMenu[0]) { currentSelect = site.locator.rb.state_select; }
- else if (menu[0] == site.locator.nodes.cityMenu[0]) { currentSelect = site.locator.rb.city_select; }
- else if (menu[0] == site.locator.nodes.doorMenu[0]) { currentSelect = site.locator.rb.store_select; }
-
- //menu[0].options.length = 0;
- menu.html("");
- generic.forms.select.addOption({
- menuNode: menu,
- label: currentSelect,
- value: ''
- });
+ //menu[0].options.length = 0;
+ // wipe out menu html
+ menu.html("");
+ // rebuild
+ generic.forms.select.addOption({
+ menuNode: menu,
+ label: (menu.attr("title")) ? menu.attr("title") : site.locator.rb.select,
+ value: ''
+ });
};
/*
* Initializes select menus by adding default option and populating the State menu from JSON data in page
@@ -101,78 +99,90 @@ site.locator.ui.init = function() {
var _initMenus = function() {
// insert default options
- $([ site.locator.nodes.stateMenu,
+ $([ site.locator.nodes.countryMenu,
+ site.locator.nodes.cityMenuIntl,
+ site.locator.nodes.stateMenu,
site.locator.nodes.cityMenu,
site.locator.nodes.doorMenu]).each(function () {
- _clearMenu($(this));
+ _clearMenu($(this));
});
- for (var state in site.locator.locationData) {
- generic.forms.select.addOption({
- menuNode: site.locator.nodes.stateMenu,
- value: state
- });
+
+ for ( var country in site.locator.locationData ) {
+ if ( country == "" ) { continue; }
+
+ if ( country == site.locator.defaultCountry ) {
+ for ( var state in site.locator.locationData[country] ) {
+ if ( state == "" ) { continue; }
+ generic.forms.select.addOption({
+ menuNode: site.locator.nodes.stateMenu,
+ value: state
+ });
+ }
+ } else {
+ generic.forms.select.addOption({
+ menuNode: site.locator.nodes.countryMenu,
+ value: country
+ });
+ }
+ }
+ $('.selectbox', site.locator.nodes.searchPanel).selectBox('refresh');
+ };
+
+
+ var _countryMenuChangeHandler = function( cityNode ) {
+ var cities = {};
+ for ( var state in site.locator.locationData[site.locator.nodes.countryMenu.val()] ) {
+ jQuery.extend( cities, site.locator.locationData[site.locator.nodes.countryMenu.val()][state] );
+
}
+
+ _filterCityMenu( cityNode, cities );
+ cityNode.focus();
};
+
+
/*
* Event handler for onchange event on State menu
*/
- var _stateMenuChangeHandler = function() {
- _filterCityMenu();
+ var _stateMenuChangeHandler = function( cityNode, locationData ) {
+ _filterCityMenu( cityNode, locationData[site.locator.nodes.stateMenu.val()] );
+ cityNode.focus();
};
/*
* Reads value from state menu and populates city menu with the appropriate values, based on JSON data in page
*/
- var _filterCityMenu = function() {
- var state = site.locator.nodes.stateMenu.val();
- _clearMenu(site.locator.nodes.cityMenu);
+ var _filterCityMenu = function( cityNode, locationData ) {
+ _clearMenu( cityNode );
// retrieve cities from that state, populate city menu
- var cityData = site.locator.locationData[state];
-
- var cityNames = [];
-
- var normalizingSort = function(a,b) {
- a = a.toLowerCase();
- b = b.toLowerCase();
- if (a < b) {
- return -1;
- } else if (a > b) {
- return 1;
- } else {
- return 0;
- }
- }
-
- $.each(cityData, function(k,v) {
- cityNames.push(k);
- });
-
- $.each(cityNames.sort(normalizingSort), function(i,cityName) {
+ var cityData = locationData;
+
+ for (var city in cityData) {
generic.forms.select.addOption({
- menuNode: site.locator.nodes.cityMenu,
- value: cityName
+ menuNode: cityNode,
+ value: city
});
- });
-
+ }
_clearMenu(site.locator.nodes.doorMenu);
+ cityNode.selectBox('refresh');
}
/*
* Event handler for onchange event on City menu
*/
- var _cityMenuChangeHandler = function() {
- _filterDoorMenu();
- site.locator.nodes.doorMenu.focus();
+ var _cityMenuChangeHandler = function( doorNode, locationData ) {
+ var state = site.locator.nodes.stateMenu.val();
+ var city = site.locator.nodes.cityMenu.val();
+ _filterDoorMenu( doorNode, locationData[state][city] );
+ doorNode.focus();
};
/*
* Reads value from city menu and populates door (store) menu with the appropriate values, based on JSON data in page
*/
- var _filterDoorMenu = function() {
- var state = site.locator.nodes.stateMenu.val();
- var city = site.locator.nodes.cityMenu.val();
- _clearMenu(site.locator.nodes.doorMenu);
- var storeArray= site.locator.locationData[state][city];
+ var _filterDoorMenu = function( doorNode, locationData ) {
+ _clearMenu( doorNode );
+ var storeArray= locationData;
for (var i=0, len=storeArray.length; i<len; i++) {
generic.forms.select.addOption({
- menuNode: site.locator.nodes.doorMenu,
+ menuNode: doorNode,
value: storeArray[i]
});
}
@@ -210,6 +220,7 @@ site.locator.ui.init = function() {
var _searchClickHandler = function(e) {
_submitQuery(e);
};
+
/*
* Event handler for click of close panel button
@@ -219,55 +230,62 @@ site.locator.ui.init = function() {
site.locator.nodes.dirForm.removeClass("hidden");
}
- /*
- * Collects parameters from form input elements, packs them into parameters,
- * then passes them to search query via the "locator:submitSearchQuery" event.
- * @see site.locator.data.submitQuery
- */
- var _submitQuery = function(e) {
+ /*
+ * Collects parameters from form input elements, packs them into parameters,
+ * then passes them to search query via the "locator:submitSearchQuery" event.
+ * @see site.locator.data.submitQuery
+ */
+ var _submitQuery = function(e) {
var data = {};
- var state = $("select.state").val(); //$F(site.locator.nodes.stateMenu);
- var city = $('select.city').val();// clean this?
+ var state = $("select.state").val();
+ var city = $('select.city').val();
var door = site.locator.nodes.doorMenu.val();
- var zip = encodeURIComponent($("input.zip").val()); //$F(site.locator.nodes.zipInput);
- var distance = $("select.distance").val()
+ var zip = encodeURIComponent($("input.zip").val().replace(' ', '')); //$F(site.locator.nodes.zipInput);
+ var distance = $("select.distance").val();
var queryArgs = {
params : [{
- "fields" : site.locator.queryFields,
- "radius" : distance,
- "show_stores_list" : "all",
- "uom": "mile"
- }]
+ "fields" : site.locator.queryFields,
+ "radius" : distance,
+ "show_stores_list" : "all",
+ "uom": "mile"
+ }]
};
-
- queryArgs.params[0].zip = zip;
- queryArgs.params[0].state = state;
- queryArgs.params[0].city = city;
+
+ var country = site.locator.nodes.countryMenu.val();
+ var intl_city = site.locator.nodes.cityMenuIntl.val();
+
+ if ((country !== "") && (intl_city !== "")) {
+ queryArgs.params[0].state = country;
+ queryArgs.params[0].city = intl_city;
+ queryArgs.params[0].intlSearch = 1;
+ } else {
+ queryArgs.params[0].zip = zip;
+ queryArgs.params[0].state = state;
+ queryArgs.params[0].city = city;
+ }
var storeList = [];
- if ( door.length > 0 ) {
- storeList[0] = door;
- queryArgs.params[0].show_stores_list = storeList;
- }
+ if ( door.length > 0 ) {
+ storeList[0] = door;
+ queryArgs.params[0].show_stores_list = storeList;
+ }
// if we have location data, add to request
- var mobileLatitude = site.locator.currentLocationData ? site.locator.currentLocationData.latitude : null;
- var mobileLongitude = site.locator.currentLocationData ? site.locator.currentLocationData.longitude : null;
+ var mobileLatitude = (site.locator.currentLocationData && (city === "")) ? site.locator.currentLocationData.latitude : null;
+ var mobileLongitude = (site.locator.currentLocationData && (city === "")) ? site.locator.currentLocationData.longitude : null;
var isRangeBtn = $(e.target).hasClass("range-btn");
- site.locator.rangeCheck = isRangeBtn;
-
- if (site.locator.hasCurrentLocation && (mobileLatitude && mobileLongitude) && !site.locator.rangeCheck && !zip) {
- queryArgs.params[0].latitude = mobileLatitude;
- queryArgs.params[0].longitude = mobileLongitude;
- }
+ site.locator.rangeCheck = isRangeBtn;
+ if (site.locator.hasCurrentLocation && (mobileLatitude && mobileLongitude) && !site.locator.rangeCheck && !zip) {
+ queryArgs.params[0].latitude = mobileLatitude;
+ queryArgs.params[0].longitude = mobileLongitude;
+ }
+ console.log(queryArgs.params[0]);
queryArgs.callback = function() {
- //site.locator.ui.displayMap(); Not needed in mobile
-
- site.locator.ui.displayResultsTable();
- };
+ site.locator.ui.displayResultsTable();
+ };
$(document).trigger("locator.submitSearchQuery", [queryArgs])
};
@@ -276,14 +294,19 @@ site.locator.ui.init = function() {
_initDirectionsForm();
_initMenus();
+
+ site.locator.nodes.countryMenu.bind('change', function(e) {
+ _countryMenuChangeHandler( site.locator.nodes.cityMenuIntl );
+ });
- site.locator.nodes.stateMenu.bind('change', function(e) {
- _stateMenuChangeHandler();
+ site.locator.nodes.stateMenu.bind('change', function(e) {
+ _stateMenuChangeHandler( site.locator.nodes.cityMenu, site.locator.locationData[site.locator.defaultCountry] );
});
site.locator.nodes.cityMenu.bind('change', function(e) {
- _cityMenuChangeHandler();
+ _cityMenuChangeHandler( site.locator.nodes.doorMenu, site.locator.locationData[site.locator.defaultCountry] );
});
site.locator.nodes.searchBtn.bind('click', function(e) {
+ console.log('clicked GO');
_searchClickHandler(e);
});
site.locator.nodes.closePanel.live("click",function(){
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/includes/templates.inc b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/includes/templates.inc
index 776d997..4f20aa6 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/includes/templates.inc
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/includes/templates.inc
@@ -26,7 +26,10 @@ function lm_perlgem_get_templates($path) {
),
'content' => $path . '/pg/favorites-results_v1.tmpl',
'label' => t('Perlgem: Favorites Results - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_favorites_results_v1',
'description' => t('Places the inline Perlgem template: \'/templates/favorites-results.tmpl\' onto the page and allows for translation of \'Add to Favorites\' and \'Continue Shopping\' button text.'),
@@ -44,10 +47,13 @@ function lm_perlgem_get_templates($path) {
),
'content' => $path . '/pg/products/single-view-image_v1.tmpl',
'label' => t('Perlgem Products: Single View Image - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_single_view_image_v1',
'description' => t('Places the inline Perlgem template, \'/templates/products/single-view-image.tmpl\' onto the page.'),
-
+
);
$templates['pg_single_view_description_v1'] = array(
@@ -66,7 +72,10 @@ function lm_perlgem_get_templates($path) {
),
),
'label' => t('Perlgem Products: Single View Description - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_single_view_description_v1',
'description' => t('Places the inline Perlgem template, \'/templates/products/single-view-description.tmpl\' onto the page and allows for translation of Add to Favorites text, Add to Favorites loading text, and Add to Cart text.'),
);
@@ -83,7 +92,10 @@ function lm_perlgem_get_templates($path) {
),
'content' => $path . '/pg/products/single-view-price_v1.tmpl',
'label' => t('Perlgem Products: Single View Price - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_single_view_price_v1',
'description' => t('Places the inline Perlgem template, \'/templates/products/single-view-price.tmpl\' onto the page.'),
);
@@ -115,7 +127,10 @@ function lm_perlgem_get_templates($path) {
),
'content' => $path . '/pg/products/single-view-price-menu_v1.tmpl',
'label' => t('Perlgem Products: Single View Price Menu - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_single_view_price_menu_v1',
'description' => t('Places the inline Perlgem template, \'/templates/products/single-view-price-menu.tmpl\' onto the page.'),
);
@@ -132,7 +147,10 @@ function lm_perlgem_get_templates($path) {
),
'content' => $path . '/pg/products/shade-table-cell_v1.tmpl',
'label' => t('Perlgem Products: Shade Table Cell - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_shade_table_cell_v1',
'description' => t('Places the inline Perlgem template, \'/templates/products/shade-table-cell.tmpl\' onto the page.'),
);
@@ -158,7 +176,10 @@ function lm_perlgem_get_templates($path) {
),
'content' => $path . '/pg/products/shade-thumb_v1.tmpl',
'label' => t('Perlgem Products: Shade Thumb - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_shade_thumb_v1',
'description' => t('Places the inline Perlgem template, \'/templates/products/shade-thumb.tmpl\' onto the page and allows for translation of Limited Edition text, an Add to Cart image , and custom Add to Cart loading text.'),
);
@@ -175,7 +196,10 @@ function lm_perlgem_get_templates($path) {
),
'content' => $path . '/pg/products/shade-picker_v1.tmpl',
'label' => t('Perlgem Products: Shade Picker - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_shade_picker_v1',
'description' => t('Places the inline Perlgem template, \'/templates/products/shade-picker.tmpl\' onto the page.'),
);
@@ -192,7 +216,10 @@ function lm_perlgem_get_templates($path) {
),
'content' => $path . '/pg/products/quickshop_v1.tmpl',
'label' => t('Perlgem Products: Quickshop - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_quickshop_v1',
'description' => t('Places the inline Perlgem template, \'/templates/products/quickshop.tmpl\' onto the page.'),
);
@@ -207,7 +234,10 @@ function lm_perlgem_get_templates($path) {
),
'content' => $path . '/pg/cart-overlay_v1.tmpl',
'label' => t('Perlgem: Cart Overlay - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_cart_overlay_v1',
'description' => t('Places the inline Perlgem template: \'/templates/cart-overlay.tmpl\' onto the page. '),
);
@@ -222,7 +252,10 @@ function lm_perlgem_get_templates($path) {
),
'content' => $path . '/pg/products/replenish-menu_v1.tmpl',
'label' => t('Perlgem Products: Replenish Menu - v1'),
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'name' => 'pg_replenish_menu_v1',
'description' => t('Places the inline Perlgem template, \'/templates/products/replenish_menu.tmpl\' onto the page.'),
);
@@ -231,7 +264,10 @@ function lm_perlgem_get_templates($path) {
'name' => 'spp_cross_sell_item_v1',
'label' => t('Perlgem: SPP Cross Sell Item - v1'),
'renderer' => 'mustache',
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'Product Catalog',
'inputs' => array(
'add_cart_button' => array(
'type' => 'text_format',
@@ -246,7 +282,10 @@ function lm_perlgem_get_templates($path) {
'name' => 'www_header_v1',
'label' => t('Perlgem Products: WWW Header - v1'),
'renderer' => 'mustache',
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'General',
'inputs' => array(
'www_header_text' => array(
'type' => 'string',
@@ -260,7 +299,10 @@ function lm_perlgem_get_templates($path) {
'name' => 'share_help_v1',
'label' => t('Perlgem Products: Share/Help Section - v1'),
'renderer' => 'mustache',
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'General',
'inputs' => array(
'share_help_content' => array(
'type' => 'text_format',
@@ -275,7 +317,9 @@ function lm_perlgem_get_templates($path) {
'name' => 'endeca_typeahead_product_result_v1',
'label' => t('Endeca Typeahead: Product Result - v1'),
'renderer' => 'mustache',
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
'inputs' => array(
'temporarily_sold_out' => array(
'type' => 'text_format',
@@ -298,7 +342,9 @@ function lm_perlgem_get_templates($path) {
'name' => 'endeca_typeahead_product_summary_v1',
'label' => t('Endeca Typeahead: Product Summary - v1'),
'renderer' => 'mustache',
- 'tags' => array('contenttype-translationset'),
+ 'tags' => array('contenttype-translationset', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
'inputs' => array(
'product_summary' => array(
'type' => 'string',
@@ -312,7 +358,10 @@ function lm_perlgem_get_templates($path) {
'renderer' => "mustache",
'content' => $path . '/email_signup_v1/email_signup_v1.html',
'label' => t('Email Signup Block - v1'),
- 'tags' => array('contenttype-contentblock'),
+ 'tags' => array('contenttype-elc_nodeblock', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'General',
'name' => 'email_signup_v1',
'inputs' => array(
'email_text' => array(
@@ -364,7 +413,10 @@ function lm_perlgem_get_templates($path) {
'renderer' => "mustache",
'content' => $path . '/email_signup_mobile_v1/email_signup_mobile_v1.html',
'label' => t('Estee Mobile Email Signup Block - v1'),
- 'tags' => array('contenttype-contentblock'),
+ 'tags' => array('contenttype-elc_nodeblock', 'device-mobile'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'General',
'name' => 'email_signup_mobile_v1',
// js shared with mobile_search
'attached' => array(
@@ -384,8 +436,15 @@ function lm_perlgem_get_templates($path) {
'name' => 'sign_in_v1',
'label' => t('Sign In - v1'),
'content' => $path . '/sign_in_v1/sign_in.html',
- 'tags' => array('contenttype-contentblock'),
+ 'tags' => array('contenttype-elc_nodeblock', 'device-responsive'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'General',
'inputs' => array(
+ 'main_title' => array(
+ 'type' => 'string',
+ 'label' => t('Main Title'),
+ ),
'email_text' => array(
'label' => 'Email Text',
'type' => 'string',
@@ -429,7 +488,10 @@ function lm_perlgem_get_templates($path) {
'name' => 'shopping_bag_v1',
'label' => t('Shopping Bag - v1'),
'renderer' => 'mustache',
- 'tags' => array('contenttype-contentblock'),
+ 'tags' => array('contenttype-elc_nodeblock', 'device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'General',
'content' => $path . '/shopping_bag_v1/shopping_bag.html',
'inputs' => array(
'bag_label' => array(
@@ -440,7 +502,6 @@ function lm_perlgem_get_templates($path) {
'checkout_label' => array(
'type' => 'string',
'label' => t('"Checkout" Label'),
- 'required' => 1,
),
),
'attached' => array(
@@ -453,7 +514,10 @@ function lm_perlgem_get_templates($path) {
'name' => 'search_form_v1',
'label' => t('Search Form - v1'),
'renderer' => 'mustache',
- 'tags' => array('contenttype-contentblock'),
+ 'tags' => array('contenttype-elc_nodeblock','device-pc'),
+ 'owner_type' => 'domain',
+ 'owner' => '2',
+ 'template_type' => 'General',
'content' => $path . '/search_form_v1/search_form.html',
'inputs' => array(
'search_box_value' => array(
@@ -487,5 +551,33 @@ function lm_perlgem_get_templates($path) {
),
);
+ $templates['search_form_mobile_v1'] = array(
+ 'name' => 'search_form_mobile_v1',
+ 'label' => t('Search Form Mobile - v1'),
+ 'renderer' => 'mustache',
+ 'tags' => array('contenttype-contentblock'),
+ 'content' => $path . '/search_form_mobile_v1/search_form_mobile.html',
+ 'inputs' => array(
+ 'search_box_value' => array(
+ 'type' => 'string',
+ 'label' => t('Search Box Value'),
+ ),
+ 'input_button_value' => array(
+ 'type' => 'string',
+ 'label' => t('Submit Button Label'),
+ 'required' => 1,
+ ),
+ ),
+ 'attached' => array(
+ 'css' => $path . '/search_form_mobile_v1/search_form_mobile.css',
+ 'libraries' => array(
+ array(
+ 'name' => 'perlgem_search',
+ 'module' => 'lm_perlgem',
+ ),
+ ),
+ ),
+ );
+
return $templates;
}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/email_signup_v1/email_signup_v1.css b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/email_signup_v1/email_signup_v1.css
index fc6655d..0d20f84 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/email_signup_v1/email_signup_v1.css
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/email_signup_v1/email_signup_v1.css
@@ -17,3 +17,53 @@
margin-top: 12px;
}
+/* Mobile overrides */
+#footer .block-template-email-signup-v1 .field-mobile-template .popup_block_title {
+ display: none;
+}
+#footer .block-template-email-signup-v1 .field-mobile-template .lm_popup_blocks.has-title .popup_block_content {
+ display: block;
+ position: static;
+ border: none;
+ padding: 0;
+}
+.field-mobile-template .perlgem-signup-block div {
+ width: 100%;
+}
+.field-mobile-template .perlgem-signup-block form {
+ width: auto;
+}
+
+#footer .field-mobile-template .perlgem-signup-block .form-item {
+ text-align: left;
+ float: left;
+ display: inline-block;
+ width: auto;
+}
+
+.field-mobile-template .perlgem-signup-block .form-text {
+ width: 204px;
+ text-align: left;
+}
+
+.field-mobile-template .perlgem-signup-block .form-submit {
+ margin: 0 0 0 10px;
+}
+
+.field-mobile-template .perlgem-signup-block br {
+ display: none;
+}
+
+.field-mobile-template .perlgem-signup-block .error {
+ margin: 0;
+}
+#footer .field-mobile-template .perlgem-signup-block div.error {
+ margin-top: 12px;
+ clear: both;
+ float: left;
+ width: 280px;
+ padding: 5px 10px;
+}
+.field-mobile-template .perlgem-signup-block div.error p {
+ margin: 0;
+}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/search_form_mobile_v1/search_form_mobile.css b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/search_form_mobile_v1/search_form_mobile.css
new file mode 100644
index 0000000..36fbc12
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/search_form_mobile_v1/search_form_mobile.css
@@ -0,0 +1,12 @@
+.field-mobile-template #perlgem-search-form { border: none; }
+
+.field-mobile-template #perlgem-search-form #edit-keywords {
+ width: 238px !important;
+ border: solid 1px #ababab;
+}
+
+.field-mobile-template #perlgem-search-form .form-submit {
+ display: block;
+ float: right;
+ margin: 0;
+}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/search_form_mobile_v1/search_form_mobile.html b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/search_form_mobile_v1/search_form_mobile.html
new file mode 100644
index 0000000..445b48f
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/search_form_mobile_v1/search_form_mobile.html
@@ -0,0 +1,7 @@
+<form action="/products/search/index.tmpl" method="get" id="perlgem-search-form" accept-charset="UTF-8">
+ <input type="hidden" name="form_id" value="perlgem_search_form" />
+ <div class="form-type-textfield form-item-KEYWORDS">
+ <input type="text" id="edit-keywords" name="keywords" placeholder="{{{search_box_value}}}" maxlength="128" class="form-text" />
+ <input type="submit" id="edit-submit--5" name="op" value="{{{input_button_value}}}" class="form-submit" />
+ </div>
+</form>
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/shopping_bag_v1/shopping_bag.html b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/shopping_bag_v1/shopping_bag.html
index 7e551bf..563df63 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/shopping_bag_v1/shopping_bag.html
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/shopping_bag_v1/shopping_bag.html
@@ -1,6 +1,10 @@
<div class="utility-nav">
-<a name="bag" id="viewcart"></a>
-<a class="bag-label" href="/checkout/viewcart.tmpl">{{{bag_label}}} (<span data-pg-object="cart" data-pg-prop="items_count">0</span>)</a>
-&nbsp;&nbsp;
-<a class="checkout-label" href="/checkout/viewcart.tmpl">{{{checkout_label}}}</a>
+ <a name="bag" id="viewcart"></a>
+ <a class="bag-label" href="/checkout/viewcart.tmpl">{{{bag_label}}} (<span data-pg-object="cart" data-pg-prop="items_count">0</span>)</a>
+ {{#checkout_label}}
+ &nbsp;&nbsp;
+ <a class="checkout-label" href="/checkout/viewcart.tmpl">{{{checkout_label}}}</a>
+ {{/checkout_label}}
</div>
+
+
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/sign_in_v1/sign_in.css b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/sign_in_v1/sign_in.css
index 79fbcea..3644ea6 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/sign_in_v1/sign_in.css
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/sign_in_v1/sign_in.css
@@ -36,3 +36,74 @@
padding-top: 10px;
}
+/* Mobile Overrides */
+.mobile-popup-block .signin-block {
+ padding: 10px;
+}
+.mobile-popup-block .perlgem-signin-block input[type="text"],
+.mobile-popup-block .perlgem-signin-block input[type="password"] {
+ text-align: left;
+ width: 236px;
+ margin: 0 auto;
+ border-color: #ababab;
+}
+.mobile-popup-block .perlgem-signin-block input.form-submit {
+ position: absolute;
+ bottom: 20px;
+ right: 20px;
+ margin: 0;
+}
+.mobile-popup-block .perlgem-signin-block .two-col {
+ width: auto;
+ overflow: visible;
+ margin-bottom: 0;
+}
+.mobile-popup-block .perlgem-signin-block .form-item {
+ margin: 0;
+}
+.mobile-popup-block .perlgem-signin-block .two-col .form-item {
+ float: none;
+ width: auto;
+ margin: 0 0 10px;
+}
+
+.mobile-popup-block .perlgem-signin-block .register-wrapper {
+ margin: 20px 0 40px;
+ width: 236px;
+}
+
+.mobile-popup-block .perlgem-signin-block .register-wrapper p {
+ display: inline;
+ margin: 0;
+ padding: 0;
+}
+.mobile-popup-block .perlgem-signin-block .register-wrapper .register_button {
+ display: inline;
+ padding: 0;
+}
+
+.mobile-popup-block .perlgem-signin-block .register-wrapper .register_button a.button {
+ border: none;
+ background: transparent;
+ text-transform: none;
+ display: inline;
+ height: auto;
+ width: auto;
+ line-height: 1.25em;
+ color: #000;
+ text-decoration: underline;
+ font-weight: normal;
+ font-size: 13px;
+ margin: 0;
+ padding: 0;
+}
+.mobile-popup-block .perlgem-signin-block .register-wrapper .register_button a.button:hover,
+.mobile-popup-block .perlgem-signin-block .register-wrapper .register_button a.button:focus {
+ text-shadow: none;
+}
+.mobile-popup-block .perlgem-signin-block h3.signin-title {
+ font: normal 13px/13px Times, Georgia, serif;
+ text-align: center;
+ margin: 0 0 20px;
+ padding: 0;
+}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/sign_in_v1/sign_in.html b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/sign_in_v1/sign_in.html
index e86ba38..69fc0d6 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/sign_in_v1/sign_in.html
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_perlgem/templates/sign_in_v1/sign_in.html
@@ -1,5 +1,8 @@
<div class="elc-anonymous perlgem-signin-block gnav-block">
<div class="signin-block">
+ {{#main_title}}
+ <h3 class="signin-title">{{main_title}}</h3>
+ {{/main_title}}
<form action="/account/signin.tmpl" method="post" id="perlgem-sign-in-form" accept-charset="UTF-8">
<div class="two-col">
<div class="form-item form-email">
@@ -14,13 +17,15 @@
<input type="submit" name="op" value="{{sign_in_text}}" class="form-submit" />
</div>
- {{{register_intro}}}
+ <div class="register-wrapper">
+ {{{register_intro}}}
- {{#register_text}}
- <div class="register_button form-actions">
- <a href="/account/signin.tmpl" class="button">{{register_text}}</a>
+ {{#register_text}}
+ <div class="register_button form-actions">
+ <a href="/account/signin.tmpl" class="button">{{register_text}}</a>
+ </div>
+ {{/register_text}}
</div>
- {{/register_text}}
{{#forgot_password_link}}
<div class="forgot_password">{{{forgot_password_link}}}</div>
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_product/lm_product.install b/drupal-7.9/sites/lamer/modules/custom/lm_product/lm_product.install
new file mode 100644
index 0000000..168aa14
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_product/lm_product.install
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * Implements hook_update_N().
+ *
+ * Set the mobile template
+ */
+function lm_product_update_7000(&$sandbox) {
+ variable_set('mobile_spp_template', 'lm_spp_mobile_v1');
+ return t('Set mobile SPP template.');
+}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_product/lm_product.module b/drupal-7.9/sites/lamer/modules/custom/lm_product/lm_product.module
index a194899..6495efb 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_product/lm_product.module
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_product/lm_product.module
@@ -125,20 +125,27 @@ function lm_product_template_api_templates() {
'content' => $path . '/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.html',
'tags' => array('embeddable-product', 'contenttype-mpp', 'device-mobile'),
'inputs' => array(
- 'html' => array(
- 'label' => t('Multi Product Page (Mobile) - v1'),
+ 'fake_input' => array(
+ 'type' => 'elc_empty_template',
+ 'value' => 1,
+ ),
+ 'intro' => array(
'type' => 'text_format',
- 'format' => 'full_html',
+ 'label' => t('Intro Copy'),
),
),
'attached' => array(
- 'js' => $path .'/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.js',
'css' => $path .'/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.css',
+ 'js' => $path .'/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.js',
'libraries' => array(
array(
'name' => 'lm_products',
'module' => 'lm_product',
),
+ array(
+ 'name' => 'equalHeights',
+ 'module' => 'elc_common',
+ ),
),
),
);
@@ -149,7 +156,7 @@ function lm_product_template_api_templates() {
'label' => t('La Mer SPP - v1'),
'description' => t('This template formats the SPP display.'),
'content' => $path . '/lm_spp_v1/lm_spp_v1.html',
- 'tags' => array('formatter', 'embeddable-product'),
+ 'tags' => array('formatter', 'embeddable-product', 'device-pc'),
'inputs' => array(
'html' => array(
'label' => t('Single Product Page'),
@@ -169,6 +176,32 @@ function lm_product_template_api_templates() {
),
);
+ $templates['lm_spp_mobile_v1'] = array(
+ 'renderer' => 'mustache',
+ 'name' => 'lm_spp_mobile_v1',
+ 'label' => t('La Mer SPP Mobile - v1'),
+ 'description' => t('This template formats the SPP display optimized for mobile.'),
+ 'content' => $path . '/lm_spp_mobile_v1/lm_spp_mobile_v1.html',
+ 'tags' => array('formatter', 'embeddable-product', 'device-mobile'),
+ 'inputs' => array(
+ 'html' => array(
+ 'label' => t('Single Product Page'),
+ 'type' => 'text_format',
+ 'format' => 'full_html',
+ ),
+ ),
+ 'attached' => array(
+ 'css' => $path .'/lm_spp_mobile_v1/lm_spp_mobile_v1.css',
+ 'js' => $path .'/lm_spp_mobile_v1/lm_spp_mobile_v1.js',
+ 'libraries' => array(
+ array(
+ 'name' => 'lm_products',
+ 'module' => 'lm_product',
+ ),
+ ),
+ ),
+ );
+
$templates['lm_mpp_carousel_v1'] = array(
'renderer' => 'mustache',
'name' => 'lm_mpp_carousel_v1',
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.css b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.css
index ac21536..127b588 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.css
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.css
@@ -1,13 +1,24 @@
-.page-products h1.title {
- font-size: 24px;
- line-height: 26px;
+body.page-products h1.title {
+ font-size: 20px;
+ line-height: 20px;
margin: 20px 0 8px;
padding: 0;
}
-#products-grid-container .thumb {
- padding: 0;
- margin: 0;
+body.page-products ul.product-thumb-row { margin-top: 0; }
+
+body.page-products .browse-products { min-width: 0; }
+body.page-products .browse-products ul { text-align: left; }
+body.page-products .browse-products ul li.thumb {
+ padding: 0 0 35px;
+ margin: 0 0 10px;
text-align: center;
- width: 140px;
+ width: 138px;
+ border: none;
+ float: none;
+ position: relative;
}
+body.page-products .browse-products ul li.thumb dt { height: 169px; position: relative; }
+body.page-products .browse-products ul li.thumb dt a { position: absolute; bottom: 0; left: 0; width: 100%; }
+body.page-products .browse-products ul li.thumb .subhead_en { height: auto; }
+body.page-products .browse-products ul li.thumb .add-to-bag { position: absolute; bottom: 0; width: 100%; }
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.html b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.html
index fa07e7c..ae3133c 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.html
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.html
@@ -1,69 +1,44 @@
<h1 class="title" id="page-title">{{CATEGORY_NAME}}</h1>
<div id="products-grid-container" class="browse-products">
- <p>
- {{RGN_SUBLINE}}
- </p>
+ {{#intro}}
+ <div id="mpp-intro">{{{intro}}}</div>
+ {{/intro}}
+ <span class="mpp_description"></span>
+
<ul class="product-thumb-row">
{{#products}}
- <li class="thumb" data-prodid="{{PRODUCT_ID}}" itemscope itemtype="http://schema.org/Product">
+ <li class="thumb {{PRODUCT_ID}}" data-prodid="{{PRODUCT_ID}}" itemscope itemtype="http://schema.org/Product">
<div class="thumb_wrapper">
<dl>
<dt>
- {{#elc_site_type.ecommerce}}
- {{#mpp_show_quick_views}}
- <a href="#" class="quickshop-link frame" id="img-link-{{PRODUCT_ID}}">
- <img class="quickshop-btn" src="/images/btns/btn_quickshop.gif" alt="Quick Shop">
- <img src="{{MEDIUM_IMAGE}}" width="150" height="150" alt="{{PROD_RGN_NAME}}" class="border"/></a>
- {{/mpp_show_quick_views}}
- {{#mpp_no_show_quick_views}}
- <a href="/product/{{PARENT_CAT_ID}}/{{PRODUCT_ID}}/{{PROD_SEO_NAME}}" class="" id="img-link-{{PRODUCT_ID}}">
- <img src="{{MEDIUM_IMAGE}}" width="150" height="150" alt="{{PROD_RGN_NAME}}" class="border"/></a>
- {{/mpp_no_show_quick_views}}
- {{/elc_site_type.ecommerce}}
-
- {{#elc_site_type.coresite_plus}}
- {{#mpp_show_quick_views}}
- <a href="#" class="quickshop-link frame" id="img-link-{{PRODUCT_ID}}">
- <img class="quickshop-btn" src="/images/btns/btn_quickshop.gif" alt="Quick Shop">
- <img src="{{MEDIUM_IMAGE}}" width="150" height="150" alt="{{PROD_RGN_NAME}}" class="border"/></a>
- {{/mpp_show_quick_views}}
- {{#mpp_no_show_quick_views}}
+ {{^elc_site_type.coresite}}
<a href="/product/{{PARENT_CAT_ID}}/{{PRODUCT_ID}}/{{PROD_SEO_NAME}}" class="" id="img-link-{{PRODUCT_ID}}">
- <img src="{{MEDIUM_IMAGE}}" width="150" height="150" alt="{{PROD_RGN_NAME}}" class="border"/></a>
- {{/mpp_no_show_quick_views}}
- {{/elc_site_type.coresite_plus}}
+ <img src="{{MEDIUM_IMAGE}}" width="114" height="165" alt="{{{PROD_RGN_NAME}}}" class="border"/>
+ </a>
+ {{/elc_site_type.coresite}}
{{#elc_site_type.coresite}}
- {{#mpp_show_quick_views}}
- <a href="#" class="quickshop-link frame" id="img-link-{{PRODUCT_ID}}">
- <img class="quickshop-btn" src="/images/btns/btn_quickshop.gif" alt="Quick Shop">
- <img src="{{MEDIUM_IMAGE}}" width="150" height="150" alt="{{PROD_RGN_NAME}}" class="border"/></a>
- {{/mpp_show_quick_views}}
- {{#mpp_no_show_quick_views}}
- <img src="{{MEDIUM_IMAGE}}" width="150" height="150" alt="{{PROD_RGN_NAME}}" class="border"/>
- {{/mpp_no_show_quick_views}}
+ <img src="{{MEDIUM_IMAGE}}" width="114" height="165" alt="{{{PROD_RGN_NAME}}}" class="border"/>
{{/elc_site_type.coresite}}
</dt>
<dd class="subhead_en">
- {{#elc_site_type.ecommerce}}
- <a href="/product/{{PARENT_CAT_ID}}/{{PRODUCT_ID}}/{{PROD_SEO_NAME}}" itemprop="url"><span itemprop="name">{{PROD_RGN_NAME}}</span></a>
- {{/elc_site_type.ecommerce}}
-
- {{#elc_site_type.coresite_plus}}
- <a href="/product/{{PARENT_CAT_ID}}/{{PRODUCT_ID}}/{{PROD_SEO_NAME}}" itemprop="url"><span itemprop="name">{{PROD_RGN_NAME}}</span></a>
- {{/elc_site_type.coresite_plus}}
+ {{^elc_site_type.coresite}}
+ <a href="/product/{{PARENT_CAT_ID}}/{{PRODUCT_ID}}/{{PROD_SEO_NAME}}" itemprop="url">
+ <span itemprop="name">{{{PROD_RGN_NAME}}}</span>
+ </a>
+ {{/elc_site_type.coresite}}
{{#elc_site_type.coresite}}
- <span itemprop="name">{{PROD_RGN_NAME}}</span>
+ <span itemprop="name">{{{PROD_RGN_NAME}}}</span>
{{/elc_site_type.coresite}}
</dd>
<dd class="add-to-bag">
<div class="thumb_shade_add_button clear">
- <a href="#" class="button add-link">Add to Bag</a>
- <span class="shaded_add_progress" style="display:none">Loading...</span>
+ <a href="/product/{{PARENT_CAT_ID}}/{{PRODUCT_ID}}/{{PROD_SEO_NAME}}" class="button">Shop Now</a>
+ <span class="add-progress" style="display:none"></span>
</div>
</dd>
</dl>
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.js b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.js
index f6ab558..d471295 100644
--- a/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.js
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_mpp_product_layout_mobile_v1/lm_mpp_product_layout_mobile_v1.js
@@ -22,7 +22,8 @@ site.rb.getRBKeys = function() {
site.rb.language.soldOut = site.rb.language.get('sold_out'); //7
site.rb.language.comingSoon = site.rb.language.get('coming_soon'); //3
site.rb.language.inactive = site.rb.language.get('inactive'); //5
-
+ site.rb.language.loading = site.rb.language.get("loading");
+
site.rb.language.replenishment_service = site.rb.language.get('replenishment_service');
site.rb.language.replenishment_frequency_0_days = site.rb.language.get('replenishment_frequency_0_days');
site.rb.language.replenishment_frequency_30_days = site.rb.language.get('replenishment_frequency_30_days');
@@ -49,7 +50,8 @@ site.mpp = function () {
var launchQuickshop = function(args) {
var view = site.productView.quickshop({
- productData: args.productData
+ productData: args.productData,
+ type: 'qv'
});
};
@@ -73,7 +75,18 @@ site.mpp = function () {
});
site.mpp.initProductThumbs();
-
+ // fn.equalHeights is useless.
+ for (var i=0; i < $('.' + ulClassName + ' > li').length; i=i+2) {
+ var item = $('.' + ulClassName + ' > li').eq(i);
+ var sibling = item.next('li');
+ if (sibling.length) {
+ var itemHeight = item.outerHeight(),
+ siblingHeight = sibling.outerHeight();
+ itemHeight > siblingHeight ? sibling.height(itemHeight) : item.height(siblingHeight);
+ }
+ }
+
+ this.initiated = true;
};
that.initProductThumbs = function() {
@@ -86,48 +99,61 @@ site.mpp = function () {
thumbNode: $(this),
productData: prodData[0]
});
-
+
});
};
that.initProductThumb = function (args) {
var self = {};
- //
- // initialize rollover and click events for Quickshop
- var quickshopLink = args.thumbNode.find('a.quickshop-link');
- var attrContainer = args.thumbNode.find('.attributes');
- var priceContainer = args.thumbNode.find('.price');
+ var $addButtonNode = $('.add-link', args.thumbNode),
+ $progressNode = $('.add-progress', args.thumbNode);
+ // $addButtonNode.text(site.rb.language.addBag);
+ $progressNode.text(site.rb.language.loading);
- if (quickshopLink) {
- var quickshopButton = quickshopLink.find('.quickshop-btn');
- quickshopLink.bind("click", function (e) {
- e.preventDefault();
- launchQuickshop({ productData: args.productData });
- });
- quickshopLink.bind("mouseover", function (e) {
- quickshopButton.addClass('qs-active');
- });
- quickshopLink.bind("mouseout", function (e) {
- quickshopButton.removeClass('qs-active');
- });
+ // Giftcards are an exception:
+ if (args.productData.PRODUCT_ID == 'PROD12518' || args.productData.PRODUCT_ID == 'PROD12430') {
+ // Both giftcards use the same image:
+ args.productData.LARGE_IMAGE = "/media/export/images/products/lrg/GIFT_lg.jpg";
+ args.productData.MEDIUM_IMAGE = "/media/export/images/products/med/GIFT_md.jpg";
+ args.productData.SMALL_IMAGE = "/media/export/images/products/sm/GIFT_sm.jpg";
+ args.productData.THUMBNAIL_IMAGE = "/media/export/images/products/sm/GIFT_sm.jpg";
+
+ // Hardcode image to physical giftcard image. Also, image dimensions for giftcards is not equal to that of other spp products:
+ $('img', args.thumbNode).attr('src', args.productData.MEDIUM_IMAGE).removeAttr('height');
+ // The plus symbol in the url won't work with redirects:
+ $('a', args.thumbNode).each(function(){
+ $(this).attr('href', $(this).attr('href').replace('+', '-'));
+ });
}
- //
- // render formatted price for each individual product
- if (priceContainer) {
- this.displayPrice({
- containerNode : priceContainer,
- priceData : args.productData.skus[0].formattedPrice
+ var skus = args.productData.skus;
+ if (generic.productData.validateSkusArray(skus)) {
+ var self = this;
+ var btn = site.productView.addButton({
+ addButtonNode: $addButtonNode,
+ progressNode: $progressNode,
+ skuData: skus[0],
+ itemType: 'cart'
});
- };
-
- //
- // render attributes (Coverage, Skin Types, Benefits, etc)
- if (attrContainer) {
- this.displayAttributes({
- containerNode : attrContainer,
- productData : args.productData
+ btn.setShoppable();
+ // Listen for "select:sku" event. If Prod ID from this event matches
+ // Prod ID for this button, change the SKU ID associated with the button.
+ $(document).bind('select.sku', function(evt, param) {
+ var skuData = param;
+ if (skuData.PRODUCT_ID == args.productData.PRODUCT_ID) {
+ btn.setSkuData(skuData);
+ btn.setShoppable();
+ }
});
+
+ // If there is a replenishment node, initiate the menu.
+ // if (args.replenishContainer) {
+ // var replenishMenu = self.renderReplenishMenu({
+ // addBtn: btn,
+ // skuInfo : skus[0],
+ // replenishContainer : args.replenishContainer
+ // });
+ // };
}
};
that.renderPageControls = function(args) {
@@ -199,7 +225,7 @@ site.mpp = function () {
return;
}
var price = args.priceData;
- args.containerNode.html(price);
+ args.containerNode.html(price);
};
/**
* This method determines which optional attribute fields are present in a product data object.
@@ -254,7 +280,7 @@ $( function() {
// non-l2 product data loaded onto page via perlgem module (/includes/request.inc)
site.mpp.init(page_data[0].result.value.categories[0].products);
//site.mpp.renderPageControls(page_data[0].result.value.categories[0].products);
-
+
});
*/
@@ -262,14 +288,16 @@ $( function() {
// load data from either page_data or AJAX
// 1. Set up the product catalog fetch parameters
+ if (site.mpp.initiated) return;
var productDataParams = {};
productDataParams.pageDataKey = 'catalog.mpp';
productDataParams.categoryId = (window.CATEGORY_ID.indexOf('CAT') !== -1) ? window.CATEGORY_ID : 'CAT' + window.CATEGORY_ID;
productDataParams.callback = function(mppData) {
// pass to multiple product filter view
- site.mpp.init(mppData.products);
- //set ul list width so it floats center
- $('#products-grid-container').width($('ul.product-thumb-row').width());
+ if (!site.mpp.initiated) {
+ site.mpp.init(mppData.products);
+ $('.mpp_description').html(mppData.DESCRIPTION);
+ };
};
// obtain the fields from the page_data resource otherwise use a hardcoded default
site.mpp.page_data_configuration = generic.rb("page_data_configuration");
@@ -286,4 +314,13 @@ $( function() {
// 2. Obtain the data
generic.productData.getCategoryData(productDataParams);
+ // show the page title if the category id is not in the 'all' category
+ // this is brittle
+ if (productDataParams.categoryId != 'CAT9924') {
+ $('h1#page-title').show();
+ }
+ // hide any highlighting on click of close-qs
+ $('.close-qs').live('click', function() {
+ $('.product-thumb-row li.thumb').removeClass('qs-slide-active');
+ });
});
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_spp_mobile_v1/lm_spp_mobile_v1.css b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_spp_mobile_v1/lm_spp_mobile_v1.css
new file mode 100644
index 0000000..be1b87f
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_spp_mobile_v1/lm_spp_mobile_v1.css
@@ -0,0 +1,143 @@
+body.page-product #main .ecommerce {
+ margin: 20px auto;
+ width: auto ;
+}
+body.page-product #main .ecommerce h1 {
+ font-size: 13px;
+ line-height: 14px;
+ text-align: center;
+ margin: 10px 0;
+ padding: 0;
+}
+body.page-product #main .ecommerce .spp-img-wrapper { text-align: center; }
+body.page-product #main .ecommerce .spp-img-wrapper > img { max-height: 200px; }
+
+body.page-product #main .ecommerce #product-options {
+ text-align: center;
+ margin: 20px 0;
+}
+body.page-product #main .ecommerce #sku_select_container,
+body.page-product #main .ecommerce #replenishment-container {
+ vertical-align: top;
+ float: left;
+ display: block;
+ margin: 0 0 20px;
+}
+body.page-product #main .ecommerce #replenishment-container { float: right; }
+body.page-product #main .ecommerce #sku_select_container #size-span,
+body.page-product #main .ecommerce #sku_select_container #price-span { line-height: 20px; }
+body.page-product #main .ecommerce #sku_select_container .selectBox-dropdown { width: 125px !important; }
+body.page-product #main .ecommerce #replenishment-container .selectBox-dropdown { width: 140px !important; }
+body.page-product #main .ecommerce #sku_select_container select { width: 120px; }
+body.page-product #main .ecommerce #replenishment-container select { width: 150px; }
+
+body.page-product #main .ecommerce #ratings-share { margin: 0 0 20px; }
+body.page-product #main .ecommerce #BVRRSummaryContainer { float: left; }
+body.page-product #main .ecommerce .BVRRPrimarySummary .BVRRRatingSummaryStyle2 { width: auto; }
+body.page-product #main .ecommerce .BVRRPrimaryRatingSummary { margin: 0; }
+body.page-product #main .ecommerce #BVRRSummaryContainer .BVRRRatingNormalOutOf,
+body.page-product #main .ecommerce #BVRRSummaryContainer .BVRRRatingSummaryLinks { display: none; }
+body.page-product #main .ecommerce #BVRRSummaryContainer .BVRRRatingNormalImage { padding: 0 0 0 3px; }
+body.page-product #main .ecommerce #share-container { float: right; }
+body.page-product #main .ecommerce #share-container a { margin: 0 0 0 10px; }
+
+body.page-product #main .ecommerce hr.shades-hr { margin: 0; border: none; }
+body.page-product #main .ecommerce .swatch-panel-left,
+body.page-product #main .ecommerce .swatch-panel-right { width: auto; padding: 0; }
+body.page-product #main .ecommerce .shades-container {
+ margin: 0 0 20px;
+ border-top: solid 1px #aaa;
+ padding: 20px 0 0;
+ width: 100%;
+ position: relative;
+ min-height: 80px;
+ float: none;
+}
+body.page-product #main .ecommerce .shades-container > div:first-child { display: none; }
+body.page-product #main .ecommerce .shades-container .shade-table-cell {
+ width: 33px;
+ height: 26px;
+ padding: 0 7px 7px 0;
+}
+body.page-product #main .ecommerce .shades-container td.shade-table-cell:last-child { padding: 0 0 7px 0; }
+body.page-product #main .ecommerce .shades-container .swatch-container {
+ width: 37px !important;
+ height: 30px !important;
+ margin: 0;
+}
+body.page-product #main .ecommerce .shades-container #smoosh_container {
+ width: 58px;
+ height: 44px ;
+ padding: 0;
+}
+body.page-product #main .ecommerce .shades-container #smoosh_container .smoosh_panel_inner {
+ width: 29px;
+ height: 22px;
+}
+body.page-product #main .ecommerce .shades-container h3.shade-name {
+ width: 58px;
+ font: 13px/13px Times,Georgia,Arial,sans-serif;
+ text-transform: none;
+ position: absolute;
+ top: 64px;
+}
+
+body.page-product #main .ecommerce .spp-info-container,
+body.page-product #main .ecommerce #product-description {
+ width: auto;
+ float: none;
+ line-height: 16px;
+ text-align: left;
+}
+body.page-product #main .ecommerce #product-description p { margin: 0 0 20px; }
+
+body.page-product #main .ecommerce div.review-container { width: auto; }
+
+body.page-product .product-tab-content { display: none; }
+body.page-product #product-tabs {
+ text-align: center;
+ border: solid 1px #aaa;
+ border-left: none;
+ border-right: none;
+ margin: 0 0 20px;
+ height: 27px;
+}
+body.page-product #product-tabs li {
+ display: inline-block;
+ padding: 0;
+ margin: 0 0 0 20px;
+}
+body.page-product #product-tabs li.first {
+ margin: 0;
+}
+body.page-product #product-tabs li a {
+ display: inline-block;
+ color: #6f6f6f;
+ text-transform: uppercase;
+ text-decoration: none;
+ line-height: 25px;
+ height: 25px;
+ border-bottom: solid 2px transparent;
+ position: relative;
+ top: 1px;
+}
+body.page-product #product-tabs li.active a { border-bottom-color: #000; color: #000; }
+
+
+/* BazaarVoice Style overides */
+.BVDI_QTTitle, .BVRRDisplayContentLinkWrite, .BVRRBuyAgainContainer, .BVDI_QTTags,
+#BVRRQuickTakeContentContainerID, #BVRRDisplayContentSortPrefixID,
+.BVRRLabel, .BVRRContextDataContainer , .BVDI_FV, .BVRRRecommendedContainer,
+.BVRRReviewProTags, .BVRRRatingsOnlySummary { display: none !important; }
+#main #BVRRContainer { width: 280px; padding: 0 !important; }
+span.BVRRSortSelectWidget, div.BVRRDisplayContentHeaderContent { text-align: left !important; }
+.BVRRDisplayContentHeaderContent { padding-bottom: 0 !important; }
+.BVRRReviewDisplayStyle3Main { margin-left: 0 !important; }
+.BVRRDisplayContentReview { border-width: 0 0 1px !important; }
+.BVRRContentReview { padding: 20px 0 12px !important; }
+.BVRRContentReview h5 { font-size: 15px; text-transform: none; clear: both; padding-top: 5px; }
+.BVRRContentReview p { font-size: 13px; margin: 8px 0 !important; }
+.BVRRDisplayContentFooter { border-width: 0 !important; }
+.BVRRPager { text-align: right !important; width: 280px; }
+.BVRRPager { margin: 0 !important; padding: 0 !important; }
+.BVRRDisplayContentFooter { padding: 0 !important; margin-top: 20px !important; }
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_spp_mobile_v1/lm_spp_mobile_v1.html b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_spp_mobile_v1/lm_spp_mobile_v1.html
new file mode 100644
index 0000000..16f8136
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_spp_mobile_v1/lm_spp_mobile_v1.html
@@ -0,0 +1,38 @@
+{{{html}}}
+{{#product}}
+<div class="{{#elc_site_type.ecommerce}}ecommerce{{/elc_site_type.ecommerce}} {{#elc_site_type.coresite_plus}}coresite_plus{{/elc_site_type.coresite_plus}} {{#elc_site_type.coresite}}coresite{{/elc_site_type.coresite}}">
+ <div class="spp-img-wrapper">
+ <img src="{{LARGE_IMAGE}}" alt="{{PROD_RGN_NAME}}" />
+ </div>
+ <h1 id="product-title">{{{PROD_RGN_NAME}}}</h1>
+ <div id="product-info-container">
+ <div id="product-options">
+ <div class="clearfix">
+ <div id="sku_select_container"></div>
+ <div id="replenishment-container"></div>
+ </div>
+ <a href="#" id="spp-add-button" class="add-button button">Add to Bag</a>
+ </div>
+ <div id="ratings-share" class="clearfix">
+ <div id="BVRRSummaryContainer"></div>
+ <div id="share-container"></div>
+ </div>
+ <div class="shades-container hidden"></div>
+
+ <div class="spp-info-container">
+ <ul id="product-tabs"><li class="active first"><a href="#" id="product-description-tab">Details</a></li><li><a href="#" id="product-reviews-tab">Reviews</a></li></ul>
+ <div>
+ <div id="product-description" class="product-tab-content">
+ {{{DESCRIPTION}}}
+ </div>
+ <div id="product-reviews" class="product-tab-content">
+ <div class="review-container hidden">
+ <a name="reviews"></a>
+ <div id="BVRRContainer"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+{{/product}}
diff --git a/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_spp_mobile_v1/lm_spp_mobile_v1.js b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_spp_mobile_v1/lm_spp_mobile_v1.js
new file mode 100644
index 0000000..3f051a6
--- /dev/null
+++ b/drupal-7.9/sites/lamer/modules/custom/lm_product/templates/lm_spp_mobile_v1/lm_spp_mobile_v1.js
@@ -0,0 +1,183 @@
+var generic = generic || {};
+var site = site || {};
+// TODO: replace with actual RB
+site.rb = site.rb || {}
+site.rb.product = site.rb.product || new generic.Hash({});
+
+site.spp = function () {
+ var productData;
+ var self;
+ var crossSellContainer = null;
+
+ var view = null;
+
+ var renderCrossSellPanes = function(productData) {
+ var crossSellContainer = $("div.recommend-container");
+ if (!productData){
+ return null;
+ }
+
+ if ($.isArray(productData.products) && productData.products.length > 0) {
+ $.each(productData.products, function(prodIndex) {
+ var thisProdItem = this;
+ //remove any reference to pg url should the rpc fail to send us the correct one...
+ thisProdItem.url = thisProdItem.url.replace('/index.tmpl', '');
+ generic.template.get({
+ path:"/templates/products/spp_cross_sell_item.tmpl",
+ object: thisProdItem,
+ callback: function(html) {
+ crossSellContainer.append(html);
+ var shadeEle = crossSellContainer.find("div.shade")[0];
+ if (typeof thisProdItem.skus[0] == "undefined") {
+ shadeEle.style.display="none";
+ }
+ // add-button code: commented out because bad test-data will wreck cart disply
+ // var btnNode = crossSellContainer.select("a.cross_sell_add")[prodIndex];
+ // var options = {
+ // itemType: 'cart',
+ // addButtonNode: btnNode,
+ // skuData: prod.skus[0]
+ // };
+ // if (generic.productData.validateSkusArray(prod.skus) && Object.isElement(btnNode)) {
+ // var btn = site.productView.addButton(options);
+ // }
+ }
+ });
+ });
+ } else { // no products in array
+ crossSellContainer.addClass("hidden");
+ }
+ };
+
+ return {
+ init: function(sppData) {
+
+ site.rb.getRBKeys();
+ var desc = '<p>' + sppData.DESCRIPTION.replace('||', '') + '</p>';
+ desc += (sppData.PRODUCT_USAGE != undefined) ? ' ' + '<p>' + sppData.PRODUCT_USAGE + '</p>' : '';
+ $('#product-description').html(desc);
+
+ $('.product-tab-content:first').show();
+ $('#product-tabs a').click(function(e){
+ e.preventDefault();
+
+ var contentID = $(this).attr('id').replace('-tab', '');
+ $('#' + contentID + '.product-tab-content').show().siblings().hide();
+
+ $(this).parent().addClass('active').siblings().removeClass('active');
+ }).first().addClass('active');
+
+ // instantiate productView.single
+ view = site.productView.single({
+ productData: sppData
+ });
+ var renderArgs = {}
+
+ var imageContainerNode = $("div.spp-img-container");
+ if (imageContainerNode) {
+ renderArgs.imageContainerNode = imageContainerNode;
+ };
+
+ var productContainerNode = $("#product-info-container");
+ if (productContainerNode) {
+ renderArgs.productContainerNode = productContainerNode;
+ };
+
+ var shadesContainerNode = $("div.shades-container");
+ if (shadesContainerNode) {
+ renderArgs.shadesContainerNode = shadesContainerNode;
+ };
+
+ view.render(renderArgs);
+ },
+
+ // default product catalog rpc fields
+ sppParams: {
+ productFields: {
+ productFields : ["PRODUCT_ID", "DEFAULT_CAT_ID", "PARENT_CAT_ID", "PROD_RGN_NAME", "PROD_RGN_SUBHEADING", "SUB_LINE", "DESCRIPTION", "SHORT_DESC", "PROD_SKIN_TYPE", "PROD_SKIN_TYPE_TEXT", "PROD_CAT_IMAGE_NAME", "PROD_CAT_DISPLAY_ORDER", "SMALL_IMAGE", "LARGE_IMAGE", "THUMBNAIL_IMAGE", "PRODUCT_USAGE", "FORMULA", "ATTRIBUTE_COVERAGE", "ATTRIBUTE_BENEFIT", "SKIN_CONCERN_LABEL", "SKIN_CONCERN_1", "SKIN_CONCERN_2", "SKIN_CONCERN_3", "skus", "shaded", "sized", "worksWith"]
+ },
+ skuFields: {
+ skuFields : ["SKU_ID", "SKU_BASE_ID", "PRODUCT_ID", "PARENT_CAT_ID", "SHADENAME", "SHADE_DESCRIPTION", "SKIN_TYPE", "SKIN_TYPE_TEXT", "PRODUCT_SIZE", "DISPLAY_ORDER", "STRENGTH", "PRICE", "formattedPrice", "formattedTaxedPrice", "SMOOSH_DESIGN", "SMOOSH_PATH_STRING", "INVENTORY_STATUS", "REFILLABLE", "HEX_VALUE", "HEX_VALUE_STRING", "FINISH", "ATTRIBUTE_COLOR_FAMILY", "UNDERTONE", "SKIN_TONE", "SKIN_TONE_TEXT"]
+ }
+ },
+
+ updateInvStatus : function( skusInvData ) {
+ view.updateInvStatus( skusInvData );
+ },
+
+ show_reviews : function ( args ) {
+ console.log('called bv: ' + args.PROD_BASE_ID);
+ var args = args || {};
+ if ( typeof $BV != 'undefined' ) {
+ $BV.ui("rr", "show_reviews", {
+ productId: args.PROD_BASE_ID,
+ onEvent: function( json ) {
+ if ( json.eventSource == 'Display' && json.eType == 'Read' ) {
+ // Track stuff from json.attributes
+ $(document).trigger('bv:loaded');
+ }
+ }
+ });
+ }
+ }
+
+ }; // end return
+}();
+
+
+generic.onLoadRpcRequests = generic.onLoadRpcRequests || [];
+generic.onLoadRpcRequests.push({
+ "method": "prodcat",
+ "params": [{
+ categories: [((window.CATEGORY_ID.indexOf('CAT') !== -1) ? window.CATEGORY_ID : 'CAT' + window.CATEGORY_ID)],
+ products: [((window.PRODUCT_ID.indexOf('PROD') !== -1) ? window.PRODUCT_ID : 'CAT' + window.PRODUCT_ID)],
+ category_fields: ['products'],
+ product_fields: ['PRODUCT_ID', 'skus'],
+ sku_fields: ['SKU_ID', 'INVENTORY_STATUS','DISPLAY_STATUS']
+ }],
+ "onSuccess" : function (d) {
+ site.spp.updateInvStatus(d.result.value.categories[0].products[0].skus);
+ },
+ "onFailure" : function () {}
+});
+
+
+
+$(document).ready(function() {
+
+ // non-l2 product data loaded onto page via perlgem module (/includes/request.inc)
+ //site.spp.init(page_data[0].result.value.products[0]);
+ site.spp.init(page_data.catalog.spp.rpcdata.products[0]);
+
+ $(document).trigger('PAGEDATA:RESULT',['catalog.spp']);
+
+ // call bazaar voice if ecom review section
+ if($('.ecommerce .review-container').length) {
+ $('.ecommerce .review-container').removeClass('hidden');
+ site.spp.show_reviews({PROD_BASE_ID: ((window.PRODUCT_ID.indexOf('PROD') !== -1) ? window.PRODUCT_ID.substring(4) : window.PRODUCT_ID)});
+ }
+
+ $('.selectbox').selectBox();
+ $('.selectbox').selectBox('settings', {
+ 'menuTransition': 'slide',
+ 'menuSpeed' : 'fast'
+ });
+
+ $('#fb_link').attr('href', 'http://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(window.location));
+ $('#tw_link').attr('href', 'http://twitter.com/share?url=' + encodeURIComponent(window.location));
+
+ $(document).bind('bv:loaded', function () {
+ $('#BVRRDisplayContentSelectBVFrameID').addClass('selectBox-arrow');
+ $('#default-desc').html('Sort reviews by');
+ $('.BVRRContentReview').each(function() {
+ var review_score = $(this).find('.BVRRReviewRatingsContainer').html();
+ var review_title = $(this).find('.BVRRReviewTitle').text();
+ var review_writer = $(this).find('.BVRRUserNickname a').text();
+ var review = $(this).find('.BVRRReviewTextContainer').html();
+ var review_date = $(this).find('.BVRRReviewDate').text();
+ var review_location = $(this).find('.BVRRUserLocation').text();
+ $(this).html(review_score + '<h5>' + review_title + '</h5><p>' + review + '</p><p>' + review_date + '<br />Written by ' + review_writer + ' in ' + review_location + '</p>');
+ });
+ });
+
+});
diff --git a/drupal-7.9/sites/lamer/themes/lmbase/templates/page.tpl.php b/drupal-7.9/sites/lamer/themes/lmbase/templates/page.tpl.php
index aa9f2a0..5670f19 100644
--- a/drupal-7.9/sites/lamer/themes/lmbase/templates/page.tpl.php
+++ b/drupal-7.9/sites/lamer/themes/lmbase/templates/page.tpl.php
@@ -8,6 +8,7 @@
$top_left = render($page['top_left']);
$branding = render($page['branding']);
$top_right = render($page['top_right']);
+$search = render($page['search']);
$navigation = render($page['navigation']);
$help = render($page['help']);
$content = render($page['content']);
@@ -48,6 +49,11 @@ if ($navigation) $main_classes[] = 'has-navigation';
<?php endif; ?>
</div>
</header>
+ <?php if ($search): ?>
+ <div id="search-area">
+ <?php print $search; ?>
+ </div>
+ <?php endif; ?>
<?php if ($navigation): ?>
<nav id="navigation" role="navigation" class="main-menu mega">
diff --git a/drupal-7.9/sites/lamer/themes/lmmobile/css/lmmobile.css b/drupal-7.9/sites/lamer/themes/lmmobile/css/lmmobile.css
index 7ca5a90..c79860d 100644
--- a/drupal-7.9/sites/lamer/themes/lmmobile/css/lmmobile.css
+++ b/drupal-7.9/sites/lamer/themes/lmmobile/css/lmmobile.css
@@ -18,7 +18,7 @@ body > .wrapper {
#main.has-navigation,
.front .has-navigation#main {
- padding: 0;
+ padding: 0 0 20px;
}
.front #top {
@@ -33,10 +33,26 @@ body > .wrapper {
top: 21px;
}
+#header h2.block-title,
+#search-area h2.block-title,
+#navigation h2.block-title,
+#footer h2.block-title,
+#page-bottom h2.block-title {
+ display: none;
+}
+
.block-menu-field {
margin: 0;
}
+.lm_popup_blocks.has-title.hover .popup_block_content {
+ display: none;
+}
+
+.mobile-popup-block a.close {
+ display: none;
+}
+
#header .top-left {
left: 0;
}
@@ -56,82 +72,86 @@ body > .wrapper {
font: 24px/24px "LinotypeDidotRoman";
}
-#perlgem-search-form {
- border: none;
-}
-#perlgem-search-form #edit-keywords {
- width: 238px;
- border: solid 1px #ababab;
- position: absolute;
- left: 0;
-}
-#perlgem-search-form .form-submit {
- display: block;
- float: right;
- margin: 0;
-}
-
#navigation {
- border: none;
-}
-#navigation .field-menu {
border-top: 1px solid #ababab;
border-bottom: 1px solid #ababab;
+ height: auto;
+ margin: 10px 0;
+ padding: 2px 0 0;
}
-#navigation .block ul {
- width: 100%;
+#navigation > div.container {
+ height: 26px;
+ border-bottom: solid 1px #ababab;
+ margin-bottom: -1px;
+ padding-bottom: 27px;
}
-#navigation .block ul li {
- display: block;
- padding: 0;
+#navigation ul {
+ margin-top: -2px;
}
-#navigation .block ul li.first {
- margin: 0 0 0 32px;
- float: left;
+#navigation ul li {
+ border-bottom: none;
}
-#navigation .block ul li.last {
- margin: 0 32px 0 0;
- float: right;
+#navigation ul li.expanded div.depth-1 {
+ top: -999em;
}
-#navigation .block ul li a {
- font-size: 13px;
+#navigation ul li.first {
+ margin-left: 0;
}
-#navigation .block ul li ul li {
- display: block;
- float: none;
- width: auto;
- height: auto;
- margin: 0;
- padding: 0;
+#navigation ul li.last {
+ margin-right: 0;
}
-#navigation .block ul li ul li.active-trail, #navigation .block ul li ul li.hover, #navigation .block ul li ul li.sfHover {
- border: 0;
+#navigation ul li.active-trail, #navigation ul li.hover, #navigation ul li.sfHover {
+ border-bottom: none;
}
-#navigation .block ul li .menu-container,
-#navigation .block ul li .menu-container ul {
- display: none;
+#navigation ul li.hover a, #navigation ul li.sfHover a {
+ border-bottom: solid 2px black;
+ color: black;
}
-#navigation .block ul li.active-trail {
- border: 0;
+#navigation ul li a {
+ display: block;
+ border-bottom: solid 2px transparent;
+}
+#navigation ul li a.active {
+ border-bottom: solid 2px black;
+ color: black;
}
+#subnavigation {
+ padding: 10px 0;
+}
#subnavigation ul,
#subnavigation ul li {
display: block;
margin: 0;
- padding: 10px 0;
+ padding: 0;
float: none;
text-align: center;
-}
-#subnavigation li {
height: auto;
line-height: normal;
+ border-bottom: none;
}
-#subnavigation li a:after {
- content: " \203A";
+#subnavigation ul a,
+#subnavigation ul li a {
+ display: block;
+ padding: 2px 0;
+ border-bottom: none;
+ color: black;
}
-#subnavigation li.active-trail {
+#subnavigation ul a.active,
+#subnavigation ul li a.active {
background-color: #e5e5e5;
+ border-bottom: none;
+}
+#subnavigation ul a:after,
+#subnavigation ul li a:after {
+ content: " \203A";
+ position: relative;
+ top: -2px;
+ left: 5px;
+}
+#subnavigation ul.active-trail,
+#subnavigation ul li.active-trail {
+ border-bottom: none;
}
#subnavigation .up {
display: inline-block;
@@ -149,6 +169,7 @@ body > .wrapper {
border-bottom: 1px solid #ababab;
padding: 10px 0;
margin: 0 0 10px;
+ height: 40px;
}
#page-bottom .block {
margin: 0;
@@ -162,51 +183,108 @@ body > .wrapper {
float: right;
}
-#footer .clearfix {
+footer#footer {
+ padding: 0 0 10px;
+ line-height: 25px;
+ position: static !important;
+ width: auto !important;
+}
+footer#footer nav.block {
+ margin: 15px 0 0;
+}
+footer#footer .block,
+footer#footer .block div,
+footer#footer .content,
+footer#footer .content div {
+ display: block;
+}
+footer#footer .clearfix {
width: 280px;
}
-#footer .clearfix .block {
+footer#footer .clearfix .block {
margin: 0 0 8px;
}
-#footer .clearfix .block ul {
+footer#footer .clearfix .block ul {
margin: 0;
}
-#footer .clearfix .block ul.menu li {
+footer#footer .clearfix .block ul.menu li {
padding: 0 7px;
background: transparent;
border-left: solid 1px black;
line-height: 13px;
margin: 7px 0;
}
-#footer .clearfix .block ul.menu li.first {
+footer#footer .clearfix .block ul.menu li.first {
border-left: none;
}
-.block .email-signup-container input.email-signup {
- float: left;
- width: 200px;
-}
-.block .email-signup-container #email-signup-submit {
- float: right;
-}
-
input[type="text"] {
line-height: 21px;
height: 21px;
padding: 0 4px;
border: solid 1px #ababab;
+ border-radius: 0;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ -o-border-radius: 0;
+ -ms-border-radius: 0;
+ -webkit-appearance: none;
margin: 0;
}
input[type="submit"],
-a.button {
+a.button,
+input.form-submit:first-child {
padding: 0 7px;
height: 21px;
+ margin: 0;
line-height: 21px;
border: solid 1px black;
border-radius: 0;
+ font-weight: normal;
-moz-border-radius: 0;
-webkit-border-radius: 0;
-o-border-radius: 0;
-ms-border-radius: 0;
}
+
+select {
+ -webkit-appearance: none;
+ background: url("../img/select_bg_mobile.png") no-repeat 100% 0;
+ border-color: #aaaaaa;
+ border-radius: 0;
+ padding: 0 15px 0 10px;
+ height: 21px;
+}
+
+#foreground-node a.close-link {
+ width: 9px;
+ height: 9px;
+ position: absolute;
+ top: 20px;
+ right: 20px;
+ overflow: hidden;
+ text-indent: -9999px;
+ background: url("/media/export/images/global/close-icon.png") no-repeat;
+ padding: 0;
+ cursor: pointer;
+}
+
+a.overlay-drawer-close {
+ display: block;
+ text-align: center;
+ border-bottom: solid 1px #aaaaaa;
+ height: 32px;
+}
+a.overlay-drawer-close:after {
+ content: " \00bb";
+ padding-bottom: 10px;
+ display: inline-block;
+ -webkit-transform: rotate(-90deg);
+ -moz-transform: rotate(-90deg);
+ -ms-transform: rotate(-90deg);
+ -o-transform: rotate(-90deg);
+}
+a.overlay-drawer-close span {
+ display: none;
+}
diff --git a/drupal-7.9/sites/lamer/themes/lmmobile/img/select_bg_mobile.png b/drupal-7.9/sites/lamer/themes/lmmobile/img/select_bg_mobile.png
new file mode 100644
index 0000000..8e47b73
Binary files /dev/null and b/drupal-7.9/sites/lamer/themes/lmmobile/img/select_bg_mobile.png differ
diff --git a/drupal-7.9/sites/lamer/themes/lmmobile/js/main.js b/drupal-7.9/sites/lamer/themes/lmmobile/js/main.js
index 22ad8f6..8b98730 100644
--- a/drupal-7.9/sites/lamer/themes/lmmobile/js/main.js
+++ b/drupal-7.9/sites/lamer/themes/lmmobile/js/main.js
@@ -7,34 +7,63 @@
}).children('li').map(function() {
// Create the subnavigation DOM element if there's an active trail present
- if ($(this).hasClass('active-trail')) {
- var submenu = $(this).children('.menu-container');
- if (submenu.length > 0) {
- copy_subnavigation_menu(submenu);
- }
- }
+ // if ($(this).hasClass('active-trail')) {
+ // var submenu = $(this).children('.menu-container');
+ // if (submenu.length > 0) {
+ // copy_subnavigation_menu(submenu);
+ // }
+ // }
// Bind the click event to the top-level menu items
$(this).children('a').click(function() {
+ if ($('#subnavigation').length) return;
var submenu = $(this).siblings('.menu-container');
+ var parent = $(this).parent();
if (submenu.length > 0) {
- copy_subnavigation_menu(submenu);
+ copy_subnavigation_menu(submenu, parent);
return false;
}
});
});
+ // Mobile sites don't have hover-triggered popovers, instead use an overlay triggered on click:
+ $('.popup_block_title', context).click(function(e){
+ e.preventDefault();
+
+ var content = $(this).siblings('.popup_block_content').clone(true);
+ generic.overlay.launch({
+ content : content,
+ includeBackground : true,
+ overlay : true,
+ cssClass : 'mobile-popup-block',
+ cssStyle : {
+ width : '280px'
+ }
+ });
+ });
+
+ // Fix for when list items in the footer that are seperated by a bar wrap to a second line
+ $('#footer ul.menu li:not(:first)').each(function(){
+ if ($(this).prev().length && $(this).prev().offset().top) {
+ if ($(this).offset().top > $(this).prev().offset().top) {
+ $(this).prev().addClass('last');
+ };
+ };
+ })
+
}
};
})(jQuery);
-function copy_subnavigation_menu(element) {
+function copy_subnavigation_menu(element, parent) {
$('#subnavigation').remove();
var up_arrow = '<div class="up">&raquo;</div>';
- $('#navigation').append('<div id="subnavigation">' + element.html() + up_arrow + '</div>');
+ $('#navigation').append('<div id="subnavigation" style="display: none;">' + element.html() + up_arrow + '</div>').find('#subnavigation').slideDown('fast');
+ parent.addClass('hover');
$('#subnavigation .up').click(function() {
$(this).parent().slideUp('fast', function() {
+ parent.removeClass('hover');
$(this).remove();
});
});
diff --git a/drupal-7.9/sites/lamer/themes/lmmobile/lmmobile.info b/drupal-7.9/sites/lamer/themes/lmmobile/lmmobile.info
index 24667c5..3fc0126 100644
--- a/drupal-7.9/sites/lamer/themes/lmmobile/lmmobile.info
+++ b/drupal-7.9/sites/lamer/themes/lmmobile/lmmobile.info
@@ -10,6 +10,7 @@ scripts[] = js/main.js
regions[top_left] = Top left
regions[branding] = Branding
regions[top_right] = Top right
+regions[search] = Search area
regions[navigation] = Navigation
regions[help] = Help
regions[content] = Content
@@ -28,8 +29,10 @@ settings[pg_utility_left] = .top-left.column
settings[pg_utility_right] = .top-right.column
settings[pg_logo] = hgroup.branding.column
settings[pg_gnav] = nav#navigation
+settings[pg_search] = div#search-area
settings[pg_header] = header#header
settings[pg_footer] = footer#footer
+settings[pg_page_bottom] = div#page-bottom
settings[pg_js_head] = head script
settings[pg_js_body_start] = #js_body_start
settings[pg_js_body_end] = #js_body_end
diff --git a/drupal-7.9/sites/lamer/themes/lmmobile/sass/lmmobile.sass b/drupal-7.9/sites/lamer/themes/lmmobile/sass/lmmobile.sass
index 05561ec..44c2b5c 100644
--- a/drupal-7.9/sites/lamer/themes/lmmobile/sass/lmmobile.sass
+++ b/drupal-7.9/sites/lamer/themes/lmmobile/sass/lmmobile.sass
@@ -19,7 +19,7 @@ body > .wrapper
#main.has-navigation,
.front .has-navigation#main
- padding: 0
+ padding: 0 0 20px
.front #top
position: relative
@@ -31,9 +31,23 @@ body > .wrapper
#typeahead-wrapper
width: 280px
top: 21px
+
+#header h2.block-title,
+#search-area h2.block-title,
+#navigation h2.block-title,
+#footer h2.block-title,
+#page-bottom h2.block-title
+ display: none
+
.block-menu-field
margin: 0
+.lm_popup_blocks.has-title.hover .popup_block_content
+ display: none
+
+.mobile-popup-block a.close
+ display: none
+
#header
.top-left
left: 0
@@ -50,71 +64,67 @@ body > .wrapper
.site-logo a
font: 24px/24px "LinotypeDidotRoman"
-#perlgem-search-form
- border: none
- #edit-keywords
- width: 238px
- border: solid 1px #ababab
- position: absolute
- left: 0
- .form-submit
- display: block
- float: right
- margin: 0
-
// Main navigation
-
#navigation
- border: none
- .field-menu
- border-top: 1px solid #ababab
- border-bottom: 1px solid #ababab
- .block
- ul
- width: 100%
- li
+ border-top: 1px solid #ababab
+ border-bottom: 1px solid #ababab
+ height: auto
+ margin: 10px 0
+ padding: 2px 0 0
+ > div.container
+ height: 26px
+ border-bottom: solid 1px #ababab
+ margin-bottom: -1px
+ padding-bottom: 27px
+ ul
+ margin-top: -2px
+ li
+ border-bottom: none
+ &.expanded div.depth-1
+ top: -999em
+ &.first
+ margin-left: 0
+ &.last
+ margin-right: 0
+ &.active-trail, &.hover, &.sfHover
+ border-bottom: none
+ &.hover a, &.sfHover a
+ border-bottom: solid 2px #000
+ color: #000
+ a
display: block
- padding: 0
- &.first
- margin: 0 0 0 32px
- float: left
- &.last
- margin: 0 32px 0 0
- float: right
- a
- font-size: 13px
- ul li
- display: block
- float: none
- width: auto
- height: auto
- margin: 0
- padding: 0
- &.active-trail,
- &.hover,
- &.sfHover
- border: 0
- .menu-container,
- .menu-container ul
- display: none
- &.active-trail
- border: 0
+ border-bottom: solid 2px transparent
+ &.active
+ border-bottom: solid 2px #000
+ color: #000
#subnavigation
+ padding: 10px 0
ul,
ul li
display: block
margin: 0
- padding: 10px 0
+ padding: 0
float: none
text-align: center
- li
height: auto
line-height: normal
+ border-bottom: none
+ a
+ display: block
+ padding: 2px 0
+ border-bottom: none
+ color: #000
+ &.active
+ background-color: #e5e5e5
+ border-bottom: none
a:after
content: " \203A"
+ position: relative
+ top: -2px
+ left: 5px
&.active-trail
- background-color: #e5e5e5
+ border-bottom: none
.up
display: inline-block
cursor: pointer
@@ -132,6 +142,7 @@ body > .wrapper
border-bottom: 1px solid #ababab
padding: 10px 0
margin: 0 0 10px
+ height: 40px
.block
margin: 0
@@ -139,28 +150,32 @@ body > .wrapper
float: left
#bottom-right
float: right
-
-#footer .clearfix
- width: 280px
- .block
- margin: 0 0 8px
- ul
- margin: 0
- ul.menu li
- padding: 0 7px
- background: transparent
- border-left: solid 1px #000
- line-height: 13px
- margin: 7px 0
- &.first
- border-left: none
-
-.block .email-signup-container
- input.email-signup
- float: left
- width: 200px
- #email-signup-submit
- float: right
+footer#footer
+ padding: 0 0 10px
+ line-height: 25px
+ position: static !important
+ width: auto !important
+ nav.block
+ margin: 15px 0 0
+ .block,
+ .block div,
+ .content,
+ .content div
+ display: block
+ .clearfix
+ width: 280px
+ .block
+ margin: 0 0 8px
+ ul
+ margin: 0
+ ul.menu li
+ padding: 0 7px
+ background: transparent
+ border-left: solid 1px #000
+ line-height: 13px
+ margin: 7px 0
+ &.first
+ border-left: none
// Global Elements
input[type="text"]
@@ -168,16 +183,61 @@ input[type="text"]
height: 21px
padding: 0 4px
border: solid 1px #ababab
+ border-radius: 0
+ -moz-border-radius: 0
+ -webkit-border-radius: 0
+ -o-border-radius: 0
+ -ms-border-radius: 0
+ -webkit-appearance: none
margin: 0
input[type="submit"],
-a.button
+a.button,
+input.form-submit:first-child
padding: 0 7px
height: 21px
+ margin: 0
line-height: 21px
border: solid 1px #000
border-radius: 0
+ font-weight: normal
-moz-border-radius: 0
-webkit-border-radius: 0
-o-border-radius: 0
-ms-border-radius: 0
+
+select
+ -webkit-appearance: none
+ background: url("../img/select_bg_mobile.png") no-repeat 100% 0
+ border-color: #aaa
+ border-radius: 0
+ padding: 0 15px 0 10px
+ height: 21px
+
+#foreground-node a.close-link
+ width: 9px
+ height: 9px
+ position: absolute
+ top: 20px
+ right: 20px
+ overflow: hidden
+ text-indent: -9999px
+ background: url("/media/export/images/global/close-icon.png") no-repeat
+ padding: 0
+ cursor: pointer
+
+a.overlay-drawer-close
+ display: block
+ text-align: center
+ border-bottom: solid 1px #aaa
+ height: 32px
+ &:after
+ content: " \00bb"
+ padding-bottom: 10px
+ display: inline-block
+ -webkit-transform: rotate(-90deg)
+ -moz-transform: rotate(-90deg)
+ -ms-transform: rotate(-90deg)
+ -o-transform: rotate(-90deg)
+ span
+ display: none
diff --git a/drupal-7.9/sites/lamer/themes/lmmobile/template.php b/drupal-7.9/sites/lamer/themes/lmmobile/template.php
index e654e4e..071087a 100644
--- a/drupal-7.9/sites/lamer/themes/lmmobile/template.php
+++ b/drupal-7.9/sites/lamer/themes/lmmobile/template.php
@@ -10,6 +10,23 @@ function lmmobile_js_alter(&$javascript) {
if (isset($javascript[$superfish_path])) {
unset($javascript[$superfish_path]);
}
+
+ // Load mobile pg js files instead of pc ones:
+ // List files to override here, relative to /js/mobile/
+ $overrides = array(
+ 'site/product/product-view-single.js',
+ 'site/product/product-view.js'
+ );
+
+ foreach ($overrides as $path) {
+ $pc_path = "/js/pc/$path";
+ if (isset($javascript[$pc_path])) {
+ $mobile_path = "/js/mobile/$path";
+ $javascript[$mobile_path] = $javascript[$pc_path];
+ $javascript[$mobile_path]['data'] = $mobile_path;
+ unset($javascript[$pc_path]);
+ }
+ }
}
/**
diff --git a/drupal-7.9/sites/lamer/themes/us/us_mobile.info b/drupal-7.9/sites/lamer/themes/us/us_mobile.info
index 24211d9..b523cc7 100644
--- a/drupal-7.9/sites/lamer/themes/us/us_mobile.info
+++ b/drupal-7.9/sites/lamer/themes/us/us_mobile.info
@@ -6,9 +6,12 @@ base theme = lmmobile
regions[top_left] = Top left
regions[branding] = Branding
regions[top_right] = Top right
+regions[search] = Search area
regions[navigation] = Navigation
regions[help] = Help
regions[content] = Content
+regions[bottom_left] = Bottom left
+regions[bottom_right] = Bottom right
regions[footer] = Footer
regions[page_top] = Page top
regions[page_bottom] = Page bottom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment