Ignore:
Timestamp:
02/08/18 09:00:39 (2 years ago)
Author:
gogo
Message:

Add FancySelects? plugin to resolve #1365, along the way move jQuery and MooTools? into libraries/ improve AssetLoader? and add Xinha.loadLibrary.

The loadScript and loadStyle functions of Asset Loaders have been changed to load the given script/style only once, this was the most common situation. loadScriptAlways and loadStyleAlways have been added with which you can force one to be reloaded.

loadLibrary presently just accepts a library name, jquery or mootools and loads the latest version in the libraries folder (hard coded), eventually we may need to have some sort of version-requesting, but cross that bridge if we come to it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/MootoolsFileManager/MootoolsFileManager.js

    r1371 r1384  
    3535}; 
    3636 
    37 MootoolsFileManager.AssetLoader = Xinha.includeAssets(); 
    38  
    3937// In case you want to use your own version of Mootools, you can load it first. 
    40 if(typeof MooTools == 'undefined') 
    41 { 
    42   MootoolsFileManager.AssetLoader 
    43     .loadScript('MooTools-Core-1.6.0.js', 'MootoolsFileManager') 
    44     .loadScript('MooTools-More-1.6.0.js', 'MootoolsFileManager'); 
    45 } 
     38MootoolsFileManager.AssetLoader = Xinha.loadLibrary('MooTools'); 
    4639 
    4740// In case you want to use your own version of FileManager, you can load it first. 
     
    142135  if (phpcfg.files_dir)  
    143136  { 
    144     MootoolsFileManager.AssetLoader.loadScriptOnce('MootoolsFileManager.FileManager.js', 'MootoolsFileManager'); 
     137    MootoolsFileManager.AssetLoader.loadScript('MootoolsFileManager.FileManager.js', 'MootoolsFileManager'); 
    145138     
    146139    this.editor.config.registerButton({ 
     
    157150  if(phpcfg.images_dir) 
    158151  {      
    159     MootoolsFileManager.AssetLoader.loadScriptOnce('MootoolsFileManager.ImageManager.js', 'MootoolsFileManager'); 
     152    MootoolsFileManager.AssetLoader.loadScript('MootoolsFileManager.ImageManager.js', 'MootoolsFileManager'); 
    160153     
    161154    // Override our Editors insert image button action.   
Note: See TracChangeset for help on using the changeset viewer.