diff --git a/manifest.json b/manifest.json index 1e16bb2..2c81fc3 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "version": "1.0.81", + "version": "1.0.82", "manifest_version": 2, "minimum_chrome_version": "51", "name": "Code Pad IDE", diff --git a/src/css/main.css b/src/css/main.css index 34594c1..65cace5 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -36,6 +36,16 @@ main { position: relative; } +/*******************************************************************************/ +/************************************ Alerts ***********************************/ +/*******************************************************************************/ +.alert { + max-width: 450px; +} + +/*******************************************************************************/ +/************************************ Buttons **********************************/ +/*******************************************************************************/ .btn-primary { background-color: rgba(0, 123, 255, .7); border-color: rgba(0, 123, 255, .7); @@ -52,6 +62,8 @@ aside { min-width: 260px; background-color: #262a2e; border-right: 1px solid rgba(0, 0, 0, .3); + overflow: hidden; + height: 100%; } aside.ui-resizable.ui-resizing { diff --git a/src/js/events.js b/src/js/events.js index 24e11a7..aeb9d47 100644 --- a/src/js/events.js +++ b/src/js/events.js @@ -367,6 +367,7 @@ $(document).ready(function () { $aside.resizable({ ghost: true, minWidth: $aside.css('min-width'), + handles: 'e, w', stop: function () { $(window).trigger('resize'); } diff --git a/src/js/handlers/editors.js b/src/js/handlers/editors.js index 98e9c0c..fa6999e 100644 --- a/src/js/handlers/editors.js +++ b/src/js/handlers/editors.js @@ -643,8 +643,10 @@ var EditorsHandler = function () { this._populateAddTabDropDown(); - var $main = $('main'); - var $header = $('header'); + var $main = $('main'); + var $header = $('header'); + var $sidebar = $('.sidebar'); + var $sidebarMenu = $('.sidebar-menu'); // Handle resize of window $(window).on('resize', function (e) { @@ -652,6 +654,9 @@ var EditorsHandler = function () { 'margin-top': $header.height().toString() + 'px', 'height': Math.ceil(e.target.innerHeight - $(document).find('.ace-status-bar').first().height() - $header.height()).toString() + 'px' }); + $sidebar.css({ + 'height': ($main.height() - $sidebarMenu.height()).toString() + 'px' + }); }).resize(); // Handle adding settings to new tabs diff --git a/src/js/handlers/files.js b/src/js/handlers/files.js index 8aa3818..4f290d6 100644 --- a/src/js/handlers/files.js +++ b/src/js/handlers/files.js @@ -63,7 +63,11 @@ var FilesHandler = function () { data.forEach(function (retainedEntry) { chrome.fileSystem.isRestorable(retainedEntry, function () { chrome.fileSystem.restoreEntry(retainedEntry, function (restoredEntry) { - if (!chrome.runtime.lastError) { + + if (chrome.runtime.lastError) { + console.info(chrome.runtime.lastError.message); + } + else { // noinspection JSUnresolvedVariable if (restoredEntry.isDirectory) { that.openedDirs.push(restoredEntry); diff --git a/src/js/handlers/notifications.js b/src/js/handlers/notifications.js index bfece6d..7ea5232 100644 --- a/src/js/handlers/notifications.js +++ b/src/js/handlers/notifications.js @@ -24,7 +24,7 @@ var NotificationsHandler = function () { }, function () { if (chrome.runtime.lastError) { - console.log(chrome.runtime.lastError.message); + console.info(chrome.runtime.lastError.message); } var obj = {}; @@ -52,7 +52,7 @@ var NotificationsHandler = function () { }, function () { if (chrome.runtime.lastError) { - console.log(chrome.runtime.lastError.message); + console.info(chrome.runtime.lastError.message); } var obj = {}; @@ -80,12 +80,12 @@ var NotificationsHandler = function () { case 'danger': icon = 'fa fa-fw fa-exclamation-triangle'; sound = '/src/sounds/notif-danger.ogg'; - console.error(message); + console.info(message); break; case 'warning': icon = 'fa fa-fw fa-exclamation-triangle'; sound = '/src/sounds/notif-danger.ogg'; - console.warn(message); + console.info(message); break; default: icon = 'fa fa-fw fa-bell'; diff --git a/src/js/handlers/sidebar.js b/src/js/handlers/sidebar.js index 022145e..a427e77 100644 --- a/src/js/handlers/sidebar.js +++ b/src/js/handlers/sidebar.js @@ -159,9 +159,12 @@ var SidebarHandler = function () { var sortFn = function (a, b) { if (a.typeFile !== b.typeFile) { - return a.typeFile > b.typeFile; + if (a.typeFile < b.typeFile) return -1; + if (a.typeFile > b.typeFile) return 1; } - return a.text > b.text; + if (a.text < b.text) return -1; + if (a.text > b.text) return 1; + return 0; }; var buildTreeViewJson = function (entry, callback) { @@ -215,6 +218,7 @@ var SidebarHandler = function () { results = results.sort(sortFn); if (!--pending) { + results = results.sort(sortFn); callback(results); } }); @@ -235,6 +239,7 @@ var SidebarHandler = function () { results = results.sort(sortFn); if (!--pending) { + results = results.sort(sortFn); callback(results); } }