Configure PrimeUI with web application - html

I'm new to prime-ui (PrimeUI is a spin-off project from the popular JSF Component Suite, PrimeFaces). I have downloaded prime-ui-0.8.bundle.zip file from http://www.primefaces.org/downloads.html . I want to configure it with my simple web application having html pages. I don't know which css and js files do I need to include so that it will start working.
Please help.
Thanks

You need to files two be located in your page. prime-ui-0.8.min.css and prime-ui-0.8.min.js. These two files are in production folder of the zip file you downloaded. You also need jquery.js and jquery-ui.js in addition to the themeroller theme.

Related

ZF2 versioning of assets to avoid caching of old files

I have a ZF2 project where I generate, minify, etc... my assets via gulp. For example I generate a styles.css file which gets included with the ZF2 headlink view helper:
echo $this->headLink()->appendStylesheet($this->baasePath('assets/css/styles.css));
Now I have the problem, that the file gets cached by the browser and does't notify any changes. Does anyone know a way to handle that? Maybe add a version number to the generated css file, but then I really don't want to edit all the ZF2 templates which inlcude that file.
Thanks for any reply.
There's a load of ways to do this, but one option is to use Assetic - a well known asset manager package. Tere's a few ZF2 modeules to help integrate this library into the framework too. A quick google search throws up some:
https://github.com/magnetronnie/zf2-assetic-module
https://github.com/kriswallsmith/assetic/
This module will help manage assets such as CSS/JS, and also has some "cache busting" features where by you can change the url based upon the file modification date to ensure if changes when ever the file is re-downloaded by the browser.

How to correctly deploy a FLEX\FLASH swf application?

I am absolutly new in Flex and Flash and I have the following problem.
I have to work on a Flex 4 project made by someone else in the past using the Eclipse plugin and building it using an ANT script (but I think that this is not so important).
After that I run my ANT script it build my project into this target folder:
So, as you can see in the previous image, the building project have created the target content corresponding to the Main.swf file (that I think is the Flex\Flash application), the asset directory (that contains some resources used by the application: fonts, incos, images and CSS) and the flexmonster directory that should contains something related to a library that generates table.
My problem is: now how can I deploy this application?
I saw this video tutorial: https://www.youtube.com/watch?v=z0YTZm1v7qQ&t=326s
but in this tutorial show that the project generates also an html that is linked to the swf file (but doesn't show the HTML content, in the tutorial seems to be autogenerated).
How can I try to execute my application? (into the browser)
Are there some difference in the deploy of a Flex and Flash application or are the same thing?
You should:
embed the swf, see: How to embed a SWF file in an HTML page?
transfer the files inside the target folder (including the embedded html for example) onto your server.
But you should ask in your company how they embed the swf, may it is delivered from the JAVA-application and not in plain HTML.
To correctly deploy a Flash or Flex web app you require to:
Create an HTML file which will embed your .swf file using SWFObject.
The SWFObject JS library.
Put those two files in your 'target' folder, then upload the 'target' folder to your web server.
Here's a quick tip for steps 1 and 2:
In Flash Builder you are going to see at the top a button with an icon that looks like a globe with an orange arrow, it is the Release Build button. Press it.
Flash Builder is going to generate a very similar folder to your 'target' folder. Copy and paste the .html and .js file into your 'target' folder.
Now you can upload your 'target' folder to your web server (via FTP or admin panel).
Just copy target folder files to your production web location.

How to manage eqFTP in Brackets to download files from server to pc

I am new to Brackets and I cannot find a solution to my problem.
I have a website and it has a CMS with lots of templates and css in different folders.
I need to modify all of them, one by one, changing styles, adding content and markups and so on.
I just started using Brackets and just installed eqFTP in it following the guide and set everything.
Now how can I download, using eqFTP, all templates and css from the server to my folder project in my pc so I can modify them and upload them all from brackets?
For example: if my templates are in public_html/templates and css are in public_html/styles/ how can I tell to eqFTP to download them in folder project?
dev here.
You should create new connection and then connect to your server, you'll see file tree and you want to right click on folder/file you need to download and choose 'Download'. For files you can actually use doubleclick which will download and open that file.
Hope this helps.

Upload files from external library?

I've added my cms as an external library in PhpStorm:
I just wanted to know if there is an option to upload (deploy) these files too? I always have to switch to my cms and open it itself as a project to be able to upload its files.
I've found nothing in the documentation also.
If it's not part of the project root/outside of the project -- then no.
But you can make it part of the project by:
adding it as Additional Content Root (Settings/Preferences | Directories) -- it will be listed as additional node in the Project View panel (similar to actual project's main folder)
or just symlink it (e.g. a subfolder inside the project root that is symlink to outside folder).
Please note that in both cases such folder becomes part of the project so the search routine will take those files into consideration as well as other functionalities (find usages; look for errors in a code; TODO's etc.). You may also accidentally edit your CMS core files and IDE will not tell you anything (in case of External Library it will notify you about this).

What is the best way to add a Dart hello world into my existing Node.js website?

I have been reading tutorials and guides concerning this but have not found a straight forward answer to this.
I currently have an existing website running on a node.js platform, locally on my computer.
Goal: Now I want to try and write a simple hello world in Dart, export it to plain JavaScript and see it work in my existing website.
Reading the documents, I read that I should create a new "Web Application" and to create some sample code up and running, I check the "Generate sample content" box.
And my project is now created in Dart Editor:
I can run the sample in Dartium, see it work, etc.
But the problem is that I have now a .html file in the Dart-project, while I have a real .html file for my existing node website in a totally different path. I don't want that. I want to try and use the existing .html instead, since.. thats my real website.
But when trying to create a new Dartium launcher, I can only refer to .html files within my Dart-project:
So my big question is; How do actually start using Dart with my existing developed website?
How do I create that bridge?
On the second image above in your original question, there is an option just below the HTML file, called URL - is this what you're looking for? You can set that to any arbitrary URL.
You'd also need to copy the helloworld.dart file into your node.js server path, and copy the bits inside the <body> tag into your existing HTML page. You'll also need to copy the packages\browser\dart.js file somewhere to your node.js server, too.
If you wanted to run the JS version, you'd also need to use the editor menu option to Generate JavaScript and copy the .js files into your node.js server path.
The script tag that refers to dart.js automatically detects if the browser supports Dart natively, and will either load the .dart version of your app, or the .dart.js version of your app (from the same folder location).
So what you're likely after is something like:
c:/nodejs_server_root
/existingIndex.html // containing the two script tags from helloworld.html
// and other tags referred to in helloworld.dart
/helloworld.dart
/dart.js
/helloworld.dart.js
And in the "URL" path in the launch configuration, you'd put something like http://localhost:<port>/existingIndex.html
https://pub.dartlang.org/packages/dev_compiler can compile Dart to Node.js modules with the --modules=node option.
See also https://github.com/dart-lang/dev_compiler/issues/291#issuecomment-176687849