return $this->view->quoteForm('requestQuotePopup'); // Different ID for popup form so it doesn't conflict with contact page form
}
-}
+ public function video($ID) {
+ $this->setPopupMaxWidth('1440');
+ $this->setPopupWidth('90%');
+ return $this->view->videoWeb($ID, '100%', 'auto', ['autoplay' => 1]);
+ }
-?>
+}
\ No newline at end of file
public function init() {\r
parent::init();\r
\r
+ $video_button = new Zend_Form_Element_Text('video_button_text');\r
+ $video_button->setLabel('Texte pour bouton vidéo');\r
+ $this->addElement($video_button);\r
+\r
+ $video = new CubeIT_Form_Element_WebVideo('video');\r
+ $video->setLabel('Vidéo');\r
+ $this->addElement($video);\r
+\r
$features_title = new Zend_Form_Element_Textarea('features_title');\r
$features_title->setLabel('Titre pour "Fonctionnalités incluses de série"');\r
$features_title->setAttrib('rows', 3);\r
\r
$this->headScript()->addScriptAndStyle('410-features');\r
\r
-$res = $this->introBlock($this->intro, '');\r
+$videoLink = '/ajaxpopup/video/'. $this->video;\r
+\r
+$extraContent = $this->linkPopup($this->video_button_text, $videoLink, ['class' => 'features-video-button']);\r
+$extraContent .= $this->linkPopup('', $videoLink, ['class' => 'features-video', 'width' => '1200']);\r
+\r
+$res = $this->introBlock($this->intro, $extraContent);\r
\r
$res .= $this->featuresSection($this->features_title, $this->features);\r
$res .= $this->featuresSection($this->services_title, $this->services);\r
-registerLoader(load_features);
+registerLoader(load_features, true);
function load_features() {
- $(window).on('cubeitresize', resizeFeatureBlocks);
- resizeFeatureBlocks();
+ $(window).on('cubeitresize', resizeFeaturePage);
+ resizeFeaturePage();
+
+ $(window).on('cubeitopenpopup', function() {
+ cubeitresize(); // Needed so video is sized correctly in popup
+ });
$(".feature-blocks").masonry({
itemSelector: ".feature-block",
}
+function resizeFeaturePage() {
+ resizeFeatureBlocks();
+ resizeFeatureVideoLink();
+}
+
+// Link that overlays the background image to trigger the video
+// must be sized and positioned relative to background
+// image size, which is relative to section size
+function resizeFeatureVideoLink() {
+
+ var container = $('.intro .content-wrapper'),
+ bgRatio = container.data('bg-ratio'),
+ multiplier = ($(window).width() <= 900) ? 1.8 : 1, // Background is zoomed below 900px (see 102-intro.less)
+ bgHeight = Math.round(container.width() * bgRatio * multiplier);
+
+ $('.features-video').css({
+ bottom: bgHeight * 0.27,
+ height: bgHeight * 0.58
+ });
+}
+
+
// Ensure that the container is a round number that can be
// evenly divided by the number of columns. This stops
// Masonry from having gaps and mis-aligned items
text-decoration: none;
text-align: center;
cursor: pointer;
+ line-height: @line-height;
+ padding-left: @horizontal-padding;
+ padding-right: @horizontal-padding;
}
.rounded-button() {
.background-button-green() {
.background-button(#8aab41, #aac759);
+ color: #fff;
+ &:hover {
+ color: #fff;
+ }
}
.background-button-blue() {
.background-button(#3c9fd6, #53bde7);
+ color: #fff;
+ &:hover {
+ color: #fff;
+ }
}
.divider(@bottom-padding: 100px) {
\r
@media @m900 {\r
padding-bottom: 85%;\r
- background-size: 180% auto;\r
+ background-size: 180% auto; // This value needs to be synced with 410-features.js for resizeVideoLink()\r
padding-top: 100px;\r
text-align: center;\r
}\r
}\r
&.agencies {\r
.border-button-fill(@color-header-grey, #c2c4c7, 5%);\r
+ line-height: 1;\r
@media @m900 {\r
display: none;\r
}\r
@f2cols: ~"(max-width: 1350px)";
@f1col: ~"(max-width: 767px)"; // Note: the same value should also be set in FeaturesSection.php for the _CSS() function
+.fonctionnalites {
+ .intro {
+ position: relative;
+ }
+}
+
+.features-video-button {
+ .button();
+ .background-button-blue();
+ .font-thinning();
+ margin-top: 50px;
+}
+
+.features-video {
+ display: block;
+ position: absolute;
+ //background: rgba(255,255,0,.5); // Highlight mode! (for testing)
+ width: 45%;
+ height: 58%; // Initial value - will be updated by JS
+ right: 5%;
+ bottom: 27%; // Initial value - will be updated by JS
+
+ @media @m900 {
+ width: 81%;
+ right: 9%;
+ }
+}
+
.feature-blocks {
width: 100%;
}