Fix duplicate helper bugs in Lesion Tracker

This commit is contained in:
Erik Ziegler 2016-08-05 10:09:12 +02:00
parent 9bf96f24d7
commit f963fec586
19 changed files with 124 additions and 181 deletions

View File

@ -12,3 +12,4 @@ notices-for-facebook-graph-api-2
1.2.0-breaking-changes 1.2.0-breaking-changes
1.3.0-split-minifiers-package 1.3.0-split-minifiers-package
1.3.5-remove-old-dev-bundle-link 1.3.5-remove-old-dev-bundle-link
1.4.0-remove-old-dev-bundle-link

View File

@ -1 +0,0 @@
/Users/Erik/.meteor/packages/meteor-tool/.1.3.4_4.1rrnj7l++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle

46
LesionTracker/.meteor/packages Executable file → Normal file
View File

@ -4,16 +4,16 @@
# 'meteor add' and 'meteor remove' will edit this file for you, # 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand. # but you can also edit it by hand.
meteor-base # Packages every Meteor app needs to have meteor-base@1.0.4 # Packages every Meteor app needs to have
mobile-experience # Packages for a great mobile UX mobile-experience@1.0.4 # Packages for a great mobile UX
mongo # The database Meteor supports right now mongo@1.1.10 # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
session # Client-side reactive dictionary for your app session@1.1.6 # Client-side reactive dictionary for your app
jquery # Helpful client-side library jquery@1.11.9 # Helpful client-side library
tracker # Meteor's client-side reactive programming library tracker@1.1.0 # Meteor's client-side reactive programming library
es5-shim # ECMAScript 5 compatibility for older browsers. es5-shim@4.6.13 # ECMAScript 5 compatibility for older browsers.
ecmascript # Enable ECMAScript2015+ syntax in app code ecmascript@0.5.7 # Enable ECMAScript2015+ syntax in app code
clinical:router clinical:router
clinical:extended-api clinical:extended-api
@ -27,37 +27,37 @@ clinical:hipaa-logger
design design
ohif:core ohif:core
insecure # Allow all DB writes from clients (for prototyping) insecure@1.0.7 # Allow all DB writes from clients (for prototyping)
cornerstone cornerstone
worklist worklist
viewerbase viewerbase
dicomweb dicomweb
accounts-base accounts-base@1.2.9
accounts-password accounts-password@1.2.12
ian:accounts-ui-bootstrap-3 ian:accounts-ui-bootstrap-3
twbs:bootstrap twbs:bootstrap
http http@1.2.8
arsnebula:reactive-promise arsnebula:reactive-promise
promise promise@0.8.3
stylus stylus@2.513.4
fortawesome:fontawesome fortawesome:fontawesome
random random@1.0.10
reactive-var reactive-var@1.0.10
reactive-dict reactive-dict@1.1.8
lesiontracker lesiontracker
practicalmeteor:loglevel practicalmeteor:loglevel
momentjs:moment momentjs:moment
anti:gagarin@=0.4.11 anti:gagarin@=0.4.11
check check@1.2.3
aldeed:template-extension@4.0.0 aldeed:template-extension@4.0.0
zuuk:stale-session zuuk:stale-session
gilbertwat:bootstrap3-daterangepicker gilbertwat:bootstrap3-daterangepicker
email email@1.1.16
peppelg:bootstrap-3-modal peppelg:bootstrap-3-modal
simple:reactive-method simple:reactive-method
hangingprotocols hangingprotocols
fastclick fastclick@1.0.12
standard-minifier-css standard-minifier-css@1.1.8
standard-minifier-js standard-minifier-js@1.1.8

View File

@ -1 +1 @@
METEOR@1.3.5.1 METEOR@1.4.0.1

View File

@ -1,21 +1,21 @@
accounts-base@1.2.8 accounts-base@1.2.9
accounts-password@1.1.13 accounts-password@1.2.12
aldeed:simple-schema@1.5.3 aldeed:simple-schema@1.5.3
aldeed:template-extension@4.0.0 aldeed:template-extension@4.0.0
allow-deny@1.0.5 allow-deny@1.0.5
anti:gagarin@0.4.11 anti:gagarin@0.4.11
anti:i18n@0.4.3 anti:i18n@0.4.3
arsnebula:reactive-promise@0.9.1 arsnebula:reactive-promise@0.9.1
autoupdate@1.2.11 autoupdate@1.3.11
babel-compiler@6.8.5 babel-compiler@6.9.0
babel-runtime@0.1.9_1 babel-runtime@0.1.10
base64@1.0.9 base64@1.0.9
binary-heap@1.0.9 binary-heap@1.0.9
blaze@2.1.8 blaze@2.1.8
blaze-html-templates@1.0.4 blaze-html-templates@1.0.4
blaze-tools@1.0.9 blaze-tools@1.0.9
boilerplate-generator@1.0.9 boilerplate-generator@1.0.9
caching-compiler@1.0.6 caching-compiler@1.1.6
caching-html-compiler@1.0.6 caching-html-compiler@1.0.6
callback-hook@1.0.9 callback-hook@1.0.9
check@1.2.3 check@1.2.3
@ -31,23 +31,23 @@ clinical:router-location@2.1.0
clinical:router-middleware-stack@2.1.2 clinical:router-middleware-stack@2.1.2
clinical:router-url@2.1.0 clinical:router-url@2.1.0
clinical:theming@0.4.10 clinical:theming@0.4.10
coffeescript@1.1.4 coffeescript@1.2.3
cornerstone@0.0.1 cornerstone@0.0.1
ddp@1.2.5 ddp@1.2.5
ddp-client@1.2.9 ddp-client@1.3.0
ddp-common@1.2.6 ddp-common@1.2.6
ddp-rate-limiter@1.0.5 ddp-rate-limiter@1.0.5
ddp-server@1.2.10 ddp-server@1.3.9
deps@1.0.12 deps@1.0.12
design@0.0.1 design@0.0.1
dicomweb@0.0.1 dicomweb@0.0.1
diff-sequence@1.0.6 diff-sequence@1.0.6
dimseservice@0.0.1 dimseservice@0.0.1
ecmascript@0.4.8 ecmascript@0.5.7
ecmascript-runtime@0.2.12 ecmascript-runtime@0.3.12
ejson@1.0.12 ejson@1.0.12
email@1.0.16 email@1.1.16
es5-shim@4.5.13 es5-shim@4.6.13
fastclick@1.0.12 fastclick@1.0.12
fortawesome:fontawesome@4.5.0 fortawesome:fontawesome@4.5.0
geojson-utils@1.0.9 geojson-utils@1.0.9
@ -57,7 +57,7 @@ hangingprotocols@0.0.1
hot-code-push@1.0.4 hot-code-push@1.0.4
html-tools@1.0.10 html-tools@1.0.10
htmljs@1.0.10 htmljs@1.0.10
http@1.1.8 http@1.2.8
ian:accounts-ui-bootstrap-3@1.2.89 ian:accounts-ui-bootstrap-3@1.2.89
id-map@1.0.8 id-map@1.0.8
insecure@1.0.7 insecure@1.0.7
@ -70,25 +70,25 @@ launch-screen@1.0.12
lesiontracker@0.0.1 lesiontracker@0.0.1
livedata@1.0.18 livedata@1.0.18
localstorage@1.0.11 localstorage@1.0.11
logging@1.0.14 logging@1.1.14
mdg:validation-error@0.5.1 mdg:validation-error@0.5.1
meteor@1.1.16 meteor@1.2.16
meteor-base@1.0.4 meteor-base@1.0.4
meteor-platform@1.2.6 meteor-platform@1.2.6
minifier-css@1.1.13 minifier-css@1.2.13
minifier-js@1.1.13 minifier-js@1.2.13
minimongo@1.0.17 minimongo@1.0.17
mobile-experience@1.0.4 mobile-experience@1.0.4
mobile-status-bar@1.0.12 mobile-status-bar@1.0.12
modules@0.6.5 modules@0.7.5
modules-runtime@0.6.5 modules-runtime@0.7.5
momentjs:moment@2.14.4 momentjs:moment@2.14.4
mongo@1.1.9_1 mongo@1.1.10
mongo-id@1.0.5 mongo-id@1.0.5
mrt:moment@2.8.1 mrt:moment@2.8.1
natestrauser:select2@4.0.2 natestrauser:select2@4.0.2
npm-bcrypt@0.8.6_3 npm-bcrypt@0.8.7
npm-mongo@1.4.45 npm-mongo@1.5.45
observe-sequence@1.0.12 observe-sequence@1.0.12
ohif:core@0.0.1 ohif:core@0.0.1
ordered-dict@1.0.8 ordered-dict@1.0.8
@ -96,7 +96,7 @@ orthanc-remote@0.0.1
peppelg:bootstrap-3-modal@1.0.4 peppelg:bootstrap-3-modal@1.0.4
practicalmeteor:chai@2.1.0_1 practicalmeteor:chai@2.1.0_1
practicalmeteor:loglevel@1.2.0_2 practicalmeteor:loglevel@1.2.0_2
promise@0.7.3 promise@0.8.3
random@1.0.10 random@1.0.10
rate-limit@1.0.5 rate-limit@1.0.5
reactive-dict@1.1.8 reactive-dict@1.1.8
@ -114,12 +114,12 @@ spacebars@1.0.12
spacebars-compiler@1.0.12 spacebars-compiler@1.0.12
srp@1.0.9 srp@1.0.9
standard-app-packages@1.0.9 standard-app-packages@1.0.9
standard-minifier-css@1.0.8 standard-minifier-css@1.1.8
standard-minifier-js@1.0.8 standard-minifier-js@1.1.8
stylus@2.512.5 stylus@2.513.4
templating@1.1.14 templating@1.2.13
templating-tools@1.0.4 templating-tools@1.0.4
tracker@1.0.15 tracker@1.1.0
twbs:bootstrap@3.3.6 twbs:bootstrap@3.3.6
typ:accounts-ldap@1.0.1 typ:accounts-ldap@1.0.1
typ:ldapjs@0.7.3 typ:ldapjs@0.7.3
@ -128,7 +128,7 @@ underscore@1.0.9
url@1.0.10 url@1.0.10
validatejs@0.0.1 validatejs@0.0.1
viewerbase@0.0.1 viewerbase@0.0.1
webapp@1.2.11 webapp@1.3.10
webapp-hashing@1.0.9 webapp-hashing@1.0.9
worklist@0.0.1 worklist@0.0.1
zuuk:stale-session@1.0.8 zuuk:stale-session@1.0.8

View File

@ -12,3 +12,4 @@ notices-for-facebook-graph-api-2
1.2.0-breaking-changes 1.2.0-breaking-changes
1.3.0-split-minifiers-package 1.3.0-split-minifiers-package
1.3.5-remove-old-dev-bundle-link 1.3.5-remove-old-dev-bundle-link
1.4.0-remove-old-dev-bundle-link

View File

@ -1 +0,0 @@
/Users/Erik/.meteor/packages/meteor-tool/.1.3.4_4.1rrnj7l++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle

View File

@ -5,37 +5,37 @@
# but you can also edit it by hand. # but you can also edit it by hand.
twbs:bootstrap twbs:bootstrap
http http@1.2.8
arsnebula:reactive-promise arsnebula:reactive-promise
promise promise@0.8.3
stylus stylus@2.513.4
fortawesome:fontawesome fortawesome:fontawesome
mrt:moment mrt:moment
meteor-base meteor-base@1.0.4
mobile-experience mobile-experience@1.0.4
mongo mongo@1.1.10
blaze-html-templates blaze-html-templates@1.0.4
session session@1.1.6
jquery jquery@1.11.9
tracker tracker@1.1.0
logging logging@1.1.14
reload reload@1.1.10
random random@1.0.10
ejson ejson@1.0.12
spacebars spacebars@1.0.12
check check@1.2.3
cornerstone cornerstone
dicomweb dicomweb
design design
ohif:core ohif:core
ecmascript ecmascript@0.5.7
viewerbase viewerbase
worklist worklist
reactive-var reactive-var@1.0.10
practicalmeteor:loglevel practicalmeteor:loglevel
hangingprotocols hangingprotocols
reactive-dict reactive-dict@1.1.8
clinical:router clinical:router
fastclick fastclick@1.0.12
standard-minifier-css standard-minifier-css@1.1.8
standard-minifier-js standard-minifier-js@1.1.8

View File

@ -1 +1 @@
METEOR@1.3.5.1 METEOR@1.4.0.1

View File

@ -1,15 +1,15 @@
allow-deny@1.0.5 allow-deny@1.0.5
arsnebula:reactive-promise@0.9.1 arsnebula:reactive-promise@0.9.1
autoupdate@1.2.11 autoupdate@1.3.11
babel-compiler@6.8.5 babel-compiler@6.9.0
babel-runtime@0.1.9_1 babel-runtime@0.1.10
base64@1.0.9 base64@1.0.9
binary-heap@1.0.9 binary-heap@1.0.9
blaze@2.1.8 blaze@2.1.8
blaze-html-templates@1.0.4 blaze-html-templates@1.0.4
blaze-tools@1.0.9 blaze-tools@1.0.9
boilerplate-generator@1.0.9 boilerplate-generator@1.0.9
caching-compiler@1.0.6 caching-compiler@1.1.6
caching-html-compiler@1.0.6 caching-html-compiler@1.0.6
callback-hook@1.0.9 callback-hook@1.0.9
check@1.2.3 check@1.2.3
@ -17,19 +17,19 @@ clinical:router@2.0.19
clinical:router-location@2.1.0 clinical:router-location@2.1.0
clinical:router-middleware-stack@2.1.2 clinical:router-middleware-stack@2.1.2
clinical:router-url@2.1.0 clinical:router-url@2.1.0
coffeescript@1.1.4 coffeescript@1.2.3
cornerstone@0.0.1 cornerstone@0.0.1
ddp@1.2.5 ddp@1.2.5
ddp-client@1.2.9 ddp-client@1.3.0
ddp-common@1.2.6 ddp-common@1.2.6
ddp-server@1.2.10 ddp-server@1.3.9
deps@1.0.12 deps@1.0.12
design@0.0.1 design@0.0.1
dicomweb@0.0.1 dicomweb@0.0.1
diff-sequence@1.0.6 diff-sequence@1.0.6
dimseservice@0.0.1 dimseservice@0.0.1
ecmascript@0.4.8 ecmascript@0.5.7
ecmascript-runtime@0.2.12 ecmascript-runtime@0.3.12
ejson@1.0.12 ejson@1.0.12
fastclick@1.0.12 fastclick@1.0.12
fortawesome:fontawesome@4.5.0 fortawesome:fontawesome@4.5.0
@ -39,7 +39,7 @@ hangingprotocols@0.0.1
hot-code-push@1.0.4 hot-code-push@1.0.4
html-tools@1.0.10 html-tools@1.0.10
htmljs@1.0.10 htmljs@1.0.10
http@1.1.8 http@1.2.8
id-map@1.0.8 id-map@1.0.8
iron:controller@1.0.12 iron:controller@1.0.12
iron:core@1.0.11 iron:core@1.0.11
@ -48,30 +48,30 @@ iron:layout@1.0.12
jquery@1.11.9 jquery@1.11.9
launch-screen@1.0.12 launch-screen@1.0.12
livedata@1.0.18 livedata@1.0.18
logging@1.0.14 logging@1.1.14
meteor@1.1.16 meteor@1.2.16
meteor-base@1.0.4 meteor-base@1.0.4
meteor-platform@1.2.6 meteor-platform@1.2.6
minifier-css@1.1.13 minifier-css@1.2.13
minifier-js@1.1.13 minifier-js@1.2.13
minimongo@1.0.17 minimongo@1.0.17
mobile-experience@1.0.4 mobile-experience@1.0.4
mobile-status-bar@1.0.12 mobile-status-bar@1.0.12
modules@0.6.5 modules@0.7.5
modules-runtime@0.6.5 modules-runtime@0.7.5
momentjs:moment@2.14.4 momentjs:moment@2.14.4
mongo@1.1.9_1 mongo@1.1.10
mongo-id@1.0.5 mongo-id@1.0.5
mrt:moment@2.8.1 mrt:moment@2.8.1
natestrauser:select2@4.0.2 natestrauser:select2@4.0.2
npm-mongo@1.4.45 npm-mongo@1.5.45
observe-sequence@1.0.12 observe-sequence@1.0.12
ohif:core@0.0.1 ohif:core@0.0.1
ordered-dict@1.0.8 ordered-dict@1.0.8
orthanc-remote@0.0.1 orthanc-remote@0.0.1
practicalmeteor:chai@2.1.0_1 practicalmeteor:chai@2.1.0_1
practicalmeteor:loglevel@1.2.0_2 practicalmeteor:loglevel@1.2.0_2
promise@0.7.3 promise@0.8.3
random@1.0.10 random@1.0.10
reactive-dict@1.1.8 reactive-dict@1.1.8
reactive-var@1.0.10 reactive-var@1.0.10
@ -84,18 +84,18 @@ silentcicero:jszip@0.0.4
spacebars@1.0.12 spacebars@1.0.12
spacebars-compiler@1.0.12 spacebars-compiler@1.0.12
standard-app-packages@1.0.9 standard-app-packages@1.0.9
standard-minifier-css@1.0.8 standard-minifier-css@1.1.8
standard-minifier-js@1.0.8 standard-minifier-js@1.1.8
stylus@2.512.5 stylus@2.513.4
templating@1.1.14 templating@1.2.13
templating-tools@1.0.4 templating-tools@1.0.4
tracker@1.0.15 tracker@1.1.0
twbs:bootstrap@3.3.6 twbs:bootstrap@3.3.6
ui@1.0.11 ui@1.0.11
underscore@1.0.9 underscore@1.0.9
url@1.0.10 url@1.0.10
validatejs@0.0.1 validatejs@0.0.1
viewerbase@0.0.1 viewerbase@0.0.1
webapp@1.2.11 webapp@1.3.10
webapp-hashing@1.0.9 webapp-hashing@1.0.9
worklist@0.0.1 worklist@0.0.1

View File

@ -24,10 +24,10 @@
</div> </div>
</div> </div>
<hr> <hr>
{{#if equals this.serverType.get "dicomWeb"}} {{#if eq this.serverType.get "dicomWeb"}}
{{>serverInformationDicomWeb this}} {{>serverInformationDicomWeb this}}
{{/if}} {{/if}}
{{#if equals this.serverType.get "dimse"}} {{#if eq this.serverType.get "dimse"}}
{{>serverInformationDimse this}} {{>serverInformationDimse this}}
{{/if}} {{/if}}
{{#if this.serverType.get}} {{#if this.serverType.get}}

View File

@ -2,7 +2,7 @@
<div class="modal" id="serverInformationModal" tabindex="-1" role="dialog" aria-labelledby="serverInformationModalLabel"> <div class="modal" id="serverInformationModal" tabindex="-1" role="dialog" aria-labelledby="serverInformationModalLabel">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
<div class="modal-content"> <div class="modal-content">
{{#let isList=(equals instance.container.mode.get "list")}} {{#let isList=(eq instance.container.mode.get "list")}}
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="serverInformationModalLabel">Server Information</h4> <h4 class="modal-title" id="serverInformationModalLabel">Server Information</h4>

View File

@ -1,17 +0,0 @@
Template.registerHelper('instance', function() {
return Template.instance();
});
Template.registerHelper('extend', function() {
const result = {};
const kw = arguments.pop();
_.each(arguments, function(current) {
if (typeof current !== 'object') {
return;
}
_.extend(result, current);
});
_.extend(result, kw.hash);
return result;
});

View File

@ -1,35 +0,0 @@
Template.registerHelper('choose', function() {
let result;
_.each(_.initial(arguments, 1), function(value) {
return value && (result = value);
});
return result;
});
Template.registerHelper('bool', function(value) {
return !!value;
});
Template.registerHelper('equals', function(a, b) {
return a === b;
});
Template.registerHelper('not', function(value) {
return !value;
});
Template.registerHelper('and', function() {
let result = true;
_.each(_.initial(arguments, 1), function(value) {
return value || (result = false);
});
return result;
});
Template.registerHelper('or', function() {
let result = false;
_.each(_.initial(arguments, 1), function(value) {
return value && (result = true);
});
return result;
});

View File

@ -1,7 +0,0 @@
Template.registerHelper('concat', function() {
let result = '';
_.each(_.initial(arguments, 1), function(value) {
result += value;
});
return result;
});

View File

@ -39,18 +39,15 @@ class Form {
var propertyArray = key.split('.'); var propertyArray = key.split('.');
var currentObject = nestedObject; var currentObject = nestedObject;
while (propertyArray.length) { while (propertyArray.length) {
var property = propertyArray.shift(); var currentProperty = propertyArray.shift();
var isArray = property.slice(-2) === '[]';
var key = isArray ? property.slice(0, -2) : property;
if (!propertyArray.length) { if (!propertyArray.length) {
currentObject[key] = value; currentObject[currentProperty] = value;
} else { } else {
if (!currentObject[key]) { if (!currentObject[currentProperty]) {
var dataStructure = isArray ? [] : {}; currentObject[currentProperty] = {};
currentObject[key] = dataStructure;
} }
currentObject = currentObject[key]; currentObject = currentObject[currentProperty];
} }
} }
} }

View File

@ -58,11 +58,6 @@ Package.onUse(function(api) {
api.addFiles('client/tools.js', 'client'); api.addFiles('client/tools.js', 'client');
// Spacebars helpers
api.addFiles('client/helpers/blaze.js', 'client');
api.addFiles('client/helpers/logical.js', 'client');
api.addFiles('client/helpers/string.js', 'client');
// Utility classes // Utility classes
api.addFiles('client/utils/form.js', 'client'); api.addFiles('client/utils/form.js', 'client');

View File

@ -9,6 +9,10 @@ Template.baseComponent.constructView = function(contentFunc, elseFunc) {
// Get the data passed to the template // Get the data passed to the template
const data = Template.currentData(); const data = Template.currentData();
if (!data) {
return;
}
// Check the base template. If it's not informed set as the custom base // Check the base template. If it's not informed set as the custom base
data.base || (data.base = 'baseCustom'); data.base || (data.base = 'baseCustom');

View File

@ -48,14 +48,20 @@ Template.registerHelper('not', value => {
// Check if all the given values are true // Check if all the given values are true
Template.registerHelper('and', (...values) => { Template.registerHelper('and', (...values) => {
let result = true; let result = true;
_.each(_.initial(values, 1), value => value || (result = false)); _.each(arguments, value => value || (result = false));
return result; return result;
}); });
// Check if one of the given values is true // Check if one of the given values is true
Template.registerHelper('or', (...values) => { Template.registerHelper('or', (...values) => {
let result = false; let result = false;
_.each(_.initial(values, 1), value => value && (result = true)); _.each(_.initial(values, 1), value => {
if (value instanceof Spacebars.kw) {
return;
}
return value && (result = true);
});
return result; return result;
}); });