Creating WebStorm shortcut to navigate to another file basing on current file name - angularjs

I'm developing AngularJS app and I have file one-two-three-directive.js opened. I'd like to have/create a shortcut which will navigate to file one_two_three.html in the same project (dashes turn into underscores and there is no directive word).
Is there any way to achieve this (any existing plugin or other way will be appreciated).

Not currently possible out of the box, related ticket: https://youtrack.jetbrains.com/issue/IDEA-265643.
I'd suggest checking the Angular Component Folding - see if it works for you

Related

Show React Native app in "Open in" dialogue of another app

I'm new at creating React Native apps and I would like to know if there is a doc or a package that allow us to open my app from an external one by clicking on the "share" button, that open the "open in... / share" dialogue modal
Thanks by advance
EDIT :
I have read the instructions given in the following link : React Native Share Extension
but the thing is that it asks to edit some Java files for Android, and other ones for iOS. Since I'm working with javascript files, where am I supposed to find the files the documentation tells me to edit ?
There is nothing built-it to do this, but there's also some useful packages for doing that, the catch is that you will need to write some native code to make it work
first there is React-native-share-extension forn handle share intents, and for more advanced stuff there is react-native-deep-link for handling for example an url of a video, or a download url, or a mail intent .
Both packages requires to edit native ;-;

Access Specific PDF Page in WPF WebBrowser Control

I have a webbrowser control in my application that is used to display pdf files that have been created in iTextSharp and are stored locally on the hard drive.
I would like to be able to navigate the file (next, previous, first, last, toc) from my application rather than using the inbuilt nav of the reader in the browser.
I have seen that you can navigate to specific pages by using
Browser.Navigate("filename.pdf#page=?);
This works the first time but when trying to navigate to a different page, it makes the browser disappear completely with no errors. However, I can reload the file without problem if I don't have the #page=? suffix on the file url though. Any ideas on this?
Alternatively, is there anyway in iTextSharp of adding something to the file to allow for it to be navigated from an external command?
All the official parameters that can be used to navigate through a PDF using parameters in the query string after the ? character are listed in a document published by Adobe: Parameters for Opening PDF Files
You already mentioned the page parameter. Another option could be using named destinations: nameddest=destination. In this case, you need to add the anchor with name destination to the file using iTextSharp.
Note that not all viewers implement these parameters. Adobe supports them in Adobe Reader and in the Adobe Reader plug-in, but there is no guarantee that they will work in pdf.js (Firefox), Pdfium (Google Chrome),... If your browser disappears when using an open parameter, you may have hit a bug in the browser or the viewer plug-in that causes the browser to crash. iTextSharp nor iText can crash a browser ;-)
There are no other ways you can navigate a PDF from an external application. The only thing you can do, is to add JavaScript to the PDF so that it always opens at the same page. This is done using an open action. I don't think this solves your problem as it would mean that you have to change the PDF file every time you want it to open at a different page.

correct way to add js in sencha architect (ExtJS)?

This thread works well in a mobile app but in a desktop app it would seem I cant add the reference to the external JS in an extjs desktop app.
The instructions from Sencha somehow don't correspond or it doesn't work for me when I try and follow them. So, I am selecting Resources->Library and can see the attribute Include JavaScript (ticked) and Library Base Path:/ext.
The JS file I am using I use in a phone app and its fine - I added it to the app.json in that and compiling the app copies the file over to the target and defers the loading.
In this case with SA I am not seeing the file copied to the target - nor can I follow the instructions with SA 3 that are documented. The only way I can add an external JS is by dropping it onto the filesystem into the ext folder manually. Again, it doesn't appear in the target and certainly errors when I run the app with
Uncaught ReferenceError: hex_sha512 is not defined
This JS has been used in other apps, is proved and tested but just relates to SA or my wrong use of SA.
The proper way to add a resource in Sencha Architect, regardless of framework, is to add it as a JS resource.
This is most easily done by hitting ctrl-t (or cmd-t on a mac) and typing "js resource" (or some shortened string thereof to get autocompletion)...
Alternatively, you can use the toolbox, click "Resources", and drag out or double click "JS Resource"
These are just different user interfaces to accomplish the same task.
Once you've added your JS resource using one of the above methods, you need to set the URL in the config pane (at bottom right unless you've configured Architect to swap the left and right panes)...
The URL is to be set relative to your project folder. If you copy the JS file into your project root under a folder called "lib" for example, then you'd set the url config to "lib/foo.js" - where foo.js is the filename, of course.
Hope that helps!
My lack of understanding of the instructions or they are not clear:
It would seem the way to do it is take eyes up to the top right of SA and spot the + button as shown in the image.
Add the JS resource and scroll up because it may be hidden behind the property inspector.
On setting the url field under properties, the source of the JS appears in the main editing window.
Certainly works fine after the app is built.

Deploying AngularJS Seed application in WebStorm

I recently started to learn about AngularJS and came across WebStorm and the AngularJS plugin by John Lindquist. Started by creating a new project using the angular-seed project and imported to WebStorm using File -> Open Directory. My directory structure looks like this
Now when I try to Debug it I get a 404 error. If I move the file app/index.html to the root folder and adjust all URL's to begin with app then it works fine. Is there a way to keep the default folder structure without moving the index.html to the root folder and also make it work with WebStorm?
I am using WebStorm 6.0.2.
I use WebStorm 7, so there might be some discrepancy in comparison with version 6 that you're using, but the over-all functionality is the same.
Quick solution:
Open the file in the editor and right click in the code to access the context menu. Choose the "Debug" option, which should start a debug session pointing to the current page.
Configuration solution:
WebStorm supports configurations for setting up different debugging scenarios. From the "Run" menu, choose the "Configurations" option. Add a JavaScript debug configuration, and add the URL you want in the designated field within the dialog presented.
Then, when you initialize a debugging session (a general one, not one for a specific page), you're presented a small dialog that allows you to choose a debug configuration.
Maybe there are more options or ways to accomplish the same thing as well, but I've never really given it more thought. I hope this is a working solution for you, but if not there's alway the documentation. If you need further clarification with regard to my answer, just give me a comment.

dnn - upload an image to portal and use it in html module?

how do i upload an image to the portal and use it in my html of my html module?
i have an html module i want to use and part of it is an image. how do i upload to my portal and then reference the url where it is on my server inside my html?
In case you didn't see my comments on the other one. One way is to just find the file on the hard drive and figure out the link manually in relation to your web root. But if you are using this as a portal system then this might not be the best solution.
There is also upload option right withing html editor. click on image manager icon and it will give you the option to upload an image.
alt text http://images.devs-on.net/Image/rw5tTdgNRgs22f1-MyWebsiteHomeAlp.png
alt text http://images.devs-on.net/Image/YjlGTN1GTUVMR1p-MyWebsiteHomeAlp.png
If your HTML is being put in the DNN HTML module, you could also use the media picker baked in.
If you want a more integrated option, you could use the DNN FileManager API to accomplish integrated uploading and retrieving of files. The DNNFilePickerUploader might come in handy for this, which will give you a DNN file ID which you could the use to get the image url.

Resources