Skip to content

Commit 8c3bef0

Browse files
committed
Fixed docs
1 parent 10e9749 commit 8c3bef0

File tree

4 files changed

+76
-75
lines changed

4 files changed

+76
-75
lines changed

Doc/HowToUse.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ How to use
22
--------------
33
OpenNote uses a touch to open scheme.
44
If you want to open something just click it.
5-
5+
66
## Login
77
To login simple go to your instance on OpenNote. You will need to have javascript enabled
88
Then simply click "Login"
@@ -16,7 +16,7 @@ Once you have some stuff simply click on a folder(Always Green) or browse a tree
1616
![][topLevel]
1717
Eventually you'll find a note(Always blue) that you want to open. Simply click it or touch it.
1818

19-
![][plants]
19+
![][plants]
2020

2121
## Notes
2222
Once you click on a note you'll will be presented with it in a read only view.
@@ -26,10 +26,9 @@ If you want to edit a note, click on the "Edit" button in the top bar
2626

2727
![][seedsEdit]
2828
This will bring you to the CKEditor. Once you are all done editing, click "Save" to store the note.
29-
Dont worry to much about the changing the content of your notes. The program keeps a history of what you changed.
3029

31-
[login]: https://raw.github.com/FoxUSA/OpenNote/master/Doc/screenShots/login.png
30+
[login]: https://raw.github.com/FoxUSA/OpenNote/master/Doc/screenShots/login.png
3231
[topLevel]: https://raw.github.com/FoxUSA/OpenNote/master/Doc/screenShots/topLevel.png
33-
[plants]: https://raw.github.com/FoxUSA/OpenNote/master/Doc/screenShots/plants.png
32+
[plants]: https://raw.github.com/FoxUSA/OpenNote/master/Doc/screenShots/plants.png
3433
[seedsView]: https://raw.github.com/FoxUSA/OpenNote/master/Doc/screenShots/seedsView.png
35-
[seedsEdit]: https://raw.github.com/FoxUSA/OpenNote/master/Doc/screenShots/seedsEdit.png
34+
[seedsEdit]: https://raw.github.com/FoxUSA/OpenNote/master/Doc/screenShots/seedsEdit.png
Lines changed: 53 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11

2-
openNote.controller("folderController", function( $scope,
3-
$rootScope,
4-
$location,
5-
$routeParams,
6-
storageService,
2+
openNote.controller("folderController", function( $scope,
3+
$rootScope,
4+
$location,
5+
$routeParams,
6+
storageService,
77
config,
88
$timeout) {
99
$rootScope.buttons = [];
1010
$scope.folderEditMode = false;
1111
$scope.currentFolder = {};
1212
$scope.parentFolder = null;
13-
13+
1414
//add buttons
1515
if($routeParams.id!=null)
1616
$rootScope.buttons.push({
@@ -22,43 +22,43 @@ openNote.controller("folderController", function( $scope,
2222
},
2323
helpText: $rootScope.helpContent.newNoteButton
2424
});
25-
25+
2626
//Create a folder
2727
$rootScope.buttons.push({
2828
text: "New folder",
2929
action: function(){
3030
var prompt = "Please enter a name for the new folder";
31-
31+
3232
if($scope.currentFolder.name!=null)
3333
prompt += "that will be created in "+$scope.currentFolder.name;
34-
35-
alertify.prompt(
34+
35+
alertify.prompt(
3636
prompt,
3737
function(confirm,data){
3838
if(!confirm)
3939
return;
40-
40+
4141
var folder = {
4242
parentFolderID:$scope.currentFolder._id,
4343
name:data
4444
};
45-
45+
4646
createFolder(folder);
4747
},
4848
"");
4949
},
5050
helpText: $rootScope.helpContent.newFolderButton
5151
});
52-
52+
5353
$rootScope.buttons.push({
5454
text: "Search",
5555
action: function(){
5656
$location.url("/search/"+$scope.currentFolder.id);
5757
},
5858
helpText: $rootScope.helpContent.findButton
5959
});
60-
61-
/**
60+
61+
/**
6262
* Load current folder contents
6363
*/
6464
$scope.loadCurrentFolder = function(){
@@ -73,41 +73,41 @@ openNote.controller("folderController", function( $scope,
7373
storageService.database().get($routeParams.id).then(function(doc){
7474
$scope.currentFolder=doc;
7575
loadCurrentFolderContents();
76-
76+
7777
if($scope.currentFolder.parentFolderID==null)
7878
$scope.parentFolder={name:"Home"};
7979
else
8080
storageService.database().get($scope.currentFolder.parentFolderID).then(function(doc){
8181
$scope.parentFolder=doc;
8282
$scope.$apply();
8383
});
84-
});
84+
});
8585
}
8686
};
87-
87+
8888
/**
8989
* Activate folder edit mode if we are not in the home folder
9090
*/
9191
$scope.activateFolderEditMode = function(){
9292
if($scope.currentFolder._id != null)
9393
$scope.folderEditMode = !$scope.folderEditMode;
9494
};
95-
95+
9696
/**
9797
* fade out all folders
9898
*/
9999
$scope.fadeOutFoldersAndNotes = function(callback){
100-
if( ( $scope.currentFolder.foldersInside !=null
100+
if( ( $scope.currentFolder.foldersInside !=null
101101
&& $scope.currentFolder.foldersInside.length>0)
102-
|| ( $scope.currentFolder.notesInside !=null
102+
|| ( $scope.currentFolder.notesInside !=null
103103
&& $scope.currentFolder.notesInside.length>0)){
104-
104+
105105
$(".note").fadeTo(config.fadeSpeedShort(),0,function(){
106106
$scope.$apply(function(){
107107
callback();
108108
});
109109
});
110-
110+
111111
$(".folder").fadeTo(config.fadeSpeedShort(),0,function(){
112112
$scope.$apply(function(){
113113
callback();
@@ -117,7 +117,7 @@ openNote.controller("folderController", function( $scope,
117117
else
118118
callback();
119119
};
120-
120+
121121
/**
122122
* Load a folder
123123
* @param folder- the folder to load
@@ -127,7 +127,7 @@ openNote.controller("folderController", function( $scope,
127127
$location.url("/folder/"+folder.doc._id);
128128
});
129129
};
130-
130+
131131
/**
132132
* Load a note
133133
* @param note - load a note
@@ -137,7 +137,7 @@ openNote.controller("folderController", function( $scope,
137137
$location.url("/note/"+note.id);
138138
});
139139
};
140-
140+
141141
/**
142142
* Rename the current folder
143143
*/
@@ -146,7 +146,7 @@ openNote.controller("folderController", function( $scope,
146146
function(confirm,data){
147147
if(!confirm)
148148
return;
149-
149+
150150
$scope.currentFolder.name=data;
151151
storageService.database().put($scope.currentFolder).then(function(result){
152152
$scope.currentFolder._rev=result.rev
@@ -156,11 +156,11 @@ openNote.controller("folderController", function( $scope,
156156
throw error
157157
//FIXME conflict resolution
158158
});
159-
},
159+
},
160160
$scope.currentFolder.name//show the current folder name
161161
);
162162
};
163-
163+
164164
/**
165165
* Remove this folder and all sub items
166166
*/
@@ -169,21 +169,21 @@ openNote.controller("folderController", function( $scope,
169169
function(confirm) {
170170
if(!confirm)
171171
return;
172-
172+
173173
var parrentFolderID = $scope.currentFolder.parrentFolderID;
174174
storageService.database().remove($scope.currentFolder).then(function(result){
175175
$rootScope.$emit("reloadListView", {});
176-
176+
177177
if(parrentFolderID==null)
178178
$location.url("/folder/");
179179
else
180180
$location.url("/folder/"+parrentFolderID);
181-
181+
182182
$scope.$apply();
183183
});
184184
});
185185
}
186-
186+
187187
/**
188188
* Listen to changed folder events to see if its the current open folder
189189
*/
@@ -192,54 +192,64 @@ openNote.controller("folderController", function( $scope,
192192
$scope.loadCurrentFolder();//reload
193193
}
194194
});
195-
195+
196196
/**
197197
* Create a folder object
198198
*/
199199
var createFolder = function(folder){
200200
folder.type="folder";
201201
storageService.database().post(folder).then(function(response){
202-
if(!response.ok)
202+
if(!response.ok)
203203
throw "//FIXME";
204204
$rootScope.$emit("reloadListView", {});
205205
$location.url("/folder/"+response.id);
206206
$scope.$apply();
207-
207+
208208
}).catch(function(error){
209209
console.log(error);//FIXME
210210
});
211211
}
212-
212+
213213
/**
214214
* Load the current folders contents
215215
*/
216216
var loadCurrentFolderContents = function(){
217217
storageService.loadFolderContents($scope.currentFolder._id, function (results) {
218218
$scope.currentFolderContents=results.rows;
219-
219+
220220
//Do they have anything to display?
221221
if($scope.currentFolder._id==null && $scope.currentFolderContents.length==0){
222222
alertify.alert("It looks like you dont have any folders. You can create one using the \"New Folder\" button in the top right of the page. If you need to pull your remote notes <a href='#/settings/database'>click here</a>.");
223223
};
224-
224+
225225
$scope.$apply();
226226
});
227227
};
228-
228+
229229
/**
230230
* Filter out everything but type folder
231231
*/
232232
$scope.folderFilter=function(object){
233233
return storageService.typeFilter(object,"folder");
234234
};
235-
235+
236236
/**
237237
* Filter out everything but type note
238238
*/
239239
$scope.noteFilter=function(object){
240240
return storageService.typeFilter(object,"note");
241241
};
242-
242+
243+
//Up a folder function
244+
if(parentFolder!=null)
245+
dragula([document.getElementById("parentFolder"), document.getElementById(right)]).on("drag", function (el) {
246+
el.className = el.className.replace(' animazing', '');
247+
}).on('drop', function (el) {
248+
setTimeout(function () {
249+
el.className += ' animazing';
250+
}, 0);
251+
});
252+
243253
//Load current folder
244254
$timeout($scope.loadCurrentFolder);
245-
});
255+
});

OpenNote/openNote/partials/folderPartial.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="folderPartial">
22
<div id="folderTitleBar">
33
<ol class="breadcrumb">
4-
<li ng-if="parentFolder!=null">
4+
<li id="parentFolder" ng-if="parentFolder!=null">
55
<a href="#/folder/{{parentFolder._id}}">{{parentFolder.name}}</a>
66
</li>
77
<li class="active" data-intro="{{helpContent.folderEditModeButton}}" ng-click="activateFolderEditMode();">
@@ -13,9 +13,9 @@
1313
<button class="customButton" ng-click="renameFolder();">Rename</button>
1414
<button class="customButton" ng-click="removeFolder();">Delete</button>
1515
</div>
16-
16+
1717
</div>
18-
18+
1919
<div ng-Repeat="folder in currentFolderContents.filter(folderFilter)" class="startHidden randomFadeInDirective box folder" ng-click="loadFolder(folder);">
2020
<h4>
2121
{{folder.doc.name}}
@@ -25,7 +25,7 @@ <h4>
2525
Folder
2626
</p>
2727
</div>
28-
28+
2929
<div ng-Repeat="note in currentFolderContents.filter(noteFilter)" class="startHidden box randomFadeInDirective note" ng-click="loadNote(note);">
3030
<h4>
3131
{{note.doc.title}}
@@ -35,4 +35,4 @@ <h4>
3535
<span class="right">Note</span>
3636
</p>
3737
</div>
38-
</div>
38+
</div>

README.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,19 @@ Documentation
7474
![][dark]
7575
License
7676
-------
77-
[JQuery](https://github.com/jquery/jquery) - Distributed under the MIT License
78-
79-
[Angular](https://github.com/angular) - Distributed under the MIT License
80-
81-
[Bootstrap](https://github.com/twbs/bootstrap) - Distributed under the MIT License
82-
83-
[CKEditor](https://github.com/ckeditor/ckeditor-releases) - Distributed under the MPL License
84-
85-
[Angular UI Tree](https://github.com/angular-ui-tree/angular-ui-tree) - Distributed under the MIT License
86-
87-
[Alertify.js](https://github.com/fabien-d/alertify.js) - Distributed under the MIT License
88-
89-
[PouchDB](https://github.com/pouchdb/pouchdb) - Distributed under the Apache License
90-
91-
[Dragula](https://github.com/bevacqua/dragula) - Distributed under the MIT License
92-
93-
[Into.js](https://github.com/usablica/intro.js/) - Distributed with license from Afshin Mehrabani Copyright (C) 2012
94-
95-
OpenNote Code - Distributed under the MIT License
96-
97-
© Jacob Liscom 2015
77+
JQuery - Distributed under the MIT License
78+
Angular - Distributed under the MIT License
79+
Bootstrap - Distributed under the MIT License
80+
CKEditor - Distributed under the MPL License
81+
Angular UI Tree - Distributed under the MIT License
82+
Alertify.js - Distributed under the MIT License
83+
PouchDB - Distributed under the Apache License
84+
Dragula - Distributed under the MIT License
85+
Into.js - Distributed with license from Afshin Mehrabani Copyright (C) 2012
86+
87+
OpenNote Code - Distributed under the MIT License
88+
89+
© Jacob Liscom 2014
9890

9991
Credits
10092
-------

0 commit comments

Comments
 (0)