diff --git a/components/active/class.active.php b/components/active/class.active.php index 1dc9316..df17446 100755 --- a/components/active/class.active.php +++ b/components/active/class.active.php @@ -115,6 +115,16 @@ class Active extends Common { public function Add() { global $sql; +<<<<<<< HEAD + + $query = "SELECT focused FROM active WHERE path=? AND user=? LIMIT 1;"; + $bind_variables = array( $this->path, $_SESSION["user_id"] ); + $result = $sql->query( $query, $bind_variables, array() ); + + if( count( $result ) == 0 ) { + + +======= $query = "UPDATE active SET focused=false WHERE user=? AND path=?;"; $bind_variables = array( $_SESSION["user_id"], $this->path ); $result = $sql->query( $query, $bind_variables, 0, "rowCount" ); @@ -122,6 +132,7 @@ class Active extends Common { if( $result == 0 ) { global $sql; +>>>>>>> 5af37cbce3326f97b4d3ff7eb50e88feb1fc8063 $query = "INSERT INTO active( user, path, focused ) VALUES ( ?, ?, ? );"; $bind_variables = array( $_SESSION["user_id"], $this->path, false ); $result = $sql->query( $query, $bind_variables, 0, "rowCount" ); @@ -175,8 +186,8 @@ class Active extends Common { public function MarkFileAsFocused() { global $sql; - $query = "UPDATE active SET focused=? WHERE user=?;UPDATE active SET focused=? WHERE path=? AND user=?;"; - $bind_variables = array( false, $_SESSION["user_id"], true, $this->path, $_SESSION["user_id"] ); + $query = "UPDATE active SET focused=? WHERE path=? AND user=?;"; + $bind_variables = array( true, $this->path, $_SESSION["user_id"] ); $return = $sql->query( $query, $bind_variables, 0, "rowCount" ); if( $return > 0 ) { diff --git a/components/active/init.js b/components/active/init.js index 69ee445..752cfc4 100755 --- a/components/active/init.js +++ b/components/active/init.js @@ -362,6 +362,9 @@ session.listThumb = listThumb; $( '#list-active-files' ).append( listThumb ); + + + /* If the tab list would overflow with the new tab. Move the * first tab to dropdown, then add a new tab. */ if( this.isTabListOverflowed( true ) ) { @@ -375,7 +378,10 @@ this.updateTabDropdownVisibility(); - $.get( this.controller + '?action=add&path=' + encodeURIComponent( path ) ); + $.get( this.controller + '?action=add&path=' + encodeURIComponent( path ), function( data ) { + + //console.log( data ); + }); if( focus ) { this.focus( path ); diff --git a/components/editor/dialog.php b/components/editor/dialog.php index 01673d7..7f25ad2 100755 --- a/components/editor/dialog.php +++ b/components/editor/dialog.php @@ -23,7 +23,11 @@ checkSession(); ?> +<<<<<<< HEAD + +======= +>>>>>>> 5af37cbce3326f97b4d3ff7eb50e88feb1fc8063 >>>>>> 5af37cbce3326f97b4d3ff7eb50e88feb1fc8063 }, ////////////////////////////////////////////////////////////////// diff --git a/components/filemanager/init.js b/components/filemanager/init.js index 62b20ad..1ce486f 100755 --- a/components/filemanager/init.js +++ b/components/filemanager/init.js @@ -520,7 +520,7 @@ if( files[index].type == 'file' ) { - let ext = ' ext-' + name.split( '.' ).pop(); + ext = 'ext-' + name.split( '.' ).pop(); } else { link.droppable({ @@ -544,7 +544,8 @@ span.addClass( nodeClass ); - link.addClass( files[index].type + ext ); + link.addClass( files[index].type ); + link.addClass( ext ); link.attr( "data-type", files[index].type ); link.attr( "data-path", files[index].name ); link.text( name ); @@ -569,8 +570,6 @@ node.removeClass( 'loading' ); - console.log( "rescanChildren", _this.rescanChildren ) - if( rescan && _this.rescanChildren.length > _this.rescanCounter ) { _this.rescan( _this.rescanChildren[_this.rescanCounter++] ); @@ -691,7 +690,6 @@ let path = drag_path; let newPath = `${drop_path}/` + path.split( "/" ).pop(); - console.log( path, newPath ); _this.rename( path, newPath ); }, @@ -968,11 +966,9 @@ parent.pop(); newParent.pop(); - console.log( parent.join( '/' ) ); - console.log( newParent.join( '/' ) ); - codiad.filemanager.rescan( parent.join( '/' ) ); codiad.filemanager.rescan( newParent.join( '/' ) ); + /* Notify listeners. */ amplify.publish( 'filemanager.onRename', { path: path, @@ -1071,7 +1067,6 @@ }; $.post( this.controller + '?action=modify&path=' + encodeURIComponent( path ), post, function( resp ) { - console.log( resp ); resp = $.parseJSON( resp ); if( resp.status == 'success' ) { if( messages === true ) { diff --git a/components/keybindings/init.js b/components/keybindings/init.js index 2af238b..2b88b8e 100755 --- a/components/keybindings/init.js +++ b/components/keybindings/init.js @@ -52,6 +52,20 @@ } }, { +<<<<<<< HEAD + name: 'Goto Line', + bindKey: { + win: 'Ctrl-L', + mac: 'Command-L' + }, + exec: function( e ) { + + codiad.editor.open_goto(); + } + }, + { +======= +>>>>>>> 5af37cbce3326f97b4d3ff7eb50e88feb1fc8063 name: 'Move Down', bindKey: { win: 'Ctrl-down', diff --git a/components/market/init.js b/components/market/init.js index 5bba894..3d95cb0 100755 --- a/components/market/init.js +++ b/components/market/init.js @@ -18,8 +18,13 @@ controller: 'components/market/controller.php', dialog: 'components/market/dialog.php', + plugins: [], + themes: [], + init: function() {}, + get_all: function() {}, + get_installed_plugins: function() {}, get_installed_themes: function() {},