Requested Feature: Adding reference to JavaScript Libraries in WebResources

Jul 23, 2012 at 4:42 PM
Edited Jul 23, 2012 at 4:42 PM


First of all, I want to thank you for such a great tool, that somehow makes it easier to edit the ribbons. Anyway, no one is perfect, wherefore I thought to add one missing feature here.

Problem: Recently I was trying to execute a JavaScript method on a press of a toolbar button. That code should then use jQuery and JsonP to call one of my WCF services. I have both libraries located in separate web resources and my method, that is again stored as a web resource should reference both.

Solution: Today I have found this discussion thread:

It tells us, that to reference another JavaScript LIbrary from a web resource, it's just enough to add it as a JavaScript node and setting the function name to "isNaN".



              <JavaScriptFunction Library="$webresource:bskh_/JavaScript/Core/JQuery" FunctionName="isNaN" />
              <JavaScriptFunction Library="$webresource:bskh_/JavaScript/Core/Json2" FunctionName="isNaN" />
              <JavaScriptFunction Library="$webresource:bskh_/JavaScript/Core/Sdk.JQuery" FunctionName="isNaN" />
              <JavaScriptFunction Library="$webresource:bskh_/JavaScript/MyTest_GetSampleText" FunctionName="GetSampleText" />

Proposal: Maybe that workflow could be incorporated within the UI, by extending the context menu by another point named "Add Javascript Library Reference", that would still allow to select a JavaScript web resource, but will fill "isNaN" automatically (readonly).

What do you think?

Jul 24, 2012 at 7:40 AM

Hi BBMG74,

Your request makes sense. I will try to add it as soon as possible

Jul 25, 2012 at 5:40 AM

Hi tanguy92,

glad to hear that you like it and waiting to have it implemented.