eclipse - how to extend the build-in javascript libraries? - javascript

While modifing my eclipse juno 4.2 with some WebDev-Features, I am currently stuck while adding library support for JQuery, JQMobi and other.
This is my situation:
(source: codespot.com)
This would be my goal:
The Problem
Is it only possible to manipulate the build-in JS-Libraries of Eclipse through plugins or manually too?
Because, when I click on Add JavaScript library, I don't get this:
In my case, there is only User Library - how can I add other ones?!
These links were kind of helpful, but don't show a solution to my problem:
https://stackoverflow.com/a/12892508/1370465
http://www.ibm.com/developerworks/library/os-eclipse-jsdt/
http://marketplace.eclipse.org/content/jsdt-jquery#.UVB0clfAm2U

A user library represent sets of JavaScript files chosen by a user and preset through the User Libraries preference page.
Everything else is provided by plug-ins.

Related

Domino Designer - Disable Javascript Validation?

Is it possible to disable JS validation in Domino Designer 8.5.3?
I'm accessing a database design where some 3rd party JS libraries (for example the Bootstrap min JS lib: bootstrap.min.js) have been installed within Code/Script Libraries rather than in the Resources/Files section.
The problem that this creates is that the built in JS validator now displays lots of JS errors in the Problems window whenever I'm accessing this application. Not the biggest deal but it makes seeing actual errors/warnings a bit more difficult to find.
I've tried enabling project specific settings and disabling the various JS validators in the Validation section but none seem to have any effect.
I've seen people mention that it's possible to disable this validation in standalone Eclipse but I can't seem to get anything to work in Domino Designer.
Any thoughts welcome.
To my knowledge - there's no way to disable the validations except to move the JS libraries to Resources / Files.
For CSS files not even that is enough to get out of the crappy editor "enhancements".
You need change the extension for the CSS file to something else.
Don't forget to add the proper "Web Properties / Mime Type".
Once you've skipped the "help" from Domino Designer you should see a nice performance improvement...

Converting HTML + JavaScript to an exe

There is actually a topic asking a very similar thing, however the information there is either out of date (broken links, discontinued solutions) or not suitable for my needs.
I have a showcase for my graduation wherein we have the opportunity to display our work to potential employers. The interface we have to use only allows .jpg, .flv and .exe files, however my project is in HTML / CSS / JavaScript.
Is there any way I can convert my project into a .exe?
(The ways the pre-existing question's answers suggest creating an .exe are now broken links / discontinued as far as I can tell; and alternate answers suggest ways to create standalone applications which do not generate .exes, which are not fit for my purposes)
Cheers!
Most easiest way is:
1) Download Visual Studio Express Edition(Because it's free).
2) File -> New Project -> Windows Forms Application.
3) Load your current HTML into it.
4) Add WebBrowser control to your project.
5) Deploy your application(Build -> Publish).
Note:
The WebBrowser Control use IE by-default. Take a look at this alternative as well.
Welcome to 2019!
There's all kinds of different ways to accomplish this now. One popular npm package is npm pkg. There's also the popular Electron (this is what vscode was built on), and quite a few others
You Could always turn the HTML file into a HTA file and then convert it into an exe :)
https://www.vbsedit.com/
You can create a Windows app from HTML/JS.
Actually it's one of my pet projects:
Scriptonit
I've been using it for a while to create tools for myself, but just recently I decided to make it a proper freeware product. If you're not looking for something very complex and you don't need lots of frameworks & modules, this might be just what you're looking for.
You can download Scriptonit here.
You may try creating a .exe installer to you html file using Inno Setup.
You can use the setup wizard; just select the html file instead of exe when selecting the main exe file
It works somehow like an installed application, it will open in your browser but you can see in the List of Applications. (in control panel)

Multiple file upload (client side)

I'm looking for multiple file upload component with alternative ways.
I need HTML5, Flash and normal upload support, depended by device.
I don't like FancyUpload, because it uses mootools and mootools is very big library.
Also I can't use jQuery, because I'm writing on Ext js and it's not good idea to use two big library like jQuery and Ext js.
I can write it myself but I don't have a time.
If everyone knows any library like this, please post link here.
Thanks!
I am a big fan of Plupload
Here is an example of all run times supported (Flash, HTML4, HTML5, etc...): http://www.plupload.com/example_all_runtimes.php
You can also include only the run times you want.
Here is an ExtJS 4 wrapper I wrote for SWFUpload: https://github.com/JarvusInnovations/Ext.ux.SWFUpload
I'm interested in having a more robust ExtJS4 upload widget though that supports HTML5 and normal form upload too. Maybe we can build one if nothing else turns up.

jQuery and Windows 8 JavaScript Metro Style Apps

Can jQuery be used in Windows 8 Metro-style apps developed using the JavaScript API? I'm looking at the samples, and there's a lot of standard DOM manipulation like document.getElementById, addEventListener, etc. I'd like to use jQuery for productivity.
The $ is not magic. jQuery is just a javascript library. It should run fine.
The only thing that might not work are cssHooks which won't take into account any 'quirks' of their environment.
So yes, it will work, if you trust Microsoft to produce an environment that follows the HTML/CSS/JS specifications.
Do you feel lucky?
Yes, it works, as will any JavaScript library. I verified it on one of the tablets they gave out at the BUILD conference.
However, do not expect to use a CDN to load in the script. You have to download it, add it to the project, and reference it locally.
tl;dr : you can use jQuery 1.7+, but it's not (yet?) fully integrated when markup modification is involved.
Quote from the Dev Center (msdn)
Using jQuery
You can use jQuery in your Windows Store app using JavaScript, but only versions 1.7 and later. We recommend always using the latest version.
That means that it will work, but you will encounter some non-standard behaviors as listed in the HTML and DOM API changes list (msdn)
There are exceptions mentioned when setting the innerHtml property (among others : Making HTML safer) if there is unsafe markup, but this is non-blocking and the simple fact of loading the jQuery library (1.8.2) will trigger a few.
As mentioned before, you do need to use a local copy of the library (no CDN).
You can use any JS library. I suspect that methods like WinJS.xhr (aka '$.ajax') where written so that WinJS doesnt have a dependency on jQuery.
It should run fine. jQuery is just a library. The $('#someid') will internally call the document.getElementById You can use it just as if you can use the javascript code you write yourself...
JQuery should work fine but bear in mind there is some built in functionality for doing this kind of thing, in the case of your example:
WinJS.Utilities.query("#someId li")
.listen("click", function (result) {
Query Collection Documentation
Don't use any windows libraries like WinJS. Why would you want to lock yourself and be dependent on proprietary code? Stick with the usual stuff, i.e. HTML, CSS, JS(JQuery or otherwise). It will only make your future support/dev far more predictable ...
As with all third party JavaScript libraries there are a couple of things you should keep in mind.
Always try to include the .js sourcefile in your project when possible. Calling out to a CDN or external hosted location will flag you for some security checks you wouldn't normally have to go through.
I have used a couple of jQuery versions in coding my own apps. Some of them broke so keep in mind there is still no guarantee. Other libraries, like SoundJS, I used older versions that I know do work.
If you are looking for some examples of third party libraries I have some posts on Knockout and Upshot here:
http://blogs.msdn.com/b/davedev/archive/2012/05/02/connecting-to-wcf-ria-services-in-a-windows-8-metro-style-app-using-upshot-js-and-kockout-js.aspx
I have also written a free Windows Store Gaming Kit that uses third party libraries you can grab the free source for that here: http://win8gamekit.codeplex.com
Actually you can download it through Visual Studio. If you download NuGet Package Manager.
TOOLS->Add Packages & Extensions
Search the left online packages for NuGet Package Manager and install.
Then when in a project that you want jQuery, right click on your references and add a NuGet package, and search jQuery. That's what I use.

How to add Rich Text Editor to display code snippets

Im working on a Rails based application where I have the need to allow the user to format the text he enters and I would also like a way to highlight code snippets the way Stackoverflow does when I enter a code snippet.
Are there any plugins that do this.
And I would also like to know which is the RTE that is recommended and would be unobtrusive.
I see a lot of recommendations for FCKEditor but how do I implement the code snippets?
It seems like you might need something lighterweight than CKeditor. If you do choose to use CKeditor, I would use a rails plugin to install it. I use this one :
http://github.com/galetahub/rails-ckeditor
The directions are very straightforward on the git.
As for Syntax Highlighting , I recommend :
The GitHub crew loves Pygments. They are using it on many different places, including Jekyll and GitHub itself. The downside is that it's a python library so you would need to install python and execute it as a shell task.
Syntax Highlighter, jQuery Library <-- The easiest to implement
http://alexgorbatchev.com/SyntaxHighlighter/
Rails3 has these plugins :
Ruby offers 3 code highlighting Gems: Ultraviolet, Syntax and CodeRay. AFAIK, the last one is the most adopted.

Categories