javascript-console-share/src/main/amp/web/fme/components/jsconsole/javascript-console.js
/**
         * Fired when the user selects a script from the load scripts drop down
         * menu. Calls a repository webscript to retrieve the script contents.
         *
         * @method onLoadScriptClick
         */
Fired when the user selects a script from the load scripts drop down
menu. Calls a repository webscript to retrieve the script contents.


Fired when the user selects a script from the load scripts drop down menu . Calls a repository webscript to retrieve the script contents .
function ACJC_onLoadScriptClick(p_sType, p_aArgs, self) {
          var callback = {
              success : function(o) {
                  self.widgets.codeMirrorScript.setValue(o.responseText);
              },
              failure: function(o) {
                  text: self.msg("error.script.load", filename)
              },
              scope: this
          }
          var callbackFreemarker = {
                  success : function(o) {
                      self.widgets.codeMirrorTemplate.setValue(o.responseText);
                  },
                  failure: function(o) {
                      text: self.msg("error.script.load", filename)
                  },
                  scope: this
          }
          var nodeRef = p_aArgs[1].value;
          if (nodeRef == "NEW") {
              self.loadDemoScript.call(self);
          }
          else {
              var url = Alfresco.constants.PROXY_URI + "api/node/content/" + nodeRef.replace("://","/");
              YAHOO.util.Connect.asyncRequest('GET', url, callback);
              var url = Alfresco.constants.PROXY_URI + "api/node/content;jsc:freemarkerScript/" + nodeRef.replace("://","/");
              YAHOO.util.Connect.asyncRequest('GET', url, callbackFreemarker);
          }
       }
function ACJC_onLoadScriptClick ( p_sType , p_aArgs , self ) { var callback = { success : function ( o ) { self . widgets . codeMirrorScript . setValue ( o . responseText ) ; } , failure : function ( o ) { text : self . msg ( "error.script.load" , filename ) } , scope : this } var callbackFreemarker = { success : function ( o ) { self . widgets . codeMirrorTemplate . setValue ( o . responseText ) ; } , failure : function ( o ) { text : self . msg ( "error.script.load" , filename ) } , scope : this } var nodeRef = p_aArgs [ 1 ] . value ; if ( nodeRef == "NEW" ) { self . loadDemoScript . call ( self ) ; } else { var url = Alfresco . constants . PROXY_URI + "api/node/content/" + nodeRef . replace ( "://" , "/" ) ; YAHOO . util . Connect . asyncRequest ( 'GET' , url , callback ) ; var url = Alfresco . constants . PROXY_URI + "api/node/content;jsc:freemarkerScript/" + nodeRef . replace ( "://" , "/" ) ; YAHOO . util . Connect . asyncRequest ( 'GET' , url , callbackFreemarker ) ; } }
Fired when the user selects a script from the load scripts drop down
 menu.
Fired when the user selects a script from the load scripts drop down menu .
// set the new editor content
 // set the new editor content
