diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-02-16 01:04:33 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-02-16 01:04:33 +0400 |
commit | ae0d011b95cd992b7e87c3947f0931ef81b1a9f0 (patch) | |
tree | b366fecca35b640ec6f215a12a25dce7ef5671b9 /core/View | |
parent | c3b51d93a7849a91887346945a6dd3cefdaf3ca7 (diff) |
Allow UIControl JavaScript classes to be located outside of piwik/UI. Modify annotations event handlers to be attached to .dataTableFeatures so they can be stopped if needed.
Diffstat (limited to 'core/View')
-rw-r--r-- | core/View/UIControl.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/View/UIControl.php b/core/View/UIControl.php index d29ec6655c..30b698efa7 100644 --- a/core/View/UIControl.php +++ b/core/View/UIControl.php @@ -39,9 +39,6 @@ class UIControl extends \Piwik\View /** * The name of the JavaScript class that handles the behavior of this control. * - * The JavaScript class must exist in the **piwik/UI** JavaScript module (so it will exist in - * `window.piwik.UI`). - * * This field must be set prior to rendering. * * @var string @@ -49,6 +46,13 @@ class UIControl extends \Piwik\View public $jsClass = null; /** + * The JavaScript module that contains the JavaScript class. + * + * @var string + */ + public $jsNamespace = 'piwik/UI'; + + /** * Extra CSS class(es) for the root element. * * @var string @@ -116,6 +120,7 @@ class UIControl extends \Piwik\View $this->templateVars['cssIdentifier'] = $this->cssIdentifier; $this->templateVars['cssClass'] = $this->cssClass; $this->templateVars['jsClass'] = $this->jsClass; + $this->templateVars['jsNamespace'] = $this->jsNamespace; $this->templateVars['implOverride'] = $override; $innerTemplateVars = $this->innerView->getTemplateVars($override); |