Guest User

Untitled

a guest
Jul 5th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.97 KB | None | 0 0
  1. // HTML
  2. <script type="text/javascript" src="system/scripts/mootools-core.js"></script>
  3. <script type="text/javascript" src="system/scripts/mootools-more.js"></script>
  4.  
  5. <script type="text/javascript" src="system/scripts/jquery-1.7.1.min.js"></script>
  6. <script type="text/javascript" src="system/scripts/jquery.noConflict.js"></script>
  7. <script type="text/javascript" src="system/scripts/Contaolove.js"></script>
  8.  
  9. // jquery.noConflict.js
  10. jQuery.noConflict();
  11.  
  12.  
  13. // Contaolove.js:
  14.  
  15. // jQuery in noConflict mode starts here
  16. (function($) {
  17.  
  18.  
  19. /**
  20.  * Contaolove object
  21.  */
  22. var Contaolove = {
  23.  
  24.     /**
  25.      * Contaolove is initialized?
  26.      * @var boolean
  27.      */
  28.     initialized: false,
  29.  
  30.     /**
  31.      * File path to HTML folder
  32.      * @var string
  33.      */
  34.     strFilePath: 'system/modules/contaolove/html/',
  35.  
  36.  
  37.     /**
  38.      * Initialize Contaolove
  39.      */
  40.     __construct: function()
  41.     {
  42.         this.initialized = true;
  43.  
  44.         // Prepare plugins list
  45.         this.preparePlugins(this.strFilePath);
  46.  
  47.         //this.showBox();
  48.         $('.testc').hide();
  49.     },
  50.  
  51.  
  52.     /**
  53.      * Test
  54.      */
  55.     showBox: function()
  56.     {
  57.         alert('box');
  58.     },
  59.  
  60.  
  61.     /**
  62.      * Define plugins list and load them
  63.      * @param string
  64.      */
  65.     preparePlugins: function(strPath)
  66.     {
  67.         $.plugins({ path: strPath, plugins:
  68.         [
  69.             { id:'browser', js: 'j/CvBrowser.js' },
  70.             { id:'chat', js: 'j/CvChat.js', css: 'c/chat.css' },
  71.             { id:'language', js: 'j/CvLanguage.js' },
  72.             { id:'ui', js: 'j/CvUserInterface.js' },
  73.         ]
  74.         });
  75.     },
  76.  
  77.  
  78.     /**
  79.      * Load a plugin from plugin list
  80.      * @param string
  81.      * @param string
  82.      */
  83.     loadPlugin: function(strPluginId, strCallback)
  84.     {
  85.         $.requires(strPluginId, strCallback);
  86.     },
  87.  
  88.  
  89.     /**
  90.      * Include an script into header or body (blnForce)
  91.      * @param string
  92.      * @param boolean
  93.      * @param string
  94.      * @return boolean
  95.      */
  96.     includeFile: function(strFile, blnForce, strCallback)
  97.     {
  98.         $.include(strFile, blnForce, strCallback);
  99.         return ($.included(strFile)) ? true : false;
  100.     }
  101. };
  102.  
  103.  
  104. /**
  105.  * We initialize Contaolove object
  106.  */
  107. if (!Contaolove.initialized)
  108. {
  109.     Contaolove.__construct();
  110. }
  111.  
  112.  
  113. // jQuery in noConflict mode ends here
  114. })(jQuery);
Add Comment
Please, Sign In to add comment