I am working on an application where I am using Ember JS .the button click is not working on MAC devices(Pc or mobile ) but the same code is working on others.. Please help me with this
{{#view App.AddNewFirm contentBinding="this"}}
<div style="cursor:"pointer">
<button style="cursor:pointer" class="btn btn-info"><i class="fa fa-user fa-fw"></i> Add Firm</button>
</div>
{{/view}}
We've had the same problem,
The click handler bound to the view did not fire on an ipad device.
We could fix it by binding click handler directly on the button, using the didInsertElement hook, instead of using the click handler ember provides
App.AddNewFirmView = Ember.View.extend({
didInsertElement:function(){
this.$('button').click(function(){
console.log('click');
});
},
});
You could also wrap your view within a <button> </button> although i discourage this.
Related
I am using ui.bootstrap alerts to display messages to users. However, the close button does not display. I'm developing an asp.Net application environment specifically in DNN. That's the only thing I can think of that could be causing the issue.
I have researched the following articles trying to find a fix:
Close button not appearing for Bootstrap alert
https://www.tutorialspoint.com/bootstrap/bootstrap_alerts.htm
I have tried manually providing the code for the button but that doesn't fix the issue.
My code:
<!-- START alerts -->
<div class="col-md-12">
<div class="alert alert-dismissible" uib-alert ng-repeat="alert in $ctrl.alerts track by $index" ng-class="'alert-' + (alert.type || 'warning')" close="$ctrl.closeAlert($index);" dismiss-on-timeout="5000">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">
×
</button>
{{ alert.msg }}
</div>
</div>
<!-- END alerts -->
The message displays and the alert is dismissable and will dismiss itself after 5 seconds as a workaround.
What I can see in the developer console is it's trying to pull a png file that doesn't exist. I can't even tell why it thinks this file would be there as the official bootstrap examples don't show the exact same CSS as I'm seeing in my environment.
// path it's looking for: WEBSITE/Portals/_default/Skins/MyTheme/assets/img/remove-icon-small.png
background-image: url(../img/remove-icon-small.png) !important;
Any thoughts on what I else I could try? Thanks in advance.
Update: adding the missing png file to the location it's looking for it still does not cause the icon to display.
I loaded a page with an iframe inside a webpage of my site.
Now, I need to auto click the button into the iframe, after the page is loaded.
The button code is:
<button type="button" id="submit-button" class="btn trusted-commit-payment">pay now!</button>
Can anyone tell me the code to do this?
I hope this will help.
Javascript
document.getElementById("myframe").addEventListener('load', function() {
document.getElementById("submit-button").click();
});
JQuery
$('iframe').on('load',function(){
$('#submit-button').click();
});
Read this
The add button that appears over the 2sxc items is missing all of a sudden. It was there a couple days agao but now when I log into any portal in my DNN instance the "+" or add button is missing
here is a screen shot:
As you can see, the change layout and edit buttons are there. Not sure why the add button disappeared.
This is true for apps that I import from the 2sxc.org website as well. So I know its not just my template becasue it also happens on all the apps I have created which use different templates.
But to be thorough, here is my template code, its token based:
<div class="kr-gallery animation">
<p>Hover or touch image and click brush icon for more details</p>
<div class="isotope_grid isotope_grid2">
<div class="isotope_main animation" data-min-width="230">
<repeat repeat="Content in Data:Default">
<div class="isotope_item kr-gallery-item sc-element">[Content:Toolbar]
<div class="photo"><a href="[Tab:FullUrl]/details/[Content:EntityId]"> <img alt="" src="[Content:Image]?h=500" />
<span class="fa fa-paint-brush"></span></a>
</div>
</div>
</repeat>
</div>
</div>
</div>
Any idea why this is?
UPDATE:
Here is my visual query:
SOLUTION:
Based on answer, I switched to razor because I am using a custom query. Here is my simple template code now:
#* this will show an "add" button if the current user is an editor *#
#Edit.Toolbar(actions: "new", contentType: "Image")
#{
// get all images as delived from the standard query
var images = AsDynamic(Data["Default"]);
}
<div class="kr-gallery animation">
<p>Hover or touch image and click brush icon for more details</p>
<div class="isotope_grid isotope_grid2">
<div class="isotope_main animation" data-min-width="230">
#foreach(var img in images)
{
<div class="isotope_item kr-gallery-item sc-element">#img.Toolbar
<div class="photo"><a href="#Link.To(parameters: "details=" + img.EntityId)"> <img alt="#img.Title" src="#img.Image?h=500" />
<span class="fa fa-paint-brush"></span></a>
</div>
</div>
}
</div>
</div>
</div>
The missing + is by design, because editors are used to the + adding an item right after the previous one. This behavior cannot be guaranteed with a query, as the order of things is determined by the query. It is even possible, that adding an item will not show up, if a query-parameter hides that item.
So the design pattern is to provide a separate + button. The easiest way is in razor, I believe the code is something like
#Edit.Toolbar(actions: "new", contentType: "your-content-type-name")
In Tokens it's a bit more messy, and you cannot conditionally check if a user has edit-permissions.
So I recommend you go the edit.toolbar way
You can also find an example of this in the blog app: http://2sxc.org/en/apps/app/dnn-blog-app-for-dnn-dotnetnuke
I could be wrong but did you recently experiment with the visual query designer? Because this could be the cause.
The most common reason is when you use a pipeline (visual query) to deliver data to a template, which is not assigned to this instance. Reason is that "add" in a instance-list of items add it to a specific position (like right after the first one). This isn't the same when you use data like a data base - as there is no sorting in that scenario. So if this is the cause, I'll help you more.
I need help to come to the sign in page once clicking on logout button from any of the inside pages in Meteor.My code is below which does not work,
test.html
<div class="container">
Welcome <span>Deal Manager</span> | <a id="logout" href="#">Logout</a>
</div>
test.js
'click #logout': function() {
history.go("/login");
}
Hey I could try and find out the solution as below
replaced this
history.go("/login");
with
history.go(-2);
As per the pages I have replaced the path with the number.Hope this is a solution for the long run as well.
I am unable to click the Continue button present in the screen. Following is the code which I am using,
LoginPage2.driver.findElement(By.name("Continue")).click();
Two buttons are placed side by side Continue and Cancel. I am able to click on the Cancel button using the same command, but not the former one.
Following is the HTML format:
<*input value="Continue" class="btn" title="Continue" name="save" type="submit">
<*input value="Cancel" class="btn" title="Cancel" name="cancel" type="submit">
Kindly help..
Regards,
Sambit
Try
LoginPage2.driver.findElement(By.name("save")).click();
Or
LoginPage2.driver.findElement(By.xpath("//input[#title='Continue']")).click();
See your HTML elements:
LoginPage2.driver.findElement(By.name("Continue")).click();
It didn't work because By.name is wrong and it is correct in case of cancel. Instead of By.name you should use By.value("Continue") than it will work.