Skip to content

Commit

Permalink
- small fix client.total method
Browse files Browse the repository at this point in the history
- update taist manifest
- update builds
  • Loading branch information
wmakeev committed Mar 30, 2015
1 parent 7e7e793 commit 6977345
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
4 changes: 2 additions & 2 deletions build/browser/moysklad-client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// moysklad-client 0.2.6 (bundle length 418610)
// moysklad-client 0.2.6 (bundle length 418600)
// Сборка библиотеки moysklad-client для браузера
//
// Vitaliy Makeev ([email protected])
Expand Down Expand Up @@ -1187,7 +1187,7 @@ var total = function (type, query, callback) {
function _totalFromParts(paramsIndex, cumulativeTotal, callback) {

if (_queryParametersList[paramsIndex]) {
var _params = _.extend({}, _queryParametersList[paramsIndex], { count: 0, start: 0 });
var _params = _.extend({}, _queryParametersList[paramsIndex], { count: 0 });

_restClient.get(type, _params, function (err, data) {
if (err) return callback(err);
Expand Down
4 changes: 2 additions & 2 deletions build/gs/client.gs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// moysklad-client 0.2.6 (bundle length 98994)
// moysklad-client 0.2.6 (bundle length 98984)
// Сборка с кодом основной библиотеки moysklad-client
//
// Vitaliy Makeev ([email protected])
Expand Down Expand Up @@ -1109,7 +1109,7 @@ var total = function (type, query, callback) {
function _totalFromParts(paramsIndex, cumulativeTotal, callback) {

if (_queryParametersList[paramsIndex]) {
var _params = _.extend({}, _queryParametersList[paramsIndex], { count: 0, start: 0 });
var _params = _.extend({}, _queryParametersList[paramsIndex], { count: 0 });

_restClient.get(type, _params, function (err, data) {
if (err) return callback(err);
Expand Down
28 changes: 15 additions & 13 deletions build/taist/moysklad-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function init() {
// script


// moysklad-client 0.2.5 (bundle length 418592)
// moysklad-client 0.2.6 (bundle length 418600)
// Сборка библиотеки moysklad-client для браузера
//
// Vitaliy Makeev ([email protected])
Expand Down Expand Up @@ -87,7 +87,7 @@ module.exports=require('gaBrea');
},{}],7:[function(require,module,exports){
module.exports={
"name": "moysklad-client",
"version": "0.2.5",
"version": "0.2.6",
"author": {
"name": "Vitaliy Makeev",
"email": "[email protected]",
Expand Down Expand Up @@ -1191,7 +1191,7 @@ var total = function (type, query, callback) {
function _totalFromParts(paramsIndex, cumulativeTotal, callback) {

if (_queryParametersList[paramsIndex]) {
var _params = _.extend({}, _queryParametersList[paramsIndex], { count: 0, start: 0 });
var _params = _.extend({}, _queryParametersList[paramsIndex], { count: 0 });

_restClient.get(type, _params, function (err, data) {
if (err) return callback(err);
Expand Down Expand Up @@ -6172,13 +6172,16 @@ Jsonix.Schema.XSD.DateTime = Jsonix.Class(Jsonix.Schema.XSD.Calendar, {
typeName : Jsonix.Schema.XSD.qname('dateTime'),
parse : function(value) {
var calendar = this.parseDateTime(value);
var date = new Date();
date.setFullYear(calendar.year);
date.setMonth(calendar.month - 1);
date.setDate(calendar.day);
date.setHours(calendar.hour);
date.setMinutes(calendar.minute);
date.setSeconds(calendar.second);

// wmakeev: set date in ctor (bug with overflow)
var date = new Date(
calendar.year,
calendar.month - 1,
calendar.day,
calendar.hour,
calendar.minute,
calendar.second);

if (Jsonix.Util.Type.isNumber(calendar.fractionalSecond)) {
date.setMilliseconds(Math.floor(1000 * calendar.fractionalSecond));
}
Expand All @@ -6189,11 +6192,10 @@ Jsonix.Schema.XSD.DateTime = Jsonix.Class(Jsonix.Schema.XSD.Calendar, {
// The time-zone offset is the difference, in minutes, between UTC and local time.
// The value returned by the getTime method is the number of milliseconds since 1 January 1970 00:00:00 UTC.

if (Jsonix.Util.NumberUtils.isInteger(calendar.timezone)) {
if (Jsonix.Util.NumberUtils.isInteger(calendar.timezone))
return new Date(date.getTime() - (60000 * date.getTimezoneOffset()) - (calendar.timezone * 60000));
} else {
else
return new Date(date.getTime() - (60000 * date.getTimezoneOffset()));
}
},
print : function(value) {
Jsonix.Util.Ensure.ensureDate(value);
Expand Down
2 changes: 1 addition & 1 deletion build/taist/moysklad-client.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"shortDescription": "Сборка библиотеки <a href=\"https://github.com/wmakeev/moysklad-client\">moysklad-client</a> для взаимодействия с API МойСклад. Код библиотеки встраивается в контекст приложения МойСклад и доступен для сторонних аддонов.",
"siteName": "МойСклад",
"siteRegexp": "online.moysklad.ru",
"title": "Библиотека moysklad-client v0.2.5",
"title": "Библиотека moysklad-client v0.2.6",
"js": "moysklad-client.js",
"description": "moysklad-client.md"
}
2 changes: 1 addition & 1 deletion src/moysklad-client/client/methods/total.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var total = function (type, query, callback) {
function _totalFromParts(paramsIndex, cumulativeTotal, callback) {

if (_queryParametersList[paramsIndex]) {
var _params = _.extend({}, _queryParametersList[paramsIndex], { count: 0, start: 0 });
var _params = _.extend({}, _queryParametersList[paramsIndex], { count: 0 });

_restClient.get(type, _params, function (err, data) {
if (err) return callback(err);
Expand Down

0 comments on commit 6977345

Please sign in to comment.