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.
Related
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'm trying to create a quiz app on Meteor and have had trouble setting up Iron Router forever. I'll try to give a visual:
This is the front page:
Image 1
When a user clicks on the button shown above, I want the first question to show up, whose contents are filled from MongoDB.
Image 2
This is what my router looks like ("question" is the name of the question template, as seen in image 2):
Router.route("/quiz/:_id", {
name: "question",
data: function(){
return Quiz.findOne(this.params._id);}
});
Now, in order for me to get from image 1 to image 2, I have to use a mongo object _id in the html file.
<template name="main">
<div class="jumbotron">
<h2>
Welcome to Simple Meteor Quiz app!
</h2>
<p>
To try it out, simply click "start" below!
</p>
<p>
<a class="btn btn-primary btn-large" href="/quiz/cieLkdzvGZPwrnZYE">Start</a>
</p>
</div>
</template>
When I click "Next Question" on image 2 to go onto the 2nd question, it doesn't work. I don't know how to make this process dynamic.
The way it looks to me right now is that I physically have to create a new route for every single question, which would look really ugly really quickly.
Any way to help implement Iron Router in this scenario? I read Discover Meteor and thought I fully understood how Iron Router works, but the more I try to fix this, the more I get confused.
Edit:
To solve my dilemma, I simple created a helper function which I could place behind the /quiz/ in the main template to lead me to the quiz question, based on a suggestion by Michel Floyd.
So the helper ends up looking like this:
Template.main.helpers({
nextQuestion: function(){
queue = Quiz.find().fetch();
return queue[0]._id;
}
});
Then attached to the URL like this:
<a class="btn btn-primary btn-large" href="/quiz/{{nextQuestion}}">Start</a>
Basically just spit out the first _id of first item in the array by making the collection an array via find().fetch(). Will probably randomize the _id at a later time.
You need a way for each template to know what the next question is. For example you can add a nextQuestionId key to your Quiz object. Then your template can be:
<template name="main">
<div class="jumbotron">
<h2>
Welcome to Simple Meteor Quiz app!
</h2>
<p>
To try it out, simply click "start" below!
</p>
<p>
<a class="btn btn-primary btn-large" href="/quiz/{{nextQuestionId}}">
Start
</a>
</p>
</div>
</template>
I'm getting the following error Uncaught No Chrome Web Store item link found.
I have the link tag installed my in header app as required
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/ighphffjhlbfaomehoboceklndcfknfh">
<div class="hidden-xs visible-sm visible-md visible-lg"><a style="margin-top: 10px;margin-right: 15px" href="#" onclick="chrome.webstore.install()" class="btn btn-sm btn-info pull-right">Linkly Chrome Extension</a></div>
You can see the issue at https://linklyapp.com
the error actually explains itself pretty well it can't find
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/ighphffjhlbfaomehoboceklndcfknfh">
in the source code. So it's probably missing. How do you add it to the head? If you need to edit the head you just need to add <head>code here</head> in your meteor html files.
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.
I am creating a macro with Excel VBA that will submit an entry into an online database using information from an Excel spreadsheet. During this entry process, the macro needs to click on a CSS button. It isn't a form button, does not have an input type, no name, no id, and no source image except for a background image. I think my only hopes are either to click on the button based on the div class. Can anyone help?
The button is here :
<div class="v-captiontext">
By Ankit
</div>
<td class="v-tabsheet-tabitemcell v-tabsheet-tabitemcell-selected" style="">
<div class="v- tabsheet-tabitem v-tabsheet-tabitem-selected">
<div class="v-caption" style="width: 39px;">
<div class="v-captiontext">
By LOT</div>
<div class="v-caption-clearelem">
</div>
</div>
</div>
</td>
Thanks to Remou's answer on this thread: Use VBA code to click on a button on webpage
Here is a first stab in your issue, you could try this:
Set tags = wb.Document.GetElementsByTagname("div")
For Each tagx In tags
If tagx.class = "v-caption-clearelem" Then
tagx.Click
End If
Next
Yet, I've never tried to use the Click method on a div.