Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a6f479d5c | ||
|
|
36d5e27bfb |
@@ -28,8 +28,6 @@ www/lang/*.mo
|
|||||||
www/js/app.js
|
www/js/app.js
|
||||||
www/js/libs.js
|
www/js/libs.js
|
||||||
|
|
||||||
www/file/*
|
|
||||||
|
|
||||||
www/css/.sass-cache
|
www/css/.sass-cache
|
||||||
www/css/*.css
|
www/css/*.css
|
||||||
!www/css/bootstrap.min.css
|
!www/css/bootstrap.min.css
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
1.13.2
|
1.13.0
|
||||||
|
|||||||
+42
-48
@@ -1,5 +1,5 @@
|
|||||||
::use 'base.mtt'::
|
::use 'base.mtt'::
|
||||||
|
|
||||||
::if getParam('__redirect')!=null::
|
::if getParam('__redirect')!=null::
|
||||||
<!-- need to login to go to this page-->
|
<!-- need to login to go to this page-->
|
||||||
<script>$(function(){
|
<script>$(function(){
|
||||||
@@ -16,11 +16,11 @@
|
|||||||
<h1>::_("Cagette.net")::</h1>
|
<h1>::_("Cagette.net")::</h1>
|
||||||
::end::
|
::end::
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4 accountBlock">
|
<div class="col-md-4 accountBlock">
|
||||||
::if user != null::
|
::if user != null::
|
||||||
<div class="dropdown pull-right text-right userName" style="margin-top:16px;">
|
<div class="dropdown pull-right text-right userName" style="margin-top:16px;">
|
||||||
|
|
||||||
<a class="" style="margin-right:16px;" href="/user/choose?show=1">
|
<a class="" style="margin-right:16px;" href="/user/choose?show=1">
|
||||||
<span class="glyphicon glyphicon-chevron-left"></span>::_("Change group")::
|
<span class="glyphicon glyphicon-chevron-left"></span>::_("Change group")::
|
||||||
</a>
|
</a>
|
||||||
@@ -29,46 +29,46 @@
|
|||||||
<span class="glyphicon glyphicon-user"></span>
|
<span class="glyphicon glyphicon-user"></span>
|
||||||
::user.getName()::
|
::user.getName()::
|
||||||
::if user.firstName2!=null::
|
::if user.firstName2!=null::
|
||||||
::_("et"):: ::user.lastName2:: ::user.firstName2::
|
::_("et"):: ::user.lastName2:: ::user.firstName2::
|
||||||
::end::
|
::end::
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
|
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
|
||||||
<li><a href="/user/logout"><span class="glyphicon glyphicon-log-out"></span> ::_("Log out")::</a></li>
|
<li><a href="/user/logout"><span class="glyphicon glyphicon-log-out"></span> ::_("Log out")::</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
::else::
|
::else::
|
||||||
<div class="pull-right text-right">
|
<div class="pull-right text-right">
|
||||||
<a href="/user/login" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-user"></span> ::_("Log in")::</a>
|
<a href="/user/login" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-user"></span> ::_("Log in")::</a>
|
||||||
<a class="btn btn-default btn-sm" href="/group/map"><span class="glyphicon glyphicon-search"></span> ::_("Look for another group")::</a>
|
<a class="btn btn-default btn-sm" href="/group/map"><span class="glyphicon glyphicon-search"></span> ::_("Look for another group")::</a>
|
||||||
</div>
|
</div>
|
||||||
::end::
|
::end::
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
::if user != null && noGroup!=true::
|
::if user != null && noGroup!=true::
|
||||||
|
|
||||||
<nav class="navbar navbar-default" ::cond user.getAmap()!=null::>
|
<nav class="navbar navbar-default" ::cond user.getAmap()!=null::>
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#cagette-navbar">
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#cagette-navbar">
|
||||||
<span class="sr-only">Toggle navigation</span>
|
<span class="sr-only">Toggle navigation</span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="cagette-navbar">
|
<div class="collapse navbar-collapse" id="cagette-navbar">
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-left">
|
<ul class="nav navbar-nav navbar-left">
|
||||||
<li ::attr class if(category=="home") 'active' ::><a href="/">::_("Home")::</a></li>
|
<li ::attr class if(category=="home") 'active' ::><a href="/">::_("Home")::</a></li>
|
||||||
<li ::attr class if(category=="contract" ) 'active' ::><a href="/contract">::_("My account")::</a></li>
|
<li ::attr class if(category=="contract" ) 'active' ::><a href="/contract">::_("My account")::</a></li>
|
||||||
<li ::attr class if(category=="amap") 'active' ::><a href="/amap">::_("Farmers")::</a></li>
|
<li ::attr class if(category=="amap") 'active' ::><a href="/amap">::_("Farmers")::</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li id="member" ::attr class if(category=="members") 'active' ::>
|
<li id="member" ::attr class if(category=="members") 'active' ::>
|
||||||
<a href="/member" ::cond user.canAccessMembership()::>::_("Members")::</a></li>
|
<a href="/member" ::cond user.canAccessMembership()::>::_("Members")::</a></li>
|
||||||
@@ -81,13 +81,13 @@
|
|||||||
<li ::cond user.isAdmin():: ::attr class if(category=="admin") 'active' ::>
|
<li ::cond user.isAdmin():: ::attr class if(category=="admin") 'active' ::>
|
||||||
<a href="/admin" >::_("Admin")::</a></li>
|
<a href="/admin" >::_("Admin")::</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="content" class="col-md-12">
|
<div id="content" class="col-md-12">
|
||||||
@@ -98,22 +98,22 @@
|
|||||||
::else::
|
::else::
|
||||||
<span class="glyphicon glyphicon-ok"></span>
|
<span class="glyphicon glyphicon-ok"></span>
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
::raw notification.text::
|
::raw notification.text::
|
||||||
</div>
|
</div>
|
||||||
::end::
|
::end::
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- extra notification block for plugins -->
|
<!-- extra notification block for plugins -->
|
||||||
::if extraNotifBlock!=null::
|
::if extraNotifBlock!=null::
|
||||||
::raw extraNotifBlock::
|
::raw extraNotifBlock::
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
::raw __content__::
|
::raw __content__::
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--<div class="row">
|
<!--<div class="row">
|
||||||
<div class="col-md-12 alert-danger text-center" style="border-radius: 8px;margin:8px 0;padding:8px 0;">
|
<div class="col-md-12 alert-danger text-center" style="border-radius: 8px;margin:8px 0;padding:8px 0;">
|
||||||
<span class="glyphicon glyphicon-cog"></span>
|
<span class="glyphicon glyphicon-cog"></span>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<div class="row" id="footer">
|
<div class="row" id="footer">
|
||||||
|
|
||||||
<div class="col-md-2" >
|
<div class="col-md-2" >
|
||||||
<img width="120" style="border: white 5px solid;" src="/img/logo-mini.jpg" alt="::_("Cagette.net")::" title="Logo ::_("Cagette.net")::"/>
|
<img width="120" style="border: white 5px solid;" src="/img/logo-mini.jpg" alt="::_("Cagette.net")::" title="Logo ::_("Cagette.net")::"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -133,12 +133,12 @@
|
|||||||
Cagette Péi est un logiciel libre qui favorise les circuits courts.<br/>
|
Cagette Péi est un logiciel libre qui favorise les circuits courts.<br/>
|
||||||
Il a été adapté pour les besoins des AMAPs sur le marché réunionnais.<br/>
|
Il a été adapté pour les besoins des AMAPs sur le marché réunionnais.<br/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3" >
|
<div class="col-md-3" >
|
||||||
::_("HELP")::
|
::_("HELP")::
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="http://www.cagette.net/wiki" target="_blank">::_("Documentation")::</a>
|
<a href="http://www.cagette.net/wiki" target="_blank">::_("Documentation")::</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Proposer une amélioration</a>
|
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Proposer une amélioration</a>
|
||||||
@@ -146,24 +146,18 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Soumettre une anomalie</a>
|
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Soumettre une anomalie</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" id="subfooter">
|
<div class="row" id="subfooter">
|
||||||
<p>
|
<span>version cagettepei-<a target="_blank" href="https://git.artcode.re/cagetters/cagettepei/src/tag/::VERSION::">::VERSION::</a></span>
|
||||||
version cagettepei-<a target="_blank" href="https://git.artcode.re/cagetters/cagettepei/src/tag/::VERSION::">::VERSION::</a>
|
|
||||||
</p>
|
|
||||||
::if BANDEAU_REGION::
|
|
||||||
<img src='/img/bandeau_region.png' alt='bandeau Région Réunion' width='250'></img>
|
|
||||||
::end::
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<!-- SQL LOG -->
|
<!-- SQL LOG -->
|
||||||
<table class="sqlLog table table-bordered" ::cond sqlLog::>
|
<table class="sqlLog table table-bordered" ::cond sqlLog::>
|
||||||
::foreach r sqlLog::
|
::foreach r sqlLog::
|
||||||
@@ -178,5 +172,5 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
::end::
|
::end::
|
||||||
|
|||||||
@@ -1,5 +1 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
{"name": "cagette-pei", "description": "le logiciel libre du circuit court", "license": "AGPL-3.0", "dependencies": {"bootstrap": "^3.3.4", "eonasdan-bootstrap-datetimepicker": "^4.7.14", "geolib": "^2.0.24", "haxe-modular": "^0.7.0", "jquery": "^2.2.4", "leaflet": "^1.3.1", "react": "^15.6.1", "react-bootstrap-typeahead": "1.4.2", "react-datetime": "^2.9.0", "react-dom": "^15.6.1", "react-leaflet": "^1.8.0", "react-places-autocomplete": "^6.0.2", "react-router": "^4.2.0", "react-router-dom": "^4.2.2"}, "devDependencies": {"babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", "babelify": "^7.3.0", "browserify": "^14.4.0", "cross-env": "^5.1.1", "node-sass": "^4.5.3", "npm-run-all": "^4.1.2", "uglify-js": "^3.1.9", "watchify": "^3.9.0"}, "scripts": {"build": "npm-run-all --parallel build:*", "build:js": "haxe cagetteJs.hxml", "build:sass": "node-sass www/css -o www/css", "watch:sass": "npm run build:sass -- --watch", "build2": "babel src -d lib", "libs:dev": "browserify js/libs/libs.js -o www/js/libs.js -d", "libs:prod": "cross-env NODE_ENV=production browserify js/libs/libs.js | uglifyjs -c -m > www/js/libs.js", "test": "haxe testsJS.hxml && node js/test/tests.js", "prepush": "npm test"}, "repository": {"type": "git", "url": "git+https://github.com/bablukid/cagette.git"}, "bugs": {"url": "https://github.com/bablukid/cagette/issues"}, "version": "1.12.0"}
|
|
||||||
=======
|
|
||||||
{"name": "cagette-pei", "description": "le logiciel libre du circuit court", "license": "AGPL-3.0", "dependencies": {"bootstrap": "^3.3.4", "eonasdan-bootstrap-datetimepicker": "^4.7.14", "geolib": "^2.0.24", "haxe-modular": "^0.7.0", "jquery": "^2.2.4", "leaflet": "^1.3.1", "react": "^15.6.1", "react-bootstrap-typeahead": "1.4.2", "react-datetime": "^2.9.0", "react-dom": "^15.6.1", "react-leaflet": "^1.8.0", "react-places-autocomplete": "^6.0.2", "react-router": "^4.2.0", "react-router-dom": "^4.2.2"}, "devDependencies": {"babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", "babelify": "^7.3.0", "browserify": "^14.4.0", "cross-env": "^5.1.1", "node-sass": "^4.5.3", "npm-run-all": "^4.1.2", "uglify-js": "^3.1.9", "watchify": "^3.9.0"}, "scripts": {"build": "npm-run-all --parallel build:*", "build:js": "haxe cagetteJs.hxml", "build:sass": "node-sass www/css -o www/css", "watch:sass": "npm run build:sass -- --watch", "build2": "babel src -d lib", "libs:dev": "browserify js/libs/libs.js -o www/js/libs.js -d", "libs:prod": "cross-env NODE_ENV=production browserify js/libs/libs.js | uglifyjs -c -m > www/js/libs.js", "test": "haxe testsJS.hxml && node js/test/tests.js", "prepush": "npm test"}, "repository": {"type": "git", "url": "git+https://github.com/bablukid/cagette.git"}, "bugs": {"url": "https://github.com/bablukid/cagette/issues"}, "version": "1.13.0"}
|
{"name": "cagette-pei", "description": "le logiciel libre du circuit court", "license": "AGPL-3.0", "dependencies": {"bootstrap": "^3.3.4", "eonasdan-bootstrap-datetimepicker": "^4.7.14", "geolib": "^2.0.24", "haxe-modular": "^0.7.0", "jquery": "^2.2.4", "leaflet": "^1.3.1", "react": "^15.6.1", "react-bootstrap-typeahead": "1.4.2", "react-datetime": "^2.9.0", "react-dom": "^15.6.1", "react-leaflet": "^1.8.0", "react-places-autocomplete": "^6.0.2", "react-router": "^4.2.0", "react-router-dom": "^4.2.2"}, "devDependencies": {"babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", "babelify": "^7.3.0", "browserify": "^14.4.0", "cross-env": "^5.1.1", "node-sass": "^4.5.3", "npm-run-all": "^4.1.2", "uglify-js": "^3.1.9", "watchify": "^3.9.0"}, "scripts": {"build": "npm-run-all --parallel build:*", "build:js": "haxe cagetteJs.hxml", "build:sass": "node-sass www/css -o www/css", "watch:sass": "npm run build:sass -- --watch", "build2": "babel src -d lib", "libs:dev": "browserify js/libs/libs.js -o www/js/libs.js -d", "libs:prod": "cross-env NODE_ENV=production browserify js/libs/libs.js | uglifyjs -c -m > www/js/libs.js", "test": "haxe testsJS.hxml && node js/test/tests.js", "prepush": "npm test"}, "repository": {"type": "git", "url": "git+https://github.com/bablukid/cagette.git"}, "bugs": {"url": "https://github.com/bablukid/cagette/issues"}, "version": "1.13.0"}
|
||||||
>>>>>>> 6a6f479 (tagged as 1.13.0)
|
|
||||||
|
|||||||
+29
-22
@@ -1,39 +1,46 @@
|
|||||||
package form;
|
package form;
|
||||||
|
|
||||||
import sugoi.form.elements.RadioGroup;
|
import sugoi.form.elements.RadioGroup;
|
||||||
import Common;
|
import Common;
|
||||||
|
|
||||||
class ColorRadioGroup extends RadioGroup {
|
class ColorRadioGroup extends RadioGroup
|
||||||
public function new(name:String, label:String, selected:String) {
|
{
|
||||||
|
|
||||||
|
public function new(name:String, label:String,selected:String)
|
||||||
|
{
|
||||||
var data = [];
|
var data = [];
|
||||||
var i = 0;
|
var i = 0;
|
||||||
for (c in db.CategoryGroup.COLORS) {
|
for (c in db.CategoryGroup.COLORS) {
|
||||||
data.push({value: Std.string(c), label: Std.string(i)});
|
data.push( { value:Std.string(c), label:Std.string(i) } );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
super(name, label, data, selected, "1", false, true);
|
super(name, label, data, selected, "1", false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function render():String {
|
override public function render():String
|
||||||
|
{
|
||||||
var s = "";
|
var s = "";
|
||||||
var n = parentForm.name + "_" + name;
|
var n = parentForm.name + "_" +name;
|
||||||
|
|
||||||
var c = 0;
|
var c = 0;
|
||||||
if (data != null) {
|
if (data != null)
|
||||||
for (row in data) {
|
{
|
||||||
var radio = "<input type=\"radio\" name=\"" + n + "\" id=\"" + n + c + "\" value=\"" + row.label + "\" "
|
for (row in data)
|
||||||
+ (row.label == Std.string(value) ? "checked" : "") + " />\n";
|
{
|
||||||
var img = "<div style='margin-right:16px;width:32px;height:32px;background:"
|
|
||||||
+ App.current.view.intToHex(Std.parseInt(row.value))
|
var radio = "<input type=\"radio\" name=\""+n+"\" id=\""+n+c+"\" value=\"" + row.label + "\" " + (row.label == Std.string(value) ? "checked":"") +" />\n";
|
||||||
+ ";'></div>";
|
|
||||||
|
var img = "<div style='margin-right:16px;width:32px;height:32px;background:"+App.current.view.intToHex(Std.parseInt(row.value))+";'></div>";
|
||||||
s += "<label for=\"" + n + c + "\" class='checkbox' style='display: inline-block;'>" + radio + " " + img + " </label>";
|
|
||||||
|
s += "<label for=\"" + n+c + "\" class='checkbox' style='display: inline-block;'>"+radio + " "+img+" </label>";
|
||||||
|
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+20
-22
@@ -13,28 +13,26 @@ class BaseView implements Dynamic {
|
|||||||
|
|
||||||
public function init() {
|
public function init() {
|
||||||
var app = App.current;
|
var app = App.current;
|
||||||
|
|
||||||
this.user = app.user;
|
this.user = app.user;
|
||||||
this.session = app.session;
|
this.session = app.session;
|
||||||
this.LANG = App.config.LANG;
|
this.LANG = App.config.LANG;
|
||||||
this.HOST = App.config.HOST;
|
this.HOST = App.config.HOST;
|
||||||
this.DATA_HOST = App.config.DATA_HOST;
|
this.DATA_HOST = App.config.DATA_HOST;
|
||||||
this.DEBUG = App.config.DEBUG;
|
this.DEBUG = App.config.DEBUG;
|
||||||
this.BANDEAU_REGION = App.config.BANDEAU_REGION;
|
|
||||||
this.NAME = App.config.NAME;
|
this.NAME = App.config.NAME;
|
||||||
this.isAdmin = app.user != null && app.user.isAdmin();
|
this.isAdmin = app.user != null && app.user.isAdmin();
|
||||||
|
|
||||||
//Access basic functions in views
|
//Access basic functions in views
|
||||||
this.Std = Std;
|
this.Std = Std;
|
||||||
this.Math = Math;
|
this.Math = Math;
|
||||||
this.Config = App.config;
|
|
||||||
|
|
||||||
|
if ( App.config.SQL_LOG ) {
|
||||||
if ( App.config.SQL_LOG ) {
|
|
||||||
this.sqlLog = untyped app.cnx == null ? null : app.cnx.log;
|
this.sqlLog = untyped app.cnx == null ? null : app.cnx.log;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMessage() {
|
function getMessage() {
|
||||||
var session = App.current.session;
|
var session = App.current.session;
|
||||||
if ( session == null ) return null;
|
if ( session == null ) return null;
|
||||||
@@ -43,14 +41,14 @@ class BaseView implements Dynamic {
|
|||||||
if( n == null ) return null;
|
if( n == null ) return null;
|
||||||
return { text : n.text, error : n.error, next : session.messages.length > 0 };
|
return { text : n.text, error : n.error, next : session.messages.length > 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getMessages() {
|
function getMessages() {
|
||||||
var out = [];
|
var out = [];
|
||||||
var session = App.current.session;
|
var session = App.current.session;
|
||||||
if ( session == null ) return [];
|
if ( session == null ) return [];
|
||||||
if (session.messages == null) return [];
|
if (session.messages == null) return [];
|
||||||
|
|
||||||
for ( m in session.messages) {
|
for ( m in session.messages) {
|
||||||
if( m == null ) continue;
|
if( m == null ) continue;
|
||||||
out.push( { text : m.text, error : m.error } );
|
out.push( { text : m.text, error : m.error } );
|
||||||
@@ -58,12 +56,12 @@ class BaseView implements Dynamic {
|
|||||||
session.messages = [];
|
session.messages = [];
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function urlEncode(str:String) {
|
function urlEncode(str:String) {
|
||||||
return StringTools.urlEncode(str);
|
return StringTools.urlEncode(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To safely print a string in javascript
|
* To safely print a string in javascript
|
||||||
* @param str
|
* @param str
|
||||||
@@ -72,13 +70,13 @@ class BaseView implements Dynamic {
|
|||||||
if (str == null) return "";
|
if (str == null) return "";
|
||||||
return str.split("\\").join("\\\\").split("'").join("\\'").split("\r").join("\\r").split("\n").join("\\n");
|
return str.split("\\").join("\\\\").split("'").join("\\'").split("\r").join("\\r").split("\n").join("\\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a value from the Variable table
|
* Get a value from the Variable table
|
||||||
* @param file
|
* @param file
|
||||||
*/
|
*/
|
||||||
function getVariable( file : String ) {
|
function getVariable( file : String ) {
|
||||||
|
|
||||||
var v = _vcache.get(file);
|
var v = _vcache.get(file);
|
||||||
if( v != null )
|
if( v != null )
|
||||||
return v;
|
return v;
|
||||||
@@ -93,7 +91,7 @@ class BaseView implements Dynamic {
|
|||||||
function getParam( p : String ) {
|
function getParam( p : String ) {
|
||||||
return App.current.params.get(p);
|
return App.current.params.get(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the url of a db.File record
|
* Return the url of a db.File record
|
||||||
*/
|
*/
|
||||||
@@ -101,7 +99,7 @@ class BaseView implements Dynamic {
|
|||||||
if (file == null) throw "file is null";
|
if (file == null) throw "file is null";
|
||||||
return "/file/"+sugoi.db.File.makeSign(file.id)+"."+file.getExtension();
|
return "/file/"+sugoi.db.File.makeSign(file.id)+"."+file.getExtension();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to print an HTML table from any kind of object
|
* Try to print an HTML table from any kind of object
|
||||||
* @param data
|
* @param data
|
||||||
@@ -109,14 +107,14 @@ class BaseView implements Dynamic {
|
|||||||
function table(data:Dynamic) {
|
function table(data:Dynamic) {
|
||||||
return new sugoi.helper.Table("table table-bordered").toString(data);
|
return new sugoi.helper.Table("table table-bordered").toString(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* newline to <br/>
|
* newline to <br/>
|
||||||
* @param txt
|
* @param txt
|
||||||
*/
|
*/
|
||||||
public function nl2br(txt:String):String {
|
public function nl2br(txt:String):String {
|
||||||
if (txt == null) return "";
|
if (txt == null) return "";
|
||||||
return txt.split("\n").join("<br/>");
|
return txt.split("\n").join("<br/>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -127,7 +125,7 @@ class BaseView implements Dynamic {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//same function with params ( templo doesnt manage optionnal params in functions )
|
//same function with params ( templo doesnt manage optionnal params in functions )
|
||||||
public function __(str:String, params:Dynamic){
|
public function __(str:String, params:Dynamic){
|
||||||
return sugoi.i18n.Locale.texts.get(str, params);
|
return sugoi.i18n.Locale.texts.get(str, params);
|
||||||
@@ -138,7 +136,7 @@ class BaseView implements Dynamic {
|
|||||||
neko.Web.logMessage("_call "+str);
|
neko.Web.logMessage("_call "+str);
|
||||||
return StringTools.rtrim( str.split("||")[0] );
|
return StringTools.rtrim( str.split("||")[0] );
|
||||||
}
|
}
|
||||||
|
|
||||||
//same function with params ( templo doesnt manage optionnal params in functions )
|
//same function with params ( templo doesnt manage optionnal params in functions )
|
||||||
public function __(str:String, params:Dynamic):String {
|
public function __(str:String, params:Dynamic):String {
|
||||||
neko.Web.logMessage("_call "+str);
|
neko.Web.logMessage("_call "+str);
|
||||||
@@ -161,5 +159,5 @@ class BaseView implements Dynamic {
|
|||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ class Config {
|
|||||||
public var TPL:String;
|
public var TPL:String;
|
||||||
public var TPL_TMP:String;
|
public var TPL_TMP:String;
|
||||||
public var DEBUG:Bool;
|
public var DEBUG:Bool;
|
||||||
public var BANDEAU_REGION:Bool;
|
|
||||||
public var HOST:String;
|
public var HOST:String;
|
||||||
public var NAME:String;
|
public var NAME:String;
|
||||||
public var KEY:String;
|
public var KEY:String;
|
||||||
@@ -29,7 +28,6 @@ class Config {
|
|||||||
TPL = PATH + "lang/" + LANG + "/tpl/";
|
TPL = PATH + "lang/" + LANG + "/tpl/";
|
||||||
TPL_TMP = PATH + "lang/" + LANG + "/tmp/";
|
TPL_TMP = PATH + "lang/" + LANG + "/tmp/";
|
||||||
DEBUG = get("debug", "0") == "1";
|
DEBUG = get("debug", "0") == "1";
|
||||||
BANDEAU_REGION = get("bandeau_region", "0") == "1";
|
|
||||||
HOST = get("host");
|
HOST = get("host");
|
||||||
KEY = get("key");
|
KEY = get("key");
|
||||||
DATA_HOST = get("dataHost", "data." + HOST);
|
DATA_HOST = get("dataHost", "data." + HOST);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 153 KiB |
Reference in New Issue
Block a user