Richtext Field buttons not working in IE - xpages

It seems that the certain richtext button just does the field refresh and hence nothing gets changed. So, after selecting the text in the editor if we try to perform any of the below "yellow marked (in the image) " operation it just refreshes and nothing happens.
I am using domino 8.5.3 and I have tried IE 10, 13. Any suggestion, or should I just report it as a bug?
Public Link (for testing): http://teamground.de/test.nsf/home.xsp

Domino 8.5.3 comes with CKEditor 3.2.1.6 http://www-01.ibm.com/support/knowledgecenter/SSVRGU_8.5.3/com.ibm.designer.domino.ui.doc/wpd_whatsnew.html?cp=SSVRGU_8.5.3%2F1. Searching the web I can see lots of issues of versions of CK Editor not working on Internet Explorer 10.
You may need to upgrade Domino to have a version of CKEditor that is supported by Internet Explorer 10. Domino 9.0 FP2 packages a version of CK Editor that supports Internet Explorer 11 http://per.lausten.dk/blog/2014/08/xpages-and-domino-9-0-1-fp2-upgrades-to-ckeditor-and-dojo.html

Thanks to Paul Withers and Per Henrik Lausten. It is partially a duplicate question as marked here.
The solution mentioned in the answer is precisely for IE 10.
However, I faced a problem because of the IE version. I thought I will just document it for others. IE 11.0.9 responds "unknown" and hence it doesn't change the response header. I designed a small function for later versions of IE. Hopefully this could help anyone:
function isIE() {
var isBrowserIE = false;
if (context.getUserAgent().getBrowser() == 'Unknown') {
var userAgent = context.getUserAgent().getUserAgent();
if (userAgent.indexOf('Trident/7') > -1 && userAgent.indexOf('rv:11') > -1) {
isBrowserIE = true;
}
}
if (context.getUserAgent().getBrowser() == 'Microsoft Internet Explorer') {
isBrowserIE = true;
}
if (context.getUserAgent().getBrowser() == 'IE') {
isBrowserIE = true;
}
return isBrowserIE;
}
And then as suggested by Per Henrik Lausten we could render the response header to IE 9 (would just copy it for one click answer)
<xp:this.beforeRenderResponse><![CDATA[#{javascript:
if (isIE()) {
var response = facesContext.getExternalContext().getResponse();
// Use IE9 mode because of CKEditor bugs with IE10
response.setHeader("X-UA-Compatible", "IE=9");
}
}]]></xp:this.beforeRenderResponse>

Related

Admob issues on Xamarin iOS apps with Admob SDK version 6.12.0

I am currently using the Google AdMob Xamarin component (version 6.12.0 - see https://components.xamarin.com/view/googleadmob) to display DFP interstitials and banner ads (displayed at different points within a tableview) on an iOS app. When I am debugging in Visual Studio 2013 I get the following output:
<Google:HTML> You are currently using version 6.12.0 of the SDK, which doesn't
officially support iOS 8. Please consider updating your SDK to the most recent
sdk version, 6.12.2, to get iOS 8 support, including a fix for smart banner
rendering in landscape mode. The latest SDK can be downloaded from
http://goo.gl/iGzfsP. A full list of release notes is available at
https://developers.google.com/mobile-ads-sdk/docs/admob/ios/rel-notes.
According to the Xamarin component's page, 6.12.0 does actually support iOS 8. Should I ignore the warning that I am getting? If not, how do I go about using 6.12.2 when the newest version of the component is only 6.12.0? Is it OK to stay with 6.12.0 or will it cause issues?
I have noticed that the banner ads aren't really displaying in the correct location on iOS8, they are slightly to the right and down from where they should be. Is this because of the SDK or some other change in iOS8 regarding how cells are displayed?
Below is how I display the banner ad:
public void InitialiseBanner(AdMobView property)
{
_bannerViewDelegate = new AdMobBannerViewDelegate();
_bannerView = new DFPBannerView();
float x = (CurrentWidth/2) - (AdvertWidth/2);
_bannerView.RootViewController = this;
_bannerView.BackgroundColor = UIColor.White;
_bannerView.Delegate = _bannerViewDelegate;
_bannerView.Frame = new RectangleF(x, 5, AdvertWidth, 50);
View.Frame = new RectangleF(0, 0, CurrentWidth, 50);
View.AddSubview(_bannerView);
_bannerView.AdUnitID = "/**UNITIDREMOVED**/" + property.AdAlias;
GADRequest request = GADRequest.Request;
.
.
.
_bannerView.LoadRequest(request);
View.BringSubviewToFront(_bannerView);
if (DeviceHelper.IsIos8OrGreater && RespondsToSelector(new Selector("separatorInset")))
{
_bannerView.LayoutMargins = UIEdgeInsets.Zero;
}
}
As for a normal banner, try loading your AdView Like this:
(This is my working example)
As a class level declaration, type this:
GADBannerView adView;
bool viewOnScreen = false;
// Get you own AdmobId from: http://www.google.com/ads/admob/
const string AdmobId = "<your admob id>";
Then in your viewDidLoad you can specify position of your banner and load it:
adView = new GADBannerView (size: GADAdSizeCons.Banner, origin: new PointF (0, UIScreen.MainScreen.Bounds.Height-100)) {
AdUnitID = AdmobId,
RootViewController = this
};
adView.DidReceiveAd += (sender, args) => {
if (!viewOnScreen) View.AddSubview (adView);
viewOnScreen = true;
};
adView.LoadRequest (GADRequest.Request);
I get the same error as well, but it doesn't actually matter. I also thought first that this was the issue but my setup was a bit wrong, i think that is the same for your code. In my example i just added my AdView to the MainView, but using custom cells you should be able to implement it in your UITable View. Also, have a look at the example provided in the components section. As for displaying DFP interstitials: There has to be something wrong with the setup as well, but i can't see it in the code you provided.

How hide header menu except repository in ALFRESCO5

I would Delete all voices in alfresco header menu excpet the repository voices how i can do there some template file to modify?
I tried with share-config.xml and share-config-custom.xml and nothing happened![enter image description here][1]
For hiding menu from alfresco share you will need to extend header.For the same you need to have some knowledge regarding "DOJO".In alfresco 5.0 for headers ,It is highly dependent on dojo. I have created one module for which code is like below which is written inside share-header.get.js.Location where you need to put file is shown in image.
var sitesMenu = widgetUtils.findObject(model.jsonModel, "id",
"HEADER_SITES_MENU");
if (sitesMenu != null) {
// Hide the site finder...
if (user.isAdmin) {
sitesMenu.config.showCreateSite = true;
}
else {
sitesMenu.config.showCreateSite = false;
}
}
Have you tried the 4.2 method?
http://blogs.alfresco.com/wp/developer/2013/09/04/customizing-the-share-header-menu-part-1/
http://blogs.alfresco.com/wp/developer/2013/09/04/customizing-the-share-header-menu-part-2/
http://blogs.alfresco.com/wp/developer/2013/09/04/customizing-the-share-header-menu-part-3/

Extension Library Name Picker gets local Names.nsf even though DB is on server

I have a Name Picker on an XPage with a dataProvider dominoNABNamePicker with the addressBookSel = all-public and people and groups = true. With the database on a Domino server using the Notes Client it displays my local Names.nsf. If I open the DB in a brouse it selects the correct names.nsf from the server.
Can't figure out if this is the result of settings in my client, the server or XPages. Does the same thing on two different PC's.
I would think that the all-public would force it to open only public NABs but it does not appear so.
I asked the same question myself.
The answer, in the control add
addressBookDb="SERVER!!names.nsf"
From here.
Can I have the extlib name picker running in xPINC lookup the directory on the server?
After a fair bit of frustration I have this working for the Notes Client and the Web Client. Perhaps this is obvious to most of you, but it sure wasn't to me.
First on the Name Picker I created a namePickerAggregator. Then I added a dominoNABNamePicker
in the addressBookDb I put the following SSJS:
var server:String = #Name("[CN]",session.getCurrentDatabase().getServer());
var allNABs:Array = session.getAddressBooks().iterator();
var pubNABs = new Array;
var privNABs = new Array;
while (allNABs.hasNext()) {
var db:NotesDatabase = allNABs.next();
if (db.isPublicAddressBook()){
pubNABs.push(db.getFileName())
} else {
privNABs.push(db.getFileName())
}
db.recycle()
}
if (pubNABs[0] == ""){
return privNames[0];
break;
} else {
return server + "!!" + pubNABs[0];
break
}
I then added a second dominoNABNamePicker with the same block of code except the return is
if (pubNABs[1] != "") {
return server + "!!" + pubNABs[1];
break;
} else {
return "";
}
This code works for both the Notes Client and the Web client so I'm now a happy camper, unless I find a gotcha somewhere.
Here is what I eventually did. I set a limit on the maximum number of address books (not great but it works) of 4 you can create as many as you want. So I created a couple of sessionScope variable that I created in the after Page Loads event on the XPage. I used this formula.
var allNABs:Array = session.getAddressBooks().iterator();
var pubNABs = new Array;
var privNABs = new Array;
while (allNABs.hasNext()) {
var db:NotesDatabase = allNABs.next();
if (db.isPublicAddressBook()){
pubNABs.push(db.getFilePath())
} else {
privNABs.push(db.getFilePath())
}
db.recycle()
}
sessionScope.put("ssPublicNABs", pubNABs);
sessionScope.put("ssPrivateNABs", privNABs);
because I use several different Name Pickers on the same page I did not want to repeat having to cycle through the Address books.
Then I created 4 NamePicker controls and added 1, 2 , 3 and 4 dominoNABNamePickers providers to each of the successive controls. Then set the rendered property based on the number of public Address books so they would not blow up on me. The db name property on each of the providers is :
var server:String = #Name("[CN]",session.getCurrentDatabase().getServer());
var pubNABs:Array = sessionScope.get("ssPublicNABs");
return server + "!!" + pubNABs[0];
where pubNABs[n] returns the correct filePath for the NAB. It works well in both Notes Client and the Web.
Then to make it not blow up on a local disconnected replica I created 4 more controls and did the same thing but used the privNABs with appropriate rendered properties so that there is no conflict. Seems like the long way around and I'm sure that there is an easier way, but it works.

Calling HtmlPage.PopupWindow from ChildWindow.Closed event

Context:
Silverlight 5, 64 bit, Win7, VS2010
Expected: a new Browser Window/Tab opens up for the url passed in.
Actual: no new browser window ot tab appears.
Code Sample: (called from ViewModel. The View is a sdk:ChildWindow.
AddRelatedIssueDialog dialog = new AddRelatedIssueDialog();
dialog.Closed +=
(s1, e1) =>
{
if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
{
var window = HtmlPage.PopupWindow("www.goole.com", "_blank", null);
}
};
dialog.Show();
We have also tried Prism events to do the same thing but with no joy...
Also have included the on the control host - but again no luck.
Any help much appreciated:
Cheers,
John
Try this:
HtmlPage.Window.Navigate(new Uri("www.google.com"), "_blank");
It works for me :)

Embedded media player gets inconsistent currentPosition on both IE8 and Firefox3

I have a embedded media player in the browser that is controlled by javascript to handle all the mediaChange event. The code looks like
mediaChangeHandler: function(media) {
if (media && this.offset && !this.offsetJumpPerformed) {
if (parseFloat(media.duration) > this.offset) {
pos = parseInt(pos);
this.getPlayer().controls.currentPosition = pos;
alert("jump to position: " + this.getPlayer().controls.currentPosition);
this.play();
this.offsetJumpPerformed = true;
alert("currentPosition:" + this.getPlayer().controls.currentPosition);
}
}
}
The first alert indicates the currentPosition is where I want it to be. However, the second alert would get currentPosition that's couple seconds less than what I have set up.
Does anyone have idea why? I tried googled it but haven't found anything useful. Thanks!
This is a bug introduced with WMP10 and present also in WMP11, while Windows Media Player 9 worked perfectly. I didn't find any workaround to correct this behavior...

Resources