<commit_before>/**
 * 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>>
* @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
*/
function hide_dialog() {
    $('#blackout-box').hide();
    $('#dialog-msg').hide();
}

function goToExaminationEvent() {
    window.location.href = no_examination_cancel_url;
}

function AlertMissingIfExaminationEvent(){
	if(examination_events_count < 1 && require_exam_before_booking) {
        var warning_message = "You didn't create examination yet.";
        
        var p = $('#event-content');
        var position = p.position();
        // alert ('L->'+position.left+ ' T '+position.top);
        var topdist = position.left + 400;
        var leftdist = position.top + 500;
        
        

        var dialog_msg = '<div class="ui-dialog ui-widget ui-widget-content ui-corner-all dialog" id="dialog-msg" tabindex="-1" role="dialog" aria-labelledby="ui-id-1" style="outline: 0px; z-index: 10002; height: auto; width: 600px;  position: fixed; top: 50%; left: 50%; margin-top: -110px; margin-left: -200px;">' +
          '<div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">' +
          '<span id="ui-id-1" class="ui-dialog-title">Confirm booking</span>' +
          '</div><div id="site-and-firm-dialog" class="ui-dialog-content ui-widget-content" scrolltop="0" scrollleft="0" style="display: block; width: auto; min-height: 0px; height: auto;">' +
          '<div class="alert-box alert with-icon"> <strong>WARNING: ' + warning_message + ' </strong></div>' +
          '<p>For the purposes of providing data to the RCOphtp National Ophthalmology Dataset (NOD), an Examination event with pre-surgery details must be created before a patient can be listed surgery.</p>' +
          '<p>Do you want to continue without examination?</p>' +
          '<div style = "margin-top:20px; float:right">' +
          '<input class="secondary small" id="prescription-yes" type="submit" name="yt0" style = "margin-right:10px" value="Yes" onclick="hide_dialog()">' +
          '<input class="warning small" id="prescription-no" type="submit" name="yt0" value="Create Examination Event" onclick="goToExaminationEvent()">' +
          '</div>';

        var blackout_box = '<div id="blackout-box" style="position:fixed;top:0;left:0;width:100%;height:100%;background-color:black;opacity:0.6;z-index:10000">';


        $(dialog_msg).prependTo("body");
        $(blackout_box).prependTo("body");
        $('div#blackout_box').css.opacity = 0.6;
        $("input#prescription-no").focus();
        $("input#prescription-yes").keyup(function (e) {
          hide_dialog();
        });
    }    
}


$(document).ready(function() {<commit_msg>fixing alert text<commit_after>/**
 * 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>>
* @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
*/
function hide_dialog() {
    $('#blackout-box').hide();
    $('#dialog-msg').hide();
}

function goToExaminationEvent() {
    window.location.href = no_examination_cancel_url;
}

function AlertMissingIfExaminationEvent(){
	if(examination_events_count < 1 && require_exam_before_booking) {
        var warning_message = "You didn't create examination yet.";
        
        var p = $('#event-content');
        var position = p.position();
        // alert ('L->'+position.left+ ' T '+position.top);
        var topdist = position.left + 400;
        var leftdist = position.top + 500;
        
        

        var dialog_msg = '<div class="ui-dialog ui-widget ui-widget-content ui-corner-all dialog" id="dialog-msg" tabindex="-1" role="dialog" aria-labelledby="ui-id-1" style="outline: 0px; z-index: 10002; height: auto; width: 600px;  position: fixed; top: 50%; left: 50%; margin-top: -110px; margin-left: -200px;">' +
          '<div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">' +
          '<span id="ui-id-1" class="ui-dialog-title">Confirm booking</span>' +
          '</div><div id="site-and-firm-dialog" class="ui-dialog-content ui-widget-content" scrolltop="0" scrollleft="0" style="display: block; width: auto; min-height: 0px; height: auto;">' +
          '<div class="alert-box alert with-icon"> <strong>WARNING: ' + warning_message + ' </strong></div>' +
          '<p>For the purposes of providing data to the RCOphth National Ophthalmology Dataset (NOD), an Examination event with pre-surgery details must be created before a patient can be listed for surgery.</p>' +
          '<p>Do you want to continue without examination?</p>' +
          '<div style = "margin-top:20px; float:right">' +
          '<input class="secondary small" id="prescription-yes" type="submit" name="yt0" style = "margin-right:10px" value="Yes" onclick="hide_dialog()">' +
          '<input class="warning small" id="prescription-no" type="submit" name="yt0" value="Create Examination Event" onclick="goToExaminationEvent()">' +
          '</div>';

        var blackout_box = '<div id="blackout-box" style="position:fixed;top:0;left:0;width:100%;height:100%;background-color:black;opacity:0.6;z-index:10000">';


        $(dialog_msg).prependTo("body");
        $(blackout_box).prependTo("body");
        $('div#blackout_box').css.opacity = 0.6;
        $("input#prescription-no").focus();
        $("input#prescription-yes").keyup(function (e) {
          hide_dialog();
        });
    }    
}


$(document).ready(function() {
{'fraction_non_alphanumeric': 0.14433269910301713, 'fraction_numerical': 0.025006795324816526, 'mean_word_length': 3.729434447300771, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2012746', 'n_tokens_mistral': 2330, 'n_tokens_neox': 2169, 'n_words': 653}