Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenaka Moorthi <benaka.moorthi@gmail.com>2013-09-12 04:56:56 +0400
committerBenaka Moorthi <benaka.moorthi@gmail.com>2013-09-12 05:39:19 +0400
commit94799537f84f0be7a3ad2da3bf289ed2783c3b27 (patch)
tree813df7a321d0c1dd4d9f98cf131fd92385d98601 /plugins/CoreHome
parentac285a17b31752d0f3ba4d6ec917339b92941de1 (diff)
Refs #4116, move initElements code to utility function in UIControl.
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r--plugins/CoreHome/javascripts/uiControl.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/CoreHome/javascripts/uiControl.js b/plugins/CoreHome/javascripts/uiControl.js
index 58d9662acb..454b7134ff 100644
--- a/plugins/CoreHome/javascripts/uiControl.js
+++ b/plugins/CoreHome/javascripts/uiControl.js
@@ -56,6 +56,15 @@
}
};
+ UIControl.initElements = function (klass, selector) {
+ $(selector).each(function () {
+ if (!$(this).attr('data-inited')) {
+ var control = new klass(this);
+ $(this).attr('data-inited', 1);
+ }
+ });
+ };
+
UIControl.prototype = {
/**