0
1
Fork 0

Js doc asteriscos

This commit is contained in:
Juan Ferrer Toribio 2016-12-20 10:32:17 +01:00
parent 3c83bed5b3
commit 63d75a7ff6
103 changed files with 353 additions and 298 deletions

View File

@ -12,12 +12,12 @@
* *
* - http://www.mydomain.org -> config.www.php * - http://www.mydomain.org -> config.www.php
* - http://test.mydomain.org -> config.test.php * - http://test.mydomain.org -> config.test.php
**/ */
return [ return [
/** /**
* Database parameters. * Database parameters.
**/ */
'db' => [ 'db' => [
'host' => 'localhost' 'host' => 'localhost'
,'port' => 3306 ,'port' => 3306

View File

@ -55,8 +55,7 @@
} }
.new-text a .new-text a
{ {
color: blue; color: #2962FF;
text-decoration: underline;
} }
.new-text li .new-text li
{ {

View File

@ -44,8 +44,7 @@
} }
.new-text a .new-text a
{ {
color: blue; color: #2962FF;
text-decoration: underline;
} }
.new-text li .new-text li
{ {

View File

@ -3,7 +3,7 @@ var Calc = require ('./calc');
/** /**
* Computes a sum of data in the model. * Computes a sum of data in the model.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Calc Extends: Calc

View File

@ -4,7 +4,7 @@ var SimpleIterator = require ('./simple-iterator');
/** /**
* Interface for handle foreach operations on the model. * Interface for handle foreach operations on the model.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Vn.Param Extends: Vn.Param
@ -132,23 +132,23 @@ module.exports = new Class
* You don't need to define it if model isn't updatable. * You don't need to define it if model isn't updatable.
* *
* @param {integer} row The row number * @param {integer} row The row number
**/ */
,before: function (row) {} ,before: function (row) {}
/** /**
* Called after each update or insert row operation. * Called after each update or insert row operation.
* *
* @param {integer} row The row number * @param {integer} row The row number
**/ */
,after: function (row) {} ,after: function (row) {}
/** /**
* Called before each model refresh. * Called before each model refresh.
**/ */
,init: function () {} ,init: function () {}
/** /**
* Called when an operation in the model is complete. * Called when an operation in the model is complete.
**/ */
,done: function () {} ,done: function () {}
}); });

View File

@ -8,7 +8,7 @@
* Warning! You should set a well defined dababase level privileges to use this * Warning! You should set a well defined dababase level privileges to use this
* class or you could have a serious security hole in you application becasuse * class or you could have a serious security hole in you application becasuse
* the user can send any statement to the server. For example: DROP DATABASE * the user can send any statement to the server. For example: DROP DATABASE
**/ */
var Connection = new Class (); var Connection = new Class ();
module.exports = Connection; module.exports = Connection;
@ -44,7 +44,7 @@ Connection.implement
* *
* @param {String} sql The SQL statement * @param {String} sql The SQL statement
* @param {Function} callback The function to call when operation is done * @param {Function} callback The function to call when operation is done
**/ */
,execSql: function (sql, callback) ,execSql: function (sql, callback)
{ {
this.send ('core/query', {'sql': sql}, this.send ('core/query', {'sql': sql},
@ -57,7 +57,7 @@ Connection.implement
* @param {Sql.Stmt} stmt The statement * @param {Sql.Stmt} stmt The statement
* @param {Function} callback The function to call when operation is done * @param {Function} callback The function to call when operation is done
* @param {Sql.Batch} batch The batch used to set the parameters * @param {Sql.Batch} batch The batch used to set the parameters
**/ */
,execStmt: function (stmt, callback, batch) ,execStmt: function (stmt, callback, batch)
{ {
this.execSql (stmt.render (batch), callback); this.execSql (stmt.render (batch), callback);
@ -69,7 +69,7 @@ Connection.implement
* @param {String} query The SQL statement * @param {String} query The SQL statement
* @param {Function} callback The function to call when operation is done * @param {Function} callback The function to call when operation is done
* @param {Sql.Batch} batch The batch used to set the parameters * @param {Sql.Batch} batch The batch used to set the parameters
**/ */
,execQuery: function (query, callback, batch) ,execQuery: function (query, callback, batch)
{ {
this.execStmt (new Sql.String ({query: query}), callback, batch); this.execStmt (new Sql.String ({query: query}), callback, batch);

View File

@ -11,7 +11,7 @@ module.exports = new Class
{ {
/** /**
* The model associated to this form. * The model associated to this form.
**/ */
model: model:
{ {
type: Model type: Model
@ -30,7 +30,7 @@ module.exports = new Class
}, },
/** /**
* The row where the form positioned, has -1 if the row is unselected. * The row where the form positioned, has -1 if the row is unselected.
**/ */
row: row:
{ {
type: Number type: Number
@ -51,7 +51,7 @@ module.exports = new Class
}, },
/** /**
* The number of rows in the form. * The number of rows in the form.
**/ */
numRows: numRows:
{ {
type: Number type: Number
@ -65,7 +65,7 @@ module.exports = new Class
}, },
/** /**
* Checks if the form data is ready. * Checks if the form data is ready.
**/ */
ready: ready:
{ {
type: Boolean type: Boolean

View File

@ -7,28 +7,28 @@ module.exports = new Class
{ {
/** /**
* The model associated to this form. * The model associated to this form.
**/ */
model: model:
{ {
type: Model type: Model
}, },
/** /**
* The row where the form positioned, has -1 if the row is unselected. * The row where the form positioned, has -1 if the row is unselected.
**/ */
row: row:
{ {
type: Number type: Number
}, },
/** /**
* The number of rows in the form. * The number of rows in the form.
**/ */
numRows: numRows:
{ {
type: Number type: Number
}, },
/** /**
* Checks if the form data is ready. * Checks if the form data is ready.
**/ */
ready: ready:
{ {
type: Boolean type: Boolean
@ -46,7 +46,7 @@ module.exports = new Class
/** /**
* Emits the 'iter-changed' signal on the form. * Emits the 'iter-changed' signal on the form.
**/ */
,iterChanged: function () ,iterChanged: function ()
{ {
this.signalEmit ('iter-changed'); this.signalEmit ('iter-changed');
@ -57,7 +57,7 @@ module.exports = new Class
* *
* @param {String} columnName The column name * @param {String} columnName The column name
* @return {integer} The column index or -1 if column not exists * @return {integer} The column index or -1 if column not exists
**/ */
,getColumnIndex: function (columnName) ,getColumnIndex: function (columnName)
{ {
if (this._model) if (this._model)
@ -80,7 +80,7 @@ module.exports = new Class
/** /**
* Removes the current row. * Removes the current row.
**/ */
,deleteRow: function () ,deleteRow: function ()
{ {
if (this._row >= 0) if (this._row >= 0)
@ -92,7 +92,7 @@ module.exports = new Class
* *
* @param {String} columnName The column name * @param {String} columnName The column name
* @return {Object} The value * @return {Object} The value
**/ */
,get: function (columnName) ,get: function (columnName)
{ {
return this._model.get (this._row, columnName); return this._model.get (this._row, columnName);
@ -103,7 +103,7 @@ module.exports = new Class
* *
* @param {String} columnName The column name * @param {String} columnName The column name
* @param {Object} value The new value * @param {Object} value The new value
**/ */
,set: function (columnName, value) ,set: function (columnName, value)
{ {
return this._model.set (this._row, columnName, value); return this._model.set (this._row, columnName, value);
@ -114,7 +114,7 @@ module.exports = new Class
* *
* @param {String} columnName The column index * @param {String} columnName The column index
* @return {Object} The value * @return {Object} The value
**/ */
,getByIndex: function (column) ,getByIndex: function (column)
{ {
return this._model.getByIndex (this._row, column); return this._model.getByIndex (this._row, column);
@ -125,7 +125,7 @@ module.exports = new Class
* *
* @param {String} columnName The column index * @param {String} columnName The column index
* @param {Object} value The new value * @param {Object} value The new value
**/ */
,setByIndex: function (column, value) ,setByIndex: function (column, value)
{ {
return this._model.setByIndex (this._row, column, value); return this._model.setByIndex (this._row, column, value);

View File

@ -9,7 +9,7 @@ var Connection = require ('./connection');
* Note that table and column names must be unique in the selection query, * Note that table and column names must be unique in the selection query,
* otherwise updates are not allowed on that table/column. If two tables or * otherwise updates are not allowed on that table/column. If two tables or
* columns have the same name, an alias should be used to make it updatable. * columns have the same name, an alias should be used to make it updatable.
**/ */
var Model = new Class (); var Model = new Class ();
module.exports = Model; module.exports = Model;
@ -56,7 +56,7 @@ Model.implement
{ {
/** /**
* The connection used to execute the statement. * The connection used to execute the statement.
**/ */
conn: conn:
{ {
type: Connection type: Connection
@ -72,7 +72,7 @@ Model.implement
}, },
/** /**
* The result index. * The result index.
**/ */
resultIndex: resultIndex:
{ {
type: Number type: Number
@ -87,7 +87,7 @@ Model.implement
}, },
/** /**
* The batch used to execute the statement. * The batch used to execute the statement.
**/ */
batch: batch:
{ {
type: Sql.Batch type: Sql.Batch
@ -103,7 +103,7 @@ Model.implement
}, },
/** /**
* The model select statement. * The model select statement.
**/ */
stmt: stmt:
{ {
type: Sql.Stmt type: Sql.Stmt
@ -119,7 +119,7 @@ Model.implement
}, },
/** /**
* The model query. * The model query.
**/ */
query: query:
{ {
type: String type: String
@ -137,7 +137,7 @@ Model.implement
}, },
/** /**
* The main table. * The main table.
**/ */
mainTable: mainTable:
{ {
type: String type: String
@ -154,7 +154,7 @@ Model.implement
}, },
/** /**
* Determines if the model is updatable. * Determines if the model is updatable.
**/ */
updatable: updatable:
{ {
type: Boolean type: Boolean
@ -171,7 +171,7 @@ Model.implement
}, },
/** /**
* The number of rows in the model. * The number of rows in the model.
**/ */
numRows: numRows:
{ {
type: Number type: Number
@ -185,7 +185,7 @@ Model.implement
}, },
/** /**
* The current status of the model. * The current status of the model.
**/ */
status: status:
{ {
type: Number type: Number
@ -196,7 +196,7 @@ Model.implement
}, },
/** /**
* Checks if the model data is ready. * Checks if the model data is ready.
**/ */
ready: ready:
{ {
type: Boolean type: Boolean
@ -207,7 +207,7 @@ Model.implement
}, },
/** /**
* Update mode. * Update mode.
**/ */
mode: mode:
{ {
enumType: Mode enumType: Mode
@ -215,7 +215,7 @@ Model.implement
}, },
/** /**
* Wether to execute the model query automatically. * Wether to execute the model query automatically.
**/ */
autoLoad: autoLoad:
{ {
type: Boolean type: Boolean
@ -275,7 +275,7 @@ Model.implement
/** /**
* Refresh the model data reexecuting the query on the database. * Refresh the model data reexecuting the query on the database.
**/ */
,refresh: function () ,refresh: function ()
{ {
var ready = false; var ready = false;
@ -422,7 +422,7 @@ Model.implement
* @param {String} field The destination field name * @param {String} field The destination field name
* @param {String} table The destination table name * @param {String} table The destination table name
* @param {Sql.Expr} srcColumn The default value expression * @param {Sql.Expr} srcColumn The default value expression
**/ */
,setDefault: function (field, table, expr) ,setDefault: function (field, table, expr)
{ {
this._defaults.push this._defaults.push
@ -439,7 +439,7 @@ Model.implement
* @param {String} field The destination field name * @param {String} field The destination field name
* @param {String} table The destination table name * @param {String} table The destination table name
* @param {Object} value The default value * @param {Object} value The default value
**/ */
,setDefaultFromValue: function (field, table, value) ,setDefaultFromValue: function (field, table, value)
{ {
this._defaults.push this._defaults.push
@ -457,7 +457,7 @@ Model.implement
* @param {String} field The destination field name * @param {String} field The destination field name
* @param {String} table The destination table name * @param {String} table The destination table name
* @param {String} srcColumn The source column * @param {String} srcColumn The source column
**/ */
,setDefaultFromColumn: function (field, table, srcColumn) ,setDefaultFromColumn: function (field, table, srcColumn)
{ {
this._defaults.push this._defaults.push
@ -473,7 +473,7 @@ Model.implement
* *
* @param {integer} column The column index * @param {integer} column The column index
* @return {Boolean} %true if column exists, %false otherwise * @return {Boolean} %true if column exists, %false otherwise
**/ */
,checkColExists: function (column) ,checkColExists: function (column)
{ {
return this.columns return this.columns
@ -486,7 +486,7 @@ Model.implement
* *
* @param {integer} rowIndex The row index * @param {integer} rowIndex The row index
* @return {Boolean} %true if row exists, %false otherwise * @return {Boolean} %true if row exists, %false otherwise
**/ */
,checkRowExists: function (rowIndex) ,checkRowExists: function (rowIndex)
{ {
return this.data return this.data
@ -511,7 +511,7 @@ Model.implement
* *
* @param {string} columnName The column name * @param {string} columnName The column name
* @return {number} The column index or -1 if column not exists * @return {number} The column index or -1 if column not exists
**/ */
,getColumnIndex: function (columnName) ,getColumnIndex: function (columnName)
{ {
var index; var index;
@ -529,7 +529,7 @@ Model.implement
* @param {number} rowIndex The row index * @param {number} rowIndex The row index
* @param {string} columnName The column name * @param {string} columnName The column name
* @return {mixed} The value * @return {mixed} The value
**/ */
,get: function (rowIndex, columnName) ,get: function (rowIndex, columnName)
{ {
var index = this.getColumnIndex (columnName); var index = this.getColumnIndex (columnName);
@ -546,7 +546,7 @@ Model.implement
* @param {number} rowIndex The row index * @param {number} rowIndex The row index
* @param {string} columnName The column name * @param {string} columnName The column name
* @param {mixed} value The new value * @param {mixed} value The new value
**/ */
,set: function (rowIndex, columnName, value) ,set: function (rowIndex, columnName, value)
{ {
var index = this.getColumnIndex (columnName); var index = this.getColumnIndex (columnName);
@ -563,7 +563,7 @@ Model.implement
* @param {number} rowIndex The row index * @param {number} rowIndex The row index
* @param {number} column The column index * @param {number} column The column index
* @return {mixed} The value * @return {mixed} The value
**/ */
,getByIndex: function (rowIndex, column) ,getByIndex: function (rowIndex, column)
{ {
if (this.checkRowExists (rowIndex) && this.checkColExists (column)) if (this.checkRowExists (rowIndex) && this.checkColExists (column))
@ -578,7 +578,7 @@ Model.implement
* @param {number} rowIndex The row index * @param {number} rowIndex The row index
* @param {number} col The column index * @param {number} col The column index
* @param {mixed} value The new value * @param {mixed} value The new value
**/ */
,setByIndex: function (rowIndex, col, value) ,setByIndex: function (rowIndex, col, value)
{ {
if (!this.checkRowExists (rowIndex) if (!this.checkRowExists (rowIndex)
@ -634,7 +634,7 @@ Model.implement
* Deletes a row from the model. * Deletes a row from the model.
* *
* @param {number} rowIndex The row index * @param {number} rowIndex The row index
**/ */
,deleteRow: function (rowIndex) ,deleteRow: function (rowIndex)
{ {
if (!this.checkRowExists (rowIndex) if (!this.checkRowExists (rowIndex)
@ -681,7 +681,7 @@ Model.implement
* Inserts a new row on the model. * Inserts a new row on the model.
* *
* @return The index of the inserted row * @return The index of the inserted row
**/ */
,insertRow: function () ,insertRow: function ()
{ {
if (!this._checkTableUpdatable (this._mainTable)) if (!this._checkTableUpdatable (this._mainTable))
@ -709,7 +709,7 @@ Model.implement
/** /**
* Performs all model changes on the database. * Performs all model changes on the database.
**/ */
,performOperations: function () ,performOperations: function ()
{ {
var ops = this._operations; var ops = this._operations;
@ -925,7 +925,7 @@ Model.implement
/** /**
* Undoes all unsaved changes made to the model. * Undoes all unsaved changes made to the model.
**/ */
,reverseOperations: function () ,reverseOperations: function ()
{ {
for (var i = 0; i < this._operations.length; i++) for (var i = 0; i < this._operations.length; i++)
@ -998,7 +998,7 @@ Model.implement
* *
* @param {integer} column The column name * @param {integer} column The column name
* @param {SortWay} way The sort way * @param {SortWay} way The sort way
**/ */
,sortByName: function (columnName, way) ,sortByName: function (columnName, way)
{ {
this._requestedSortIndex = -1; this._requestedSortIndex = -1;
@ -1015,7 +1015,7 @@ Model.implement
* *
* @param {integer} column The column index * @param {integer} column The column index
* @param {SortWay} way The sort way * @param {SortWay} way The sort way
**/ */
,sort: function (column, way) ,sort: function (column, way)
{ {
this._requestedSortIndex = column; this._requestedSortIndex = column;
@ -1062,7 +1062,7 @@ Model.implement
* FIXME: Not fully implemented. * FIXME: Not fully implemented.
* *
* @param {String} column The column name * @param {String} column The column name
**/ */
,indexColumn: function (column) ,indexColumn: function (column)
{ {
this._requestedIndexes[column] = true; this._requestedIndexes[column] = true;
@ -1106,7 +1106,7 @@ Model.implement
* @param {String} column The column name * @param {String} column The column name
* @param {Object} value The value to search * @param {Object} value The value to search
* @return {integer} The column index * @return {integer} The column index
**/ */
,search: function (column, value) ,search: function (column, value)
{ {
var index = this.getColumnIndex (column); var index = this.getColumnIndex (column);
@ -1120,7 +1120,7 @@ Model.implement
* @param {integer} col The column index * @param {integer} col The column index
* @param {Object} value The value to search * @param {Object} value The value to search
* @return {integer} The column index * @return {integer} The column index
**/ */
,searchByIndex: function (col, value) ,searchByIndex: function (col, value)
{ {
if (!this.checkColExists (col)) if (!this.checkColExists (col))
@ -1264,7 +1264,7 @@ Model.implement
* @param {String} schema The original table schema * @param {String} schema The original table schema
* @param {Array} pks Array with the names of primary keys * @param {Array} pks Array with the names of primary keys
* @param {String} ai The autoincrement column name * @param {String} ai The autoincrement column name
**/ */
,setInfo: function (table, orgname, schema, pks, ai) ,setInfo: function (table, orgname, schema, pks, ai)
{ {
if (!this.tableInfo) if (!this.tableInfo)

View File

@ -10,7 +10,7 @@ module.exports = new Class
{ {
/** /**
* The form field referenced by this param. * The form field referenced by this param.
**/ */
column: column:
{ {
type: String type: String
@ -26,7 +26,7 @@ module.exports = new Class
}, },
/** /**
* The form referenced by this param. * The form referenced by this param.
**/ */
form: form:
{ {
type: Form type: Form
@ -48,7 +48,7 @@ module.exports = new Class
/** /**
* Determines whether the link to the form is unidirectional, ie, a * Determines whether the link to the form is unidirectional, ie, a
* change in the form updates the parameter but not vice versa. * change in the form updates the parameter but not vice versa.
**/ */
oneWay: oneWay:
{ {
type: Boolean type: Boolean

View File

@ -9,7 +9,7 @@ module.exports = new Class
{ {
/** /**
* The connection used to execute the statement. * The connection used to execute the statement.
**/ */
conn: conn:
{ {
type: Connection type: Connection
@ -25,7 +25,7 @@ module.exports = new Class
}, },
/** /**
* The model query. * The model query.
**/ */
query: query:
{ {
type: String type: String
@ -41,7 +41,7 @@ module.exports = new Class
}, },
/** /**
* The model select statement. * The model select statement.
**/ */
stmt: stmt:
{ {
type: Sql.Stmt type: Sql.Stmt
@ -57,7 +57,7 @@ module.exports = new Class
}, },
/** /**
* The batch used to execute the statement. * The batch used to execute the statement.
**/ */
batch: batch:
{ {
type: Sql.Batch type: Sql.Batch
@ -73,7 +73,7 @@ module.exports = new Class
}, },
/** /**
* Wether to execute automatically de query que it's ready. * Wether to execute automatically de query que it's ready.
**/ */
autoLoad: autoLoad:
{ {
type: Boolean, type: Boolean,

View File

@ -3,7 +3,7 @@ var Result = require ('./result');
/** /**
* This class stores the database results. * This class stores the database results.
**/ */
module.exports = new Class module.exports = new Class
({ ({
results: null results: null
@ -11,7 +11,7 @@ module.exports = new Class
/** /**
* Initilizes the resultset object. * Initilizes the resultset object.
**/ */
,initialize: function (results, error) ,initialize: function (results, error)
{ {
this.results = results; this.results = results;
@ -22,7 +22,7 @@ module.exports = new Class
* Gets the query error. * Gets the query error.
* *
* @return {Db.Err} the error or null if no errors hapened * @return {Db.Err} the error or null if no errors hapened
**/ */
,getError: function () ,getError: function ()
{ {
return this.error; return this.error;
@ -44,7 +44,7 @@ module.exports = new Class
* Fetchs the next result from the resultset. * Fetchs the next result from the resultset.
* *
* @return {Db.Result} the result or %null if error or there are no more results * @return {Db.Result} the result or %null if error or there are no more results
**/ */
,fetchResult: function () ,fetchResult: function ()
{ {
var result = this.fetch (); var result = this.fetch ();
@ -64,7 +64,7 @@ module.exports = new Class
* Fetchs the first row from the next resultset. * Fetchs the first row from the next resultset.
* *
* @return {Array} the row if success, %null otherwise * @return {Array} the row if success, %null otherwise
**/ */
,fetchRow: function () ,fetchRow: function ()
{ {
var result = this.fetch (); var result = this.fetch ();
@ -81,7 +81,7 @@ module.exports = new Class
* Fetchs the first row and column value from the next resultset. * Fetchs the first row and column value from the next resultset.
* *
* @return {Object} the value if success, %null otherwise * @return {Object} the value if success, %null otherwise
**/ */
,fetchValue: function () ,fetchValue: function ()
{ {
var row = this.fetchRow (); var row = this.fetchRow ();

View File

@ -1,11 +1,11 @@
/** /**
* This class stores a database result. * This class stores a database result.
**/ */
module.exports = new Class module.exports = new Class
({ ({
/** /**
* Initilizes the result object. * Initilizes the result object.
**/ */
initialize: function (result) initialize: function (result)
{ {
this.data = result.data; this.data = result.data;
@ -29,7 +29,7 @@ module.exports = new Class
* *
* @param {String} columnName The column name * @param {String} columnName The column name
* @return {Object} The cell value * @return {Object} The cell value
**/ */
,get: function (columnName) ,get: function (columnName)
{ {
var columnIndex = this.columnMap[columnName]; var columnIndex = this.columnMap[columnName];
@ -38,7 +38,7 @@ module.exports = new Class
/** /**
* Resets the result iterator. * Resets the result iterator.
**/ */
,reset: function () ,reset: function ()
{ {
this.row = -1; this.row = -1;
@ -46,7 +46,7 @@ module.exports = new Class
/** /**
* Moves the internal iterator to the next row. * Moves the internal iterator to the next row.
**/ */
,next: function () ,next: function ()
{ {
this.row++; this.row++;

View File

@ -4,7 +4,7 @@ var Model = require ('./model');
/** /**
* A light iterator for models. * A light iterator for models.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Vn.Object Extends: Vn.Object
@ -13,7 +13,7 @@ module.exports = new Class
{ {
/** /**
* The model associated to this form. * The model associated to this form.
**/ */
model: model:
{ {
type: Model type: Model
@ -28,7 +28,7 @@ module.exports = new Class
}, },
/** /**
* The row where the form positioned, has -1 if the row is unselected. * The row where the form positioned, has -1 if the row is unselected.
**/ */
row: row:
{ {
type: Number type: Number
@ -43,7 +43,7 @@ module.exports = new Class
}, },
/** /**
* The number of rows in the form. * The number of rows in the form.
**/ */
numRows: numRows:
{ {
type: Number type: Number
@ -57,7 +57,7 @@ module.exports = new Class
}, },
/** /**
* Checks if the form data is ready. * Checks if the form data is ready.
**/ */
ready: ready:
{ {
type: Boolean type: Boolean

View File

@ -19,7 +19,7 @@ module.exports = new Class
* *
* @param {string} objectId The object identifier * @param {string} objectId The object identifier
* @return {Object} The object, or %null if not found * @return {Object} The object, or %null if not found
**/ */
,$: function (objectId) ,$: function (objectId)
{ {
if (this.builder) if (this.builder)
@ -86,7 +86,7 @@ module.exports = new Class
/** /**
* Called when the form is opened. * Called when the form is opened.
**/ */
,open: function () ,open: function ()
{ {
this.close (); this.close ();
@ -96,7 +96,7 @@ module.exports = new Class
/** /**
* Called when the form is closed. * Called when the form is closed.
**/ */
,close: function () ,close: function ()
{ {
if (!this.isOpen) if (!this.isOpen)
@ -108,12 +108,12 @@ module.exports = new Class
/** /**
* Called when the form is activated. * Called when the form is activated.
**/ */
,activate: function () {} ,activate: function () {}
/** /**
* Called when the form is deactivated. * Called when the form is deactivated.
**/ */
,deactivate: function () {} ,deactivate: function () {}
,_destroy: function () ,_destroy: function ()

View File

@ -444,18 +444,12 @@ module.exports = new Class
,setTitle: function (title) ,setTitle: function (title)
{ {
Vn.Node.removeChilds (this.$('title')); Vn.Node.setChild (this.$('title'), title);
if (title)
this.$('title').appendChild (title);
} }
,setActions: function (actions) ,setActions: function (actions)
{ {
Vn.Node.removeChilds (this.$('action-bar')); Vn.Node.setChild (this.$('action-bar'), actions);
if (actions)
this.$('action-bar').appendChild (actions);
} }
,closeForm: function () ,closeForm: function ()

View File

@ -16,7 +16,7 @@ module.exports = new Class
* *
* @param {string} objectId The object identifier * @param {string} objectId The object identifier
* @return {Object} The object, or %null if not found * @return {Object} The object, or %null if not found
**/ */
,$: function (objectId) ,$: function (objectId)
{ {
if (this.builderResult) if (this.builderResult)

View File

@ -4,7 +4,7 @@ var NodeBuilder = require ('./node-builder');
/** /**
* Represents a grid column. This is an abstract class and should not be * Represents a grid column. This is an abstract class and should not be
* instantiated directly. * instantiated directly.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: NodeBuilder Extends: NodeBuilder
@ -65,7 +65,7 @@ module.exports = new Class
/** /**
* Initializes the column. * Initializes the column.
**/ */
,initialize: function (props) ,initialize: function (props)
{ {
this.parent (props); this.parent (props);
@ -87,7 +87,7 @@ module.exports = new Class
* *
* @param {HTMLTableRow} tr the table row * @param {HTMLTableRow} tr the table row
* @return {HTMLTableData} the rendered cell * @return {HTMLTableData} the rendered cell
**/ */
,render: function (tr) ,render: function (tr)
{ {
var td = this.td.cloneNode (true); var td = this.td.cloneNode (true);

View File

@ -7,7 +7,7 @@ module.exports = new Class
{ {
/** /**
* Format that applies to the value. * Format that applies to the value.
**/ */
format: format:
{ {
type: String type: String

View File

@ -7,7 +7,7 @@ module.exports = new Class
{ {
/** /**
* The directory where the images are allocated. * The directory where the images are allocated.
**/ */
directory: directory:
{ {
type: String type: String
@ -15,7 +15,7 @@ module.exports = new Class
}, },
/** /**
* The subdirectory where the images are allocated. * The subdirectory where the images are allocated.
**/ */
subdir: subdir:
{ {
type: String type: String
@ -23,7 +23,7 @@ module.exports = new Class
}, },
/** /**
* Subdirectory where full images are allocated. * Subdirectory where full images are allocated.
**/ */
fullDir: fullDir:
{ {
type: String type: String
@ -31,7 +31,7 @@ module.exports = new Class
}, },
/** /**
* The REST connection used to upload the image. * The REST connection used to upload the image.
**/ */
conn: conn:
{ {
type: Vn.JsonConnection type: Vn.JsonConnection

View File

@ -7,7 +7,7 @@ module.exports = new Class
{ {
/** /**
* The link url. * The link url.
**/ */
href: href:
{ {
type: String type: String
@ -15,7 +15,7 @@ module.exports = new Class
}, },
/** /**
* the target where the link is opened. * the target where the link is opened.
**/ */
target: target:
{ {
type: String type: String

View File

@ -7,7 +7,7 @@ module.exports = new Class
{ {
/** /**
* The text to append to the number. * The text to append to the number.
**/ */
unit: unit:
{ {
type: String type: String
@ -15,7 +15,7 @@ module.exports = new Class
}, },
/** /**
* The number of decimal places to display. * The number of decimal places to display.
**/ */
digits: { digits: {
type: Number type: Number
,value: 0 ,value: 0

View File

@ -7,7 +7,7 @@ module.exports = new Class
{ {
/** /**
* Format that applies to the value. * Format that applies to the value.
**/ */
format: format:
{ {
type: String type: String

View File

@ -3,7 +3,7 @@ var Popup = require ('./popup');
/** /**
* Class to show message dialogs with buttons. * Class to show message dialogs with buttons.
**/ */
var Dialog = new Class (); var Dialog = new Class ();
module.exports = Dialog; module.exports = Dialog;
@ -55,7 +55,7 @@ Dialog.implement
{ {
/** /**
* The message displayed to the user. * The message displayed to the user.
**/ */
message: message:
{ {
type: String type: String
@ -70,7 +70,7 @@ Dialog.implement
} }
/** /**
* The dialog icon. * The dialog icon.
**/ */
,icon: ,icon:
{ {
type: String type: String
@ -85,7 +85,7 @@ Dialog.implement
} }
/** /**
* The dialog buttons. * The dialog buttons.
**/ */
,buttons: ,buttons:
{ {
enumType: Button enumType: Button

View File

@ -112,7 +112,7 @@ module.exports = new Class
* editable. * editable.
* *
* @param {Boolean} editable Whether the user is allowed to edit the entry * @param {Boolean} editable Whether the user is allowed to edit the entry
**/ */
,setEditable: function (editable) {} ,setEditable: function (editable) {}
/** /**
@ -120,7 +120,7 @@ module.exports = new Class
* on the associated entry. * on the associated entry.
* *
* @param {Object} value The new value for the entry * @param {Object} value The new value for the entry
**/ */
,putValue: function (value) {} ,putValue: function (value) {}
/** /**
@ -128,7 +128,7 @@ module.exports = new Class
* on the associated entry changes. * on the associated entry changes.
* *
* @param {Object} value The new entry value * @param {Object} value The new entry value
**/ */
,valueChanged: function (value) ,valueChanged: function (value)
{ {
this._value = value; this._value = value;

View File

@ -1,6 +1,6 @@
/** /**
* Class to display or edit an image. Also it allows to show it's full version. * Class to display or edit an image. Also it allows to show it's full version.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Htk.Field Extends: Htk.Field
@ -9,7 +9,7 @@ module.exports = new Class
{ {
/** /**
* The directory where the images are allocated. * The directory where the images are allocated.
**/ */
directory: directory:
{ {
type: String type: String
@ -25,7 +25,7 @@ module.exports = new Class
}, },
/** /**
* The subdirectory where the images are allocated. * The subdirectory where the images are allocated.
**/ */
subdir: subdir:
{ {
type: String type: String
@ -41,7 +41,7 @@ module.exports = new Class
}, },
/** /**
* Whether to show the full image when mouse hover. * Whether to show the full image when mouse hover.
**/ */
fullDir: fullDir:
{ {
type: String type: String
@ -57,7 +57,7 @@ module.exports = new Class
}, },
/** /**
* The REST connection used to upload the image. * The REST connection used to upload the image.
**/ */
conn: conn:
{ {
type: Vn.JsonConnection type: Vn.JsonConnection

View File

@ -7,7 +7,7 @@ module.exports = new Class
{ {
/** /**
* Format that applies to the value. * Format that applies to the value.
**/ */
format: format:
{ {
type: String type: String

View File

@ -10,7 +10,7 @@ module.exports = new Class
{ {
/** /**
* The model associated to this form. * The model associated to this form.
**/ */
model: model:
{ {
type: Db.Model type: Db.Model
@ -26,7 +26,7 @@ module.exports = new Class
}, },
/** /**
* The row where the form positioned, has -1 if the row is unselected. * The row where the form positioned, has -1 if the row is unselected.
**/ */
row: row:
{ {
type: Number type: Number
@ -47,7 +47,7 @@ module.exports = new Class
}, },
/** /**
* The number of rows in the form. * The number of rows in the form.
**/ */
numRows: numRows:
{ {
type: Number type: Number
@ -61,7 +61,7 @@ module.exports = new Class
}, },
/** /**
* Checks if the form data is ready. * Checks if the form data is ready.
**/ */
ready: ready:
{ {
type: Boolean type: Boolean
@ -72,7 +72,7 @@ module.exports = new Class
}, },
/** /**
* Checks if the form data is ready. * Checks if the form data is ready.
**/ */
placeholder: placeholder:
{ {
type: String type: String
@ -88,7 +88,7 @@ module.exports = new Class
}, },
/** /**
* Wether to allow null values. * Wether to allow null values.
**/ */
notNull: notNull:
{ {
type: Boolean type: Boolean

View File

@ -7,7 +7,7 @@ module.exports = new Class
{ {
/** /**
* Format that applies to the value. * Format that applies to the value.
**/ */
format: format:
{ {
type: String type: String

View File

@ -9,7 +9,7 @@ module.exports = new Class
{ {
/** /**
* Subdirectory where full images are allocated. * Subdirectory where full images are allocated.
**/ */
fullDir: fullDir:
{ {
type: String type: String

View File

@ -10,7 +10,7 @@ module.exports = new Class
{ {
/** /**
* The source data model. * The source data model.
**/ */
model: model:
{ {
type: Db.Model type: Db.Model
@ -38,7 +38,7 @@ module.exports = new Class
}, },
/** /**
* Message that should be displayed when source model is not ready. * Message that should be displayed when source model is not ready.
**/ */
emptyMessage: emptyMessage:
{ {
type: String type: String
@ -46,7 +46,7 @@ module.exports = new Class
}, },
/** /**
* Wether to display the header with column titles. * Wether to display the header with column titles.
**/ */
showHeader: showHeader:
{ {
type: Boolean type: Boolean

View File

@ -6,7 +6,7 @@ var Tpl = require ('./image-editor.xml');
/** /**
* A form to handle the image database, it allows to add new images or * A form to handle the image database, it allows to add new images or
* replace it. * replace it.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Component Extends: Component
@ -14,7 +14,7 @@ module.exports = new Class
{ {
/** /**
* The REST connection used to upload the image. * The REST connection used to upload the image.
**/ */
conn: conn:
{ {
type: Vn.JsonConnection type: Vn.JsonConnection

View File

@ -3,7 +3,7 @@ var Widget = require ('./widget');
/** /**
* Class to handle popups. * Class to handle popups.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Widget Extends: Widget
@ -12,7 +12,7 @@ module.exports = new Class
{ {
/** /**
* The popup child. * The popup child.
**/ */
child: child:
{ {
type: Widget type: Widget
@ -28,7 +28,7 @@ module.exports = new Class
} }
/** /**
* The popup child Node. * The popup child Node.
**/ */
,childNode: ,childNode:
{ {
type: Object type: Object
@ -44,7 +44,7 @@ module.exports = new Class
} }
/** /**
* Indicates how the dialog must be displayed. * Indicates how the dialog must be displayed.
**/ */
,modal: ,modal:
{ {
type: Boolean type: Boolean

View File

@ -10,7 +10,7 @@ module.exports = new Class
{ {
/** /**
* The source data model. * The source data model.
**/ */
model: model:
{ {
type: Db.Model type: Db.Model
@ -33,7 +33,7 @@ module.exports = new Class
} }
/** /**
* The identifier for internal iterator. * The identifier for internal iterator.
**/ */
,formId: ,formId:
{ {
type: String type: String
@ -49,7 +49,7 @@ module.exports = new Class
/** /**
* {Function (Vn.BuilderResult, Db.Form)} Function to call after every * {Function (Vn.BuilderResult, Db.Form)} Function to call after every
* box rendering. * box rendering.
**/ */
,renderer: ,renderer:
{ {
type: Function type: Function
@ -64,7 +64,7 @@ module.exports = new Class
} }
/** /**
* Message that should be displayed when source model is not ready. * Message that should be displayed when source model is not ready.
**/ */
,emptyMessage: ,emptyMessage:
{ {
type: String type: String

View File

@ -1,6 +1,6 @@
/** /**
* Class to show toast messages. * Class to show toast messages.
**/ */
module.exports = module.exports =
{ {
maxMessages: 6 maxMessages: 6
@ -13,7 +13,7 @@ module.exports =
* Shows a normal toast message. * Shows a normal toast message.
* *
* @param {String} message The message text * @param {String} message The message text
**/ */
,showMessage: function (message) ,showMessage: function (message)
{ {
this._showText (message, 'message'); this._showText (message, 'message');
@ -23,7 +23,7 @@ module.exports =
* Shows a warning toast message. * Shows a warning toast message.
* *
* @param {String} message The message text * @param {String} message The message text
**/ */
,showWarning: function (message) ,showWarning: function (message)
{ {
this._showText (message, 'warning'); this._showText (message, 'warning');
@ -33,7 +33,7 @@ module.exports =
* Shows an error toast message. * Shows an error toast message.
* *
* @param {String} message The message text * @param {String} message The message text
**/ */
,showError: function (message) ,showError: function (message)
{ {
this._showText (message, 'error'); this._showText (message, 'error');
@ -74,7 +74,7 @@ module.exports =
/** /**
* Hides all currently displayed toast messages. * Hides all currently displayed toast messages.
**/ */
,hide: function () ,hide: function ()
{ {
if (!this._container) if (!this._container)

View File

@ -8,7 +8,7 @@ module.exports = new Class
{ {
/** /**
* Main HTML node that represents the widget * Main HTML node that represents the widget
**/ */
node: node:
{ {
type: Object type: Object
@ -20,7 +20,7 @@ module.exports = new Class
}, },
/** /**
* CSS classes to be appendend to the node classes. * CSS classes to be appendend to the node classes.
**/ */
class: class:
{ {
type: String type: String

View File

@ -4,7 +4,7 @@ var Value = require ('./value');
/** /**
* A map container for many Sql.Object * A map container for many Sql.Object
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Object Extends: Object

View File

@ -3,7 +3,7 @@ var Stmt = require ('./stmt');
/** /**
* The equivalent of a SQL delete. * The equivalent of a SQL delete.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Stmt Extends: Stmt

View File

@ -5,7 +5,7 @@ var Field = require ('./field');
/** /**
* The equivalent of a SQL DML. * The equivalent of a SQL DML.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Stmt Extends: Stmt

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/** /**
* The equivalent of a SQL expression. * The equivalent of a SQL expression.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Object Extends: Object

View File

@ -5,7 +5,7 @@ var Expr = require ('./expr');
* The equivalent of a SQL field. * The equivalent of a SQL field.
* *
* @param {string} taget The name of the owner table * @param {string} taget The name of the owner table
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Expr Extends: Expr

View File

@ -3,7 +3,7 @@ var Operation = require ('./operation');
/** /**
* The equivalent of a SQL operation. * The equivalent of a SQL operation.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Operation Extends: Operation

View File

@ -3,7 +3,7 @@ var Operation = require ('./operation');
/** /**
* The equivalent of a SQL operation. * The equivalent of a SQL operation.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Operation Extends: Operation

View File

@ -7,7 +7,7 @@ var List = require ('./list');
* *
* @param {string} funcName The name of the function * @param {string} funcName The name of the function
* @param {Array#Sql.Expr} param Array with function parameters * @param {Array#Sql.Expr} param Array with function parameters
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Expr Extends: Expr

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/** /**
* A holder for another object. * A holder for another object.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Object Extends: Object

View File

@ -3,7 +3,7 @@ var Dml = require ('./dml');
/** /**
* The equivalent of a SQL insert. * The equivalent of a SQL insert.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Dml Extends: Dml

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/** /**
* List of Sql.Object * List of Sql.Object
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Object Extends: Object

View File

@ -3,7 +3,7 @@ var Stmt = require ('./stmt');
/** /**
* The equivalent of a SQL multi statement. * The equivalent of a SQL multi statement.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Stmt Extends: Stmt

View File

@ -1,6 +1,6 @@
/** /**
* Base class for all objects on this library. * Base class for all objects on this library.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Vn.Object Extends: Vn.Object
@ -10,14 +10,14 @@ module.exports = new Class
* *
* @param {Sql.Batch} batch The batch used to render the object * @param {Sql.Batch} batch The batch used to render the object
* @return {String} The SQL string * @return {String} The SQL string
**/ */
,render: function (batch) {} ,render: function (batch) {}
/** /**
* Gets if the object is ready to be rendered. * Gets if the object is ready to be rendered.
* *
* @return {boolean} %true if the object is ready, %false otherwise * @return {boolean} %true if the object is ready, %false otherwise
**/ */
,isReady: function () ,isReady: function ()
{ {
return true; return true;
@ -27,6 +27,6 @@ module.exports = new Class
* Through the query looking for containers and adds it to the batch. * Through the query looking for containers and adds it to the batch.
* *
* @return {Sql.Batch} batch The batch * @return {Sql.Batch} batch The batch
**/ */
,findHolders: function (batch) {} ,findHolders: function (batch) {}
}); });

View File

@ -6,7 +6,7 @@ var Expr = require ('./expr');
* *
* @param {Array#Sql.Expr} expr Array with the exprs * @param {Array#Sql.Expr} expr Array with the exprs
* @param {Sql..Operation.Type} type The type of the operation * @param {Sql..Operation.Type} type The type of the operation
**/ */
var Operation = new Class (); var Operation = new Class ();
module.exports = Operation; module.exports = Operation;

View File

@ -3,7 +3,7 @@ var Value = require ('./value');
/** /**
* The equivalent of a SQL value. * The equivalent of a SQL value.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Value Extends: Value

View File

@ -4,7 +4,7 @@ var Field = require ('./field');
/** /**
* The equivalent of a SQL select. * The equivalent of a SQL select.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Stmt Extends: Stmt

View File

@ -4,7 +4,7 @@ var Expr = require ('./expr');
/** /**
* The equivalent of a SQL statement. * The equivalent of a SQL statement.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Object Extends: Object

View File

@ -4,7 +4,7 @@ var Holder = require ('./holder');
/** /**
* Literal SQL string. * Literal SQL string.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Stmt Extends: Stmt

View File

@ -3,7 +3,7 @@ var Target = require ('./target');
/** /**
* Represents a database table. * Represents a database table.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Target Extends: Target

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/** /**
* The equivalent of a SQL target. * The equivalent of a SQL target.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Object Extends: Object

View File

@ -3,7 +3,7 @@ var Dml = require ('./dml');
/** /**
* The equivalent of a SQL update. * The equivalent of a SQL update.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Dml Extends: Dml

View File

@ -3,7 +3,7 @@ var Expr = require ('./expr');
/** /**
* The equivalent of a SQL value. * The equivalent of a SQL value.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Expr Extends: Expr
@ -13,7 +13,7 @@ module.exports = new Class
{ {
/** /**
* The master param. * The master param.
**/ */
param: param:
{ {
type: Vn.Param type: Vn.Param
@ -29,7 +29,7 @@ module.exports = new Class
}, },
/** /**
* The value. * The value.
**/ */
value: value:
{ {
type: String type: String

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/** /**
* Creates a object from a XML specification. * Creates a object from a XML specification.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Object Extends: Object
@ -69,7 +69,7 @@ module.exports = new Class
* @path String The XML path * @path String The XML path
* @dstDocument Document The document used to create the nodes * @dstDocument Document The document used to create the nodes
* @return %true on success, %false othersise * @return %true on success, %false othersise
**/ */
,loadXml: function (path, dstDocument) ,loadXml: function (path, dstDocument)
{ {
this._path = path; this._path = path;
@ -115,7 +115,7 @@ module.exports = new Class
* @path Node The DOM node * @path Node The DOM node
* @dstDocument Document The document used to create the nodes * @dstDocument Document The document used to create the nodes
* @return %true on success, %false othersise * @return %true on success, %false othersise
**/ */
,loadXmlFromNode: function (node, dstDocument) ,loadXmlFromNode: function (node, dstDocument)
{ {
this._compileInit (dstDocument); this._compileInit (dstDocument);
@ -264,7 +264,7 @@ module.exports = new Class
/** /**
* Creates a text node context. * Creates a text node context.
**/ */
,textCompile: function (node, tagName) ,textCompile: function (node, tagName)
{ {
if (!tagName) if (!tagName)
@ -284,7 +284,7 @@ module.exports = new Class
/** /**
* Creates a object context. * Creates a object context.
**/ */
,objectCompile: function (node, tagName) ,objectCompile: function (node, tagName)
{ {
var klass = vnCustomTags[tagName]; var klass = vnCustomTags[tagName];
@ -443,7 +443,7 @@ module.exports = new Class
/** /**
* Creates a HTML node context. * Creates a HTML node context.
**/ */
,elementCompile: function (node, tagName) ,elementCompile: function (node, tagName)
{ {
var attributes = {}; var attributes = {};

View File

@ -1,6 +1,6 @@
/** /**
* Brownser cookie handler. * Brownser cookie handler.
**/ */
module.exports = module.exports =
{ {
set: function (key, value, days) set: function (key, value, days)

View File

@ -1,6 +1,6 @@
/** /**
* Date handling utilities. * Date handling utilities.
**/ */
Date.prototype.clone = function () Date.prototype.clone = function ()
{ {

View File

@ -3,7 +3,7 @@ var Object = require ('./object');
/** /**
* Class to handle the URL. * Class to handle the URL.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Object Extends: Object

View File

@ -3,7 +3,7 @@ var HashListener = require ('./hash-listener');
/** /**
* Class to handle the URL. * Class to handle the URL.
**/ */
module.exports = module.exports =
{ {
_hash: null _hash: null
@ -33,7 +33,7 @@ module.exports =
* Gets the hash part of the URL. * Gets the hash part of the URL.
* *
* @param {string} key The variable name * @param {string} key The variable name
**/ */
,get: function (key) ,get: function (key)
{ {
return this._hashMap[key]; return this._hashMap[key];
@ -43,7 +43,7 @@ module.exports =
* Sets the hash part of the URL, respecting the current hash variables. * Sets the hash part of the URL, respecting the current hash variables.
* *
* @param {Object} map A key-value map * @param {Object} map A key-value map
**/ */
,add: function (map) ,add: function (map)
{ {
var newMap = this._hashMap; var newMap = this._hashMap;
@ -58,7 +58,7 @@ module.exports =
* Sets the hash part of the URL. * Sets the hash part of the URL.
* *
* @param {Object} map A key-value map * @param {Object} map A key-value map
**/ */
,set: function (map) ,set: function (map)
{ {
if (map) if (map)
@ -90,7 +90,7 @@ module.exports =
* @param {Object} map A key-value map * @param {Object} map A key-value map
* @param {boolean} add %true to combine with the current map, %false otherwise * @param {boolean} add %true to combine with the current map, %false otherwise
* @return {String} The URL * @return {String} The URL
**/ */
,make: function (map, add) ,make: function (map, add)
{ {
var hash = '#!'; var hash = '#!';

View File

@ -4,7 +4,7 @@ var JsonException = require ('./json-exception');
/** /**
* Handler for JSON rest connections. * Handler for JSON rest connections.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Object Extends: Object
@ -15,7 +15,7 @@ module.exports = new Class
/** /**
* Initilizes the connection object. * Initilizes the connection object.
**/ */
,initialize: function () ,initialize: function ()
{ {
this.parent (); this.parent ();
@ -48,7 +48,7 @@ module.exports = new Class
* @param {String} password The user password * @param {String} password The user password
* @param {Boolean} remember Specifies if the user should be remembered * @param {Boolean} remember Specifies if the user should be remembered
* @param {Function} openCallback The function to call when operation is done * @param {Function} openCallback The function to call when operation is done
**/ */
,open: function (user, pass, remember, callback) ,open: function (user, pass, remember, callback)
{ {
if (user !== null && user !== undefined) if (user !== null && user !== undefined)
@ -92,7 +92,7 @@ module.exports = new Class
* Closes the connection to the REST service. * Closes the connection to the REST service.
* *
* @param {Function} callback The function to call when operation is done * @param {Function} callback The function to call when operation is done
**/ */
,close: function (callback) ,close: function (callback)
{ {
this._closeClient (); this._closeClient ();
@ -122,7 +122,7 @@ module.exports = new Class
* *
* @param {String} user The user name * @param {String} user The user name
* @param {Function} callback The callback function * @param {Function} callback The callback function
**/ */
,supplantUser: function (user, callback) ,supplantUser: function (user, callback)
{ {
var params = {'supplantUser': user}; var params = {'supplantUser': user};
@ -141,7 +141,7 @@ module.exports = new Class
/** /**
* Ends the user supplanting and restores the last login. * Ends the user supplanting and restores the last login.
**/ */
,supplantEnd: function () ,supplantEnd: function ()
{ {
this.fetchToken (); this.fetchToken ();
@ -154,7 +154,7 @@ module.exports = new Class
* @param {String} restService The service path * @param {String} restService The service path
* @param {Map} params The params to pass to the service * @param {Map} params The params to pass to the service
* @param {Function} callback The response callback * @param {Function} callback The response callback
**/ */
,send: function (restService, params, callback) ,send: function (restService, params, callback)
{ {
if (!params) if (!params)
@ -162,7 +162,7 @@ module.exports = new Class
params['srv'] = 'json:'+ restService; params['srv'] = 'json:'+ restService;
this.sendWithUrl (params, callback, 'post', '.'); this.sendWithUrl (params, callback, 'POST', '.');
} }
,sendForm: function (form, callback) ,sendForm: function (form, callback)
@ -174,7 +174,7 @@ module.exports = new Class
if (elements[i].name) if (elements[i].name)
params[elements[i].name] = elements[i].value; params[elements[i].name] = elements[i].value;
this.sendWithUrl (params, callback, 'post', form.action); this.sendWithUrl (params, callback, 'POST', form.action);
} }
,sendFormMultipart: function (form, callback) ,sendFormMultipart: function (form, callback)
@ -185,7 +185,7 @@ module.exports = new Class
formData.append ('token', this.token); formData.append ('token', this.token);
var request = new XMLHttpRequest (); var request = new XMLHttpRequest ();
request.open ('post', form.action, true); request.open ('POST', form.action, true);
request.onreadystatechange = request.onreadystatechange =
this._onStateChange.bind (this, request, callback); this._onStateChange.bind (this, request, callback);
request.send (formData); request.send (formData);

View File

@ -1,6 +1,6 @@
/** /**
* This class stores the database errors. * This class stores the database errors.
**/ */
module.exports = new Class module.exports = new Class
({ ({
exception: null exception: null

View File

@ -3,7 +3,7 @@ vnLocaleStrings = {};
/** /**
* Class to manage the internationalization. * Class to manage the internationalization.
**/ */
module.exports = module.exports =
{ {
language: null language: null
@ -24,7 +24,7 @@ module.exports =
var file = path +'/locale/'+ this.language +'.json'+ Vn.getVersion (); var file = path +'/locale/'+ this.language +'.json'+ Vn.getVersion ();
var request = new XMLHttpRequest (); var request = new XMLHttpRequest ();
request.open ('get', file, true); request.open ('GET', file, true);
request.onreadystatechange = this.loadDone.bind (this, request, callback); request.onreadystatechange = this.loadDone.bind (this, request, callback);
request.send (); request.send ();
} }

View File

@ -1,6 +1,11 @@
module.exports = module.exports =
{ {
/**
* Removes all node childs.
*
* @param {Node} node The HTML Node
*/
removeChilds: function (node) removeChilds: function (node)
{ {
var childs = node.childNodes; var childs = node.childNodes;
@ -10,12 +15,37 @@ module.exports =
node.removeChild (childs[0]); node.removeChild (childs[0]);
} }
/**
* Removes a node from the document.
*
* @param {Node} node The HTML Node
*/
,remove: function (node) ,remove: function (node)
{ {
if (node.parentNode) if (node.parentNode)
node.parentNode.removeChild (node); node.parentNode.removeChild (node);
} }
/**
* Replaces the node child/s with another one.
*
* @param {Node} node The HTML Node
* @param {Node} child The new child or %null to set an empty node
*/
,setChild: function (node, child)
{
this.removeChilds (node);
if (child)
node.appendChild (child);
}
/**
* Replaces the node text/childs with text.
*
* @param {Node} node The HTML Node
* @param {Node} child The new node text or %null for no text
*/
,setText: function (node, text) ,setText: function (node, text)
{ {
Vn.Node.removeChilds (node); Vn.Node.removeChilds (node);
@ -25,14 +55,25 @@ module.exports =
node.ownerDocument.createTextNode (text)); node.ownerDocument.createTextNode (text));
} }
/**
* Adds a class to the node CSS classes. Note that this
* function doesn't check if the node already has the class.
*
* @param {Node} node The HTML Node
* @param {String} className The CSS class name
*/
,addClass: function (node, className) ,addClass: function (node, className)
{ {
/* var classes = node.className.split (' '); node.className = className +' '+ node.className;
if (classes.split (' ').indexOf (className) == -1)
*/ node.className = className +' '+ node.className;
} }
/**
* Removes a class from the node CSS classes. This functions
* removes all ocurrences of the class from the node.
*
* @param {Node} node The HTML Node
* @param {String} className The CSS class name
*/
,removeClass: function (node, className) ,removeClass: function (node, className)
{ {
var index = 0; var index = 0;
@ -49,18 +90,23 @@ module.exports =
node.className = classes.join (' '); node.className = classes.join (' ');
} }
/**
* Hides the node from the document.
*
* @param {Node} node The HTML Node
*/
,hide: function (node) ,hide: function (node)
{ {
node.style.display = 'none'; node.style.display = 'none';
} }
/**
* Shows a hidden node.
*
* @param {Node} node The hidden HTML Node
*/
,show: function (node) ,show: function (node)
{ {
node.style.display = 'block'; node.style.display = 'block';
} }
}; };
$ = function (id)
{
return document.getElementById (id);
}

View File

@ -3,7 +3,7 @@
* The main base class. Manages the signal system. * The main base class. Manages the signal system.
* *
* @param signals Map with all connected signal handlers * @param signals Map with all connected signal handlers
**/ */
module.exports = new Class module.exports = new Class
({ ({
Tag: 'vn-object' Tag: 'vn-object'
@ -17,18 +17,29 @@ module.exports = new Class
this.setProperties (props); this.setProperties (props);
} }
/**
* Sets a group of object properties.
*
* @param {Object} props Properties
*/
,setProperties: function (props) ,setProperties: function (props)
{ {
for (var prop in props) for (var prop in props)
this[prop] = props[prop]; this[prop] = props[prop];
} }
/**
* Increases the object reference count.
*/
,ref: function () ,ref: function ()
{ {
this._refCount++; this._refCount++;
return this; return this;
} }
/**
* Decreases the object reference count.
*/
,unref: function () ,unref: function ()
{ {
this._refCount--; this._refCount--;
@ -55,7 +66,7 @@ module.exports = new Class
* @param {String} id The signal identifier * @param {String} id The signal identifier
* @param {Function} callback The callback * @param {Function} callback The callback
* @param {Object} instance The instance * @param {Object} instance The instance
**/ */
,on: function (id, callback, instance) ,on: function (id, callback, instance)
{ {
if (!(callback instanceof Function)) if (!(callback instanceof Function))
@ -84,7 +95,7 @@ module.exports = new Class
* @param {String} id The signal identifier * @param {String} id The signal identifier
* @param {Function} callback The callback * @param {Function} callback The callback
* @param {Boolean} block %true for lock the signal, %false for unlock * @param {Boolean} block %true for lock the signal, %false for unlock
**/ */
,blockSignal: function (id, callback, block, instance) ,blockSignal: function (id, callback, block, instance)
{ {
if (!this._signalData) if (!this._signalData)
@ -105,7 +116,7 @@ module.exports = new Class
* Emits a signal in the current object. * Emits a signal in the current object.
* *
* @param {String} id The signal identifier * @param {String} id The signal identifier
**/ */
,signalEmit: function (id) ,signalEmit: function (id)
{ {
if (!this._signalData) if (!this._signalData)
@ -133,7 +144,7 @@ module.exports = new Class
* @param {String} id The signal identifier * @param {String} id The signal identifier
* @param {Function} callback The connected callback * @param {Function} callback The connected callback
* @param {Object} instance The instance * @param {Object} instance The instance
**/ */
,disconnect: function (id, callback, instance) ,disconnect: function (id, callback, instance)
{ {
if (!this._signalData) if (!this._signalData)
@ -154,7 +165,7 @@ module.exports = new Class
* Disconnects all signals for the given instance. * Disconnects all signals for the given instance.
* *
* @param {Object} instance The instance * @param {Object} instance The instance
**/ */
,disconnectByInstance: function (instance) ,disconnectByInstance: function (instance)
{ {
if (!this._signalData) if (!this._signalData)
@ -175,7 +186,7 @@ module.exports = new Class
/** /**
* Destroys the object, this method should only be called before losing * Destroys the object, this method should only be called before losing
* the last reference to the object. * the last reference to the object.
**/ */
,_destroy: function () ,_destroy: function ()
{ {
if (!this._signalData) if (!this._signalData)
@ -189,6 +200,12 @@ module.exports = new Class
this._signalData = null; this._signalData = null;
} }
/**
* Links the object with another object.
*
* @param {Object} prop The linked property
* @param {Object} handlers The object events to listen with
*/
,link: function (prop, handlers) ,link: function (prop, handlers)
{ {
this._signalInit (); this._signalInit ();

View File

@ -5,7 +5,7 @@ var Value = require ('./value');
/** /**
* Simply a linkable value holder. * Simply a linkable value holder.
**/ */
module.exports = new Class module.exports = new Class
({ ({
Extends: Object Extends: Object

View File

@ -1,13 +1,13 @@
/** /**
* Class to handle the URL. * Class to handle the URL.
**/ */
module.exports = module.exports =
{ {
/** /**
* Gets the value of a URL variable. * Gets the value of a URL variable.
* *
* @param {string} key The variable name * @param {string} key The variable name
**/ */
getQuery: function (key) getQuery: function (key)
{ {
var regExp = new RegExp ('[\?\&]'+ key +'=([^\&]*)(\&?)', 'i'); var regExp = new RegExp ('[\?\&]'+ key +'=([^\&]*)(\&?)', 'i');
@ -21,7 +21,7 @@ module.exports =
* *
* @param {string} key The variable name * @param {string} key The variable name
* @param {string} value The new value * @param {string} value The new value
**/ */
,setQuery: function (key, value) ,setQuery: function (key, value)
{ {
var changed = true; var changed = true;

View File

@ -45,7 +45,7 @@ Vn = module.exports = {
* is already included, does nothing. * is already included, does nothing.
* *
* @param {string} fileName The stylesheet file name * @param {string} fileName The stylesheet file name
**/ */
,includeCss: function (fileName) ,includeCss: function (fileName)
{ {
var cssData = this.cssIncludes[fileName]; var cssData = this.cssIncludes[fileName];
@ -75,7 +75,7 @@ Vn = module.exports = {
* Excludes a CSS stylesheet from the current document. * Excludes a CSS stylesheet from the current document.
* *
* @param {string} fileName The stylesheet file name * @param {string} fileName The stylesheet file name
**/ */
,excludeCss: function (fileName) ,excludeCss: function (fileName)
{ {
var cssData = this.cssIncludes[fileName]; var cssData = this.cssIncludes[fileName];
@ -145,7 +145,7 @@ Vn = module.exports = {
* Should be called on the last statically incuded script. * Should be called on the last statically incuded script.
* *
* @param {Function} callback The main function * @param {Function} callback The main function
**/ */
,main: function (callback) ,main: function (callback)
{ {
if (this.mainCalled) if (this.mainCalled)
@ -206,7 +206,7 @@ Vn = module.exports = {
* current script. * current script.
* *
* @param {...} The list of files as function arguments * @param {...} The list of files as function arguments
**/ */
,include: function () ,include: function ()
{ {
for (var i = 0; i < arguments.length; i++) for (var i = 0; i < arguments.length; i++)
@ -223,7 +223,7 @@ Vn = module.exports = {
* current script. * current script.
* *
* @param {...} The list of files as function arguments * @param {...} The list of files as function arguments
**/ */
,resource: function () ,resource: function ()
{ {
for (var i = 0; i < arguments.length; i++) for (var i = 0; i < arguments.length; i++)
@ -240,7 +240,7 @@ Vn = module.exports = {
* are resolved. * are resolved.
* *
* @param {Function} callback The callback function * @param {Function} callback The callback function
**/ */
,define: function (callback) ,define: function (callback)
{ {
this.currentCallback = callback; this.currentCallback = callback;
@ -251,7 +251,7 @@ Vn = module.exports = {
* *
* @param {string} libName The folder of the library * @param {string} libName The folder of the library
* @param {Array<string>} files Array with every library file name * @param {Array<string>} files Array with every library file name
**/ */
,includeLib: function (libName, files) ,includeLib: function (libName, files)
{ {
Vn.Locale.loadScript ('js/'+ libName +'.js'); Vn.Locale.loadScript ('js/'+ libName +'.js');
@ -267,7 +267,7 @@ Vn = module.exports = {
* @param {string} fileName The script file name * @param {string} fileName The script file name
* @param {Function} callback The function to call when script is * @param {Function} callback The function to call when script is
* downloaded and included * downloaded and included
**/ */
,includeJs: function (fileName, callback, skipVersion) ,includeJs: function (fileName, callback, skipVersion)
{ {
var includeData = this._realIncludeJs (fileName, skipVersion); var includeData = this._realIncludeJs (fileName, skipVersion);
@ -344,7 +344,7 @@ Vn = module.exports = {
* *
* @param {string} path The file path * @param {string} path The file path
* @param {Function} callback The function to call when file is downloaded * @param {Function} callback The function to call when file is downloaded
**/ */
,loadXml: function (path, callback) ,loadXml: function (path, callback)
{ {
var includeData = this._realLoadXml (path); var includeData = this._realLoadXml (path);
@ -387,7 +387,7 @@ Vn = module.exports = {
* *
* @param {string} path The file path * @param {string} path The file path
* @return {Object} The DOM object * @return {Object} The DOM object
**/ */
,getXml: function (path) ,getXml: function (path)
{ {
var includeData = this.includes[path]; var includeData = this.includes[path];
@ -402,7 +402,7 @@ Vn = module.exports = {
* Checks if user is using a mobile browser. * Checks if user is using a mobile browser.
* *
* return {boolean} %true if is mobile, %false otherwise. * return {boolean} %true if is mobile, %false otherwise.
**/ */
,isMobile: function () ,isMobile: function ()
{ {
if (this.isMobileCached === null) if (this.isMobileCached === null)

View File

@ -65,7 +65,7 @@ class SshConnection
/** /**
* Abrebiated method to make SSH connections. * Abrebiated method to make SSH connections.
**/ */
function __construct ($host, $user, $password) function __construct ($host, $user, $password)
{ {
$this->connection = $connection = ssh2_connect ($host); $this->connection = $connection = ssh2_connect ($host);
@ -83,7 +83,7 @@ class SshConnection
/** /**
* Executes a command on the host. * Executes a command on the host.
**/ */
function exec ($command) function exec ($command)
{ {
return ssh2_exec ($this->connection, $command); return ssh2_exec ($this->connection, $command);
@ -91,7 +91,7 @@ class SshConnection
/** /**
* Escapes the double quotes from an string. * Escapes the double quotes from an string.
**/ */
static function escape ($str) static function escape ($str)
{ {
return '"'. str_replace ('"', '\\"', $str) .'"'; return '"'. str_replace ('"', '\\"', $str) .'"';

View File

@ -4,7 +4,7 @@ include __DIR__.'/account.php';
/** /**
* Updates the user password. * Updates the user password.
**/ */
class ChangePassword extends Vn\Web\JsonRequest class ChangePassword extends Vn\Web\JsonRequest
{ {
const PARAMS = ['newPassword']; const PARAMS = ['newPassword'];

View File

@ -89,7 +89,7 @@ class Query extends Vn\Web\JsonRequest
/** /**
* Transforms the database result into a JSON parseable object. * Transforms the database result into a JSON parseable object.
**/ */
function transformResult ($result) function transformResult ($result)
{ {
$tableMap = []; $tableMap = [];
@ -182,7 +182,7 @@ class Query extends Vn\Web\JsonRequest
/** /**
* Transforms the database value into a JSON parseable value. * Transforms the database value into a JSON parseable value.
**/ */
function castValue ($value, $type) function castValue ($value, $type)
{ {
if ($value !== NULL) if ($value !== NULL)

View File

@ -4,7 +4,7 @@ include __DIR__.'/account.php';
/** /**
* Sets the user password. * Sets the user password.
**/ */
class SetPassword extends Vn\Web\JsonRequest class SetPassword extends Vn\Web\JsonRequest
{ {
const PARAMS = [ const PARAMS = [

View File

@ -5,7 +5,7 @@ include __DIR__.'/account.php';
/** /**
* Updates the user credentials on external systems like Samba, create * Updates the user credentials on external systems like Samba, create
* home directory, create mailbox, etc. * home directory, create mailbox, etc.
**/ */
class SyncUser extends Vn\Web\JsonRequest class SyncUser extends Vn\Web\JsonRequest
{ {
const PARAMS = ['syncUser']; const PARAMS = ['syncUser'];

View File

@ -4,7 +4,7 @@ use Vn\Lib;
/** /**
* Adds a document to the Document Management System. * Adds a document to the Document Management System.
**/ */
class Add extends Vn\Web\JsonRequest class Add extends Vn\Web\JsonRequest
{ {
function run ($db) function run ($db)

View File

@ -1,7 +1,7 @@
/** /**
* Adds a new lot, generates its barcode * Adds a new lot, generates its barcode
* inserts/updates de record on table #vn2008.buy_edi * inserts/updates de record on table #vn2008.buy_edi
**/ */
USE edi; USE edi;
DROP PROCEDURE IF EXISTS batch_new; DROP PROCEDURE IF EXISTS batch_new;
DELIMITER $$ DELIMITER $$

View File

@ -2,7 +2,7 @@
* Creates a buy line from an EDI lot. * Creates a buy line from an EDI lot.
* *
* @param v_edi The EDI id * @param v_edi The EDI id
**/ */
USE edi; USE edi;
DROP PROCEDURE IF EXISTS edi_load; DROP PROCEDURE IF EXISTS edi_load;
DELIMITER $$ DELIMITER $$

View File

@ -3,7 +3,7 @@
* *
* @param v_mail_id Message-ID of email * @param v_mail_id Message-ID of email
* @param v_sender Origin email id * @param v_sender Origin email id
**/ */
USE edi; USE edi;
DROP PROCEDURE IF EXISTS message_new; DROP PROCEDURE IF EXISTS message_new;
DELIMITER $$ DELIMITER $$

View File

@ -8,7 +8,7 @@ class Image
* Creates an image resource from a valid image file. * Creates an image resource from a valid image file.
* *
* @param string $srcFile The source file name * @param string $srcFile The source file name
**/ */
static function create ($srcFile) static function create ($srcFile)
{ {
$imageType = exif_imagetype ($srcFile); $imageType = exif_imagetype ($srcFile);
@ -43,7 +43,7 @@ class Image
* @param integer $maxWidth The maximum width of resized image in pixels * @param integer $maxWidth The maximum width of resized image in pixels
* @param boolean $crop Wether to crop the image * @param boolean $crop Wether to crop the image
* @param boolean $symbolicSrc If it is not necessary to resize the image creates a symbolic link using the passed path as source * @param boolean $symbolicSrc If it is not necessary to resize the image creates a symbolic link using the passed path as source
**/ */
static function resizeSave ($image, $dstFile, $maxHeight, $maxWidth, $crop = FALSE, $symbolicSrc = NULL) static function resizeSave ($image, $dstFile, $maxHeight, $maxWidth, $crop = FALSE, $symbolicSrc = NULL)
{ {
$width = imagesx ($image); $width = imagesx ($image);

View File

@ -10,7 +10,7 @@ require_once (__DIR__.'/lib.php');
* @param integer $maxHeight The maximum height of resized image in pixels * @param integer $maxHeight The maximum height of resized image in pixels
* @param integer $maxWidth The maximum width of resized image in pixels * @param integer $maxWidth The maximum width of resized image in pixels
* @param boolean $rewrite Wether to rewrite the destination file if it exits * @param boolean $rewrite Wether to rewrite the destination file if it exits
**/ */
class Resize extends Vn\Lib\Method class Resize extends Vn\Lib\Method
{ {
const PARAMS = [ const PARAMS = [

View File

@ -5,7 +5,7 @@ require_once (__DIR__.'/util.php');
/** /**
* Syncronizes the data directory with the database, this may take * Syncronizes the data directory with the database, this may take
* some time. * some time.
**/ */
class Sync extends Vn\Lib\Method class Sync extends Vn\Lib\Method
{ {
private $trashSubdir; private $trashSubdir;
@ -111,7 +111,7 @@ class Sync extends Vn\Lib\Method
* Moves a data directory to the trash. * Moves a data directory to the trash.
* *
* @param string $file The file to move to the trash * @param string $file The file to move to the trash
**/ */
function moveTrash ($file) function moveTrash ($file)
{ {
$trashBasedir = "{$this->dataDir}/.trash/". $this->$trashSubdir; $trashBasedir = "{$this->dataDir}/.trash/". $this->$trashSubdir;

View File

@ -9,7 +9,7 @@ require_once (__DIR__.'/util.php');
* @param string $file The file name * @param string $file The file name
* @param integer $width The width of the thumb * @param integer $width The width of the thumb
* @param integer $height The height of the thumb * @param integer $height The height of the thumb
**/ */
class Thumb extends Vn\Web\RestRequest class Thumb extends Vn\Web\RestRequest
{ {
function run () function run ()

View File

@ -7,7 +7,7 @@ use Vn\Lib\UserException;
/** /**
* Uploads a file creating its corresponding sizes. * Uploads a file creating its corresponding sizes.
**/ */
class Upload extends Vn\Web\JsonRequest class Upload extends Vn\Web\JsonRequest
{ {
function run ($db) function run ($db)

View File

@ -4,7 +4,7 @@ require_once (__DIR__.'/image.php');
/** /**
* Base class for image methods. * Base class for image methods.
**/ */
class Util class Util
{ {
var $app; var $app;
@ -20,7 +20,7 @@ class Util
* Loads information for specified schema. * Loads information for specified schema.
* *
* @param string $schema The schema name * @param string $schema The schema name
**/ */
function loadInfo ($schema) function loadInfo ($schema)
{ {
$db = $this->app->getSysConn (); $db = $this->app->getSysConn ();

View File

@ -3,7 +3,7 @@
/** /**
* Ejemplo: * Ejemplo:
* <Cube><Cube time="2010-12-10"><Cube currency="USD" rate="1.3244"/> * <Cube><Cube time="2010-12-10"><Cube currency="USD" rate="1.3244"/>
**/ */
class ExchangeRate extends Vn\Lib\Method class ExchangeRate extends Vn\Lib\Method
{ {
function run ($db) function run ($db)
@ -22,7 +22,7 @@ class ExchangeRate extends Vn\Lib\Method
{ {
$xmlDate = new DateTime ($cube['time']); $xmlDate = new DateTime ($cube['time']);
// Si existen datos más recientes de la máxima fecha los añade // Si existen datos m<EFBFBD>s recientes de la m<>xima fecha los a<>ade
if ($maxDate < $xmlDate) if ($maxDate < $xmlDate)
foreach ($cube->Cube as $subCube) foreach ($cube->Cube as $subCube)

View File

@ -4,7 +4,7 @@ require_once (__DIR__.'/tpv.php');
/** /**
* Gets transaction confirmations from the IMAP mailbox. * Gets transaction confirmations from the IMAP mailbox.
**/ */
class ConfirmMail extends Vn\Lib\Method class ConfirmMail extends Vn\Lib\Method
{ {
function run ($db) function run ($db)

View File

@ -4,7 +4,7 @@ require_once (__DIR__.'/tpv.php');
/** /**
* Gets transaction confirmation from HTTP POST. * Gets transaction confirmation from HTTP POST.
**/ */
class ConfirmPost extends Vn\Web\RestRequest class ConfirmPost extends Vn\Web\RestRequest
{ {
function run ($db) function run ($db)

View File

@ -5,7 +5,7 @@ require_once (__DIR__.'/tpv.php');
/** /**
* Gets transaction confirmation from SOAP service. * Gets transaction confirmation from SOAP service.
**/ */
class ConfirmSoap extends Vn\Web\RestRequest class ConfirmSoap extends Vn\Web\RestRequest
{ {
function run ($db) function run ($db)

View File

@ -4,7 +4,7 @@ class Tpv
{ {
/** /**
* Tryes to confirm a transaction with the given params. * Tryes to confirm a transaction with the given params.
**/ */
static function confirm ($db, $params) static function confirm ($db, $params)
{ {
if (!(isset ($params['Ds_Amount']) if (!(isset ($params['Ds_Amount'])

View File

@ -2,7 +2,7 @@
/** /**
* Starts a new TPV transaction and returns the params. * Starts a new TPV transaction and returns the params.
**/ */
class Transaction extends Vn\Web\JsonRequest class Transaction extends Vn\Web\JsonRequest
{ {
const PARAMS = ['amount']; const PARAMS = ['amount'];

View File

@ -7,7 +7,7 @@ namespace Vn\Web;
* *
* Format for $_REQUEST['srv'] variable: * Format for $_REQUEST['srv'] variable:
* - [serviceName]:[requestDir]/[requestFile] * - [serviceName]:[requestDir]/[requestFile]
**/ */
class App extends \Vn\Lib\App class App extends \Vn\Lib\App
{ {
protected $conn = NULL; protected $conn = NULL;
@ -52,7 +52,7 @@ class App extends \Vn\Lib\App
* or the default config file if isn't defined a file for the vhost. * or the default config file if isn't defined a file for the vhost.
* *
* @return string The config file name * @return string The config file name
**/ */
function getConfigFile () function getConfigFile ()
{ {
if (!empty ($_SERVER['SERVER_NAME']) if (!empty ($_SERVER['SERVER_NAME'])

View File

@ -6,7 +6,7 @@ use Vn\Lib\Locale;
/** /**
* Base class for services that sends response as HTML format. * Base class for services that sends response as HTML format.
**/ */
class HtmlService extends Service class HtmlService extends Service
{ {
function run () function run ()

View File

@ -8,7 +8,7 @@ namespace Vn\Web;
* @property string $exception The exception name * @property string $exception The exception name
* @property string $message The message string * @property string $message The message string
* @property string $code The code of message * @property string $code The code of message
**/ */
class JsonException class JsonException
{ {
var $exception = NULL; var $exception = NULL;

View File

@ -7,7 +7,7 @@ namespace Vn\Web;
* *
* @property Object $data The returned data * @property Object $data The returned data
* @property array $warnings Array with warning messages * @property array $warnings Array with warning messages
**/ */
class JsonReply class JsonReply
{ {
var $data = NULL; var $data = NULL;

View File

@ -4,6 +4,6 @@ namespace Vn\Web;
/** /**
* Base class for JSON services. * Base class for JSON services.
**/ */
abstract class JsonRequest extends RestRequest {} abstract class JsonRequest extends RestRequest {}

View File

@ -6,7 +6,7 @@ use Vn\Lib;
/** /**
* Base class for JSON application. * Base class for JSON application.
**/ */
class JsonService extends RestService class JsonService extends RestService
{ {
private $warnings = NULL; private $warnings = NULL;

View File

@ -7,7 +7,7 @@ use Exception;
/** /**
* Basic class to encode, decode and verify JWT tokens. It implements the HS256 * Basic class to encode, decode and verify JWT tokens. It implements the HS256
* algorithm from the RFC 7519 standard. * algorithm from the RFC 7519 standard.
**/ */
class Jwt class Jwt
{ {
/** /**
@ -16,7 +16,7 @@ class Jwt
* @param {Array} $payload The data to encode * @param {Array} $payload The data to encode
* @param {string} $key The key used to sign the token * @param {string} $key The key used to sign the token
* @return {string} The new JWT token * @return {string} The new JWT token
**/ */
static function encode ($payload, $key) static function encode ($payload, $key)
{ {
$header = [ $header = [
@ -37,7 +37,7 @@ class Jwt
* @param {Array} $token The JWT token * @param {Array} $token The JWT token
* @param {string} $key The key used to validate the token * @param {string} $key The key used to validate the token
* @return {string} The JWT validated and decoded data * @return {string} The JWT validated and decoded data
**/ */
static function decode ($token, $key) static function decode ($token, $key)
{ {
$parts = explode ('.', $token); $parts = explode ('.', $token);

View File

@ -10,7 +10,7 @@ class Security
/** /**
* Base class for REST services. * Base class for REST services.
**/ */
abstract class RestRequest extends \Vn\Lib\Method abstract class RestRequest extends \Vn\Lib\Method
{ {
const PARAMS = NULL; const PARAMS = NULL;

Some files were not shown because too many files have changed in this diff Show More