Replacement for cftree & cfmenu in coldfusion 2018 - coldfusion

I knew, cfgraph & cfgraphData has been deprecated from cf11 and we had a alternate solution as cfchart,cfchartseries,cfchartdata. Likewise what is the alternate solution for cftree & cfmenu ? I hope that's also deprecated in latest version.
Can someone point me to what is the replacements for these two tags ( cftree & cfmenu ) instead of using some other external js / libraries ?
Can we have any other solution for it without using other js / libraries ?

Related

Is it possible to use Alpaca Forms without jquery?

I am trying to integrate Alpaca Forms into Alfresco Share, but I have a problem trying to add jQuery as a dependency, as the plataform already includes jQuery as a dependency, but an old version, so including this new one just for Alpaca will create problems.
Is there any way to use Alpaca without jQuery, doing all the initialization and configuration using pure javascript?
There's no way to use Alpaca without jQuery, you can see it yourself in alpaca functions ... but you can use many jquery versions with no conflict using jQuery.noConflict( true )
I made a fiddle for that, it uses jQuery version 2.2.4 for alpaca and I loaded jquery version 1.2.3 too. To use the first version of jQuery use the $ sign, for the other version use the variable mapped to a variable like var jquery123 = jQuery.noConflict( true ); jquery123.[some_function]
Link to the fiddle

How do I teach WebStorm 9 inspector to recognize Angular Material Design tags/attributes?

Currently, all my angular material HTML attributes are highlighted in yellow with WebStorm 9 (Mac OS X Yosemite) warning: "Attribute [name] is not allowed here".
How can I teach WS to automatically recognize these attributes as valid? I am aware that I can add each one one-by-one to the list of custom attributes, but was hoping that there would be a better way to do this.
UPDATE:
Just wanted to clarify that this issue applies to Angular Material project, and not the AngularJS itself.
You need to add the angular-material.js file as a Library in WebStorm:
Open Preferences (Mac: Cmd+,, Win/Linux: Ctrl+Alt+S)
Go to Languages & Frameworks > JavaScript > Libraries
Click Add and then press the + icon
Find angular-material.js in your node_modules folder
Add a Name and a version and press Ok
Now you will have completions for all elements and attributes that have an #ngdoc documentation in the angular-material source code.
Usage
Start typing and you will see the completions:
Pressing F1 (Ctrl+Q on Win/Linux) will also show some docs, if available in the source code:
Important note
Not all features are properly documented, the following won't show up (unless you already used them) cause they are defined dynamically in a loop, with no #ngdoc for them:
var API_WITH_VALUES = [ "layout", "flex", "flex-order", "flex-offset", "layout-align" ];
var API_NO_VALUES = [ "show", "hide", "layout-padding", "layout-margin" ];
So for these you'd have to add them as a custom attribute (Alt+Enter > "Add flex to custom html attributes").
Environment
Tested on a Mac OS X 10.11.4 using WebStorm 2016.1.1, but this should work for older versions as well.
I am using PHPStorm, which is a sister Project of WebStorm, but it should work the same way.
You maybe need to add the Library:
File
Settings
Languages & Frameworks
Javascript
Librarys
Add here AngularJS
If this does not work, you can add them manually:
Follow this Steps:
File
Default Settings
Editor
Inspection
HTML
Unknown HTML tag attributes
To the right you will see in Options "Custom HTML tag attributes". Enter here the attributes you want to allow.
I highly recomend you to install the Angular.js plugin:
Go to menu File > Settings (or ctrl + alt + S if you're on Windows);
Select Plugins in the window that'll open;
Click in the Browse Repositories button;
Type AngularJS in the search field. Select the plugin;
Click Install Plugin.
The plugin is incumbed to read #ngdoc annotations present in ngMaterial sources and create documentation for their directives.
It seems to support WebStorm and other IDEs, but I could not find it in the plugin registry while filtering by other IDEs. Maybe it'll work inside WebStorm...
Anyway, this is what you get:
You have also a plugin that helps a lot, check it out. It helps a lot
Angular material v2, Teradata covalent v1, Angular flex layout v1 & Material icon live templates
And with the solution provided by #Alex Ilyaev gives a lot of help.
But its no perfect.
Hope it helps.
Currently I don't think that idea's AngularJS plugin understands angular-materials attribute extensions.
It does understand the directives i.e. control click <md-button ...> and the directive (custom tag) is found.
For now you will have to add the attributes af custom attributes in order to get a "green" page.

How can I find out which version of Zurb Foundation I'm running

Is there something I can enter in the command line to find out which version I'm running?
Without knowing more about your exact situation, the easiest way is to add the following JavaSscript after you initialize Foundation ($(document).foundation();).
The final product would look like this:
$(document).foundation();
$(document).ready(function(){
alert('Foundation Core Version: ' + Foundation.version);
alert('Foundation DropDown Version:' + Foundation.libs.dropdown.version);
});
The first alert gives you the core version of foundation you are running in foundation.js and foundation.min.js.
If you are not using foundation.min.js, which loads Foundation Core and all JavaScript plugins such as: accordion, dropdown, joyride, tab, and so on, you can use the second alert. It will give you the version of the specified plugin.
You can visit the Foundation Docs on JavaScript Setup to learn more about foundation.min.js and the plugins such as: foundation.accordion.js, foundation.dropdown.js, foundation.joyride.js, foundation.tab.js and so on.
I have only tested the JavaScript on Foundation 5.0.3, but I believe it will work on older versions.
I hope that helps.
search in foundation.js for "version"
window.Foundation = {
name : 'Foundation',
version : '5.3.1',
In your browser's dev tool's console, type "Foundation.version"
For anyone looking at an easy way to do this:
To look up a project's foundation version, look into /bower_components/foundation/bower.json
it should have something similar to:
"homepage": "https://github.com/zurb/bower-foundation", "_release": "5.2.1",
As far as I'm aware there isn't something you can type in to check the version, you can type 'foundation version' but this will likely come back with 1.0.4 which I think is the installer or compass version, it isn't the version of Foundation.
In the foundation.js file, search for 'version'.

Is there any good reason to have Sitecore Media url's including tilde?

I could see blog post from 2011 recommending using "-" instead of "~".
What is the best practice to write media URL in Sitecore 6.5 on .NET 4.0/IIS7.5? Should I keep default /~/media/ or follow blog post advice using /-/media/ or while I am there, why not just use /media/?
I suspect the use of ~ is for legacy reasons. The current recommendation is to use -/media as you point out, but you could use whatever you wanted and it would work. The issue you have just using /media/ is if there is any other item with that as part of the name then it will trigger the media handler, rather than serving up your content for example.
For example, as request for /blah/blah/blah/-/media/images/logo.png will serve up the image correctly, /about/media/news/2013/12/20/sitecore.aspx should in fact serve up a page but will trigger the media handler and return a 404 just using /media/. So if you are going to use something else then make sure it is unique, you may need to enforce it since content editors can be a bit funny about remembering things like this.
Since you are currently using Sitecore 6.5 then I can assume you have existing content. Make sure you leave the existing ~/media trigger to allow your Rich Text fields to continue to work
If you update the Media.MediaLinkPrefix setting on a system that
already has some content in a database, Sitecore may not update the
values in all Rich Text Editor fields that contain values in the old
formats, including inline images and links to media items.
Sitecore Idiosyncrasies: Media URLs
I would probably go ahead and set Media.RequestExtension to an empty string so that image urls are served up with the correct media extension too.
I know this problem appear just when are you using .Net Framework 2.0
Please see next link .
If you run your website under .Net Framework 4.0 and IIS 7.5 you don't have this vulnerability.
Also this document explain a little bit about using of tilde.
Also you can check John West blog about /~/media
So the conclusion is use -/media for media files.
For projects using Sitecore 7.2, you may want to stick to using a tilde or apply the hot-fix mentioned in the following KB article.
https://kb.sitecore.net/articles/998758

Using jQuery.scrollTo in Foundation 4, multiple options not working

I am using the latest version of Zurb Foundation 4 framework for a one-page site. I am using Windows 7 Ultimate, Chrome browser for testing. I have menu items on the page (not a links, I'm using spans to contain them) which when clicked activate the scrollTo plugin. I have the jquery.easing.1.3 plug-in also enabled.
The problem is I need to use multiple options in the scrollTo commmand as follows:
$.scrollTo('#div_internet',1000,{offset: '-60', easing: 'easeInOutExpo'});
When I specify either option (offset or easing) by themselves in the brackets, this code works. When I put them both in there with a commma delimiter, the code breaks. I cannot find any suggestions or anyone else who has run into this problem. Suggestions?
For further references;
All options need to be entered between curly brackets and comma separated (including that duration).
$(item).scrollTo(itemPosition, {option1: int, option2: 'string', option3: {object1, object2}})
For example, the proper syntax for passing many offset to the scrollTo plugin (assuming an #id position) along with with easing and duration is:
$.scrollTo(itemId, {offset: {top:-offY, left:-offX}, easing : 'easeInOutCubic', duration : 2000});