download attribute not working in gitbook - gitbook

In markdown, I specify the download attribute for a file link to download the file when clicking on the link
fundebug.0.1.2.min.jst
But it is not working. After run "gitbook serve", the link will be opened in a new tab.
I checked the html which gitbook generates, it add target="_blank":
fundebug.0.1.2.min.js
I tried to override target attribute by specify target="_self", but it is not working.

Related

Image not showing in chrome extension

I have an image injected into the page from a chrome extension.
When I inspect the injected element it looks like this:
<img src="chrome-extension://edccnohanonbgondaihhbobkmhekjlpf/images/search.png" title="search">
The image does not show, but instead has the standard "not found" placeholder along with the text "search" (from the title attribute).
If I right-click the value in the src attribute and select "open in new tab", it shows the image, proving that the image exists.
I have managed to get images in chrome extensions before, but for some reason, not in this one. Are there some known limitations as to when images will work and when they wont.
I'm using:
chrome.runtime.getURL('images/search.png')
to get the image within the extension.
The difference between this extension and others is that the image is injected from a seperate source file (which is in the manifest), and called with a function call from content script (also in the manifest).
Any ideas?

Opening .pdf files using a <a href> link

I have a .pdf document in a folder called docs, that is inside of my WebContent folder.
I want to have a link to show the address to this file, so that when the user click it, he can see the document's content.
The code is this:
See document
When I execute it, I get the error:
HTTP Status 404 - /Web/docs/jsftutorial.pdf
I tested this with a .txt file, and it works, but why not with a .pdf?
Thank you!!
I found a tutorial on how to Read and open the PDF in a new browser window here:
http://balusc.blogspot.com.br/2006/05/pdf-handling.html
Now it works!

How can I get images into my Excel reports with BIRT?

I have some reports that have images that look great as web pages, or PDF, but the images are not coming over when the report is opened in Excel.
What is your birt version? Images are supported in Excel only from birt 4.3, with spudsoft xls & xlsx emitters.
For older versions that's quite more tricky but we can still inlcude these emitters, or the native excel emitter.
Use the Native Excel Emitter for Excel format, instead of default excel emitter.
You can download plugin from here:
Extract the jar using any of any of the archive software(eg. winzip, 7-zip,etc) and keep it separately.
After extracting the jar file, copy the 'jar' files in your own project's folder (webapp/web-inf/lib).
And also add the original downloaded jar (org.eclipse.birt.report.engine.emitter.nativexls.jar) into your project's folder (webapp/web-inf/lib).
And add the class path (Right click Project → Configure Build Path → Add Jar → Select the jar files you have added from the lib folder).
Note: For Maven Projects only
If you are using Maven Projects, then you should add the jar files in your maven repository.
In command prompt, type the following commands:
mvn install:install-file -Dfile=c:\kaptcha.jar -DgroupId=com.google.code
-DartifactId=kaptcha -Dversion={version} -Dpackaging=jar
Instead of follow the step 4, follow the below steps:
Right click Project → Config Build Path → Add Variable.
Select your maven repository variable.
Click 'Extend' button.
Under select your jar and click 'ok' button.
You should also add the jar files which is extracted from the org.eclipse.birt.report.engine.emitter.nativexls.jar (in lib folder)
In java, under the Excel Format option, add the following line also:
ExcelRenderOption option=new ExcelRenderOption();
option.setOption(IRenderOption.EMITTER_ID,"org.eclipse.birt.report.engine.emitter.nativexls");

How to include templates into VSIX package

I am developing a package for VS2012 and what I have there is:
A custom project template and a set of custom item templates:
Templates\Items\MyFirstItem (and more items there), Templates\Projects\MyProject
Each template item contains .vstemplate file which is set to VSTemplate build action.
A Package which registers a ProjectFactory in a way:
[ProvideProjectFactory(
typeof(MyProjectFactory),
null,
"My Project Files (*.myproj);*.myproj",
"myproj", "myproj",
#".\\NullPath",
LanguageVsTemplate = "MyProject")]
A "Create VSIX Container during the build" option is set for the project.
When I build the project I see that my templates are zipped correctly and are copied into the output folder as expected such as bin\Debug\ItemTemplates\... and bin\Debug\ProjectTemplates.
They are also installed properly into the experimental instance.
However, these templates are NOT getting included into .vsix file.
And there is the question: how do I make them included without zipping them manually and including these zip files as assets into the source.extension.vsixmanifest?
You have to add those to the source.extension.vsixmanifest designer in your VSIX project. There is an Assets section and you basically just click New, select ItemTemplate from the type dropdown, select Current solution or project, then choose your item template. Repeat for every item template.

expressionengine publish.php file not working

I have upgraded the version to 2.5.2 of expressionengine..
in my old version in themes/cp_themes/default/content/publish.php file, have added a custom javascript code and code php too, because whenever I publish or edit any entry from admin side I want to open a window on a button click event.. on that button click event I passed a url to and opening a window which having map.. n that was working excellent..
Now issue is that in my new version 2.5.2 its not working, even not showing that HTML button as well. In Actual publish.php file is not calling.. I have put php exit(); on top of the file.. N I found that, the file publish.php is not calling..
So plz help to for that, I want to apply same changes to my latest version as was in my old version.. So, that in which file have to write that code..??
Can anybody Help me.. Please ASAP..
Thanks,
Jatin

Resources