Outlook if mso conditions - email

I wonder is it possible to specify more than one exact versions of Outlook in one if mso condition? Like
//pseudo
if mso9 OR mso10 OR mso11
apply these styles
end if
If it is, please can someone give a link to the syntax explanation?

I believe this approach does work.
<!--[if (mso 9)|(mso 10)|(mso 11)]>
Here is a link: https://litmus.com/community/code/396-conditional-code-for-outlook

Related

Bold characters merge with normal characters

I send my customer newsletter with bold characters indicate that they combine the regular characters.
When i m using tag same problem. Any Idea?
My code here.
<tr>
<td style="font-family:Tahoma, Geneva, sans-serif; color:#000; font-size:13px; padding:20px">Hailed by<b>Apple CEO Tim Cook</b> as<b>"the biggest news in iPad since the iPad"</b> at its launch event in San Francisco, the extra-large<b>iPad Pro</b> is a new<b>12.9-inch tablet</b> as<b>thin as</b> the<b>iPad Air</b> and powered by the new<b>A9x 64-bit chip</b>. <br />
<br />
Running on Apple's latest software,<b>iOS 9, the iPad Pro</b> will work with a<b>stylus, dubbed Apple Pencil</b>, and a<b>smart keyboard accessory</b>. The<b>Smart Keyboard</b>, a keyboard especially for the<b>iPad Pro</b>, looks a lot like the one for the<b>Microsoft Surface Pro 3</b>, and<b>works similarly</b>. It was launched alongside an updated<b>iPad Mini 4</b>and<b>lower pricing</b> for the rest of the iPad line-up. Read more here. </td>
</tr>
<tr>
Note: My client is using Outlook with Office 360.
outlook screenshot
You have a spacing issue on the 4th line:
... updated<b>iPad Mini 4</b>and<b>lower pricing</b> ...
Just add the respective spaces and you should be fine:
... updated <b>iPad Mini 4</b> and <b>lower pricing</b> ...
This mistake is repeated in several places, so for better optimization, just use spaces before/after every tag you use and no spaces within the tag. This was, you'll be rid of such errors in the future :)

Selenium-Webdriver JAVA:- i am getting error ""org.openqa.selenium.NoSuchElementException: no such element""" but Appointment Icon is present

I want to verify the tool tip but getting error no such element. I have confirmed that element is exist.
Java Code:
String toolTipTextAppointment = driver
.findElement(By
.id("//*[#id='EditView_NOTE_POPUP']/table/tbody/tr[2]/td/table/tbody/tr[3]/td[2]/table/tbody/tr/td[1]/a/img")).getAttribute("title");
System.out.println(toolTipTextAppointment);
HTML Code:
<td nowrap="nowrap" style="border:0px;">
<a class="" href="javascript:void(0);" onclick="showPopupActivity('Meetings','activityPopupFormAraContent',440,600);">
<img style="border: 6px none;" title="Appointment" src="themes/AutoAccelerator/images/calender_icon.gif"/>
</a>
</td>
Try
driver.findElement(By.cssSelector("img[src*='calender_icon.gif']")).getAttribute("title")
you have used findElement(By.id("")) but you passed xpath in it that is why it is not working
String toolTipTextAppointment = driver.findElement(By.xpath("/html/body/table/tbody/tr/td/a/img")).getAttribute("title");
System.out.println(toolTipTextAppointment);
The problem is visibility. There are two different concepts, existence and visibility (reachable to click or see).
You need to check if the element is visible, not sure about the syntax as I use the clojure library (clj-webdriver) but as far as I know should be shomething like this
e=driver.findElement(By.id("idOfElement")).isDisplayed();
Take into account that the driver will find hidden element but they are not visible. In this particular case you may need to scroll down the page to make the element visible, I suggest retrieve its e.location and use the coordinates with a javascript snippet
((JavascriptExecutor)driver).executeScript("window.scrollTo(" + e.location + ")");
Then the element will be visible and you will be able to interact with it, I usually have this code embedded in a helper function as it's a quite common issue.
Disclaimer: code is just an orientation, I don't know the syntax as I don't use Java. Hope it helps

rendering description saved using tinymce editor

I have a problem with pagination.
In my website , I have a function productList which generates a paginated list of products.
The code for the paginate function is shown below:
$this->paginate = array('conditions'=>array($otherconditions,$statuscondition,$active_condition,$catcondition),'order' => $order, 'limit' => 10);
In the view file,
the paginator helper is used as follows:
<div class="paginator">
<span class="info">
<?php echo $this->Paginator->counter(array('format' => __('Page <strong>{:page}</strong> of <strong>{:pages}</strong>')), array('escape'=>false));
?>
</span>
<ul>
<?php echo $this->Paginator->numbers(array('separator' => '', 'tag'=>'li'));?>
</ul>
</div>
Suppose, there are 150 products, so with a limit of 10, there will be 15 pages.
The problem is that the page numbers are not displayed in the end pages like page 15 i.e when I click on the page number 15, the products are displayed but the paginator counter and paginator number links are not displayed.
I have looked all over the net for a solution but could not find one. Please guide me.
PS: the paginate variable depends on my parameters like the category selected , and other conditions.
I dont think its a problem with the paginate syntax because the pagination works for small number of pages like 2 or 3.
The problem is with paginator helper I think.
Thanks in advance.
I have found the following line when I inspected the HTML. the page number and counter where commented automatically inside the following comments.
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
< ...</p></div>
then after this I have the html for the page counter , page number links and also the script files. what is happening. I looked for its meaning and I found that mso 9 is microsoft office 9 or something. Which is not very reasonable. please guid me.
I solved this by putting a comment before the closing p tag and div tag.
So the comment tag <!--[if gte mso 9] > closes before </p></div>.
I also used the php function strip_tags to strip the body of text of all tags.
This is a duct tape method. But the problem I found lies in the mce editor.When a user copy pastes a paragraph from a word document to a mce editor thats running in firefox browser, the above mentioned conditional comment is added to the text. So, when displaying the user text, the conditional comment comments out rest of the html after the text.
IT is better to work with the mce editor callback to remove the conditional comment which i will be working on now.
Hope this helps someone...

Alternative to uibinder I18n

There is the Uibinder way of doing i18n as described here
And then there is this suggestion for GWT i18n.
I am considering the alternative as I am experiencing some issues with the first solution.
I wish to know the pros and cons of both methods so I know what to choose.
Please advise.
The first solution is very verbose, requires you to put localization files in specific folders and is described as a kind of a nightmare but it does support text with (runtime) variables. The second solution doesn't support variables in messages, but is much easier to use.
The second solution support 2 use cases. This is how they look for both solutions:
Plain text:
Solution 1:
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
ui:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat'
ui:generateKeys="com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator"
ui:generateLocales="default">
<div><ui:msg key="helloWorld" description="Greeting">Hello, world.</ui:msg></div>
</ui:UiBinder>
Solution 2:
<ui:with field='i18n' type='x.y.client.i18n.MyMessages' />
....
<div><ui:text from="{i18n.helloWorld}" /></div>
In the solution 1 the text inside the tag will be the default text and the description is in the description attribute. In the second solution you would add that in the interface class MyMessages which extends Messages.
Static method argument:
Solution 1:
<th title="Gross receipts">
<ui:attribute ui:name='title' ui:description='Tooltip text for gross column'/>
...
</th>
Solution 2:
<th title="{i18n.grossReceiptsTitle}">...</th>
Any more advanced usage of message like passing arguments is not possible with solution 2, but you can always fall back to add them in your constructor after the initWidget call.

Extract part of HTML in C/Objective-C

I need to extract the detail content of a website while preserve all formatting of the division. The section I wish to extract is:
...
<div class="detailContent"><p>
<P dir=ltr><STRONG>Hinweis</strong>: Auf ... </p>
</div>
...
My current solution is to use HTMLParser from libxml2 and xpath to find the nodes and walk through all the nodes to reconstruct this piece of HTML. This is a long an complicated code.
I' just wondering if there is an easier solution to extract part of HTML?
Thanks.
Simple Javascript solution: document.getElementsByClassName("detailContent")
Combine that with UIWebView's support for running Javascript and you might have a more concise solution.