Skip to content

Commit

Permalink
1.0.82
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbrg committed Dec 2, 2017
1 parent 131ec49 commit ab1843d
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 10 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.81",
"version": "1.0.82",
"manifest_version": 2,
"minimum_chrome_version": "51",
"name": "Code Pad IDE",
Expand Down
12 changes: 12 additions & 0 deletions src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/js/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ $(document).ready(function () {
$aside.resizable({
ghost: true,
minWidth: $aside.css('min-width'),
handles: 'e, w',
stop: function () {
$(window).trigger('resize');
}
Expand Down
9 changes: 7 additions & 2 deletions src/js/handlers/editors.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,15 +643,20 @@ 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) {
$main.css({
'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
Expand Down
6 changes: 5 additions & 1 deletion src/js/handlers/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/js/handlers/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down Expand Up @@ -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 = {};
Expand Down Expand Up @@ -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';
Expand Down
9 changes: 7 additions & 2 deletions src/js/handlers/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -215,6 +218,7 @@ var SidebarHandler = function () {
results = results.sort(sortFn);

if (!--pending) {
results = results.sort(sortFn);
callback(results);
}
});
Expand All @@ -235,6 +239,7 @@ var SidebarHandler = function () {
results = results.sort(sortFn);

if (!--pending) {
results = results.sort(sortFn);
callback(results);
}
}
Expand Down

0 comments on commit ab1843d

Please sign in to comment.