forked from totaljs/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeedback.js
More file actions
64 lines (45 loc) · 1.53 KB
/
feedback.js
File metadata and controls
64 lines (45 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
var greeting = '';
exports.version = '1.01';
exports.install = function(options) {
F.route('/feedback/', feedback);
// INSTALL('view', 'feedback-view', 'http://www.some-url.com/some-view.html');
// create client side JavaScript
// F.fs.create.js('feedback.js', 'func' + 'tion feedback() { alert("I am feedback"); }');
// create client side CSS
// F.fs.create.css('feedback.css', 'feedback { padding:5px; font: normal 20px Arial; }');
// create view file (must exists Views directory)
// F.fs.create.view('feedback', '<div>VIEW</div>');
// create resource (must exists Resources directory)
// F.fs.create.resource('feedback', 'hello : welcome in feedback resource');
// get directory path
// F.path.public('image.jpg');
// F.path.logs();
// F.path.temp();
// F.path.backup();
// F.path.root();
/*
F.on('load', function() {
// all controllers and modules is loaded
});
F.on('controller', function(controller, name) {
// every request to controller call this event
console.log(controller.req.ip);
});
*/
};
exports.uninstall = function(options) {
// routes are removed automatically
// remove files
// F.fs.rm.css('feedback');
// F.fs.rm.js('feedback');
// F.fs.rm.view('feedback');
// F.fs.rm.resource('feedback');
};
exports.greeting = function(value) {
console.log('From greeting(): ' + value);
greeting = value;
return value;
};
function feedback() {
this.plain('action in module: feedback.js');
}