Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
Initial copy from Wales
Browse files Browse the repository at this point in the history
  • Loading branch information
biskyt committed Jul 10, 2020
0 parents commit b4c3493
Show file tree
Hide file tree
Showing 116 changed files with 69,553 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text eol=lf

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
*.css text
*.html text
*.xml text
*.js text
*.conf text
*.sass text
*.scss text
*.md text

# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf
*.cmd text eol=crlf

# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf
*.php text eol=lf


# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.bmp binary
*.gif binary
*.tiff binary
*.dcm binary
*.pdf binary
*.otf binary
*.eot binary
*.ttf binary
*.woff binary
*.woff2 binary
*.odt binary
*.zip binary
wait binary
/web/wait binary
/dicomprocessor/wait binary
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.settings
.buildpath
.project
node_modules
.sass-cache
.DS_Store
.vscode/*
11 changes: 11 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = function(grunt) {

/* Set the config */
grunt.initConfig(require('./grunt/config')(grunt));

/* Load the npm grunt tasks */
require('load-grunt-tasks')(grunt, 'grunt-*');

/* Load our custom grunt tasks */
grunt.loadTasks('./grunt/tasks');
};
31 changes: 31 additions & 0 deletions OphInKowastereoModule.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* OpenEyes
*
* (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011
* (C) OpenEyes Foundation, 2011-2012
* This file is part of OpenEyes.
* OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
*
* @package OpenEyes
* @link http://www.openeyes.org.uk
* @author OpenEyes <[email protected]>
* @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
* @copyright Copyright (c) 2011-2012, OpenEyes Foundation
* @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
*/

class OphInKowastereoModule extends BaseEventTypeModule
{
public function init() {
$this->setImport(array(
'OphInKowastereo.models.*',
'OphInKowastereo.components.*',
'OphInKowastereo.commands.*',
));

parent::init();
}
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
OphInVisualfields
=================

This module is currently under development and has no stable releases.
6 changes: 6 additions & 0 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Release History
===============

1.7.0
-----
Initial release
1 change: 1 addition & 0 deletions assets/css/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.x
Binary file added assets/css/desktop.ini
Binary file not shown.
30 changes: 30 additions & 0 deletions assets/css/module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/** Visual Fields module styles */
/**
* OpenEyes
*
* (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011
* (C) OpenEyes Foundation, 2011-2013
* This file is part of OpenEyes.
* OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
*
* @package OpenEyes
* @link http://www.openeyes.org.uk
* @author OpenEyes <[email protected]>
* @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
* @copyright Copyright (c) 2011-2013, OpenEyes Foundation
* @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
*/
/* line 17, ../sass/components/_event.scss */
.event {
border-color: #a5a0a9;
}
/* line 19, ../sass/components/_event.scss */
.event .event-content {
background-image: url('../img/watermark.png?1400161568');
}
/* line 22, ../sass/components/_event.scss */
.event .event-title {
background-image: url('../img/medium.png?1400161568');
}
Binary file added assets/desktop.ini
Binary file not shown.
Binary file added assets/img/desktop.ini
Binary file not shown.
Binary file added assets/img/medium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/watermark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/js/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.x
Binary file added assets/js/desktop.ini
Binary file not shown.
84 changes: 84 additions & 0 deletions assets/js/imageLoader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
var currentImage = 0;

/**
* Changes the
*/
function ev_mousemove (ev, id, imageObj, images, idOtherSide, imageObjOtherSide,
imagesOtherSide, id_linked, imagesLinked) {
var canvas = document.getElementById(id);
var context = canvas.getContext("2d");
var canvasOtherSide = document.getElementById(idOtherSide);
var contextOtherSide = canvasOtherSide.getContext("2d");

// Get the mouse position relative to the canvas element.
if (ev.layerX || ev.layerX == 0) { // Firefox
x = ev.layerX;
} else if (ev.offsetX || ev.offsetX == 0) { // Opera
x = ev.offsetX;
}

// image_width / images
var incr = 300 / images.length;
// image_width / increment

var rect = canvas.getBoundingClientRect();
x = ev.clientX - rect.left;
var pos = x / incr;
// alert(x + ', ' + ev.clientX + ', ' + rect.left);
// alert(x + ', ' + incr + ', ' + pos + ', ' + images.length + ', ' + imagesLinked.length + ', ' + currentImage);
if (currentImage != Math.floor(pos)) {
currentImage = Math.floor(pos);
if (currentImage > images.length) {
currentImage = images.length-1;
}
// alert(currentImage);
imageObj.onload = function() {
context.drawImage(imageObj, 0, 0);
}
imageObjOtherSide.onload = function() {
contextOtherSide.drawImage(imageObjOtherSide, 0, 0);
}
// imageObjAlg.onload = function() {
// }
if (currentImage < images.length) {
imageObj.src = images[currentImage];
imageObjOtherSide.src = imagesOtherSide[currentImage];
} else {
return;
}

var canvasLinked = document.getElementById(id_linked);

if (canvasLinked != null) {
var context2 = canvasLinked.getContext("2d");
var multiplier = 1;
if (images.length < imagesLinked.length) {
multiplier = Math.round(imagesLinked.length / images.length);
} else if (images.length > imagesLinked.length) {
multiplier = Math.round(images.length / imagesLinked.length);
} else {
multiplier = 1;
}
var imageObj2 = new Image();
imageObj2.onload = function() {
context2.drawImage(imageObj2, 0, 0);
contextOtherSide.drawImage(imageObjOtherSide, 0, 0);
}
if (images.length < imagesLinked.length) {
var index = 0;
if (currentImage > 0) {
index = Math.round((currentImage+1) * multiplier );
if (index > imagesLinked.length -1) {
index = imagesLinked.length -1;
}
}
imageObj2.src = imagesLinked[index];
imageObjOtherSide.src = imagesOtherSide[index];
} else {
var index = Math.floor( (currentImage + 1 ) / multiplier);
imageObj2.src = imagesLinked[index];
imageObjOtherSide.src = imagesOtherSide[index];
}
}
}
}
16 changes: 16 additions & 0 deletions assets/js/module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$(document).ready(function() {
function selectField(e) {

var side = e.data.side, id = $(this).val();

var field = window["OphInKowastereo_available_fields_" + side][id];

$('#Element_OphInKowastereo_Image_image_' + side).attr('src', field.url);
$('#Element_OphInKowastereo_Image_strategy_' + side).text(field.strategy);
$('#Element_OphInKowastereo_Image_pattern_' + side).text(field.pattern);
}

$('#Element_OphInKowastereo_Image_right_field_id').change({side: "right"}, selectField);
$('#Element_OphInKowastereo_Image_left_field_id').change({side: "left"}, selectField);
});

25 changes: 25 additions & 0 deletions assets/sass/components/_event.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// * OpenEyes
// *
// * (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011
// * (C) OpenEyes Foundation, 2011-2013
// * This file is part of OpenEyes.
// * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
// * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
// *
// * @package OpenEyes
// * @link http://www.openeyes.org.uk
// * @author OpenEyes <[email protected]>
// * @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
// * @copyright Copyright (c) 2011-2013, OpenEyes Foundation
// * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0

.event {
border-color: #a5a0a9;
.event-content {
background-image: image-url("watermark.png");
}
.event-title {
background-image: image-url("medium.png");
}
}
Binary file added assets/sass/components/desktop.ini
Binary file not shown.
Binary file added assets/sass/desktop.ini
Binary file not shown.
20 changes: 20 additions & 0 deletions assets/sass/module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// * OpenEyes
// *
// * (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011
// * (C) OpenEyes Foundation, 2011-2013
// * This file is part of OpenEyes.
// * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
// * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
// *
// * @package OpenEyes
// * @link http://www.openeyes.org.uk
// * @author OpenEyes <[email protected]>
// * @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
// * @copyright Copyright (c) 2011-2013, OpenEyes Foundation
// * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0

/** Visual Fields module styles */

@import "openeyes/module";
@import "components/event";
Loading

0 comments on commit b4c3493

Please sign in to comment.