mjml-section
Advanced tools
Comparing version 2.0.0-beta.5 to 2.0.0-beta.6
@@ -54,3 +54,41 @@ 'use strict'; | ||
}; | ||
var postRender = function postRender($) { | ||
$('.mj-section-outlook-background').each(function () { | ||
var url = $(this).data('url'); | ||
var width = $(this).data('width'); | ||
$(this).removeAttr('class').removeAttr('data-url').removeAttr('data-width'); | ||
if (!url) { | ||
return; | ||
} | ||
$(this).before('<!--[if gte mso 9]>\n <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:' + width + 'px;">\n <v:fill origin="0.5, 0" position="0.5,0" type="tile" src="' + url + '" />\n <v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">\n <![endif]-->'); | ||
$(this).after('<!--[if gte mso 9]>\n </v:textbox>\n </v:rect>\n <![endif]-->'); | ||
}); | ||
$('.mj-section-outlook-open').each(function () { | ||
var $columnDiv = $(this).next(); | ||
$(this).replaceWith('<!--[if mso]>\n <table border="0" cellpadding="0" cellspacing="0"><tr><td style="vertical-align:' + $columnDiv.data('vertical-align') + ';width:' + parseInt($(this).data('width')) + 'px;">\n <![endif]-->'); | ||
$columnDiv.removeAttr('data-vertical-align'); | ||
}); | ||
$('.mj-section-outlook-line').each(function () { | ||
var $columnDiv = $(this).next(); | ||
$(this).replaceWith('<!--[if mso]>\n </td><td style="vertical-align:' + $columnDiv.data('vertical-align') + ';width:' + parseInt($(this).data('width')) + 'px;">\n <![endif]-->'); | ||
$columnDiv.removeAttr('data-vertical-align'); | ||
}); | ||
$('.mj-section-outlook-close').each(function () { | ||
$(this).replaceWith('<!--[if mso]>\n </td></tr></table>\n <![endif]-->'); | ||
}); | ||
return $; | ||
}; | ||
var Section = (0, _mjmlCore.MJMLElement)(_class = function (_Component) { | ||
@@ -199,3 +237,4 @@ _inherits(Section, _Component); | ||
Section.baseStyles = baseStyles; | ||
Section.postRender = postRender; | ||
exports.default = Section; |
{ | ||
"name": "mjml-section", | ||
"version": "2.0.0-beta.5", | ||
"version": "2.0.0-beta.6", | ||
"main": "lib/index.js", | ||
@@ -16,5 +16,5 @@ "repository": { | ||
"lodash": "^4.6.1", | ||
"mjml-core": "^2.0.0-beta.3", | ||
"mjml-core": "^2.0.0-beta.4", | ||
"react": "^0.14.7" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9000
194
Updatedmjml-core@^2.0.0-beta.4