File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ if (("undefined" === typeof $ || "undefined" === typeof $.fn || "undefined" ===
2828
2929( function ( ) {
3030 var BrutusinForms = brutusin [ "json-forms" ] ;
31-
31+
3232// Basic bootstrap css
3333 BrutusinForms . addDecorator ( function ( element , schema ) {
3434 if ( element . tagName ) {
@@ -38,7 +38,13 @@ if (("undefined" === typeof $ || "undefined" === typeof $.fn || "undefined" ===
3838 } else if ( tagName === "select" ) {
3939 element . className += " chosen-select form-control" ;
4040 } else if ( tagName === "button" ) {
41- element . className += "btn btn-primary btn-xs" ;
41+ if ( element . className === "remove" ) {
42+ element . className += " glyphicon glyphicon-remove-circle" ;
43+ while ( element . firstChild ) {
44+ element . removeChild ( element . firstChild ) ;
45+ }
46+ }
47+ element . className += " btn btn-primary btn-xs" ;
4248 } else if ( tagName === "form" ) {
4349 element . className += " form-inline" ;
4450 }
Original file line number Diff line number Diff line change @@ -416,6 +416,7 @@ if (typeof brutusin === "undefined") {
416416 }
417417 } ;
418418 var removeButton = document . createElement ( "button" ) ;
419+ removeButton . className = "remove" ;
419420 appendChild ( removeButton , document . createTextNode ( "x" ) , s ) ;
420421 removeButton . onclick = function ( ) {
421422 delete current [ nameInput . value ] ;
@@ -766,7 +767,7 @@ if (typeof brutusin === "undefined") {
766767 pseudoSchema . oneOf = new Array ( ) ;
767768 pseudoSchema . type = "oneOf" ;
768769 for ( var i in schema . oneOf ) {
769- // console.log(schema.oneOf[i]);
770+ // console.log(schema.oneOf[i]);
770771 var childProp = name + "." + i ;
771772 pseudoSchema . oneOf [ i ] = childProp ;
772773 populateSchemaMap ( childProp , schema . oneOf [ i ] ) ;
@@ -870,7 +871,7 @@ if (typeof brutusin === "undefined") {
870871 renderInfoMap [ schemaId ] . value = value ;
871872 clear ( titleContainer ) ;
872873 clear ( container ) ;
873- // console.log(s.type, id, s);
874+ // console.log(s.type, id, s);
874875 var r = renderers [ s . type ] ;
875876 if ( r && ! s . dependsOn ) {
876877 if ( s . title ) {
You can’t perform that action at this time.
0 commit comments