Hello, I'm having really hard time in adding another select option into default button code. What i want to do is to add class to button depending on selected value from select box (small,medium,big).
Everything works ok for first button, after i add another one i have class on that but class from first one is removed. Also if i add 4 buttons in one save they have right classes if i add another one after that only last has class.
I'm using wordpress backend for this feature and here is my code from button.js
contents : [{ id : "info", label : b.lang.forms.button.title, title : b.lang.forms.button.title, elements : [{ id : "name", type : "text", label : b.lang.common.name, "default" : "", setup : function(a) { this.setValue(a.data("cke-saved-name") || a.getAttribute("name") || "") }, commit : d }, { id : "value", type : "text", label : b.lang.forms.button.text, accessKey : "V", "default" : "", setup : function(a) { this.setValue(a.getAttribute("value") || "") }, commit : d }, { id : "type", type : "select", label : b.lang.forms.button.type, "default" : "button", accessKey : "T", items : [[b.lang.forms.button.typeBtn, "button"], [b.lang.forms.button.typeSbm, "submit"], [b.lang.forms.button.typeRst, "reset"]], setup : function(a) { this.setValue(a.getAttribute("type") || "") }, commit : d },{ id : "class", type : "select", label : b.lang.forms.button.cla, "default" : "button-small", accessKey : "T", items : [[b.lang.forms.button.classS, "button-small"], [b.lang.forms.button.classM, "button-medium"], [b.lang.forms.button.classB, "button-big"]], setup : function(a) { this.setValue(a.getAttribute("class") || "") }, commit : d }]