Change buttonGroup API to accept various information in data parameter

Change-Id: I0c3eb998d9be04fd1e7955b6c412277ec44755aa
diff --git a/dev/js/src/plugin/server.js b/dev/js/src/plugin/server.js
index 90dcd7c..cb49364 100644
--- a/dev/js/src/plugin/server.js
+++ b/dev/js/src/plugin/server.js
@@ -160,17 +160,17 @@
 
           // Add to dynamic button list (e.g. for matches)
           if (buttons[panel]) {
-            buttons[panel].push([title, embed["classes"], cb, icon]);
+            buttons[panel].push([title, {'cls':embed["classes"], 'icon': icon }, cb]);
           }
 
           // Add to static button list (e.g. for query) already loaded
           else if (KorAP.Panel[panel]) {
-            KorAP.Panel[panel].actions.add(title, embed["classes"], cb, icon);
+            KorAP.Panel[panel].actions.add(title, {'cls':embed["classes"], 'icon':icon}, cb);
           }
 
           // Add to static button list (e.g. for query) not yet loaded
           else {
-            buttonsSingle[panel].push([title, embed["classes"], cb, icon]);
+            buttonsSingle[panel].push([title, {'cls':embed["classes"], 'icon':icon}, cb]);
           }
         }
         //TODO There is no possibility to add icons to an plugin toggle button right now. 
@@ -181,7 +181,7 @@
 
           // TODO:
           //   Lazy registration (see above!)
-          KorAP.Panel[panel].actions.addToggle(title, ["title"], state);
+          KorAP.Panel[panel].actions.addToggle(title, {'cls':["title"]}, state);
 
           // Get the URL of the service
 
diff --git a/dev/js/src/plugin/widget.js b/dev/js/src/plugin/widget.js
index 068ced4..707f5f0 100644
--- a/dev/js/src/plugin/widget.js
+++ b/dev/js/src/plugin/widget.js
@@ -43,7 +43,7 @@
       // is a nice idea as well.
       
       this.actions.add(
-        this.name, ['button-icon', 'plugin'], function (e) {
+        this.name, {'cls':['button-icon', 'plugin']}, function (e) {
 
           // Temporary
           window.alert("Basic information about this plugin");