function addAttribute(){
 var form = document.getElementById('tattr');

 var element = document.createElement('input');
 element.id = count_attr;
 element.className = 'attribute_name';
 form.appendChild(element);

 var typ, null_checkbox, uniq_checkbox, pk_checkbox, close_button;

 form.appendChild(document.createTextNode( '\u00A0' )); 
 $.when(typ = type_select()).then(form.appendChild(typ));
 form.appendChild(document.createTextNode( '\u00A0' ));
 $.when(null_checkbox = add_checkbox('notNULL')).then(form.appendChild(null_checkbox));
 form.appendChild(document.createTextNode( '\u00A0' ));
 $.when(uniq_checkbox = add_checkbox('isUnique')).then(form.appendChild(uniq_checkbox));
 form.appendChild(document.createTextNode( '\u00A0' ));
 $.when(pk_checkbox = add_checkbox('isPK')).then(form.appendChild(pk_checkbox));

 form.appendChild(document.createElement('br'));
 form.appendChild(document.createElement('br'));

 count_attr+=1;
}
/**
 * Adds a new attribute to the input modal
 */
Adds a new attribute to the input modal
Adds a new attribute to the input modal
function addAttribute(){
 var form = document.getElementById('tattr');
 var element = document.createElement('input');
 element.id = count_attr;
 element.className = 'attribute_name';
 form.appendChild(element);
 var typ, null_checkbox, uniq_checkbox, pk_checkbox, close_button;
 form.appendChild(document.createTextNode( '\u00A0' )); 
 $.when(typ = type_select()).then(form.appendChild(typ));
 form.appendChild(document.createTextNode( '\u00A0' ));
 $.when(null_checkbox = add_checkbox('notNULL')).then(form.appendChild(null_checkbox));
 form.appendChild(document.createTextNode( '\u00A0' ));
 $.when(uniq_checkbox = add_checkbox('isUnique')).then(form.appendChild(uniq_checkbox));
 form.appendChild(document.createTextNode( '\u00A0' ));
 $.when(pk_checkbox = add_checkbox('isPK')).then(form.appendChild(pk_checkbox));
 form.appendChild(document.createElement('br'));
 form.appendChild(document.createElement('br'));
 count_attr+=1;
}
function addAttribute ( ) { var form = document . getElementById ( 'tattr' ) ; var element = document . createElement ( 'input' ) ; element . id = count_attr ; element . className = 'attribute_name' ; form . appendChild ( element ) ; var typ , null_checkbox , uniq_checkbox , pk_checkbox , close_button ; form . appendChild ( document . createTextNode ( '\u00A0' ) ) ; $ . when ( typ = type_select ( ) ) . then ( form . appendChild ( typ ) ) ; form . appendChild ( document . createTextNode ( '\u00A0' ) ) ; $ . when ( null_checkbox = add_checkbox ( 'notNULL' ) ) . then ( form . appendChild ( null_checkbox ) ) ; form . appendChild ( document . createTextNode ( '\u00A0' ) ) ; $ . when ( uniq_checkbox = add_checkbox ( 'isUnique' ) ) . then ( form . appendChild ( uniq_checkbox ) ) ; form . appendChild ( document . createTextNode ( '\u00A0' ) ) ; $ . when ( pk_checkbox = add_checkbox ( 'isPK' ) ) . then ( form . appendChild ( pk_checkbox ) ) ; form . appendChild ( document . createElement ( 'br' ) ) ; form . appendChild ( document . createElement ( 'br' ) ) ; count_attr += 1 ; }
Adds a new attribute to the input modal
Adds a new attribute to the input modal