diff --git a/application/config/migration.php b/application/config/migration.php index 36e3840a..372fbaf2 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE; | be upgraded / downgraded to. | */ -$config['migration_version'] = 121; +$config['migration_version'] = 122; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/122_create_cwmacros_table.php b/application/migrations/122_create_cwmacros_table.php new file mode 100644 index 00000000..42940d36 --- /dev/null +++ b/application/migrations/122_create_cwmacros_table.php @@ -0,0 +1,116 @@ +db->table_exists('cwmacros')) { + $this->dbforge->add_field(array( + 'id' => array( + 'type' => 'BIGINT', + 'constraint' => 20, + 'unsigned' => TRUE, + 'auto_increment' => TRUE, + 'unique' => TRUE + ), + + 'user_id' => array( + 'type' => 'BIGINT', + 'constraint' => 20, + 'unsigned' => TRUE, + 'auto_increment' => FALSE + ), + + 'station_location_id' => array( + 'type' => 'BIGINT', + 'constraint' => 20, + 'unsigned' => TRUE, + 'auto_increment' => FALSE + ), + + 'function1_name' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE + ), + + 'function1_macro' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE + ), + + 'function2_name' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE + ), + + 'function2_macro' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE + ), + + 'function3_name' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE + ), + + 'function3_macro' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE + ), + + 'function4_name' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE + ), + + 'function4_macro' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE + ), + + 'function5_name' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE + ), + + 'function5_macro' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE + ), + + 'modified' => array( + 'type' => 'timestamp', + 'null' => TRUE, + ) + )); + + $this->dbforge->add_key('id', TRUE); + $this->dbforge->add_key('user_id', TRUE); + $this->dbforge->add_key('station_location_id', TRUE); + + $this->dbforge->create_table('cwmacros'); + } + } + + public function down() + { + $this->dbforge->drop_table('cwmacros'); + } +} \ No newline at end of file diff --git a/assets/js/winkey.js b/assets/js/winkey.js index b483fbe0..77caa2b7 100644 --- a/assets/js/winkey.js +++ b/assets/js/winkey.js @@ -138,4 +138,18 @@ async function readLoop() { //Scroll to the bottom of the text field receiveText.scrollTop = receiveText.scrollHeight; } +} + +function closeModal() { + var container = document.getElementById("modals-here") + var backdrop = document.getElementById("modal-backdrop") + var modal = document.getElementById("modal") + + modal.classList.remove("show") + backdrop.classList.remove("show") + + setTimeout(function() { + container.removeChild(backdrop) + container.removeChild(modal) + }, 200) } \ No newline at end of file