Commit 7fb99d6a authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete underscore from build

parent a7d62eb3
...@@ -264,7 +264,6 @@ ...@@ -264,7 +264,6 @@
"externs": [ "externs": [
"../common/Build/Externs.js", "../common/Build/Externs.js",
"../../web-apps/vendor/jquery/jquery.min.js", "../../web-apps/vendor/jquery/jquery.min.js",
"../../web-apps/vendor/underscore/underscore-min.js",
"../../web-apps/vendor/sockjs/sockjs.min.js", "../../web-apps/vendor/sockjs/sockjs.min.js",
"../../web-apps/vendor/xregexp/xregexp-all-min.js", "../../web-apps/vendor/xregexp/xregexp-all-min.js",
"../../web-apps/vendor/jszip/jszip.min.js", "../../web-apps/vendor/jszip/jszip.min.js",
......
...@@ -252,7 +252,6 @@ ...@@ -252,7 +252,6 @@
"externs": [ "externs": [
"../common/Build/Externs.js", "../common/Build/Externs.js",
"../../web-apps/vendor/jquery/jquery.min.js", "../../web-apps/vendor/jquery/jquery.min.js",
"../../web-apps/vendor/underscore/underscore-min.js",
"../../web-apps/vendor/sockjs/sockjs.min.js", "../../web-apps/vendor/sockjs/sockjs.min.js",
"../../web-apps/vendor/xregexp/xregexp-all-min.js", "../../web-apps/vendor/xregexp/xregexp-all-min.js",
"../../web-apps/vendor/jszip/jszip.min.js", "../../web-apps/vendor/jszip/jszip.min.js",
......
...@@ -244,7 +244,6 @@ ...@@ -244,7 +244,6 @@
"externs": [ "externs": [
"../common/Build/Externs.js", "../common/Build/Externs.js",
"../../web-apps/vendor/jquery/jquery.min.js", "../../web-apps/vendor/jquery/jquery.min.js",
"../../web-apps/vendor/underscore/underscore-min.js",
"../../web-apps/vendor/sockjs/sockjs.min.js", "../../web-apps/vendor/sockjs/sockjs.min.js",
"../../web-apps/vendor/xregexp/xregexp-all-min.js", "../../web-apps/vendor/xregexp/xregexp-all-min.js",
"../../web-apps/vendor/jszip/jszip.min.js", "../../web-apps/vendor/jszip/jszip.min.js",
......
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
} else { } else {
var t = this; var t = this;
window.setTimeout(function() { window.setTimeout(function() {
if (callback && _.isFunction(callback)) { if (callback) {
var lengthArray = (arrayBlockId) ? arrayBlockId.length : 0; var lengthArray = (arrayBlockId) ? arrayBlockId.length : 0;
if (0 < lengthArray) { if (0 < lengthArray) {
callback({"lock": arrayBlockId[0]}); callback({"lock": arrayBlockId[0]});
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
this._CoAuthoringApi.askSaveChanges(callback); this._CoAuthoringApi.askSaveChanges(callback);
} else { } else {
window.setTimeout(function() { window.setTimeout(function() {
if (callback && _.isFunction(callback)) { if (callback) {
// Фиктивные вызовы // Фиктивные вызовы
callback({"saveLock": false}); callback({"saveLock": false});
} }
...@@ -738,7 +738,7 @@ ...@@ -738,7 +738,7 @@
} else { } else {
// Вернем ошибку, т.к. залочены элементы // Вернем ошибку, т.к. залочены элементы
window.setTimeout(function() { window.setTimeout(function() {
if (callback && _.isFunction(callback)) { if (callback) {
callback({error: idLockInArray + '-lock'}); callback({error: idLockInArray + '-lock'});
} }
}, 100); }, 100);
...@@ -759,14 +759,14 @@ ...@@ -759,14 +759,14 @@
// Проверим состояние, если мы не подсоединились, то сразу отправим ошибку // Проверим состояние, если мы не подсоединились, то сразу отправим ошибку
if (ConnectionState.Authorized !== this._state) { if (ConnectionState.Authorized !== this._state) {
this.saveLockCallbackErrorTimeOutId = window.setTimeout(function() { this.saveLockCallbackErrorTimeOutId = window.setTimeout(function() {
if (callback && _.isFunction(callback)) { if (callback) {
// Фиктивные вызовы // Фиктивные вызовы
callback({error: "No connection"}); callback({error: "No connection"});
} }
}, 100); }, 100);
return; return;
} }
if (callback && _.isFunction(callback)) { if (callback) {
var t = this; var t = this;
var indexCallback = this._saveCallback.length; var indexCallback = this._saveCallback.length;
this._saveCallback[indexCallback] = callback; this._saveCallback[indexCallback] = callback;
...@@ -1051,7 +1051,7 @@ ...@@ -1051,7 +1051,7 @@
if (changed) { if (changed) {
this._locks[blockTmp] = {"state": lock["sessionId"] === this._id ? 2 : 3, "user": lock["user"], "time": lock["time"], "block": blockTmp, "blockValue": blockValue};//2-acquired by me! this._locks[blockTmp] = {"state": lock["sessionId"] === this._id ? 2 : 3, "user": lock["user"], "time": lock["time"], "block": blockTmp, "blockValue": blockValue};//2-acquired by me!
} }
if (this._lockCallbacks.hasOwnProperty(blockTmp) && this._lockCallbacks[blockTmp] !== null && _.isFunction(this._lockCallbacks[blockTmp])) { if (this._lockCallbacks.hasOwnProperty(blockTmp)) {
if (lock["sessionId"] === this._id) { if (lock["sessionId"] === this._id) {
//Do call back //Do call back
this._lockCallbacks[blockTmp]({"lock": this._locks[blockTmp]}); this._lockCallbacks[blockTmp]({"lock": this._locks[blockTmp]});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment