Skip to content

Commit

Permalink
fixed: code
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed Jun 2, 2014
1 parent a855343 commit f7f28ee
Show file tree
Hide file tree
Showing 56 changed files with 38 additions and 300 deletions.
1 change: 0 additions & 1 deletion angularjs-bootstrap/tmp/app.js

This file was deleted.

1 change: 0 additions & 1 deletion angularjs-bootstrap/tmp/controllers-home.js

This file was deleted.

1 change: 0 additions & 1 deletion angularjs-bootstrap/tmp/controllers-user.js

This file was deleted.

1 change: 0 additions & 1 deletion angularjs-bootstrap/tmp/css-app.css

This file was deleted.

1 change: 1 addition & 0 deletions angularjs-bootstrap/views/_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css" />
@{head}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
@{favicon('favicon.ico')}

Expand Down
2 changes: 1 addition & 1 deletion angularjs-common/views/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@{ngStyle('app')}

<!-- cdnjs -->
@{ngLocale('~en-us')}
@{ngLocale('en-us')}

<!-- /app/controllers/ -->
@{ngController('home', 'user')}
Expand Down
4 changes: 0 additions & 4 deletions assertion-testing/tests/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,16 @@ exports.run = function(framework, name) {
});

framework.assert('Test URL 1', '/1/', ['GET'], function(error, data, code, headers, cookies, name) {
console.log(data, code)
assert.ok(code === 200 && data === '1', name);
console.log('1');
});

framework.assert('Test URL 2', '/2/', ['GET'], function(error, data, code, headers, cookies, name) {
assert.ok(code === 200 && data === '2', name);
console.log('2');
});

framework.assert('Test URL 3', '/3/', ['GET'], function(error, data, code, headers, cookies, name) {
// throws error, data === 4
assert.ok(code === 200 && data === '3', name);
console.log('3');
});

};
4 changes: 3 additions & 1 deletion async/views/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
</head>
<body>

@{!model.join('<br />')}
@{foreach m in model}
<div>@{m}</div>
@{end}

</body>
</html>
2 changes: 1 addition & 1 deletion authorization-www-basic/controllers/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports.install = function(framework) {
function authorization() {

var self = this;
var user = self.baa('This is secure area');
var user = self.baa('This is secured area');

if (user === null) {
// self.baa() automatically will send a response to an authentication.
Expand Down
1 change: 1 addition & 0 deletions authorization/databases/users-logs.nosql
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
{"id":1,"email":"[email protected]","ip":"127.0.0.1","date":"2013-12-27T22:33:40.839Z"}
{"id":1,"email":"[email protected]","ip":"127.0.0.1","date":"2013-12-27T22:34:38.823Z"}
{"id":1,"email":"[email protected]","ip":"127.0.0.1","date":"2014-03-02T08:10:29.987Z"}
{"id":1,"email":"[email protected]","ip":"127.0.0.1","date":"2014-05-29T06:01:40.119Z"}
4 changes: 2 additions & 2 deletions components/components/grid.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var configuration = { class: 'grid' };

exports.install = function(framework) {
// @#auto-vendor-prefix#@ = framework automatically adds prefixes
framework.fs.create.css('grid', '@#auto-vendor-prefix#@\n.grid{width:100%;border:1px solid #E0E0E0;border-right:0;border-bottom:0;font:normal 11px Arial;color:gray}.grid td{border:1px solid #E0E0E0;border-left:0;border-top:0;padding:5px 8px}', true);
// /*auto*/ = framework automatically adds vendor prefixes
framework.fs.create.css('grid', '/*auto*/\n.grid{width:100%;border:1px solid #E0E0E0;border-right:0;border-bottom:0;font:normal 11px Arial;color:gray}.grid td{border:1px solid #E0E0E0;border-left:0;border-top:0;padding:5px 8px}', true);
};

exports.configure = function(obj) {
Expand Down
1 change: 0 additions & 1 deletion components/public/css/grid.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
@#auto-vendor-prefix#@

.grid{width:100%;border:1px solid #E0E0E0;border-right:0;border-bottom:0;font:normal 11px Arial;color:gray}.grid td{border:1px solid #E0E0E0;border-left:0;border-top:0;padding:5px 8px}
3 changes: 2 additions & 1 deletion css-auto-vendor-prefixes/public/css/default.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@#auto-vendor-prefix#@
/*auto*/

body { margin:50px; background-color: #E0E0E0; }

div { color: red; box-shadow: 10px 10px 5px silver; border-radius: 10px 10px 10px 10px; background-color: white; padding:10px; }
Expand Down
3 changes: 3 additions & 0 deletions email-send/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# E-mail templating

Example: <https://github.com/totaljs/examples/tree/master/controller-mail>
3 changes: 0 additions & 3 deletions email-templating-view/config-debug

This file was deleted.

10 changes: 0 additions & 10 deletions email-templating-view/controllers/default.js

This file was deleted.

31 changes: 0 additions & 31 deletions email-templating-view/definitions/mail.js

This file was deleted.

17 changes: 0 additions & 17 deletions email-templating-view/views/mail.html

This file was deleted.

3 changes: 0 additions & 3 deletions email-templating/config-debug

This file was deleted.

11 changes: 0 additions & 11 deletions email-templating/controllers/default.js

This file was deleted.

54 changes: 0 additions & 54 deletions email-templating/definitions/mail.js

This file was deleted.

5 changes: 0 additions & 5 deletions email-templating/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions email-templating/resources/en.resource

This file was deleted.

4 changes: 1 addition & 3 deletions forms/controllers/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ exports.install = function(framework) {
function view_registration() {
var self = this;

self.repository.title = 'Registration';

var model = {
type: 0,
name: '',
Expand Down Expand Up @@ -36,7 +34,7 @@ function json_registration() {
var self = this;

self.repository.country = ['', 'SK', 'CZ', 'EN', 'DE', 'AU', 'HU', 'PL', 'FR'];

self.repository.type = [
{ id: 0, name: '' },
{ id: 1, name: 'Developer' },
Expand Down
2 changes: 1 addition & 1 deletion forms/views/_layout.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>@{repository.title}</title>
<title>Registration</title>
<meta charset="utf-8" />
<meta http-equiv="content-language" content="sk" />
<meta http-equiv="X-UA-Compatible" content="IE=10" />
Expand Down
2 changes: 1 addition & 1 deletion framework-schema-validation/controllers/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function plain_homepage() {
var self = this;

// send test request to /order/
utils.request(self.host('/order/'), 'POST', 'firstname=Peter&lastname=Sirka&email=[email protected]&telephone=0903163302&address=&inject=1&inject=2&param=custom');
utils.request(self.host('/order/'), ['post'], { firstname: 'Peter', lastname: 'Sirka', email: '[email protected]', telephone: '0903163302', address: '', inject1: '', inject2: '', param: 'custom' });

self.plain('Show node.js console');
}
Expand Down
2 changes: 1 addition & 1 deletion framework-schema/controllers/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function plain_homepage() {
var self = this;

// send test request to /order/
utils.request(self.host('/order/'), 'POST', 'firstname=Peter&lastname=Sirka&email=[email protected]&telephone=0903163302&address=&inject=1&inject=2&param=custom');
utils.request(self.host('/order/'), ['post'], { firstname: 'Peter', lastname: 'Sirka', email: '[email protected]', telephone: '0903163302', address: '', inject1: '', inject2: '', param: 'custom' });

self.plain('Show node.js console');
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion models/controllers/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ exports.install = function(framework) {

function json_homepage() {
var self = this;
var user = self.model('user');
var user = MODEL('user');
self.json(user, true);
}
6 changes: 3 additions & 3 deletions navigation-sitemap/templates/sitemap.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ul>
<!--
<li><a href="{url}">{name}</a></li>
-->
@{foreach}
<li><a href="@{model.url}">@{model.name}</a></li>
@{end}
</ul>
9 changes: 9 additions & 0 deletions navigation-sitemap/views/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,14 @@

@{template('sitemap', sitemap())}

<br />
<!-- OR -->
<br />

@{foreach m in sitemap()}
<div>@{m.name}, relative url: @{m.url}</div>
@{end}


</body>
</html>
6 changes: 3 additions & 3 deletions pagination/templates/paging1.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="mb5">Paging:</div>
<div class="paging">
<!--
<a href="@{model.url}">@{model.page}</a>
-->
@{foreach}
<a href="@{model.url}">@{model.page}</a>
@{end}
</div>
6 changes: 3 additions & 3 deletions pagination/templates/paging2.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="mb5">Paging @{repository.page}/@{repository.count}:</div>
<div class="paging">
<!--
<a href="@{model.url}"@{if model.selected} class="selected"@{endif}>@{model.page}</a>
-->
@{foreach m in model}
<a href="@{m.url}"@{if m.selected} class="selected"@{endif}>@{m.page}</a>
@{end}
<div>@{repository.items.format('### ###')} items</div>
</div>
2 changes: 1 addition & 1 deletion pagination/views/homepage.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@{template('paging1', model.render(), model)}
@{template('paging1', model.render())}

<hr />

Expand Down
16 changes: 0 additions & 16 deletions routing-advanced/controllers/admin/articles.js

This file was deleted.

Loading

0 comments on commit f7f28ee

Please sign in to comment.