2 Replies Latest reply on Jan 3, 2014 4:17 AM by mcollinge

    JavaScript in plugins & referencing system properties

    mcollinge

      We've got a plugin which is including JavaScript into the main compressed + consolidated files by doing simple references like this in plugin.xml

       

      <plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="http://www.jivesoftware.com/schemas/clearspace/2_5/plugin.xsd">
          <name>javascript-libraries</name>
          <class>com.premierfarnell.plugin.e14JavaScriptLibraries</class>
      
          <javascript src="/plugins/javascript-libraries/resources/script/e14-global-utils.js" />
      </plugin>
      

       

      This works nicely, and the code is compressed + bundled with the other JS code as we wanted.

       

      However, one thing that would be really useful is to be able to reference system properties from the JS code, injecting them in when the JS is first bundled up. Is this possible at all?

       

      We have code in our Jive 4.5 repository which is kept in FTL files to get around this, but those won't get compressed + bundled up with the other JS.