Skip to content

Commit 04ffce6

Browse files
committed
Fixed display, refactor tag controller, fixed tag css
1 parent 89b0145 commit 04ffce6

File tree

13 files changed

+50
-59
lines changed

13 files changed

+50
-59
lines changed

docs/Build.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
- Grunt `npm install -g grunt-cli`
55

66
## Build
7-
Clone [this project](https://github.com/FoxUSA/OpenNote) an the [SharedServices Project](https://github.com/FoxUSA/OpenNoteService-PHP)
8-
9-
My project folder structure is setup as follows
7+
Clone the projects and set them up in the structure below
108
```
119
Some working folder
1210
├─ OpenNote
1311
├─ OpenNote-SharedServices
14-
├─ OpenNote-Docer
12+
├─ OpenNote-Docker
1513
└─ OpenNote-CLI
1614
```
1715

docs/HowToUse.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,6 @@ Once you click on a note you'll will be presented with it in a read only view.
4646

4747
![][seedsedit] This will bring you to the editor. Once you are all done editing, click "Save" to store the note.
4848

49-
## Syncing
50-
By default OpenNote is storing info in your browser. Until you setup syncing, you are at risk of lousing your notes. To setup syncing. From the home page click `Settings`, then click database. On the right hand side of the panel you will see a Replication url field. This expect a url to your couchDB database in the form of `$protocol://$user:$password@$serverurl:$port/$database`.
51-
52-
For example if your server information is as follows:
53-
54-
Item | Value
55-
--- | ---
56-
protocol | http
57-
user | admin
58-
password | password
59-
serverurl | 127.0.0.1
60-
port | 6984
61-
database | opennote
62-
63-
then your replication url would be `http://admin:[email protected]:6984/opennote`
64-
65-
You will see an alert if replication is working.
66-
6749
[plants]: ./images/plants.png
6850
[seedsedit]: ./images/seedsEdit.png
6951
[seedsview]: ./images/seedsView.png

docs/Install.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,35 @@ services:
2828
command: server /data
2929
3030
```
31-
## Start
32-
`docker-compose up -d` to start
31+
## Setup
32+
- [ ] `docker-compose up -d` to start
33+
- CouchDB
34+
- [ ] Go to `http://$serverurl:5984/_utils/#_config/nonode@nohost/cors` and enable CORS for your domain.
35+
- [ ] Go to `http://$serverurl:5984/_utils/#_config/nonode@nohost` and set `require_valid_user` to true. If you are unable to get to the login screen after setting that, you can access it via `http://$serverurl:5984/_utils/#login`
36+
- [ ] Setup SSL [via this guide](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=48203146) //TODO
3337

3438

39+
- Minio
40+
- [ ] Setup SSL //TODO https://docs.minio.io/docs/how-to-secure-access-to-minio-server-with-tls
41+
- [ ] Create OpenNote bucket
3542

43+
## Syncing
44+
By default OpenNote is storing info in your browser. Until you setup syncing, you are at risk of lousing your notes. To setup syncing. From the home page click `Settings`, then click database. On the right hand side of the panel you will see a Replication url field. This expect a url to your couchDB database in the form of `$protocol://$user:$password@$serverurl:$port/$database`.
45+
46+
For example if your server information is as follows:
47+
48+
Item | Value
49+
--- | ---
50+
protocol | http
51+
user | admin
52+
password | password
53+
serverurl | 127.0.0.1
54+
port | 5984
55+
database | opennote
56+
57+
then your replication url would be `http://admin:[email protected]:6984/opennote`
58+
59+
You will see an alert if replication is working.
3660

3761
## Uninstall
3862
If you ever want to shutdown OpenNote run `docker-compose down` in the same folder as `docker-compose.yml`. This will shut down the containers associated with OpenNote.

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<script src="openNote.bundle.js"></script>
1919

2020
</head>
21-
<body>
22-
<div id="menu" class="ng-hide fadeIn" ng-show="showMenu" ng-include="'openNote/partials/navBarPartial.html'"></div>
21+
<body class="ng-hide randomFadeInDirective" ng-show="showUI">
22+
<div id="menu" ng-include="'openNote/partials/navBarPartial.html'"></div>
2323
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-12" ng-include="'openNote/partials/tagListPartial.html'"></div>
2424
<div class="col-lg-10 col-md-9 col-sm-8 col-xs-12" ng-view> </div>
2525
<div id="copyRight" class="col-xs-12 fadeOutDirective">&#169; 2018 Jacob Liscom - Version {{version}}</div>

openNote/controllers/noteController.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,6 @@ openNote.controller("noteController", ["$scope",
111111
lineNumbers: true,
112112
indentUnit: 4
113113
});
114-
115-
// var resize = function() {
116-
// $(".CodeMirror").css({"height": ($(window).height()*0.75 )+ "px"});
117-
// };
118-
// window.onresize = resize;
119-
// resize();
120-
121114
});
122115

123116
};
@@ -139,7 +132,7 @@ openNote.controller("noteController", ["$scope",
139132
console.error(response);
140133
throw response;
141134
}
142-
135+
143136
detachWindowUnload();
144137

145138
//Tags

openNote/controllers/settings/databaseController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ openNote.controller("databaseController", ["$scope",
2424
* Save replication settings
2525
*/
2626
$scope.save = function() {
27-
storageService.setRemoteURL($scope.url);
27+
storageService.setRemoteURL($scope.url);//TODO validate this with a regex or something
2828
$rootScope.$on("replicationComplete", function() {
2929
$rootScope.$emit("reloadListView", {});
3030
});

openNote/controllers/tagController.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ openNote.controller("tagController", ["$scope",
3434
var tags = map.tags[$scope.tag];
3535
tags.forEach(function(tag) {
3636
storageService.get(tag).then(function(note) {
37-
$scope.notes.push(note);
37+
$scope.notes.push({
38+
doc:note
39+
});
3840
$scope.$apply();
3941
});
4042
});

openNote/directives/folderContentsDirective.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ openNote.directive("folderContentsDirective", [
4444
*/
4545
$scope.loadNote = function(note) {
4646
$scope.fadeOut(function() {
47-
$location.url("/note/" + note.id);
47+
$location.url("/note/" + note.doc._id);
4848
});
4949
};
5050

openNote/openNote.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ openNote.value("config", {
88
* Get current version
99
*/
1010
getVersion: function(){
11-
return "17.02.01";
11+
return "18.03.00";
1212
},
1313

1414
/**

openNote/openNote.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,30 @@ openNote.run([
4141
"config",
4242
"tagService",
4343
"$http",
44+
"$timeout",
4445
function($rootScope,
4546
$location,
4647
config,
4748
tagService,
48-
$http) {
49+
$http,
50+
$timeout) {
4951

5052
$rootScope.version = config.getVersion();
5153
tagService.bindHandlers();
5254
$rootScope.$on("$routeChangeStart", function() {
5355

5456
//Initial entry after if logged in
55-
if (!$rootScope.showMenu && !$rootScope.showSideBar) //make sure we only fade in/run once
57+
if (!$rootScope.showUI) //make sure we only fade in/run once
5658
$rootScope.$emit("init");
5759
});
5860

5961
/**
6062
* Initialize app and start fade in
6163
*/
6264
$rootScope.$on("init", function() {
63-
$rootScope.showMenu = true;
64-
$rootScope.showSideBar = true;
65+
$timeout(function(){
66+
$rootScope.showUI = true;
67+
});//Wait for everything to make sure fade in is not skipped
6568

6669
//Check for updates
6770
$http.get(config.getUpdateURL()).then(

0 commit comments

Comments
 (0)