XFDF pdf opening in same window in IE - django

I'm working on a project that collects data from the project then displays it using xfdf to populate a .pdf file. Now when I use Chrome or Firefox it opens in a new tab which is exactly what I want, but some of my clients will be using IE, which opens it in the same window and causes some confusion. What area of the code should I be looking at in order to tackle and solve this problem?
I can show code examples, just let me know what I need to show.
Thanks,
Steve
Edit: When I click 'Print Application' button, it asks me to save or open the file. When they click open, it opens in the same tab, I want it to appear in a new tab.

In my experience, the best way to accomplish this is to alter your template linking to the PDF. For example:
Clicky!
This should work in all browsers.

Related

xcode change the console output to terminal 9.1

Hey guys i'm learning about algorithms at the moment and I have written the Lee algorithm.
What I'm trying to do now is highlight the shortest path it finds in red text in the console.
I found this thread which explains what it is I'm trying to do however the option is no longer there in xcode 9.1
The answer: Output bold text to console in C (on Mac - Xcode)
When I go through edit scheme > options > run the tickbox is not there, any ideas?
I had the same problem. Solution:
instead of 'edit scheme' click 'new scheme', give it a name and save
now choose that new scheme you've just created and click 'edit
scheme'
go to the 'Info' tab and in a menu 'Executable' choose
'Other...'
in file window go to search input field and type
'terminal' and click on its icon when you find it. Now you should see 'Terminal.app' in 'Executable' field
go to the 'Arguments' tab, click on + and copy and paste this line there: ${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}
click 'close' and run your program with your new scheme selected
Normally Xcode will open terminal for you. If not, you may also turn off any debug related fields in the 'Info' tab. Hope this helps!
Full tutorial here:
https://www.raywenderlich.com/163134/command-line-programs-macos-tutorial-2
when in edit scheme > options > run, by default it would be under info tab. That checkbox will be available under option section

Display template for content search webpart issue for datatable and Tabs

I have developed display template and using it in Content search web part.
For displaying result on page i am using JQuery datatable/JQuery Tabs in display template.
Everything works fine, but sometime while loading page i am getting error like ("Object doesn't support property or method 'dataTable' (OnPostRender: )" and for tabs error is "Object doesn't support property or method 'tabs' (OnPostRender: )").
And if i refresh page many times then error will go and result is display as code.
I have register JQuery, JS and CSS using $includeScript.
I have also tried with RegisterSod for JQuery and JS file but still issue is same.
Thanks in Advance.
Can be:
This error usually occurs when an html element id has the same id as some variable in the javascript function, try change the name.
If you put the code I'll be able to help you better.
test = button.attr('test'); // Object doesnt support this method
$test= button.attr('test'); // works fine
Or debbug your code with and discover your problem. Enable script debugging IE:
In Internet Explorer, choose Internet Options from the Tools menu.
In the Internet Options dialog box, click the Advanced tab.
On the Advanced tab, under Browsing, clear Disable Script Debugging.
Click OK.
If you have IE 8+ click here
Tutorial Using jQuery dataTables: link here

How to show "edit image" in Sitecore experience editor?

In sitecore "content editor" we can use the "image editor" by clicking "edit image" in the data section, but in the experience editor it is not visible.
is there a way to make available for editors to use the image editor? or this behavior is a sitecore standard?
thanks for help
Picture field
I've just written it up in a blog post.
First you'll need to add a new button under
/sitecore/system/Field types/Simple Types/Image/WebEdit Buttons
You can duplicate one of the existing ones and change the icon and text yourself. Make the contents of the Click field:
chrome:field:editcontrol({command:"webedit:changeimage"})
(there's already a webedit:editimage so we can't name it that).
Open App_Config\Include\Sitecore.ExperienceEditor.config and duplicate the entry for webedit:chooseimage. Change the command name to webedit:changeimage as per above. Then change the type to the class you will create below.
If you have access to a decompiler, take a look at the existing command Sitecore.Shell.Framework.Commands.Shell.EditImage as well as the existing command
for selecting an image in Experience Editor Sitecore.Shell.Applications.WebEdit.Commands.ChooseImage. You'll see that they're similar, but unfortunately they use two different
methods of opening a dialog (Windows.RunApplication and SheerResponse.ShowModalDialog) so we can't reuse the existing class as-is. I have created a class that uses a bit of both (link below).
Create your class (eg. EditImage.cs), make it serializable and inherit from WebEditImageCommand like the other EE buttons. I have posted the full class as a gist for you.
When you select an image in the Experience Editor, you should now have an extra button in the list which opens the image editor in a modal window when clicked.
You need to do next steps, is not the most elegant way but you can do it:
In the Experience Editor, click the image that you want to edit, and in the floating toolbar that appears, click More and then Edit the related item. This opens the item in the Content Editor, from where you can scroll to the field that contains the image and click Edit image.

Word 2003 Template - document saving

We have a word 2003 template we use as the basis for a configuration sheet for a system. The whole thing is based around form fields and the template is then locked. To write a new document we double click on the template, fill in the form fields, save and off we go.
The problem Ive got is that when finished writing in the "doc" file and closing or saving I always get a dialog asking if I want to save changes to the template as well. Even if I just double click the template "dot" file so that a blank "doc" file based on this is opened and then close that document straightaway I still get the save template query.
Is there anyway I can get rid of it as its damned annoying to everyone who uses the template.
Many thanks
Further note:
I've just had Word 2003 opened with no documents or templates opened. I use file open and open the template. Once it is open I then close it again. No "do you want to save" messages. I then use windows explorer and double click on the same template to create a document. I wait til the document is sitting in word ready to use. I then click close again without typing or changing anything - After the do you want to save changes to "Document 2" which I say no to, I then get the "do you want to save the template" message.
Further further note:
I have now tracked this to some code I have that adds a toolbar and buttons. within this code is a line customizationcontext = Thisdocument and then the toolbar and buttons are created. If I change the line to CustomizationContext = ActiveDocument I then do not get the prompt for saving when I close a document created from the template. I do however now get the prompt if I open the template and close it without changing anything(also the buttons I added do not appear correctly (but they do appear in the document))! I can live with this though as it is preferable than the other way round.
The most common reason for this to happen, is that one of your formats (paragraph or other) is marked to update the source template if changed.
Check all the used formats in your template if the option to save back changes is activated and de-activate this option - the same applies to any .doc already created from this template since it will carry over this option.
To check your formats (in Word 2003), open the sidebar for styles and formatting, change the filter at the bottom to "Used formats". Move your pointer over the format you like to inspect and select the action "Modify..." from the pull down menu at the right.
On the bottom right - just above the OK-button - you'll find the checkbox labeled "Automatically update".
See also Automatically update a paragraph style.

Opening a file from a Qt URL

I'm coding a small and basic error tracker with Qt. The whole application is in a QTable.
Each error is linked to a file ; so, one of the columns of my table deals with that. I have a QLabel and a button next to it ; you click on the button to select a file, and then, the label displays the name of the file.
What I'd like to do now : the QLabel appears as a link, and when you click on it, it opens the file (with whatever app is associated to the file's extension). I'd rather it in the form of a link, because it's more obvious for the user. If I don't manage to do it, I'll go with a home QLabel herited class with a click signal, but it's not quite the same thing.
So, is what I want to do possible ?
And how would you do it ? Thanks in advance for your help !
You can use html in QLabel's text, so lets use that. Then set the QLabel to automatically open the link:
ui->label->setText("Link to file");
ui->label->setOpenExternalLinks(true);