Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

some fixes and default configurations

  • Loading branch information...
commit b064ed181ac0822efb2bf8a6b558d6f42fc8e55a 1 parent fa141e7
@pedronasser pedronasser authored
View
2  README.md
@@ -67,7 +67,7 @@ WNS Framework @ v1.0.1a
}
},
"components": {
- "http":
+ "http": {
"listen":[{SERVER PORT},"127.0.0.1"]
}
}
View
3  default-config.json
@@ -5,7 +5,8 @@
"app": {
"default": {
"appPath": "default/",
- "domain": "127.0.0.1"
+ "domain": "127.0.0.1",
+ "dbEngine": "mongo"
}
},
View
12 source/app/config.json
@@ -6,11 +6,15 @@
// "source/config/wnAppConfig.json"
// And edit.
+ // Application Name
+ "title": "Default WNS WebApp",
+
+ // Other components configuration
"components": {
- "urlManager": {
- "rules": {
- "<controller:api>/<action:class>/<name:.*>":"<controller>/<action>"
- }
+ "http": {
+ "serveralias": "localhost",
+ "errorPage": "site/error",
+ "defaultController":"site"
},
"database": {
"class": "wnDbConnection",
View
51 source/app/public/css/style.css
@@ -43,6 +43,7 @@ ul#menu li {
display: block;
float: left;
height: 22px;
+ margin-right:5px;
}
ul#menu li a {
@@ -82,54 +83,4 @@ ul#menu li a {
background: #E9E9E9;
border-top: 1px dotted #CCC;
padding: 11px;
-}
-
-.line {
- display: block;
- width: 100%;
- height: 1px;
- background-color: #E0E0E0;
-}
-
-.prop {
- background-color: #EFEFEF;
- padding: 10px;
- margin: 10px 0px;
-}
-
-div.prop h4 {
- font-size: 15px;
- margin: 0;
- padding: 0;
-}
-
-.className {
- color: #333;
- letter-spacing: 1px;
- border-bottom: 1px solid #D0D0D0;
- margin-bottom: 15px;
-}
-
-.classExtend {
- margin-bottom: 10px;
-}
-
-.extends {
- height: 25px;
- padding-bottom: 10px;
-}
-
-.extends li {
- display: inline;
-}
-
-.extends li a {
- padding: 5px;
- background-color: #F0F0F0;
- margin-right: 5px;
- color: black;
-}
-
-.extends li a:hover {
- background-color: #E0E0E0;
}
View
9 source/core/web/wnController.js
@@ -155,16 +155,17 @@ module.exports = {
render: function (view,data) {
var _controller=this.getControllerName(),
_layout=this.layout;
- _view=view;
+ _view=view,
+ _viewTpl=this.app.getFile(this.app.getConfig('path').views+_controller+'/'+view+'.tpl')
// Verifica se a view realmente existe...
- if (_viewtpl=this.app.getFile(this.app.getConfig('path').views+_controller+'/'+view+'.tpl')) {
+ if (_viewTpl!==false) {
// Buscando templates...
- var _layouttpl=this.app.getFile(this.app.getConfig('path').views+'layouts/'+_layout+'.tpl');
+ var _layoutTpl=this.app.getFile(this.app.getConfig('path').views+'layouts/'+_layout+'.tpl');
// Importa o layout...
- this.view.layout = (new this.app.c.wnTemplate(_layouttpl?_layouttpl:'{conteudo}',false)).match({'content':_viewtpl});
+ this.view.layout = (new this.app.c.wnTemplate(_layoutTpl?_layoutTpl:'{conteudo}',false)).match({'content':_viewTpl});
// Load the language from configuration
this.view.language = this.app.getConfig('components').view.language;
View
3  source/core/web/wnView.js
@@ -93,7 +93,8 @@ module.exports = {
// Menu
var _menu = '',
_tplMenu = new this.controller.app.c.wnTemplate(this.controller.app.getConfig('components').view.menuItemTemplate);
- for (m in this.controller.app.getConfig('components').view.menu) {
+ for (m in this.controller.app.getConfig('components').view.menu)
+ {
_menu += _tplMenu.match({'label':m,'url':this.controller.app.getConfig('components').view.menu[m][0]});
}
this.menu = new this.controller.app.c.wnTemplate(this.controller.app.getConfig('components').view.menuTemplate).match({'list':_menu});
Please sign in to comment.
Something went wrong with that request. Please try again.