I want to make a responsive email template with MJML, it looks good on most of the email rendering clients, but (of course) Outlook 2003 is doing it differently, as you can see in the image:
Outlook 2003 is rendering both, the mobile and the desktop version.
The complete code is here which you can try here: https://mjml.io/try-it-live/Bk5Gu1w9L
<mjml owa="desktop">
<mj-head>
<mj-breakpoint width="320px" />
<mj-style>
#media screen and (max-width:320px) {
.show_on_desktop td{
display: none !important;
}
}
#media screen and (min-width:321px) {
.show_on_mobile td{
display: none !important;
}
}
.show_on_mobile td {
mso-hide: all;
font-size: 0;
max-height: 0;
line-height: 0;
}
</mj-style>
</mj-head>
<mj-body>
<mj-raw><!--[if !mso]><\!--></mj-raw>
<mj-section>
<mj-column css-class="show_on_mobile">
<mj-image src="https://www.ecom-ex.com/fileadmin/user_upload/images/products/one-pager/gallery/ex-handy_10_dz1dz2/ex-handy_10_dz1_teaser_1.png"></mj-image>
<mj-text>show on mobile</mj-text>
</mj-column>
</mj-section>
<mj-raw><!-- <![endif]--></mj-raw>
<mj-section>
<mj-column css-class="show_on_desktop">
<mj-image src="http://c64os.com/resources/c64c-system.jpg"></mj-image>
<mj-text>show on desktop</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
The rendering is tested via EmailOnAcid which does not provide a free account to play around.
We tried many versions, this was the best looking so far, but Outlook 2003 (and some others) are showing it not as we were hoping for.
We are discussing about ignoring some old clients as Outlook 2003, but a solution instead of ignoring it, would be really nice.
I know this conversation dates a bit, but #TonyDallimore : would you try to run a 2020 game on Windows XP?
Even if MJML is pure HTML, HTML also evolved since 2003 ;-) Even Microsoft stopped supporting 2k3 quite a while ago.
It's as if you were asking the guy at the gas station for leaded gas, because your 1970's car was originally made for that ;-)
If you are the Outlook 2003 user, may I simply suggest you try to get something a little bit more recent? there are tons of freeware you can use. And many of them are as complete if not more than Outlook 2003 and can import your past and present emails into your new mail manager :-)
If someone else is the Outlook 2003 user, I don't know how close you may be to that person, or even if you know of anyone who personally uses that version, but I personally would tell you to just NOT worry about them.
Maybe you could put a friendly note at the top and/or bottom of your email that for security purposes, outdated email managers "may" not be supported my the MJML format of the email. ;-)
Hoping this helps you understand a bit clearer the situation,
merlinregis
There's a related discussion at https://github.com/mjmlio/mjml/issues/1182
Nothing against support here, but (FYI) there's lots of MJML Support for questions just like this at https://slack.mjml.io.
Good luck.
Related
I am using Moodle 3.2.2 and I upload Scorm course Dispatch file in Moodle. Everything is working fine except Resuming course.
I created my own dispatch file like Scorm cloud does. When I test the same course by download Scorm cloud dispatch file its working fine. But My dispatch file in Moodle is not resuming the course.
Note:
I use iSpring Presenter to create SCORM course.
This is the dispatch structure of files I have.
The dispatch.html code is
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="configuration.js"></script>
<script src="utils.js"></script>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script type="text/javascript">
include_script(DispatchRoot + "/scripts/client-driver.js");
include_script(DispatchRoot + "/scripts/client-loader.js");
</script>
</head>
<frameset id="dispatch_frameset" rows="0,*" frameborder="0" framespacing="0" border="0" onload="DispatchStart('dispatch_course_frame')"
onunload="DispatchUnload()">
<!-- We set the src to blank.html to avoid security warnings in IE6 / IE7 when launching in HTTPS -->
<!--<frame id="dispatch_content_frame" name="dispatch_content_frame" src="blank.html" />-->
<frame id="dispatch_loading_frame" name="dispatch_loading_frame" src="blank.html" />
<frame id="dispatch_course_frame" name="dispatch_course_frame">
</frameset>
<noframes>
Your browser must be able to view frames for this content to display.
</noframes>
</html>
client-driver.js is a file which helps to build communication between LMS and SCORM. while client-loader.js file is where communication happens. I am using following code
var completionStatus = Getvalue("cmi.core.lesson_status");
if (completionStatus == "not attempted") {
SetValue("cmi.core.lesson_status", "incomplete");
}
SetValue("cmi.core.exit", "suspend");
console.log(Getvalue("cmi.core.student_id"));
console.log(Getvalue("cmi.core.student_name"));
var entry = Getvalue("cmi.core.entry")
console.log(entry);
if (entry == "resume") {
var val = Getvalue("cmi.suspend_data");
SetValue("cmi.suspend_data", val);
}
else {
SetValue("cmi.suspend_data", "2");
}
When the user close the Moodle LMS window this code execute
SetValue("cmi.core.exit", "suspend");
api.LMSCommit("");
api.LMSFinish("");
But next time I am unable to resume course. Can anyone tell me where I am doing wrong? How to resume course from the last slide.?
I'm going to dig this up from some real old knowledge so bare in mind you need to verify it. I believe the way Moodle was coded; if you set any status it may trigger the SCO to re-launch in "Review" mode which will bugger up your cmi.core.entry. I had to explicitly setup a 'do not status until finish' option in my Content API Library to deal with this issue. Do not confuse "Finish" with "LMSFinish". Its more or less "the student is done with the attempt". Most SCORM 2004 users set the status of the SCO to incomplete when its 'not attempted'. It makes sense. With one glaring difference - In SCORM 1.2 there is only one status for passed, failed, completed or incomplete (not attempted).
Check your cmi.core.lesson_mode to see if my theory is correct on a second launch.
As content developers we probably could have been doing a better job to expose UI elements to hit "I am done" like a turning in of your homework. Some LMS systems even went to extents to put 'done' buttons in their TOC's or Lesson Viewers.
These terms often confuse people and some of it was addressed in SCORM 2004. I believe Moodle abandoned their SCORM 2004 Runtime support.
Keep in mind Moodle also allows data to be set against a SCO in review mode. SCORM didn't exactly dictate what a LMS should do in this situation, but Moodle opted to allow that to continue to change the student attempt. My opinion here is this is a "never ending attempt". We could debate whether this is right/wrong or indifferent - but ultimately the SCORM white paper for 1.2 was mainly optional vs mandatory, and they didn't call out what a LMS should or shouldn't do on this. We'd need a time machine to go back to 2001.
I recently upgraded my application to GWT 2.7 from GWT 2.5. This has caused me to drop support for IE6 and IE7.
I would like to provide users with IE6 or IE7 with a warning that their browser is outdated and will not work. At the moment if you go to the app with one of those browsers, you get a blank screen.
I know there are a couple ways that I could hack something together but I would rather use the GWT way, rather than some hack. Is there a GWT hook for unsupported browsers?
Option (hack) One
Drop this into my main.html:
if(document.documentMode === 6 || document.documentMode === 7){
myUnsupportedBrowserWarningFunction();
}
Potential problem with this is that if someone is using a browser that GWT doesn't recognise and I don't recognise (mobile opera? Some other browser), they will still get a blank page.
Option (hack) Two
GWT looks for the compiled JS here:
gwt/myApp/ASDFKLSDJFLSFDJSLDFJLSJDFSDES.cache.js
When someone is using an unsupported browser the following is requested (and is not found):
gwt/myApp/undefined.cache.js
It would be possible to create undefined.cache.js and put your unsupported browser code there. This is obviously a brittle solution and will break with future GWT updates.
Option Three
A recent patch (available in GWT 2.7) allows you to provide a default
permutation (e.g. safari) if GWT can not detect the browser and with
deferred binding you can display a warning that the provided app might not
work correctly as the browser is generally unsupported by GWT.
-- J.
Source
I don't want to set a default permutation for unsupported browsers. I want the site to not work and to display a warning. So this solution doesn't really provide what I am looking for.
Similar Questions & Posts
The same question was asked for an eariler version of GWT in 2009. I hope that GWT has added some kind of hook or best practice in the last 6 years.
More info on setting a default (fallback) permutation
You should be able to use onLoadErrorFn for that: https://code.google.com/p/google-web-toolkit/issues/detail?id=8135
<script>
function gwtLoadError(errMsg) {
// GWT app couldn't load, reason in errorMsg
}
</script>
<meta name="gwt:onLoadErrorFn" content="gwtLoadError">
or possibly onPropertyErrorFn:
<script>
function gwtPropError(propName, allowedValues, actualValue) {
if (propName == 'user.agent') {
// unsupported browser
}
}
</script>
<meta name="gwt:onPropertyErrorFn" content="gwtPropError">
(I don't think user.agent.runtimeWarning would help in this case, but maybe have a look)
There is an easy way:
Conditional Comments
<!--[if lt IE 8]>
<p>You are using an unsupportet browser. Please perform an update</p>
<![endif]-->
I think Option 3 may be the best one, but there is a problem: This will start the actual application (which still may be incompatible).
If this is an issue and you want a clear warning, you can rewrite the permutation selection script (You would need to update the script with the upcoming GWT releases)
You will need to copy this source:
https://gwt.googlesource.com/gwt/+/2.7.0/user/src/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java
You could add something like:
$wnd.Location.replace('nosupported.html');
between line 90 and 91
My facebook comment box is getting off vertically when I run my site locally with rails, but when I upload it to heroku and view it there it seems to autosize fine. Any idea why this might be? Is it because my localhost is unreachable from facebooks servers? Is there a way to get it to show properly locally?
Make sure the parent element has:
overflow: visible;
If you are using a Pluggin, you have to quit all the codes like
. facebook-comment { width: 95px !important; }
These codes are setting-up automatically by the plugin and don't work with all css functionalities.
Once you have done that, you can create a <div class> in your PHP console and adding it in your CSS file to customize your box as you want.
hello friends I have a big problem with internet explorer, I made a date validation using "select" with jquery, in Mozilla and crome works, but IE does nothing. Please I need help!
Your JS code calls for elements that aren't created in IE version less than 7 - thus it does nothing. See below:
<!--[if lt IE 7]>
<script type="text/javascript">
document.createElement("#date-star-month");
document.createElement("#date-star-year");
document.createElement("#date-finish-month");
document.createElement("#date-finish-year");
document.createElement("#date-star-month option");
document.createElement("#date-star-year option");
document.createElement("#date-finish-month option");
document.createElement("#date-finish-year option");
document.createElement("year_star");
document.createElement("year_finish");
</script>
<![endif]-->
This will not work in IE older than 7 - tested on 9, didn't work, until I ran IE9 in quasi-IE7 mode.
Additional pointers
Would be much easier to answer your question if you would be more specific.
Adding your code was a good move, do that from the start.
Too bad you didn't:
let us know what the validation function is supposed to do
on what browsers (with their versions) have you tested this
Also, if you state your intentions (why do you need that data validation, what it must do, etc.) you can get extra tips to achieve this in other (maybe better or easier) way.
I have the following code in a rendering, running on multiple environments:
<li class="formWWW">
<span class="formNumber"><sc:text field="Form Number" /></span>
<h4><sc:link field="URL"><sc:text field="Title" /></sc:link></h4>
<p><xsl:value-of select="sc:fld('Description', .)" /></p>
</li>
The issue I'm having involves the <sc:link> inside the h4. On my local machine and in our development environment, it properly generates an anchor tag the way it is supposed to; however, in our QA testing environment, it seems as though <sc:link> is just dumping the contents of the URL (General Link) field instead of rendering it as an anchor. It is very confusing since I know the renderings and the data inside the fields are both consistent among the environments.
My best guess is that there is a configuration setting somewhere relating to the behavior of <sc:link>, but I don't know. Thank you for your time.
I thought about just deleting this question, but it may be useful for others down the line to know that the problem was solved by resetting IIS. It seems as though whenever nothing makes sense, iisreset.