]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
adds or updates docs comments, Foundation.register/unregisterPlugin integration,...
authorzurbchris <chris@zurb.com>
Wed, 18 Nov 2015 03:26:41 +0000 (19:26 -0800)
committerzurbchris <chris@zurb.com>
Wed, 18 Nov 2015 03:26:41 +0000 (19:26 -0800)
js/foundation.abide.js
js/foundation.accordion.js
js/foundation.accordionMenu.js
js/foundation.equalizer.js
js/foundation.interchange.js
js/foundation.responsiveMenu.js
js/foundation.responsiveToggle.js
js/foundation.tabs.js
js/foundation.toggler.js
js/foundation.tooltip.js

index bab5820edc0e664eafe0ba7c557c3f41e1a91852..de0ff76a3aa783f9265fa902a15f0b361ee9d81d 100644 (file)
     this._init();
     this._events();
 
-    /**
-     * Fires when the plugin has been successfuly initialized.
-     * @event Abide#init
-     */
-    this.$element.trigger('init.zf.abide');
+    Foundation.registerPlugin(this);
   }
 
   /**
     $form.find('[data-abide-error]').css('display', 'none');
     $(':input', $form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr(invalidAttr);
   };
+  Abide.prototype.destroy = function(){
+    //TODO this...
+  };
 
   Foundation.plugin(Abide);
 
index fe25b713a583ee6148e9031ae41888642e9c2f77..3db5999d7f59cb098ca33efcde306e9a51f23493 100644 (file)
     this.options = $.extend({}, Accordion.defaults, this.$element.data(), options);
 
     this._init();
-    /**
-     * Fires when the plugin has been successfuly initialized.
-     * @event Accordion#init
-     */
+
     Foundation.registerPlugin(this);
     Foundation.Keyboard.register('Accordion', {
       'ENTER': 'toggle',
     this.$element.find('[data-tab-content]').slideUp(0).css('display', '');
     this.$element.find('a').off('.zf.accordion');
 
-    /**
-     * Fires when the plugin has been destroyed.
-     * @event Accordion#destroyed
-     */
-    // this.$element.trigger('destroyed.zf.accordion');
     Foundation.unregisterPlugin(this);
   };
 
index 6cd684dfd6d1972b4ad97dc0982859c107d9107a..c6da2b42609eb890deb5f393ed0659983440b075 100644 (file)
 
     this._init();
 
-
-    /**
-     * Fires when the plugin has been successfuly initialized.
-     * @event AccordionMenu#init
-     */
-    // this.$element.trigger('init.zf.accordionMenu');
     Foundation.registerPlugin(this);
     Foundation.Keyboard.register('AccordionMenu', {
       'ENTER': 'toggle',
     this.$element.find('[data-submenu]').slideDown(0).css('display', '');
     this.$element.find('a').off('click.zf.accordionMenu');
 
-    /**
-     * Fires when the plugin has been destroyed.
-     * @event AccordionMenu#destroy
-     */
-    // this.$element.trigger('destroyed.zf.accordionMenu');
     Foundation.Nest.Burn(this.$element, 'accordion');
     Foundation.unregisterPlugin(this);
   };
index 8294b83e376663b846e1ca709920027519888cb5..58a24c3ee528c0737035a5014bcb66e3ccf3ae6b 100644 (file)
     this._events();
 
     Foundation.registerPlugin(this);
-    // /**
-    //  * Fires when the plugin has been successfuly initialized.
-    //  * @event Equalizer#init
-    //  */
-    // this.$element.trigger('init.zf.equalizer');
   }
 
   /**
index cffcfa6e26d2e461b15d9bcef37849cbdaf3faa5..c971e31d620ccefab589d7cfbf3c733be7b18456 100644 (file)
    */
   Interchange.prototype.destroy = function(){
     //TODO this.
-  }
+  };
   Foundation.plugin(Interchange);
 
   // Exports for AMD/Browserify
index 96b3dc771ac9dfc25d66e1508600a9e7f60dfb5a..7c00684f865a46f3f1b690187f7a2bdd171e9f05 100644 (file)
     this._events();
 
     Foundation.registerPlugin(this);
-    // /**
-    //  * Fires when the plugin has been successfuly initialized.
-    //  * @event ResponsiveMenu#init
-    //  */
-    //  this.$element.trigger('init.zf.ResponsiveMenu');
   }
 
   ResponsiveMenu.defaults = {};
   ResponsiveMenu.prototype.destroy = function() {
     this.currentPlugin.destroy();
     $(window).off('.zf.ResponsiveMenu');
+    Foundation.unregisterPlugin(this);
   };
   Foundation.plugin(ResponsiveMenu);
 
index 89b36815b508796fdff136a05044e8610bc80126..5410ee8431e712eb8951d838ae7f6613ce498a0b 100644 (file)
@@ -22,11 +22,6 @@ function ResponsiveToggle(element, options) {
   this._events();
 
   Foundation.registerPlugin(this);
-  // /**
-  //  * Fires when the plugin has been successfully initialized.
-  //  * @event ResponsiveToggle#init
-  //  */
-  // this.$element.trigger('init.zf.ResponsiveToggle');
 }
 
 ResponsiveToggle.defaults = {
@@ -36,7 +31,7 @@ ResponsiveToggle.defaults = {
    * @example 'medium'
    */
   hideFor: 'medium'
-}
+};
 
 /**
  * Initializes the tab bar by finding the target element, toggling element, and running update().
@@ -53,7 +48,7 @@ ResponsiveToggle.prototype._init = function() {
   this.$toggler = this.$element.find('[data-toggle]');
 
   this._update();
-}
+};
 
 /**
  * Adds necessary event handlers for the tab bar to work.
@@ -66,7 +61,7 @@ ResponsiveToggle.prototype._events = function() {
   $(window).on('changed.zf.mediaquery', this._update.bind(this));
 
   this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));
-}
+};
 
 /**
  * Checks the current media query to determine if the tab bar should be visible or hidden.
@@ -85,7 +80,7 @@ ResponsiveToggle.prototype._update = function() {
     this.$element.hide();
     this.$targetMenu.show();
   }
-}
+};
 
 /**
  * Toggles the element attached to the tab bar. The toggle only happens if the screen is small enough to allow it.
@@ -102,8 +97,10 @@ ResponsiveToggle.prototype.toggleMenu = function() {
      */
     this.$element.trigger('toggled.zf.responsiveToggle');
   }
-}
-
+};
+ResponsiveToggle.prototype.destroy = function(){
+  //TODO this...
+};
 Foundation.plugin(ResponsiveToggle);
 
-}(jQuery, Foundation)
+}(jQuery, Foundation);
index 5f54dbace5aeac26e8e258142d6a9bec12bbdc2f..591f2644893f2bae14441c8f0750a7712dc65a8a 100644 (file)
       // 'TAB': 'next',
       // 'SHIFT_TAB': 'previous'
     });
-    // /**
-    //  * Fires when the plugin has been successfuly initialized.
-    //  * @event Tabs#init
-    //  */
-    // this.$element.trigger('init.zf.tabs');
   }
 
   Tabs.defaults = {
       $(window).off('changed.zf.mediaquery');
     }
     Foundation.unregisterPlugin(this);
-    // /**
-    //  * Fires when the plugin has been destroyed.
-    //  * @event Tabs#destroyed
-    //  */
-    // this.$element.trigger('destroyed.zf.tabs');
   };
 
   Foundation.plugin(Tabs);
index b5c52210c01f823abb118820433d973da66fa179..b2dcb808a31aea654cfe1036b87c8365ab1eb0fe 100644 (file)
     this._events();
 
     Foundation.registerPlugin(this);
-    // /**
-    //  * Fires when the plugin has been successfuly initialized.
-    //  * @event Toggler#init
-    //  */
-    // this.$element.trigger('init.zf.toggler');
   }
 
   Toggler.defaults = {
+    /**
+     * Tells the plugin if the element should animated when toggled.
+     * @option
+     * @example false
+     */
     animate: false
   };
 
    */
   Toggler.prototype.destroy= function() {
     this.$element.off('.zf.toggler');
+    Foundation.unregisterPlugin(this);
   };
 
   Foundation.plugin(Toggler);
index 90489f980343398d397c557edb0b047bde7fe007..b1c0bb5781483916f620ee369f7f049e038d3507 100644 (file)
     this._init();
 
     Foundation.registerPlugin(this);
-
-    // /**
-    //  * Fires when the plugin has been successfully initialized
-    //  * @event Tooltip#init
-    //  */
-    // this.$element.trigger('init.zf.tooltip');
   }
 
   Tooltip.defaults = {