Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


The 'Con' property within windows scope is also the namespace which should be used by all JavaScript modulesthe JavaScript application in the Backend.

 

general.js

This file contains general modules which are potentially helpful for every backend Backend page. It , it should be loaded right after contenido.js!

...

  • Registry (Con.Registry)

    Registry module store (get/set) application wide objectsvariables.

    Note: Every frame has it's own registry instance. If you want to keep something in the registry and it should be available for all frames, the then add it to the top window.

    top.Con.Registry.set('foobar', 1);
    var value = top.Con.Registry.get('foobar');

  • Loader (Con.Loader)
    The JavaScript/CSS asset loader. Provides the feature to load required dependencies dynamically.
     
  • UtilUrl (Con.UtilUrl)
    Collection of URL helper functions to build backend Backend URLs, extrat parametes parameters from URLs, etc.
     
  • FrameLeftTop (Con.FrameLeftTop)
    Object to resize left_top frame
     
  • Additional functions
    Definition of additional functions for common usage like
    - Con.multiLink(), the former conMultiLink()
    - Con.getRegistry()
    - Con.getContentWindow(), returns right_bottom frame
    - Con.getTranslations()
    - Con.showConfirmation()
    - Con.showNotification()
    - Con.markSubmenuItem() 

...

The Backend needs some dynamic settings on the JavaScript side, like session id, current backend Backend language, backend Backend path, the JavaScript configuration , etc., therefore it will be added dynamically to the head-section.

The current code, this may change in the future, looks as follows:

<script type="text/javascript">
(function(Con, $) {
Con.sid = "r3718q..."; // The Backend session id
$.extend(Con.cfg, {
urlBackend: "http://contenido.localhost/contenido/", // URL to backendBackend
urlHelp: "", // URL to help page
belang: "en_US", // Current backendBackend language
frame: 4 // Current frame (feasible is 1, 2, 3, 4 or 0 for unknown)
});
})(Con, Con.$);
</script>

...