Skip to content

Commit

Permalink
Footer updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Engelbert Niehaus committed Dec 3, 2020
1 parent 104e0dc commit 4b99de2
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 9 deletions.
54 changes: 54 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
}
}

function setWikiLanguage(pLang) {
console.log("Set Wiki Language to '" + pLang + "'");
}

</script>
<hr>
<center>
Expand Down Expand Up @@ -302,5 +306,55 @@ <h3><i>based on Library: <a href="https://www.npmjs.com/package/wtf_wikipedia" t
};
//--------------------------------------

//console.log(JSON.stringify(el("sWikiLanguage"),null,4));

function getOption4Select(pid) {
var sel = document.getElementById(pid);
var opt;
var vJSON = [];
if (sel) {
for ( var i = 0, len = sel.options.length; i < len; i++ ) {
opt = sel.options[i];
vJSON.push({
"text": sel.options[i].text,
"value": sel.options[i].value
});
}
} else {
console.error("ERROR: ["+pid+"] does not exist.");
}
return vJSON;
}


function getSelectedOption(sel) {
var opt;
for ( var i = 0, len = sel.options.length; i < len; i++ ) {
opt = sel.options[i];
if ( opt.selected === true ) {
break;
}
}
return opt;
}

/* assign onclick handlers to the buttons
document.getElementById('sWikiLanguage').onclick = function () {
el.value = sel.value;
}
document.getElementById('showTxt').onclick = function () {
// access text property of selected option
el.value = sel.options[sel.selectedIndex].text;
}
document.getElementById('doLoop').onclick = function () {
var opt = getSelectedOption(sel);
el.value = opt.value;
}
*/

console.log(JSON.stringify(getOption4Select("sWikiLanguage"),null,4))
// immediate function to preserve global namespace
</script>
</html>
32 changes: 32 additions & 0 deletions docs/js/string.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@

function getOption4Select(pid) {
var sel = document.getElementById(pid);
var opt;
var vJSON = [];
if (sel) {
for ( var i = 0, len = sel.options.length; i < len; i++ ) {
opt = sel.options[i];
vJSON.push({
"text": sel.options[i].text,
"value": sel.options[i].value
});
}
} else {
console.error("ERROR: ["+pid+"] does not exist.");
}
return vJSON;
}


function getSelectedOption(sel) {
var opt;
for ( var i = 0, len = sel.options.length; i < len; i++ ) {
opt = sel.options[i];
if ( opt.selected === true ) {
break;
}
}
return opt;
}



function getIndent(level) {
var result = '',
i = level * 4;
Expand Down
2 changes: 1 addition & 1 deletion docs/js/wiki2reveal_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,6 @@ function replaceString(pString,pSearch,pReplace) {
}
vReturnString += pString;
}
console.log("replaceString() finalized for '"+pString+"'");
//console.log("replaceString() finalized for '"+pString+"'");
return vReturnString;
}
17 changes: 10 additions & 7 deletions docs/js/wikiconvert.js
Original file line number Diff line number Diff line change
Expand Up @@ -1648,6 +1648,7 @@ this.process_normal = function(wikitext) {
var vLinkSplit = (tokens[0]).split("|");
vURL = this.getWikiMediaURL(vLinkSplit[0]);
var vFileType = this.getMediaFileType(vURL);
//----------- MEDIATYPE: AUDIO -----------------
if (vFileType == "audio") {
//-------------------------
//-----AUDIO---------------
Expand Down Expand Up @@ -1723,9 +1724,9 @@ this.process_normal = function(wikitext) {
console.log("Audio Found: "+vURL+" with Type: "+vFileType + " AudioSlides='" + vAudioSlide + "' with Audio Tag: "+vAudioTag);
pWikiCode = pWikiCode.replace(tokens[0], replace_str);
} else if (vFileType == "video") {
//-------------------------
//-----VIDEO---------------
//-------------------------
//----------------------------------------------
//----------- MEDIATYPE: VIDEO -----------------
//----------------------------------------------
var vVideoTag = '<div class="videodiv">';
vVideoTag += '<video width="80%" controls>';
vVideoTag += '<source src="'+vURL+'">';
Expand All @@ -1742,10 +1743,10 @@ this.process_normal = function(wikitext) {
//replace_str = '<video src="'+vURL+'"></video>'
pWikiCode = pWikiCode.replace(tokens[0], replace_str);
//} else if ((vFileType == "svg") || (vFileType == "img")) {
} else {
//-------------------------
//-----IMAGE---------------
//-------------------------
} else if (vFileType == "img") {
//----------------------------------------------
//----------- MEDIATYPE: IMAGE-----------------
//----------------------------------------------
console.log("Image Found: "+vURL+" with Type: "+vFileType);
//var vSize = this.get_wiki_image_size(vLinkSplit);
var vSize = "width: 50%";
Expand Down Expand Up @@ -1794,6 +1795,8 @@ this.process_normal = function(wikitext) {
pWikiCode = pWikiCode.replace(tokens[0], replace_str);
}
}; // else if vLineSplit.length
} else {
console.error("Uncaught MediaType: '" + vURL + "'");
} // else vFileType
}; // While tokens
return pWikiCode;
Expand Down
12 changes: 11 additions & 1 deletion docs/wiki2reveal_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ <H2 class="slides" id="headerdemo" style="display:none">
<b>Footer Wiki Source EN:</b></br>
<textarea id="wikisrc" rows="12" cols="120">
== Page Information ==

=== Wiki2Reveal ===
The '''[https://niebert.github.io/Wiki2Reveal/index.html?domain=___DOMAIN___&title=___TITLE_ENCODED___&author=___COURSE_ENCODED___&language=___LANGUAGE___&audioslide=___AUDIO___ Wiki2Reveal slides]''' were created for the '''[https://de.wikiversity.org/wiki/____COURSE_ENCODED___ ___COURSE___]'''' and the Link for the [[v:en:Wiki2Reveal|Wiki2Reveal Slides]] was created with the [https://niebert.github.io/Wiki2Reveal/ link generator].
<!--
* Contents of the page are based on:
Expand All @@ -103,6 +105,10 @@ <H2 class="slides" id="headerdemo" style="display:none">
<b>Footer Wiki Source DE:</b></br>
<textarea id="wikisrc_de" rows="12" cols="120">
== Seiteninformation ==
Diese Lernresource wurde als '''[https://niebert.github.io/Wiki2Reveal/wiki2reveal.html?domain=___DOMAIN___&title=___TITLE_ENCODED___&author=___COURSE_ENCODED___&language=___LANGUAGE___&audioslide=___AUDIO___ Wiki2Reveal Foliensatz]''' erstellt.

=== Wiki2Reveal ===

Dieser '''[https://niebert.github.io/Wiki2Reveal/wiki2reveal.html?domain=___DOMAIN___&title=___TITLE_ENCODED___&author=___COURSE_ENCODED___&language=___LANGUAGE___&audioslide=___AUDIO___ Wiki2Reveal Foliensatz]''' wurde für den Lerneinheit '''[https://de.wikiversity.org/wiki/____COURSE_ENCODED___ ___COURSE___]'''' erstellt der Link für die [[v:en:Wiki2Reveal|Wiki2Reveal-Folien]] wurde mit dem [https://niebert.github.io/Wiki2Reveal/ Wiki2Reveal-Linkgenerator] erstellt.
<!--
* Die Inhalte der Seite basieren auf den folgenden Inhalten:
Expand All @@ -119,7 +125,9 @@ <H2 class="slides" id="headerdemo" style="display:none">

<b>Footer Wiki Source FR:</b></br>
<textarea id="wikisrc_fr" rows="12" cols="120">
== informations de page ==
== Informations de Page ==

=== Wiki2Reveal ===
Ce jeu de '''[https://niebert.github.io/Wiki2Reveal/wiki2reveal.html?domain=___DOMAIN___&title=___TITLE_ENCODED___&author=___COURSE_ENCODED___&language=___LANGUAGE___&audioslide=___AUDIO___ diapositives Wiki2Reveal]''' a été créé pour la session '''[https://de.wikiversity.org/wiki/____COURSE_ENCODED___ ___COURSE___]''' et le lien pour les diapositives Wiki2Reveal a été créé à l'aide du [https://niebert.github.io/Wiki2Reveal/ générateur de liens Wiki2Reveal].
<!--
* Le contenu de la page est basé sur le contenu suivant:
Expand All @@ -138,6 +146,8 @@ <H2 class="slides" id="headerdemo" style="display:none">
<b>Footer Wiki Source ES:</b></br>
<textarea id="wikisrc_es" rows="12" cols="120">
== Información de la Página ==

=== Wiki2Reveal ===
Este conjunto de '''[https://niebert.github.io/Wiki2Reveal/wiki2reveal.html?domain=___DOMAIN___&title=___TITLE_ENCODED___&author=___COURSE_ENCODED___&language=___LANGUAGE___&audioslide=___AUDIO___ diapositivas de Wiki2Reveal]''' se creó para la sesión '''[https://de.wikiversity.org/wiki/____COURSE_ENCODED___ ___CURSO___]''', y el enlace para las diapositivas de Wiki2Reveal se creó con el [https://niebert.github.io/Wiki2Reveal/ generador de enlaces de Wiki2Reveal].
<!--
* El contenido de la página se basa en el siguiente contenido:
Expand Down

0 comments on commit 4b99de2

Please sign in to comment.