-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b804bfd
commit ed3591b
Showing
60 changed files
with
22,039 additions
and
2,499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
$fi.fn.v.Ecriture= | ||
Backbone.View.extend({ | ||
el:'<table>', | ||
template:_.template('<caption><%= message %></caption>'+ | ||
template:_.template('<caption><%= meta.message %></caption>'+ | ||
'<tr><th>compte</th><th>debit</th><th>credit</th></tr>'+ | ||
'<% _.each( mouvement, function(l){ %><tr><th><%= l[0] %></th><td><%= l[1]?l[1].toFixed(window.$fi.fix):"" %></td><td><%= l[2]?l[2].toFixed(window.$fi.fix):"" %></td></tr> <% }) %></table>' ), | ||
'<% _.each( mouvement, function(l){ %><tr><th><%= l[0] %></th><td><%= (window.$fi.fn.v.is_empty(f))?"":f %></td><td><%= (window.$fi.fn.v.is_empty(f))?"":f %></td></tr> <% }) %></table>' ), | ||
|
||
render:function(ev){ $(this.el).html(this.template(this.model.toVSON())); return this; }, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
function to_array(arg){ | ||
return [].slice.call( arg || [] ); | ||
} | ||
|
||
function copy_array(arr){ | ||
return arr.slice(); | ||
} | ||
|
||
function idem(e){ | ||
return e; | ||
} | ||
|
||
function filter_and_dispatch( filter, exact ) { | ||
return function (set){ | ||
return set.filter( filter ).reduce(function(resp,e){ | ||
if(exact(e)) return { | ||
exact: resp.exact.concat([e]), | ||
sub: resp.sub | ||
}; | ||
return { | ||
exact: resp.exact, | ||
sub: resp.sub.concat([e]) | ||
}; | ||
}, { exact:[], sub:[] } ); | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,67 @@ | ||
/** | ||
* Accounting Large Object | ||
* | ||
*/ | ||
var ALO=create_class( | ||
function(){ | ||
/** | ||
* Accounting Large Object | ||
* | ||
*/ | ||
var ALO=create_class( | ||
function(){ | ||
|
||
}, | ||
{ | ||
/** | ||
* Load On Demand data | ||
* | ||
* @param {string} o [description] | ||
* @param {string} k [description] | ||
* | ||
* @return {object} [description] | ||
*/ | ||
lod:function(k){ | ||
// load on demand | ||
var id = this.hasOwnProperty(k)? this[k] : k; | ||
}, | ||
{ | ||
/** | ||
* Load On Demand data | ||
* | ||
* @param {string} o [description] | ||
* @param {string} k [description] | ||
* | ||
* @return {object} [description] | ||
*/ | ||
lod:function(k){ | ||
// load on demand | ||
var id = this.hasOwnProperty(k)? this[k] : k; | ||
|
||
if( id=== undefined ) return undefined; | ||
if(id.split === undefined ){ | ||
return new this.$.Comptes( id, this.$ ); | ||
} | ||
var t = id.split(/:/); | ||
t = $fi.fn[t[0]]; | ||
if( id === undefined ) return undefined; | ||
if( id === false ) return undefined; | ||
|
||
//return new t({ id: id }); | ||
return this.$.sync('read',{ | ||
id: id, | ||
$: this.$ | ||
}); | ||
}, | ||
if(id.split === undefined ){ | ||
return new this.$.Comptes( id, this.$ ); | ||
} | ||
|
||
return this.$.sync('read',{ | ||
id: id, | ||
$: this.$ | ||
}); | ||
}, | ||
|
||
/** | ||
* generate an ID for an object | ||
* | ||
* @return {string} ID of the object | ||
*/ | ||
sign:function(){ | ||
this.id= ''+CryptoJS.SHA1( JSON.stringify(this) ); | ||
return this.id; | ||
}, | ||
|
||
/** | ||
* generate an ID for an object | ||
* | ||
* @return {string} ID of the object | ||
*/ | ||
sign:function(){ | ||
this.id= ''+CryptoJS.SHA1( JSON.stringify(this) ); | ||
return this.id; | ||
}, | ||
|
||
/** | ||
* Initialize an object with given s non undefined values or d values | ||
* | ||
* @param {object} s [description] | ||
* @param {object} d [description] | ||
*/ | ||
set_or_default:function(s,d){ | ||
for( var i in d ){ | ||
this[i]= ( s[i]===undefined ? d[i] : s[i] ); | ||
} | ||
}, | ||
|
||
save:function(o){ | ||
return this.$.sync('update',this,o); | ||
}, | ||
/** | ||
* Initialize an object with given s non undefined values or d values | ||
* | ||
* @param {object} s [description] | ||
* @param {object} d [description] | ||
*/ | ||
set_or_default:function(s,d){ | ||
for( var i in d ){ | ||
this[i]= ( s[i]===undefined ? d[i] : s[i] ); | ||
} | ||
return this; | ||
}, | ||
|
||
fetch:function(o){ | ||
var i = this; | ||
o=o||{}; | ||
o.success=o.success||function(){}; | ||
var o_suc = o.success; | ||
o.success = function(data){ i.set_or_default({},data); o_suc(data);}; | ||
return this.$.sync('read',this,o ); | ||
}, | ||
|
||
}); | ||
/** | ||
* Save an object ... and attribut it an ID | ||
*/ | ||
save:function(o){ | ||
return this.$.sync('update',this,o); | ||
} | ||
}); |
Oops, something went wrong.