i need help in my problem, i'm using ajax to get data with JSON using pagination my problem is my stylesheet in the second page not working but the class (Bootstrap) working please help
Have you right clicked the webpage and selected 'View page source'?
check whether the path is correct that calls the CSS stylesheet.
Have you used the proper blade syntax to link the stylesheet?
HTML::style('css/stylesheet.css')
The following thread might help you which also applies to laravel 5.2
https://laracasts.com/discuss/channels/laravel/linking-to-css-and-js-laravel-51
Related
I have a javascript file under the following folder in my JAR component:
/src/main/resources/META-INF/resources/default/javascript/jquery.marquee.js
If I create a custom JSF component with the following #ResourceDependency annotation:
#ResourceDependency(library = "default", name = "javascript/jquery.marquee.js", target = "head")
The javascript file cannot be found, and in the browser I can see two weird URLs with undefined.css and undefined.js as part of the URL, and also referring the PrimeFaces library ??
http://localhost:8080/acio/javax.faces.resource/undefined/undefined.css.xhtml?ln=primefaces&v=5.3
http://localhost:8080/acio/javax.faces.resource/undefined/undefined.js.xhtml?ln=primefaces&v=5.3
However, if I manually include the script in a XHTML template as follows:
<h:outputScript library="default" name="javascript/jquery.marquee.js" />
Then everything works like a charm as expected, with the expected URL as follows:
http://localhost:8080/acio/javax.faces.resource/javascript/jquery.marquee.js.xhtml?ln=default
I'm completely puzzled about this.
Why, if I use the #ResourceDependency annotation, I get TWO wrong URL's, one about a CSS and another about the JS, related to the PrimeFaces resources, when I'm positively sure the placement of my own JS file is correct? (otherwise the h:outputScript would not work as well)
Tested with Mojarra 2.2.13.SP1 shipped with WildFly 10.1.0.Final, and Mojarra 2.2.12 shipped with WildFly 9.0.2.Final
Any help would be greatly appreaciated !
[UPDATE]
It looks like the the issue may be related to the way we handle page navigation. We are using a SPA approach, with a Facelet template that has a big panel group area inside, with a dynamic JSF include directive. Pages are XHTML fragments that are dynamically included in the template's panel group after an AJAX execution.
It appears that #ResourceDependency only renders the corresponding HTML resource link when a View is created the very first time. As we are using SPA, our View never changes, from the JSF point of view. We handle all the page navigation with AJAX fragment updates using the include directive.
As a test, I placed the tag of my component in the Facelet template itself, instead of a XHTML fragment... and the link is rendered as expected !
It would be great if someone can confirm this behaviour... and if there's any elegant solution to it.
So far, we have to manually include the needed HTML resources on the template definition.
It turns out that the problem goes away when upgrading to PrimeFaces 6.1. Probably Kukeltje is right, and the PF 5.3 Resource Renderer has some kind of bug.
In short, when developing your own JSF PrimeFaces components, PF 5.3 will not render the #ResourceDependency annotations of the JSF component in some situations, like the one described here: using an SPA approach with XHTML fragments.
Moving to PF 6.1 solves the problem. If upgrading is not possible, we have to manually include the needed JS / CSS resources in the fragment with outputScript tags.
I've made an Add-on which is a custom field.
The style of the text in the field changes depending on the properties of an issue.
I check which style should the text have in the .java file and I pass the html class in a variable called $indicator to the velocity template:
#if( ${value} )
<span class="$indicator">${value}</span>
#end
It works perfect everywhere but in gadgets. When I add this field to a table showing issues in a dashboard, the html code is correct, but it doesn't find the css resource. This is because gadgets are inside an iframe.
How can I make the iframe have a reference to the stylesheet?
You did not say exactly which gadget you were using, but try adding the following context within your <web-resource> module:
<context>jira.webresources:issue-table</context>
The above should work for at least Assigned to Me, Filter Results, In Progress, Voted, and Watched in JIRA 6.1+.
If that does not work, you might also try:
<context>com.atlassian.jira.gadgets:common-lite</context>
If that general context doesn't work, you can look for which exact contexts are #requireContext'ed by the specific gadget you are trying to use, and then make sure that your web-resource is listed in that context. You can figure this out by looking at the gadget's XML and then searching for the #requireContext. (You can find the gadget XMLs inside $JIRA_DATA/plugins/.osgi-plugins/transformed-plugins/jira-gadgets-plugin-*.jar)
Starting with JIRA 7 the Answer of Scott Dudley is no longer working. #requireContext was replaced with a #requireResource within the Atlassian sources of this gadget.
As it affects our plugin, I created a Improvement Request to make that possible again
I am having a big time issue with solving a problem. I have a placeholder called main for the content region of the page. I was building that region in the cms. Everything was going great until I attempted to add an embedded video contained in an iframe. When I save django cms completely removed the iframe and left an empty div. So I attempted to use prettyphoto light box to open the video by clicking on an image. The code I added to the page through the cms is:
<a rel='prettyPhoto[youtube]' href="https://www.youtube.com/embed/mqVZF_yb8C0?autoplay=1&start=1765&iframe=true" data-rel="prettyPhoto">Click Image</a>
When I saved, django cms completely removed the data-rel attribute from the link which is obviously needed for the js. So I went a step further and adapted the code of the data attribute to:
rel="prettyPhoto"
and the cms also removed that attribute! Also anytime I add an html5 tag like article of section it hates that too! What gives here? Am I doing something wrong? Any advice would be appreciated.
Aaron,
Thanks.
Please see the discussion at https://github.com/divio/django-cms/issues/1529. We use html5lib to clean the contents of the text plugin (this cannot be turned off for security reasons).
What you'll want to do is write a custom plugin (possibly one that can be embedded inside text plugins).
I have just recently implemented the five star rating system from ajax, into my asp.net site. Everything works fine in locall debug mode.However. Once i publish it, the css does not show up. I have declared all of the css within the content page, not sure if this is why. I am very in-experienced with working with css; so i am sorry if it something simple.
I have checked the spelling of the image url, and have also tried implementing it into the site.css. But as i said, i am in-experienced; so am not sure what to do here.
This is my code as it stands:
The css declared at the top of the content page:
http://codepad.org/m1w39Hep
The reference to the css from my rating control:
http://codepad.org/Kl0BKets
Thanks in advance!
Check if your css links is right and your css files loaded successfully
I have seen your code.
Give extention as ".css" and not ".c"
I dont think that you can use Codepad for that because it does not give support for CSS.
If you are not using Codepad
Then as you are deploying it in server then check the URLs of the Images that are present in the CSS file for rating/.
I'm having a problem whit this website i'm building - www.bodyheat.uk.com .
The first page (home) appears as i "wrote" in the css, but in the other ones the webpage it seems that the webpage cant call the css.
Anyone can help me on that?
TRICAT answered this
"You must have the base of your urls in the pages wrong because the css and js are using a relative url including the name of the page..
/joomla/index.php/templates/system/css/system.css
And obviously it should be:
/joomla/templates/system/css/system.css
The www.bodyheat.uk.com works because it doesn't have a page name behind the url."
But where I can change it? In what file? configuration? I saw what you said but dont know where to go to change it :(
THANKS ALL!!
You must have the base of your urls in the pages wrong because the css and js are using a relative url including the name of the page..
/joomla/index.php/templates/system/css/system.css
And obviously it should be:
/joomla/templates/system/css/system.css
The www.bodyheat.uk.com works because it doesn't have a page name behind the url.
I had this problem as well when I was creating a custom template. In the Global configurations, under SEO Settings, I turned OFF 'Search Engine Friendly URLs'. This fixed my problem.
Thanks!