Fixed up client files can now download and delete files, added web link to client logins added payments, quotes and recurring to client print and lots of little ui cleanups here and there

This commit is contained in:
root
2019-05-11 20:06:01 -04:00
parent f5377409b0
commit 5c55358841
750 changed files with 225007 additions and 177 deletions
+22
View File
@@ -0,0 +1,22 @@
var Benchmark = require('benchmark'),
moment = require("./../moment.js"),
base = moment('2013-05-25');
var unitsUnderTest = ["milliseconds", "seconds", "minutes", "hours", "days", "weeks", "months", "quarters", "years"];
var tests = unitsUnderTest.reduce(function (testsSoFar, unit) {
testsSoFar["add " + unit] = generateTestForUnit(unit);
return testsSoFar;
}, {});
function generateTestForUnit(unit) {
return {
setup: function(){var base = base; var unit = unit;},
fn: function(){base.add(8, unit);},
async: true
};
}
module.exports = {
name: 'add',
tests: tests
};
+10
View File
@@ -0,0 +1,10 @@
var Benchmark = require('benchmark'),
moment = require("./../moment.js"),
base = moment('2013-05-25');
module.exports = {
name: 'clone',
onComplete: function(){},
fn: function(){base.clone();},
async: true
};
+22
View File
@@ -0,0 +1,22 @@
var Benchmark = require('benchmark'),
moment = require("./../moment.js"),
base = moment('2013-05-25');
var unitsUnderTest = ["second", "minute", "hour", "date", "day", "isoWeek", "week", "month", "quarter", "year"];
var tests = unitsUnderTest.reduce(function (testsSoFar, unit) {
testsSoFar["endOf " + unit] = generateTestForUnit(unit);
return testsSoFar;
}, {});
function generateTestForUnit(unit) {
return {
setup: function(){var base = base; var unit = unit;},
fn: function(){base.endOf(unit);},
async: true
};
}
module.exports = {
name: 'endOf',
tests: tests
};
+12
View File
@@ -0,0 +1,12 @@
var Benchmark = require('benchmark'),
moment = require('./../moment.js'),
base = new Date();
module.exports = {
name: 'fromDate',
onComplete: function(){},
fn: function(){
moment(base);
},
async: true
};
+12
View File
@@ -0,0 +1,12 @@
var Benchmark = require('benchmark'),
moment = require('./../moment.js'),
base = new Date();
module.exports = {
name: 'fromDateUtc',
onComplete: function(){},
fn: function(){
moment.utc(base);
},
async: true
};
+67
View File
@@ -0,0 +1,67 @@
var Benchmark = require('benchmark'),
moment = require("./../moment.js");
var isObjectEmpty_getOwnPropertyNames = function(obj) {
if (Object.getOwnPropertyNames) {
return (Object.getOwnPropertyNames(obj).length === 0);
} else {
var k;
for (k in obj) {
if (obj.hasOwnProperty(k)) {
return false;
}
}
return true;
}
};
var isObjectEmpty_keys = function(obj) {
if (Object.keys) {
return (Object.keys(obj).length === 0);
} else {
var k;
for (k in obj) {
if (obj.hasOwnProperty(k)) {
return false;
}
}
return true;
}
};
var isObjectEmpty_forIn = function(obj) {
var k;
for (k in obj) {
if (obj.hasOwnProperty(k)) {
return false;
}
}
return true;
};
module.exports = {
name: 'isObjectEmpty',
tests: {
"isObjectEmpty -> for..in": {
onComplete: function(){},
fn: function(){
isObjectEmpty_forIn(moment());
},
async: false
},
"isObjectEmpty -> Object.keys": {
onComplete: function(){},
fn: function(){
isObjectEmpty_keys(moment());
},
async: false
},
"isObjectEmpty -> Object.getOwnPropertyNames": {
onComplete: function(){},
fn: function(){
isObjectEmpty_getOwnPropertyNames(moment());
},
async: false
}
}
};
+11
View File
@@ -0,0 +1,11 @@
var Benchmark = require('benchmark'),
moment = require('./../moment.js');
module.exports = {
name: 'makeDuration',
onComplete: function(){},
fn: function(){
moment.duration(5, 'years');
},
async: true
};
+40
View File
@@ -0,0 +1,40 @@
var Benchmark = require('benchmark'),
moment = require("./../moment.js"),
base = moment('2013-05-25');
module.exports = {
name: 'clone',
tests: {
isBefore_true: {
onComplete: function(){},
fn: function(){base.isBefore('2013-06-25');},
async: true
},
isBefore_self: {
onComplete: function(){},
fn: function(){base.isBefore('2013-05-25');},
async: true
},
isBefore_false: {
onComplete: function(){},
fn: function(){base.isBefore('2013-04-25');},
async: true
},
isAfter_true: {
onComplete: function(){},
fn: function(){base.isAfter('2013-04-25');},
async: true
},
isAfter_self: {
onComplete: function(){},
fn: function(){base.isAfter('2013-05-25');},
async: true
},
isAfter_false: {
onComplete: function(){},
fn: function(){base.isAfter('2013-06-25');},
async: true
}
}
};
+22
View File
@@ -0,0 +1,22 @@
var Benchmark = require('benchmark'),
moment = require("./../moment.js"),
base = moment('2013-05-25');
var unitsUnderTest = ["second", "minute", "hour", "date", "day", "isoWeek", "week", "month", "quarter", "year"];
var tests = unitsUnderTest.reduce(function (testsSoFar, unit) {
testsSoFar["startOf " + unit] = generateTestForUnit(unit);
return testsSoFar;
}, {});
function generateTestForUnit(unit) {
return {
setup: function(){var base = base; var unit = unit;},
fn: function(){base.startOf(unit);},
async: true
};
}
module.exports = {
name: 'startOf',
tests: tests
};
+22
View File
@@ -0,0 +1,22 @@
var Benchmark = require('benchmark'),
moment = require("./../moment.js"),
base = moment('2013-05-25');
var unitsUnderTest = ["milliseconds", "seconds", "minutes", "hours", "days", "weeks", "months", "quarters", "years"];
var tests = unitsUnderTest.reduce(function (testsSoFar, unit) {
testsSoFar["subtract " + unit] = generateTestForUnit(unit);
return testsSoFar;
}, {});
function generateTestForUnit(unit) {
return {
setup: function(){var base = base; var unit = unit;},
fn: function(){base.subtract(8, unit);},
async: true
};
}
module.exports = {
name: 'subtract',
tests: tests
};
+43
View File
@@ -0,0 +1,43 @@
var Benchmark = require('benchmark');
module.exports = {
name: 'zeroFill',
tests: {
zeroFillMath: {
setup: function() {
var zeroFillMath = function(number, targetLength, forceSign) {
var absNumber = '' + Math.abs(number),
zerosToFill = targetLength - absNumber.length,
sign = number >= 0;
return (sign ? (forceSign ? '+' : '') : '-') +
Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
}
},
fn: function() {
zeroFillMath(Math.random() * 1e5 | 0, 5);
zeroFillMath(Math.random() * 1e5 | 0, 10);
zeroFillMath(Math.random() * 1e10 | 0, 20);
},
async: true
},
zeroFillWhile: {
setup: function() {
var zeroFillWhile = function(number, targetLength, forceSign) {
var output = '' + Math.abs(number),
sign = number >= 0;
while (output.length < targetLength) {
output = '0' + output;
}
return (sign ? (forceSign ? '+' : '') : '-') + output;
}
},
fn: function() {
zeroFillWhile(Math.random() * 1e5 | 0, 5);
zeroFillWhile(Math.random() * 1e5 | 0, 10);
zeroFillWhile(Math.random() * 1e10 | 0, 20);
},
async: true
}
}
};