Commit 124f520a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

jquery dependency added where necessary

parent 4e1826b2
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
"devDependencies": { "devDependencies": {
"assert": "1.4.1", "assert": "1.4.1",
"bluebird": "^3.5.2", "bluebird": "^3.5.2",
"bootstrap": "^3.3.7",
"browserify": "^13.1.1", "browserify": "^13.1.1",
"chai": "^3.5.0", "chai": "^3.5.0",
"clean-css-cli": "^4.2.1", "clean-css-cli": "^4.2.1",
...@@ -39,6 +38,7 @@ ...@@ -39,6 +38,7 @@
"uglifyjs": "^2.4.10" "uglifyjs": "^2.4.10"
}, },
"dependencies": { "dependencies": {
"bootstrap": "^3.3.7",
"csv-stringify": "^4.0.0", "csv-stringify": "^4.0.0",
"datatables.net": "^1.10.19", "datatables.net": "^1.10.19",
"datatables.net-rowreorder": "^1.2.5", "datatables.net-rowreorder": "^1.2.5",
......
"use strict"; "use strict";
/* exported logger */ /* exported logger */
var $ = require('jquery');
var Promise = require("bluebird"); var Promise = require("bluebird");
......
"use strict"; "use strict";
/* exported logger */ /* exported logger */
var $ = require('jquery');
// noinspection JSUnusedLocalSymbols // noinspection JSUnusedLocalSymbols
var logger = require('./logger'); var logger = require('./logger');
...@@ -613,7 +614,7 @@ function createCopy(original) { ...@@ -613,7 +614,7 @@ function createCopy(original) {
} }
return result; return result;
} else { } else {
return jQuery.extend({}, original); return $.extend({}, original);
} }
} }
......
...@@ -304,6 +304,7 @@ Functions.prototype.getElementByName = function (element, name) { ...@@ -304,6 +304,7 @@ Functions.prototype.getElementByName = function (element, name) {
* @returns {HTMLElement|undefined} * @returns {HTMLElement|undefined}
*/ */
Functions.prototype.getElementByClassName = function (element, name) { Functions.prototype.getElementByClassName = function (element, name) {
var $ = require('jquery');
if (name.indexOf(".") !== 0) { if (name.indexOf(".") !== 0) {
name = "." + name; name = "." + name;
} }
...@@ -384,6 +385,7 @@ Functions.prototype.createElement = function (params) { ...@@ -384,6 +385,7 @@ Functions.prototype.createElement = function (params) {
result.index = params.index; result.index = params.index;
} }
if (params.data !== null && params.data !== undefined) { if (params.data !== null && params.data !== undefined) {
var $ = require('jquery');
$(result).attr("data", params.data); $(result).attr("data", params.data);
} }
return result; return result;
...@@ -715,6 +717,18 @@ Functions.prototype.isString = function (value) { ...@@ -715,6 +717,18 @@ Functions.prototype.isString = function (value) {
return (value instanceof String || typeof value === "string"); return (value instanceof String || typeof value === "string");
}; };
/**
*
* @param {String} selector
* @return {String}
*/
Functions.prototype.escapeSelector = function (selector) {
// return $.escapeSelector(selector);
return "".replace.call(selector,
/(^[^_a-zA-Z\u00a0-\uffff]|[^-_a-zA-Z0-9\u00a0-\uffff])/g,
"\\$1");
};
var singleton = new Functions(); var singleton = new Functions();
module.exports = singleton; module.exports = singleton;
"use strict"; "use strict";
var $ = require('jquery');
var jQuery = $;
var dt = require('datatables.net')();
var dtReorder = require('datatables.net-rowreorder')();
require('jquery-ui/dialog');
var Promise = require("bluebird"); var Promise = require("bluebird");
var logger = require('./logger'); var logger = require('./logger');
...@@ -9,11 +15,6 @@ var ObjectWithListeners = require('./ObjectWithListeners'); ...@@ -9,11 +15,6 @@ var ObjectWithListeners = require('./ObjectWithListeners');
var SecurityError = require('./SecurityError'); var SecurityError = require('./SecurityError');
var ValidationError = require('./ValidationError'); var ValidationError = require('./ValidationError');
var $ = require('jquery');
var jQuery = $;
var dt = require('datatables.net')();
var dtReorder = require('datatables.net-rowreorder')();
require('jquery-ui/dialog');
/** /**
* This static global object contains set of functions that returns/set data in * This static global object contains set of functions that returns/set data in
......
"use strict"; "use strict";
/* exported logger */ /* exported logger */
var $ = require('jquery');
var ObjectWithListeners = require('../ObjectWithListeners'); var ObjectWithListeners = require('../ObjectWithListeners');
var PanelControlElementType = require('./PanelControlElementType'); var PanelControlElementType = require('./PanelControlElementType');
......
"use strict"; "use strict";
/* exported logger */ /* exported logger */
var $ = require('jquery');
var AbstractGuiElement = require('./AbstractGuiElement'); var AbstractGuiElement = require('./AbstractGuiElement');
var GuiConnector = require('../GuiConnector'); var GuiConnector = require('../GuiConnector');
......
"use strict"; "use strict";
var $ = require('jquery');
/* exported logger */ /* exported logger */
var Promise = require("bluebird"); var Promise = require("bluebird");
......
"use strict"; "use strict";
var $ = require('jquery');
/* exported logger */ /* exported logger */
var AbstractGuiElement = require('./AbstractGuiElement'); var AbstractGuiElement = require('./AbstractGuiElement');
......
"use strict"; "use strict";
/* exported logger */ /* exported logger */
var $ = require('jquery');
var AbstractGuiElement = require('./AbstractGuiElement'); var AbstractGuiElement = require('./AbstractGuiElement');
var PanelControlElementType = require('./PanelControlElementType'); var PanelControlElementType = require('./PanelControlElementType');
......
"use strict"; "use strict";
var $ = require('jquery');
var AbstractGuiElement = require('./AbstractGuiElement'); var AbstractGuiElement = require('./AbstractGuiElement');
var ConfigurationType = require('../ConfigurationType'); var ConfigurationType = require('../ConfigurationType');
var Functions = require('../Functions'); var Functions = require('../Functions');
......
"use strict"; "use strict";
/* exported logger */ /* exported logger */
var $ = require('jquery');
var AbstractGuiElement = require('./AbstractGuiElement'); var AbstractGuiElement = require('./AbstractGuiElement');
var GuiConnector = require('../GuiConnector'); var GuiConnector = require('../GuiConnector');
......
"use strict"; "use strict";
/* exported logger */ /* exported logger */
var $ = require('jquery');
var AbstractGuiElement = require('./AbstractGuiElement'); var AbstractGuiElement = require('./AbstractGuiElement');
var GuiConnector = require('../GuiConnector'); var GuiConnector = require('../GuiConnector');
......
"use strict"; "use strict";
/* exported logger */ /* exported logger */
var $ = require('jquery');
var GuiConnector = require('../GuiConnector'); var GuiConnector = require('../GuiConnector');
var AbstractGuiElement = require('./AbstractGuiElement'); var AbstractGuiElement = require('./AbstractGuiElement');
......
"use strict"; "use strict";
var $ = require('jquery');
var AbstractGuiElement = require('./AbstractGuiElement'); var AbstractGuiElement = require('./AbstractGuiElement');
var GuiConnector = require('../GuiConnector'); var GuiConnector = require('../GuiConnector');
var GuiUtils = require('./leftPanel/GuiUtils'); var GuiUtils = require('./leftPanel/GuiUtils');
......
"use strict"; "use strict";
var $ = require('jquery');
/* exported logger */ /* exported logger */
var AbstractGuiElement = require('./AbstractGuiElement'); var AbstractGuiElement = require('./AbstractGuiElement');
......
"use strict"; "use strict";
var Promise = require("bluebird"); var Promise = require("bluebird");
var $ = require('jquery');
var AbstractGuiElement = require('../AbstractGuiElement'); var AbstractGuiElement = require('../AbstractGuiElement');
var GuiConnector = require('../../GuiConnector'); var GuiConnector = require('../../GuiConnector');
......
"use strict"; "use strict";
var $ = require('jquery');
var Promise = require("bluebird"); var Promise = require("bluebird");
var JSZip = require("jszip"); var JSZip = require("jszip");
var xss = require('xss'); var xss = require('xss');
......
"use strict"; "use strict";
/* exported logger */ /* exported logger */
var $ = require('jquery');
var AbstractAnnotatorsDialog = require('./AbstractAnnotatorsDialog'); var AbstractAnnotatorsDialog = require('./AbstractAnnotatorsDialog');
var Annotator = require("../../map/data/Annotator"); var Annotator = require("../../map/data/Annotator");
......
"use strict"; "use strict";
/* exported logger */ /* exported logger */
var $ = require('jquery');
require('jquery-ui/dialog');
require('jstree');
var AbstractAnnotatorsDialog = require('./AbstractAnnotatorsDialog'); var AbstractAnnotatorsDialog = require('./AbstractAnnotatorsDialog');
var GuiConnector = require("../../GuiConnector"); var GuiConnector = require("../../GuiConnector");
......
Supports Markdown
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