Skip to content

Commit

Permalink
Merge branch 'master' into greenkeeper/i18next-10.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel authored Apr 3, 2018
2 parents 465c405 + e094f89 commit d45877d
Show file tree
Hide file tree
Showing 22 changed files with 3,331 additions and 988 deletions.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# ignore downloaded dependencies
# dependencies
node_modules
bower_components

# ignore build
# build
build

# ignore test viewer
/viewer
# misc
npm-debug.log
yarn-error.log
14 changes: 11 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ env:
global:
- secure: jWTxnnLGmoM+j3148tIF2SJMEyub2j9kmR15vEKVeP6BbUvNgWH9jTSwf6Ddv3qjbAb3D8p9nhYBOZgRub1stwjWCH+DS17AoKFeRVj4Q8Sf0XBHGzJbn0FkstilVmGv3Zr/FVmDSEm1xSSHanWCUQX0uH9r/XB8z7khp4pLryo=

# update gh-pages if all good
# greenkeeper lock file
before_install: yarn global add greenkeeper-lockfile@1
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload

after_success:
- chmod +x ./resources/scripts/update-gh-pages.sh
- ./resources/scripts/update-gh-pages.sh
# send coverage to coveralls
- grunt coveralls
# update gh-page only for master and not pull requests
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
chmod +x ./resources/scripts/update-gh-pages.sh; "./resources/scripts/update-gh-pages.sh";
else echo "Not deploying artifacts for $TRAVIS_BRANCH"; fi
6 changes: 4 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-jsdoc');

// Task to run tests
grunt.registerTask('publish', ['jshint', 'qunit', 'coveralls', 'concat', 'uglify', 'jsdoc']);
// tasks
grunt.registerTask('test', ['jshint', 'qunit']);
grunt.registerTask('build', ['concat', 'uglify']);
grunt.registerTask('doc', ['jsdoc']);
};
37 changes: 28 additions & 9 deletions dist/dwv.js
Original file line number Diff line number Diff line change
Expand Up @@ -3040,7 +3040,7 @@ dwv.dicom = dwv.dicom || {};
* Get the version of the library.
* @return {String} The version of the library.
*/
dwv.getVersion = function () { return "0.23.2"; };
dwv.getVersion = function () { return "0.23.3"; };

/**
* Clean string: trim and remove ending.
Expand Down Expand Up @@ -25028,6 +25028,22 @@ var dwv = dwv || {};
/** @namespace */
dwv.browser = dwv.browser || {};

/**
* Local function to ask Modernizr if a property is supported.
* @parma {String} property The property to test.
*/
function askModernizr( property ) {
if ( typeof dwv.Modernizr === "undefined" ) {
dwv.ModernizrInit(window, document);
}
var props = property.split('.');
var prop = dwv.Modernizr;
for ( var i = 0; i < props.length; ++i ) {
prop = prop[props[i]];
}
return prop;
}

/**
* Browser check for the FileAPI.
* Assume support for Safari5.
Expand All @@ -25045,16 +25061,17 @@ dwv.browser.hasFileApi = function()
return true;
}
// regular test
return dwv.Modernizr.filereader;
return askModernizr("filereader");
};

/**
* Browser check for the XMLHttpRequest.
*/
dwv.browser.hasXmlHttpRequest = function()
{
return dwv.Modernizr.xhrresponsetype &&
dwv.Modernizr.xhrresponsetypearraybuffer && dwv.Modernizr.xhrresponsetypetext &&
return askModernizr("xhrresponsetype") &&
askModernizr("xhrresponsetypearraybuffer") &&
askModernizr("xhrresponsetypetext") &&
"XMLHttpRequest" in window && "withCredentials" in new XMLHttpRequest();
};

Expand All @@ -25063,7 +25080,7 @@ dwv.browser.hasXmlHttpRequest = function()
*/
dwv.browser.hasTypedArray = function()
{
return dwv.Modernizr.dataview && dwv.Modernizr.typedarrays;
return askModernizr("dataview") && askModernizr("typedarrays");
};

/**
Expand All @@ -25072,7 +25089,7 @@ dwv.browser.hasTypedArray = function()
*/
dwv.browser.hasInputColor = function()
{
return dwv.Modernizr.inputtypes.color;
return askModernizr("inputtypes.color");
};

/**
Expand All @@ -25081,7 +25098,7 @@ dwv.browser.hasInputColor = function()
*/
dwv.browser.hasInputDirectory = function()
{
return dwv.Modernizr.fileinputdirectory;
return askModernizr("fileinputdirectory");
};


Expand Down Expand Up @@ -25488,7 +25505,8 @@ var dwv = dwv || {};
* of control over the experience.
*/

;(function(window, document, undefined){
dwv.ModernizrInit = function (window, document, undefined) {
//;(function(window, document, undefined){
var tests = [];


Expand Down Expand Up @@ -26075,7 +26093,8 @@ file selection dialog.

;

})(window, document);
//})(window, document);
};

// namespaces
var dwv = dwv || {};
Expand Down
4 changes: 2 additions & 2 deletions dist/dwv.min.js

Large diffs are not rendered by default.

20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dwv",
"version": "0.23.2",
"version": "0.24.0-beta",
"description": "DICOM Web Viewer.",
"keywords": [
"DICOM",
Expand All @@ -17,25 +17,29 @@
"main": "dist/dwv.min.js",
"dependencies": {
"i18next": "~10.6.0",
"i18next-xhr-backend": "~1.5.1",
"i18next-browser-languagedetector": "~2.1.0",
"i18next-xhr-backend": "~1.5.1",
"jszip": "~3.1.3",
"konva": "~1.7.3",
"magic-wand-js": "~1.0.0"
},
"devDependencies": {
"qunit": "~2.5.1",
"grunt": "~1.0.1",
"grunt-cli": "~1.2",
"grunt-contrib-jshint": "~1.1.0",
"grunt-qunit-istanbul": "~1.0.0",
"grunt-coveralls": "~1.0",
"grunt-contrib-concat": "~1.0",
"grunt-contrib-jshint": "~1.1.0",
"grunt-contrib-uglify": "~3.3.0",
"grunt-coveralls": "~2.0.0",
"grunt-jsdoc": "~2.2.0",
"ink-docstrap": "~1.3"
"grunt-qunit-istanbul": "~1.0.0",
"http-server": "^0.11.1",
"ink-docstrap": "~1.3",
"qunit": "~2.6.0"
},
"scripts": {
"test": "grunt publish --verbose"
"start": "http-server",
"test": "grunt test --verbose",
"build": "grunt build --verbose",
"doc": "grunt doc --verbose"
}
}
Loading

0 comments on commit d45877d

Please sign in to comment.