make the viewer work at meteor 1.3
This commit is contained in:
parent
b3e5838caf
commit
b957b1f540
@ -92,6 +92,7 @@ twbs:bootstrap@3.3.6
|
|||||||
ui@1.0.11
|
ui@1.0.11
|
||||||
underscore@1.0.8
|
underscore@1.0.8
|
||||||
url@1.0.9
|
url@1.0.9
|
||||||
|
validatejs@0.0.1
|
||||||
viewerbase@0.0.1
|
viewerbase@0.0.1
|
||||||
webapp@1.2.8
|
webapp@1.2.8
|
||||||
webapp-hashing@1.0.9
|
webapp-hashing@1.0.9
|
||||||
|
|||||||
@ -17,6 +17,8 @@ Package.onUse(function(api) {
|
|||||||
api.use('natestrauser:select2@4.0.1', 'client');
|
api.use('natestrauser:select2@4.0.1', 'client');
|
||||||
api.use('clinical:router');
|
api.use('clinical:router');
|
||||||
|
|
||||||
|
api.use('validatejs');
|
||||||
|
|
||||||
// Our custom packages
|
// Our custom packages
|
||||||
api.use('viewerbase');
|
api.use('viewerbase');
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,8 @@ Package.onUse(function(api) {
|
|||||||
api.use('jquery');
|
api.use('jquery');
|
||||||
api.use('stylus');
|
api.use('stylus');
|
||||||
|
|
||||||
|
api.use('validatejs');
|
||||||
|
|
||||||
// Control over logging
|
// Control over logging
|
||||||
api.use('practicalmeteor:loglevel');
|
api.use('practicalmeteor:loglevel');
|
||||||
|
|
||||||
|
|||||||
1086
Packages/validatejs/lib/validate.js
Executable file
1086
Packages/validatejs/lib/validate.js
Executable file
File diff suppressed because it is too large
Load Diff
27
Packages/validatejs/load.js
Executable file
27
Packages/validatejs/load.js
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
import {validate as v} from './lib/validate.js';
|
||||||
|
|
||||||
|
v.validators.equals = function(value, options, key, attributes) {
|
||||||
|
if (options && value !== options.value) {
|
||||||
|
return key + 'must equal ' + options.value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
v.validators.doesNotEqual = function(value, options, key) {
|
||||||
|
if (options && value === options.value) {
|
||||||
|
return key + 'cannot equal ' + options.value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
v.validators.contains = function(value, options, key) {
|
||||||
|
if (options && value.indexOf && value.indexOf(options.value) === -1) {
|
||||||
|
return key + 'must contain ' + options.value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
v.validators.doesNotContain = function(value, options, key) {
|
||||||
|
if (options && value.indexOf && value.indexOf(options.value) !== -1) {
|
||||||
|
return key + 'cannot contain ' + options.value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
validate = v;
|
||||||
15
Packages/validatejs/package.js
Executable file
15
Packages/validatejs/package.js
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
Package.describe({
|
||||||
|
name: 'validatejs',
|
||||||
|
summary: 'OHIF Validatejs temporary',
|
||||||
|
version: '0.0.1'
|
||||||
|
});
|
||||||
|
|
||||||
|
Package.onUse(function(api) {
|
||||||
|
api.versionsFrom('1.3.2.4');
|
||||||
|
api.use('ecmascript');
|
||||||
|
|
||||||
|
api.addFiles('lib/validate.js', 'client');
|
||||||
|
api.addFiles('load.js', 'client');
|
||||||
|
|
||||||
|
api.export('validate', 'client');
|
||||||
|
});
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
//import {validate} from '../client/compatibility/validate.js';
|
||||||
|
|
||||||
validate.validators.equals = function(value, options, key, attributes) {
|
validate.validators.equals = function(value, options, key, attributes) {
|
||||||
if (options && value !== options.value) {
|
if (options && value !== options.value) {
|
||||||
return key + 'must equal ' + options.value;
|
return key + 'must equal ' + options.value;
|
||||||
|
|||||||
@ -14,6 +14,8 @@ Package.onUse(function(api) {
|
|||||||
api.use('stylus');
|
api.use('stylus');
|
||||||
api.use('practicalmeteor:loglevel');
|
api.use('practicalmeteor:loglevel');
|
||||||
api.use('momentjs:moment');
|
api.use('momentjs:moment');
|
||||||
|
|
||||||
|
api.use('validatejs');
|
||||||
|
|
||||||
// Our custom packages
|
// Our custom packages
|
||||||
api.use('cornerstone');
|
api.use('cornerstone');
|
||||||
@ -24,7 +26,7 @@ Package.onUse(function(api) {
|
|||||||
api.addFiles('client/compatibility/jquery.hotkeys.js', 'client');
|
api.addFiles('client/compatibility/jquery.hotkeys.js', 'client');
|
||||||
|
|
||||||
// Data validation (the Meteor package is currently out-of-date)
|
// Data validation (the Meteor package is currently out-of-date)
|
||||||
api.addFiles('client/compatibility/validate.js', 'client');
|
//api.addFiles('client/compatibility/validate.js', 'client');
|
||||||
|
|
||||||
// ---------- Collections ----------
|
// ---------- Collections ----------
|
||||||
api.addFiles('client/collections.js', 'client');
|
api.addFiles('client/collections.js', 'client');
|
||||||
@ -128,7 +130,7 @@ Package.onUse(function(api) {
|
|||||||
api.addFiles('lib/updateAllViewports.js', 'client');
|
api.addFiles('lib/updateAllViewports.js', 'client');
|
||||||
api.addFiles('lib/queryStudies.js', 'client');
|
api.addFiles('lib/queryStudies.js', 'client');
|
||||||
api.addFiles('lib/importStudies.js', 'client');
|
api.addFiles('lib/importStudies.js', 'client');
|
||||||
api.addFiles('lib/validators.js', 'client');
|
//api.addFiles('lib/validators.js', 'client');
|
||||||
api.addFiles('lib/instanceClassSpecificViewport.js', 'client');
|
api.addFiles('lib/instanceClassSpecificViewport.js', 'client');
|
||||||
api.addFiles('lib/setMammogramViewportAlignment.js', 'client');
|
api.addFiles('lib/setMammogramViewportAlignment.js', 'client');
|
||||||
api.addFiles('lib/isImage.js', 'client');
|
api.addFiles('lib/isImage.js', 'client');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user