Skip to content

Commit

Permalink
Merge branch 'master' into build-files
Browse files Browse the repository at this point in the history
  • Loading branch information
damyanpetev committed Jul 1, 2016
2 parents 0fc06ff + e1bcc3b commit 7ba4442
Show file tree
Hide file tree
Showing 50 changed files with 4,635 additions and 4,789 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
language: node_js
node_js:
- "4"
before_install:
- npm install -g grunt-cli bower
# before_script:
# - npm install -g grunt
- "4"
script:
- grunt verify
- grunt coveralls
Expand Down
4 changes: 1 addition & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var buildVersion = require("./package.json").version,
scripts: "src/js/**/*.js",
scriptsDir: "src/js",
modulesDir: "src/js/modules",
extensions: "src/extensions/**/*.js",
extensions: "src/js/extensions/**/*.js",
extensionsDir: "src/js/extensions",
devTests: "tests/unit/**/*test*.htm*",
devTestsDir: "tests/unit",
Expand Down Expand Up @@ -40,13 +40,11 @@ module.exports = function (grunt) {
all: ["<%= config.devTests%>"],
options: {
force: false,
timeout: 180000,
"--web-security": "no",
coverage: {
src: grunt.file.readJSON('build/config/all/instrument.json').config,
instrumentedFiles: "src/instrumentedFiles",
htmlReport: "coverage/reportHTML",
jsonSummaryReport: "coverage/reportJSON",
lcovReport: "coverage/reportLCOV",
disposeCollector: true,
reportOnFail: true,
Expand Down
7 changes: 1 addition & 6 deletions build/ReporterJSCS.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = function (errors) {
var reportHtmlJS = "",
errorHtmlJS = "",
jscsObj = null, iError = 0, fileName = "",
iError = 0, fileName = "",
error = null, errorLine = 0, errorCode, errorReason, fs,
date = new Date(), isDummy = false;

Expand All @@ -10,11 +10,6 @@
reportHtmlJS += "<p>Check JSCS from console using 'grunt cs' or 'grunt cs:controlName'.";
reportHtmlJS += "<table border=1 cellpadding=5 cellspacing=0 style='font-family:Verdana; font-size:11pt; border-width:1px; border: 1px solid black;width:600px;'>";

// JSON report
jscsObj = new Object();
jscsObj["RunOn"] = date;
jscsObj["CodeAnalysisRunDetail"] = [];

for (iErr = 0; iErr < errors.length; iErr++) {

errorInFile = errors[iErr];
Expand Down
14 changes: 1 addition & 13 deletions build/ReporterJSHint.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
reporter: function (errors, files) {
var reportHtml = "",
errorHtml = "",
reportJSON = "",
jsonObj, testRunDetails, iFile, iError, file, fileName,
testRunDetails, iFile, iError, file, fileName,
error, errorLine, errorCode, errorReason, fs, CodeAnalysisRunDetail,
date = new Date();

Expand All @@ -14,14 +13,8 @@
// http://jshint.com/docs/#options
reportHtml += "<table border=1 cellpadding=5 cellspacing=0 style='font-family:Verdana; font-size:11pt; border-width:1px; border: 1px solid black;width:600px;'>";

// JSON report
jsonObj = new Object();
jsonObj["RunOn"] = date;
jsonObj["CodeAnalysisRunDetail"] = [];

for (iFile = 0; iFile < files.length; iFile++) {


file = files[iFile];
fileName = file.file.replace("src/js/", "");
fileNameLink = fileName.replace("/", "_");
Expand Down Expand Up @@ -62,21 +55,16 @@
CodeAnalysisRunDetail["ErrorCount"] = file.errors.length;
}
CodeAnalysisRunDetail["FunctionalArea"] = fileNameJSON;
jsonObj["CodeAnalysisRunDetail"].push(CodeAnalysisRunDetail);
}
reportHtml += "</table>";
reportHtml += errorHtml;
reportHtml += "</body></body>";

reportJSON = JSON.stringify(jsonObj);

fs = require('fs');
if (!fs.existsSync("./jshint/")) {
fs.mkdir("./jshint");
}

// Wirite the JSON report
fs.writeFile("./jshint/report.json", reportJSON);

// Write the HTML report
process.stdout.write(reportHtml);
Expand Down
16 changes: 2 additions & 14 deletions build/ReporterQUnit.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
exceptionCounter = 1,
reportIndex = 0,
tableHeader = "<tr style='background-color:#E8FFCF;'><th>Module Names</th><th>Passed</th><th>Failed</th><th>Total</th><th>Execution Time</th></tr>",
totalPassed, totalFailed, totalTotal, totalTime, jsonObj;
totalPassed, totalFailed, totalTotal, totalTime;

module.exports.writeReport = function (phase, done) {
var fs, reportJSON,
var fs,
date = new Date();

if (phase === "init") {
Expand All @@ -22,28 +22,17 @@ module.exports.writeReport = function (phase, done) {
report += "<h2>QUnit for build: jQuery_{{build_number}}</h2><br />" + date;
report += "<table border=1 cellpadding=5 cellspacing=0 style='font-family:Verdana; font-size:11pt; border-width:1px; border: 1px solid black;width:600px;'>";
report += tableHeader;

//JSON report
jsonObj = new Object();
jsonObj["RunOn"] = date;
jsonObj["TestRunDetails"] = [];
jsonObj["TestType"] = { "TestTypeName": "Unit Test" };
}
else if (phase === "finalize") {
fs = require('fs');
var color = totalFailed ? "#FFEDF1;" : "#E8FFCF;"
report = report.replace(tableHeader, tableHeader + "<tr style='background-color:" + color + "; font-weight: bold;'><td>TOTAL</td><td>" + totalPassed + "</td><td>" + totalFailed + "</td><td>" + totalTotal + "</td><td>" + totalTime + " ms</td></tr>");
report += "</table>" + errorsTableHTML + "</body></html>";

reportJSON = JSON.stringify(jsonObj);

if (!fs.existsSync("./qunit/")) {
fs.mkdirSync("./qunit/");
}

// Wirite the JSON report
fs.writeFile("./qunit/report.json", reportJSON);

// Write the HTML report
fs.writeFile("./qunit/report.html", report, function (err) {
if (err) {
Expand Down Expand Up @@ -107,7 +96,6 @@ module.exports.endTest = function(failed, passed, total, runtime) {
testRunDetails["FunctionalArea"] = name; // TODO
testRunDetails["Scenario"] = name;
testRunDetails["DeviceType"] = { "DeviceName": "PhantomJS" };
jsonObj["TestRunDetails"].push(testRunDetails);

totalPassed += passed;
totalFailed += failed;
Expand Down
7 changes: 7 additions & 0 deletions build/config/zoombar/instrument.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"config": [
"<%= config.modulesDir%>/infragistics.ui.zoombar.js",
"<%= config.modulesDir%>/infragistics.util.js",
"<%= config.modulesDir%>/infragistics.ui.shared.js"
]
}
7 changes: 7 additions & 0 deletions build/config/zoombar/jshint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"config": [
"<%= config.modulesDir%>/infragistics.ui.zoombar.js",
"<%= config.modulesDir%>/infragistics.ui.shared.js",
"<%= config.modulesDir%>/infragistics.util.js"
]
}
5 changes: 5 additions & 0 deletions build/config/zoombar/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"config": [
"<%= config.devTestsDir %>/zoombar/**/*test*.htm*"
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
],
"license": "Apache-2.0",
"scripts": {
"postinstall": "bower install"
"preinstall": "npm install -g bower",
"postinstall" : "npm install -g grunt-cli && bower install"
},
"dependencies": {},
"devDependencies": {
Expand Down
27 changes: 14 additions & 13 deletions src/js/modules/i18n/infragistics.ui.zoombar-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@

/*global jQuery */
(function ($) {
$.ig = $.ig || {};
$.ig = $.ig || {};

if (!$.ig.Zoombar) {
$.ig.Zoombar = {};
if (!$.ig.Zoombar) {
$.ig.Zoombar = {};

$.extend($.ig.Zoombar, {

locale: {
zoombarTargetNotSpecified: "igZoombar requires a valid target to attach to!",
zoombarTypeNotSupported: "The type of widget the Zoombar is trying to attach to is not supported!",
optionChangeNotSupported: "Changing the following option after the igZoombar has been created is not supported:"
}
});
$.extend($.ig.Zoombar, {

}
})(jQuery);
locale: {
zoombarTargetNotSpecified: "igZoombar requires a valid target to attach to!",
zoombarTypeNotSupported: "The type of widget the Zoombar is trying to attach to is not supported!",
zoombarProviderNotRecognized: "igZoombar could not recognize the provider specified. If you are using a custom one, please ensure that you are passing the name of an existing Class in the $.ig namespace or an instance of one.",
optionChangeNotSupported: "Changing the following option after the igZoombar has been created is not supported:"
}
});

}
})(jQuery);
5 changes: 4 additions & 1 deletion src/js/modules/infragistics.ui.editors.js
Original file line number Diff line number Diff line change
Expand Up @@ -9090,10 +9090,13 @@ if (typeof jQuery !== "function") {
currentDate = new Date(currentDate.getUTCFullYear(),
currentDate.getUTCMonth(), currentDate.getUTCDate());
}
currentInputValue = this._editorInput.val();
$(this._editorInput).datepicker("setDate", currentDate);

}
currentInputValue = this._editorInput.val();
if (currentInputValue === undefined) {
currentInputValue = this._editorInput.val();
}
try {
this._editorInput.datepicker("option", "showOptions", { direction: direction });

Expand Down
Loading

0 comments on commit 7ba4442

Please sign in to comment.