Skip to content

Commit

Permalink
Fix items
Browse files Browse the repository at this point in the history
French marked.jspf hebrew is screwed up
  • Loading branch information
ajwecker committed Feb 11, 2019
1 parent f3ecaab commit 62592f5
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 92 deletions.
2 changes: 0 additions & 2 deletions TS1218/.settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@ encoding//WebContent/WEB-INF/views/parts/HE/transcribe/abc.jspf=UTF-8
encoding//WebContent/WEB-INF/views/parts/HE/transcribe/help.jspf=UTF-8
encoding//WebContent/WEB-INF/views/parts/HE/transcribe/marked.jspf=UTF-8
encoding//WebContent/WEB-INF/views/parts/HE/transcribe/special.jspf=UTF-8
encoding//src/messages_en.properties=UTF-8
encoding//src/messages_es.properties=UTF-8
encoding//src/messages_fr.properties=UTF-8
encoding/<project>=UTF-8
7 changes: 1 addition & 6 deletions TS1218/WebContent/WEB-INF/views/css/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,12 @@
.tab-content {
overflow-y: auto;
}
.tabContentTitle{
font-size:28px;
font-weight: bold;
text-decoration: underline;
}
.rtl {
direction:rtl;
text-align:right;
}

.ltr {
.ltr {
direction:ltr;
text-align:left;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</div>

</div>
</div>


<div class="upper_dots">
<div class="title">נקודות עיליות</div>
Expand Down
174 changes: 96 additions & 78 deletions TS1218/WebContent/WEB-INF/views/script.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
function showRegisterForm() {
$('.login-page').addClass('show-register').removeClass('show-login');
}

function showLoginForm() {
$('.login-page').addClass('show-login').removeClass('show-register');
}

// Stuff from the page
function makeActive() {
var workElem = document.getElementById("work");
if (workElem != null) {
workElem.className += " active";
}
if (workElem) {
workElem.className += " active";
}
}

// guest login
Expand All @@ -15,55 +23,56 @@ function enterAsGuest() {

// When the user clicks on <div>, open the popup
function myPopup() {
var popup = document.getElementById("myPopup");
popup.classList.toggle("show");
var popup = document.getElementById("myPopup");
popup.classList.toggle("show");
}
function myInsert(ligature) {
elem = document.getElementById('trw')
var caretPos = elem.selectionStart;
var myString = elem.value;
pre = myString.substring(0, caretPos);
post = myString.substring(caretPos, myString.length);
elem.value = pre + ligature + post;
elem.focus();
elem.selectionStart = caretPos + 1;
elem.selectionEnd = caretPos + 1;
elem = document.getElementById('trw')
var caretPos = elem.selectionStart;
var myString = elem.value;
pre = myString.substring(0, caretPos);
post = myString.substring(caretPos, myString.length);
elem.value = pre + ligature + post;
elem.focus();
elem.selectionStart = caretPos + 1;
elem.selectionEnd = caretPos + 1;

}
function myMark(endligature, startligature) {
elem = document.getElementById('trw')
var caretPosStart = elem.selectionStart;
var caretPosEnd = elem.selectionEnd;
var myString = elem.value;

pre = myString.substring(0, caretPosStart);
middle = startligature + myString.substring(caretPosStart, caretPosEnd) + endligature;
post = myString.substring(caretPosEnd, myString.length);
document.getElementById('trw').value = pre + middle + post;
if (caretPosStart != caretPosEnd) {
caretPosEnd += 2;
} else {
caretPosEnd += 1;
}
elem.focus();
elem.selectionStart = caretPosEnd;
elem.selectionEnd = caretPosEnd;
elem = document.getElementById('trw')
var caretPosStart = elem.selectionStart;
var caretPosEnd = elem.selectionEnd;
var myString = elem.value;

pre = myString.substring(0, caretPosStart);
middle = startligature + myString.substring(caretPosStart, caretPosEnd)
+ endligature;
post = myString.substring(caretPosEnd, myString.length);
document.getElementById('trw').value = pre + middle + post;
if (caretPosStart != caretPosEnd) {
caretPosEnd += 2;
} else {
caretPosEnd += 1;
}
elem.focus();
elem.selectionStart = caretPosEnd;
elem.selectionEnd = caretPosEnd;
}
function myFill() {
elem = document.getElementById('trw')
elem = document.getElementById('trw')

var myString = elem.value;
elem2 = document.getElementById('filler');
ligature = elem2.value;
elem.value = myString + ligature;
elem.focus();
elem.selectionStart = myString.length;
elem.selectionEnd = myString.length;
var myString = elem.value;
elem2 = document.getElementById('filler');
ligature = elem2.value;
elem.value = myString + ligature;
elem.focus();
elem.selectionStart = myString.length;
elem.selectionEnd = myString.length;

}
function myResizeOrg() {

var elemImg = document.getElementById("imgline");
var elemImg = document.getElementById("imgline");

if (elemImg) {
var rect = elemImg.getBoundingClientRect();
Expand All @@ -81,9 +90,21 @@ function myResizeOrg() {
}

}
function myResizeOrg2() {

var elemImg = document.getElementById("map2");
if (elemImg) {
var rect = elemImg.getBoundingClientRect();
var fontsize = (Math.trunc(rect.height * 0.45) - 1) + "px";
var elemTRW = document.getElementById("trw");
elemTRW.style.height = fontsize;
elemTRW.style.fontSize = fontsize;
var elemTest = document.getElementById("test");
elemTest.innerHTML = fontsize;
console.log("OrgFontsize= " + fontsize)
}



}
function myResize(myAdd) {
var elemTRW = document.getElementById("trw");
var rect = elemTRW.getBoundingClientRect();
Expand All @@ -96,10 +117,9 @@ function myResize(myAdd) {
}

function myReset() {
var elemTRW = document.getElementById("trw");
elemTRW.value = "${transcribedline}"
// document.getElementById("Done").disabled = false;
// document.getElementById("Done").setAttribute("style", "background-color: 90CAF9");
var elemTRW = document.getElementById("trw");
var elemTRWORG = document.getElementById("trwOrig");
elemTRW.value = elemTRWORG.value;

//domentById("PC").setAttribute("style", "background-color: #f0f0f0");
}
Expand All @@ -115,44 +135,42 @@ function trwChanged() {
//document.getElementById("PC").setAttribute("style", "background-color: 90CAF9");
}
function resizeImg() {
var elemImgPage = document.getElementById("imgPage");
var rect = elemImgPage.getBoundingClientRect();
var width = Math.trunc(rect.width * 1);
var height = Math.trunc(width * 1);
var elemImgPage = document.getElementById("imgPage");
var rect = elemImgPage.getBoundingClientRect();
var width = Math.trunc(rect.width * 1);
var height = Math.trunc(width * 1);

elemImgPage.style.height = height + "px";
var elemImgMap = document.getElementById("map");
elemImgMap.style.height = height + "px";
elemImgMap.style.width = width + "px";

elemImgPage.style.height = height + "px";
var elemImgMap = document.getElementById("map");
elemImgMap.style.height = height + "px";
elemImgMap.style.width = width + "px";

console.log("imgPageHeight= " + height)
console.log("imgPageHeight= " + height)
}

function onloadResize() {
myResizeOrg();
// resizeImg();
myResizeOrg();
resizeImg();
}

function openInfo(evt, infoName) {
// Declare all variables
var i, tabcontent, tablinks;

// Get all elements with class="tabcontent" and hide them
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}

// Get all elements with class="tablinks" and remove the class "active"
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}

// Show the current tab, and add an "active" class to the link that opened the tab
document.getElementById(infoName).style.display = "block";
evt.currentTarget.className += " active";
// Declare all variables
var i, tabcontent, tablinks;

// Get all elements with class="tabcontent" and hide them
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}

// Get all elements with class="tablinks" and remove the class "active"
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}

// Show the current tab, and add an "active" class to the link that opened
// the tab
document.getElementById(infoName).style.display = "block";
evt.currentTarget.className += " active";
}


10 changes: 5 additions & 5 deletions TS1218/WebContent/WEB-INF/views/transcribe.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<body onload="onloadResize();" class="${dir}">
<%@include file="../common/navigation.jspf"%>
<%@include file="../common/footer2.jspf"%>

<div class="transcribe-page scrollable mt-2 p-2 row">


Expand Down Expand Up @@ -154,11 +154,11 @@

<div id="activity-buttons"
class="mt-2 d-flex justify-content-between">
<button type="submit" class="btn btn-warning" name="status" id="Skip"
<button type="submit" class="btn btn-warning" name="status"
value="Skip">
<fmt:message key="main.work_area.finish_button_2" />
</button>
<button type="submit" class="btn btn-success" name="status" id="Done"
<button type="submit" class="btn btn-success" name="status"
value="Done">
<fmt:message key="main.work_area.finish_button_1" />
</button>
Expand Down Expand Up @@ -249,7 +249,7 @@
fillColor : '#f03',
fillOpacity : 0.2
}).addTo(map);
}, 3000);
}, 1500);
</script>
</div>
</div>
Expand Down Expand Up @@ -281,6 +281,6 @@
</div>
</div>
</div>

<%@include file="../common/footer2.jspf"%>


0 comments on commit 62592f5

Please sign in to comment.