Skip to content

Commit

Permalink
Merge branch 'release/0.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Iosue committed May 31, 2017
2 parents a2b99ee + 99c3595 commit 58a7314
Show file tree
Hide file tree
Showing 19 changed files with 326 additions and 248 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ npm run package-win
```

## Developed with love and passion by
* Federico Iosue - [Website](http://www.iosue.it/federico)
* Federico Iosue - [Website](http://federico.iosue.it)

## License
The application is licensed under [GPL3](LICENSE.md) so, if you want to use it fully or any part of it you **have to** release the source code.
1 change: 1 addition & 0 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var ONApp;
'ngRoute',
'ngMaterial',
'ngAnimate',
"ngAria",
'ngMdIcons',
'colorpicker.module',
'LocalStorageModule',
Expand Down
40 changes: 15 additions & 25 deletions app/assets/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,6 @@ body {
overflow: hidden;
}

::-webkit-scrollbar {
width: 0;
background: transparent;
}

/*Workaround for nested dmDialog instances*/

.md-dialog-backdrop:nth-of-type(even) {
z-index: 81;
}

.md-dialog-backdrop:nth-of-type(odd) {
z-index: 79;
}

.md-dialog-container:nth-of-type(even) {
z-index: 82;
}

.md-dialog-container:nth-of-type(odd) {
z-index: 80;
}

/*Toolbar*/

Expand All @@ -47,9 +25,14 @@ md-toolbar.md-hue-1 md-input-container {
overflow-y: scroll;
}

#drawer-container::-webkit-scrollbar {
width: 0;
background: transparent;
}

#rootView {
width: 100%;
overflow-y: scroll;
overflow-y: auto;
}

.menu-item ng-md-icon {
Expand Down Expand Up @@ -85,6 +68,10 @@ empty-view p {
font-weight: bolder;
}

.virtual-repeat #vertical-container {
height: 592px;
}

.selected-note {
background-color: var(--selection-color);
}
Expand All @@ -96,8 +83,11 @@ empty-view p {

.note .category-ribbon {
width: 15px;
position: relative;
left: -15px;
margin-right: 10px;
}

.note .note-texts {
padding-top: 10px;
}

.note .attachment-container {
Expand Down
3 changes: 2 additions & 1 deletion app/scripts/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ ONApp.constant('CONSTANTS', {
SORT_TITLE: 'title',
SORT_ALARM: 'alarm',
SORT_CREATION: 'creation',
SORT_LAST_MODIFICATION: 'lastModification'
SORT_LAST_MODIFICATION: 'lastModification',
PAGE_SIZE: 25
});
10 changes: 5 additions & 5 deletions app/scripts/attachments/attachment.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="attachment-inner-container" ng-controller="attachmentsController" ng-switch="isImgOrPdf(attachment)">
<img ng-switch-when="true" class="attachment" ng-src="{{getNoteThumbnail(attachment)}}" alt="{{attachment.name}}"/>
<div class="attachment-inner-container" ng-controller="attachmentsController" ng-switch="isImgOrPdf(note.attachmentsList[0])">
<img ng-switch-when="true" class="attachment" ng-src="{{getNoteThumbnail(note.attachmentsList[0])}}" alt="{{note.attachmentsList[0].name}}"/>
<div ng-switch-default class="generic-attachment">
<p>{{attachment.name}}</p>
<img ng-src="{{getNoteThumbnail(attachment)}}" alt="{{attachment.name}}"/>
<span>{{getMimeTypeSimple(attachment)}}</span>
<p>{{note.attachmentsList[0].name}}</p>
<img ng-src="{{getNoteThumbnail(note.attachmentsList[0])}}" alt="{{note.attachmentsList[0].name}}"/>
<span>{{getMimeTypeSimple(note.attachmentsList[0])}}</span>
</div>
</div>
3 changes: 2 additions & 1 deletion app/scripts/attachments/attachmentsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ angular.module('ONApp').controller('attachmentsController', ['$scope', 'storageS

$scope.isImgOrPdf = function (attachment) {
return _.some(['image', 'pdf'], function (mimeType) {
return attachment.mime_type.indexOf(mimeType) > -1;
return attachment.mime_type && attachment.mime_type.indexOf(mimeType) > -1;
});
};

$scope.getMimeTypeSimple = function (attachment) {
if (!attachment.mime_type) return "";
var simpleMimeType = _.last(attachment.mime_type.split('/')[1].split('.'));
return simpleMimeType.charAt(0).toUpperCase() + simpleMimeType.slice(1);
};
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/detail/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</md-input-container>

<md-grid-list md-cols-xs="1" md-cols-sm="2" md-cols-md="2" md-cols-lg="3" md-cols-gt-lg="4" md-row-height="1:1">
<md-grid-tile ng-repeat="attachment in note.attachmentsList" ng-click="openAttachment(attachment)"
<md-grid-tile ng-repeat="attachment in note.attachmentsList track by attachment.id" ng-click="openAttachment(attachment)"
ng-right-click="deleteAttachment(attachment)" md-ink-ripple>
<div class="attachment-container" ng-include="'app/scripts/attachments/attachment.html'"/>
</md-grid-tile>
Expand Down
10 changes: 5 additions & 5 deletions app/scripts/detail/detailController.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ angular.module('ONApp').controller('detailController', ['$rootScope', '$scope',
$scope.close();
}
}).add({
combo: "ctrl+c",
combo: "ctrl+e",
description: "Set category",
allowIn: ['INPUT', 'SELECT', 'TEXTAREA'],
callback: function () {
Expand Down Expand Up @@ -58,7 +58,7 @@ angular.module('ONApp').controller('detailController', ['$rootScope', '$scope',
},
preserveScope: true,
autoWrap: true,
skipHide: true,
multiple: true,
clickOutsideToClose: true,
templateUrl: 'app/scripts/detail/undoChangesDialog.html'
}).then(function () {
Expand Down Expand Up @@ -107,7 +107,7 @@ angular.module('ONApp').controller('detailController', ['$rootScope', '$scope',
},
preserveScope: true,
autoWrap: true,
skipHide: true,
multiple: true,
clickOutsideToClose: true,
templateUrl: 'app/scripts/detail/attachmentDeletionDialog.html'
}).then(function () {
Expand All @@ -123,12 +123,12 @@ angular.module('ONApp').controller('detailController', ['$rootScope', '$scope',

$scope.setCategory = function () {
$mdDialog.show({
skipHide: true,
multiple: true,
controller: 'categoriesSelectionController',
templateUrl: 'app/scripts/categories/categoriesSelection.html',
clickOutsideToClose: true,
locals: {
category: $scope.note.category,
category: $scope.note.category || {},
allowAdd: false
}
}).then(function (category) {
Expand Down
15 changes: 8 additions & 7 deletions app/scripts/list/list.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<div ng-controller="listController" layout="column" class="relative list-root" flex>
<div ng-controller="listController as ctrl" layout="column" class="relative list-root virtual-repeat" flex>

<md-fab-speed-dial id="fab" ng-show="isFabVisible()" class="md-scale md-fab-bottom-right">
<md-fab-trigger>
<md-button aria-label="edit" class="md-warn md-fab" ng-click="editNote()">
<md-tooltip md-direction="left" md-visible="tooltipVisible">Edit</md-tooltip>
<ng-md-icon icon="edit" />
<ng-md-icon icon="edit"/>
</md-button>
</md-fab-trigger>
</md-fab-speed-dial>

<md-content ng-if="notes.length">
<md-list-item ng-repeat="note in notes track by note.creation" ng-click="noteClicked($event, note)"
ng-right-click="noteRightClicked(note)" ng-class="{'selected-note': showAsSelected(note)}"
aria-label="Note">
<md-virtual-repeat-container id="vertical-container" md-auto-shrink="true" ng-style="ctrl.getListHeight()" flex>
<div md-virtual-repeat="note in dynamicItems" class="repeated-item" md-on-demand
ng-right-click="noteRightClicked(note)" ng-class="{'selected-note': showAsSelected(note)}"
aria-label="Note">
<div ng-include="'app/scripts/list/note.html'" class="note"/>
<md-divider/>
</md-list-item>
</div>
</md-virtual-repeat-container>
</md-content>

<empty-view ng-if="!notes.length" navitem="currentNavigation"></empty-view>
Expand Down
Loading

0 comments on commit 58a7314

Please sign in to comment.