From 2885c8059e216e532503b13ea8a91013e7bc3268 Mon Sep 17 00:00:00 2001 From: xevidos Date: Tue, 30 Apr 2019 12:56:08 -0400 Subject: [PATCH] Updated ReadMe, Added logging to create default tables, Fixed undefined this.positions, Fixed varchar length --- README.md | 26 ++++++++++++++++++++---- components/active/init.js | 5 +++-- components/sql/class.sql.conversions.php | 11 ++++++++-- components/sql/class.sql.php | 2 +- js/system.js | 1 + 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d7c5ec3..5a318f5 100755 --- a/README.md +++ b/README.md @@ -6,6 +6,16 @@ Codiad was built with simplicity in mind, allowing for fast, interactive develop For more information on the project please check out the check out the Wiki. Distributed under the MIT-Style License. See LICENSE.txt file for more information. +Repositories: + +[GitLab](https://gitlab.com/xevidos/codiad) +[GitHub](https://github.com/xevidos/codiad) + +Issues: + +[GitLab](https://gitlab.com/xevidos/codiad/issues) +[GitHub](https://github.com/xevidos/codiad/issues) + Features: * 100+ Native programming languages supported. @@ -37,7 +47,8 @@ Task List: * Add if file could not be saved 5 times close the open file * Add multi level users. ( Projects for only certain groups, Permission levels ) * Add mobile compatibility -* Add support for more database systems ( MSSQL, Oracle, SQLite, Maybe Filesystem again, etc ) +* Add support for more database systems ( MSSQL, Oracle, SQLite, Filesystem storage, etc ) +* Add in auto save timer that saves after the user stops typing instead of after every change * Clean up update script * Fix broken themes * Re Add the custom language recognition system after recode @@ -45,14 +56,21 @@ Task List: Completed: -* Add Auto Save. +* Add Auto Save * Add ability to center bottom of code * Add updating script * Add site renaming * Database Update - - Added Mysql Support. + - Added ( MySQL, PostgreSQL ) Support. - Project Updated to use PDO so future support for more database systems can be added. - Updated to store program data ( Not project data ) in databases. * Fix JS errors already showing * Remove Codiad autocomplete in favor of Ace's -* Updated for PHP 7.2 \ No newline at end of file +* Updated Cursor tracking +* Updated for PHP 7.2 + + +Bugs: + +* Auto save does not save the most recent changes every once in a while requiring more information to be typed ( E.G. A couple spaces ) in order to show up in saved file. +* Cursor is set to the wrong position if in split view. \ No newline at end of file diff --git a/components/active/init.js b/components/active/init.js index 7269a96..53ad118 100755 --- a/components/active/init.js +++ b/components/active/init.js @@ -400,13 +400,14 @@ if(path != this.getPath()) { + let _this = this; codiad.editor.setSession(this.sessions[path]); this.history.push(path); $.get(this.controller, {'action':'focused', 'path':path}, function() { - if( ! ( this.positions[`${path}`] === undefined ) ) { + if( ! ( _this.positions[`${path}`] === undefined ) ) { - this.setPosition( this.positions[`${path}`] ); + _this.setPosition( .positions[`${path}`] ); } }); } diff --git a/components/sql/class.sql.conversions.php b/components/sql/class.sql.conversions.php index 3db3844..ccea77d 100644 --- a/components/sql/class.sql.conversions.php +++ b/components/sql/class.sql.conversions.php @@ -404,8 +404,15 @@ class sql_conversions { } if( $dbtype == "mysql" && $fields ) { - $field_length = ( 3000 / $unique_length ); - $fields_string .= "{$id_open}{$id}{$id_close}($field_length),"; + if( $fields[$id] == "text" ) { + + $field_length = ( 3000 / $unique_length ); + $fields_string .= "{$id_open}{$id}{$id_close}($field_length),"; + } elseif( $fields[$id] == "string" ) { + + $field_length = ( 3000 / $unique_length ); + $fields_string .= "{$id_open}{$id}{$id_close}(255),"; + } } else { $fields_string .= "{$id_open}{$id}{$id_close},"; diff --git a/components/sql/class.sql.php b/components/sql/class.sql.php index 75af9f4..ecb9755 100755 --- a/components/sql/class.sql.php +++ b/components/sql/class.sql.php @@ -177,7 +177,7 @@ class sql { if ( $result === false || ! $error[0] == "00000" ) { - return false; + return $error; } else { return true; diff --git a/js/system.js b/js/system.js index 5d94626..0907b07 100755 --- a/js/system.js +++ b/js/system.js @@ -144,6 +144,7 @@ codiad.message.error( i18n( 'Error Creating Default Tables' ) ); } + console.log( data ); }, error: function(jqXHR, textStatus, errorThrown) {