API-Referenz
eLP : object
global eLP Object
Kind: global namespace
- eLP :
object
- .resources :
object
- .config :
object
- .type :
string
- .svgzoom :
number
- .ckeditor4 :
string
- .resizepolyfill :
boolean
- .portfolio_name :
string
- .bildungseinrichtung :
string
- .bildungseinrichtung_selection :
boolean
- .language :
string
- .tools :
Array
- .datetypes :
Array.<string>
- .phasetypes :
Array.<string>
- .kompetenzen_array
- .type :
- .collections :
Array
- .queries :
object
- .phone :
object
- .tablet :
object
- .desktopSmall :
object
- .desktopBig :
object
- .touch :
object
- .orientation :
object
- .phone :
- .veranstaltungen :
Array
- .utils :
object
- .getPngDimensions ⇒
object
- .bowser :
object
- .loaderVisible :
number
- .sortName(a, b) ⇒
number
- .makeBool(variable) ⇒
boolean
- .nullCoal(...expressions) ⇒
*
- .btoaWrapper(string) ⇒
string
- .atobWrapper(string) ⇒
string
- .decodeHtmlEntities(html) ⇒
string
- .byString(o, s) ⇒
*
- .isObject(obj) ⇒
boolean
- .isDOM(obj) ⇒
boolean
- .findByIdShallow(o, id) ⇒
string
|number
|undefined
- .findIndexByIdShallow(o, id) ⇒
string
|number
|undefined
- .findById(o, id) ⇒
object
|number
- .showClosestTabsCollapse(target, container, nav) ⇒
boolean
- .newerVersion(now, test) ⇒
boolean
- .testIfCORSViolation(url, editor)
- .imageURLtoBase64(url) ⇒
Promise.<string>
- .SVGtoPNG(svg) ⇒
string
- .SVGtoPNGdefer(svg) ⇒
Promise.<string>
- .convertHtmlToPdf(html, images) ⇒
object
- .hslToHex(h, s, l) ⇒
string
- .hexToRGB(h) ⇒
string
- .rgbToHex(rgb) ⇒
string
- .defer() ⇒
Promise
- .makeCKEditor(elem, config, startValue, forceRecreate)
- .makeFlatpickr(element, config) ⇒
object
|null
- .removeFlatpickr(element, keepNative)
- .fixCKEBlur()
- .objectToHtml(obj) ⇒
string
- .objectToLink(obj) ⇒
string
- .objectToElement(obj) ⇒
string
- .literatureObjectToReference(obj) ⇒
string
- .testReadonlySome(obj) ⇒
boolean
- .templatePreserve(data) ⇒
string
|object
- .getListSortWithFilterBound(listObj) ⇒
function
- .formToDates(data, ids) ⇒
Array
- .serialize(elements) ⇒
object
- .isInArray(x, array) ⇒
boolean
- .outputPhase(lehreinheit, termin, veranst) ⇒
string
- .readJsonFile(file) ⇒
object
- .readMarkdownFile(file) ⇒
Promise.<*>
- .updateResources(language, bildungseinrichtung, veranstSet, prevBildung) ⇒
number
- .dragStartPhaseRow(event)
- .dragEnterPhaseRow(event)
- .dragOverPhaseRow(event)
- .dragEndPhaseRow(event)
- .dropPhaseRow(event)
- .phaseRowOrderUp()
- .phaseRowOrderDown()
- .rowClose()
- .dragStartSubContent(event)
- .dragEnterSubContent(event)
- .dragOverSubContent(event)
- .dragEndSubContent(event)
- .dropSubContent(event)
- .subContentOrderUp()
- .subContentOrderDown()
- .subcontentRowClose()
- .dragStartVeranstaltung(event)
- .dragEnterVeranstaltung(event)
- .dragOverVeranstaltung(event)
- .dragEndVeranstaltung()
- .dropVeranstaltung(event)
- .dragStartCollection(event)
- .dragEnterCollection(event)
- .dragOverCollection(event)
- .dragEndCollection(event)
- .dropCollection(event)
- .dragStartTermin(event)
- .dragEnterTermin(event)
- .dragOverTermin(event)
- .dragEndTermin(event)
- .dropTermin(event)
- .dragStartReflex(event)
- .dragEnterReflex(event)
- .dragOverReflex(event)
- .dragEndReflex(event)
- .dropReflex(event)
- .dragStartPhase(event)
- .dragEnterPhase(event)
- .dragOverPhase(event)
- .dragEndPhase(event)
- .dropPhase(event)
- .loaderShow()
- .loaderHide()
- .phoneResizeHandler()
- .resizeHandlerPolyfill(element)
- .getPngDimensions ⇒
- .storage :
object
- .puffer :
object
- .storageSaving :
number
- .menuSaving :
number
- .storageFunction()
- .loadStorageFunction(testrun) ⇒
object
|undefined
- .cleanDeprecatedStorage()
- .speichernHighlight()
- .save(opts)
- .resetStorage()
- .puffer :
- .toolbar :
object
- .general :
Array
- .einrichtung :
Array
- .netzwerk :
Array
- .user :
Array
- .toolbox :
Array
- .createTools(elem)
- .bookmark_drag_start_veranst(event)
- .bookmark_drag_start_toolbox(event)
- .bookmark_drag_move_veranst(event)
- .bookmark_drag_move_toolbox(event)
- .bookmark_drag_new(event)
- .bookmark_drop_move_veranst(event)
- .bookmark_drop_move_toolbox(event)
- .bookmark_drop_new_veranst(event)
- .bookmark_drop_new_toolbox(event)
- .newToolbarBookmark(link, title, veranst)
- .newToolboxBookmark(link, title, group)
- .editBookmark(bookmark, additionalObj, callback)
- .mergeFunction(origArray, addedArray) ⇒
Array
- .create(veranst)
- .createToolbox(veranst)
- ~arrayBookmarks(array, toolbox) ⇒
string
- ~arrayBookmarks(array, toolbox) ⇒
- .general :
- .sidebar :
object
- .settings :
object
- .infothek :
object
- .listen :
object
- .listoptionen :
object
- .create() ⇒
Promise
- .parseSubmenu(submenu, prevFile, prevId, prevPath, promiseChain) ⇒
object
- .createInfothekPane(options) ⇒
string
- .createIntern()
- .toListjsObject(beforeObj, panelid, additionalobj) ⇒
object
- .getFilterOptions(filtertype, liste) ⇒
string
- .getFilterOptionsForTaxonomy(model) ⇒
string
- .updateListen(bildungseinrichtung, language)
- .infothekListenFilterInit(element)
- .getFiltervalues(element) ⇒
Array
- .updateFilterBreadcrumbs(element, filtervalues)
- .changeBildungseinrichtung(bildung)
- .ensureShowingOfItem(target)
- .listen :
- .core :
object
- .createCommunity()
- .createLernportalBildungseinrichtungen()
- .openTerminDialog(prevTermin, callback)
- ~updateCount()
- ~newRow(termin) ⇒
string
- ~checkWeekday(day) ⇒
boolean
- ~updateCountRow()
- ~checkWeekday(day) ⇒
- .datesToArray(termine) ⇒
Array
- .datesToOutput(termine) ⇒
Array
- .datesToHtmlRows(termine, leaveSpaceForButton) ⇒
string
- .datesToHtmlTable(termine, withoutCountComplete) ⇒
string
- .datesToPdf(termin, layout) ⇒
Array
- ~objectToText(obj) ⇒
string
- ~objectToText(obj) ⇒
- .oldDateToDates(date) ⇒
Array
- .oldTerminToDates(rhythmus, termine) ⇒
Array
- .calcDatesCount(dates) ⇒
number
- .findDateInDates(dates, date, id) ⇒
object
- .findDateDuplicateId(terminid, veranst) ⇒
number
- .decipherTaxonomyLevel(level, dim, standard, veranst) ⇒
string
- .defaultTaxonomy(standard) ⇒
Array.<Array.<string>>
|Array.<string>
|string
- .getTaxonomy(taxmodell, veranst) ⇒
object
- .getTaxonomyDimension(dim, taxmodell, veranst) ⇒
object
- .getTaxonomyLevels(level, dim, taxmodell, veranst) ⇒
object
- .newVerId() ⇒
string
- .newVeranstaltung() ⇒
object
- .newVeranstaltungTermin() ⇒
object
- .newVeranstaltungTerminPhase() ⇒
object
- .changeBildungseinrichtung(bildungseinrichtung, veranst)
- .changeLanguage(language, veranst)
- .translate(langkey, language, veranst) ⇒
string
- .translateAll(language, veranst, elem)
- .newMaterial(defaultValues, callback)
- .editMaterial(materialId, callback)
- .showMaterial(materialId)
- .getLicenses(additionalLicenses) ⇒
Array
- .createBreadcrumb(target)
- ~sidebarLink(link) ⇒
string
- ~sidebarLink(link) ⇒
- .createKacheln(elem)
- .getComputedData(data, bildungseinrichtung, language) ⇒
object
- .init(ohneStorage)
- .reset()
- .updatePlaner(terminkey, lehreinheitkey, reloadSelect, veranst)
- .updateOverview(veranst)
- .updateTermine(terminkey, lehreinhkey, reloadSelect, veranst)
- .updateKompetenzen(veranst)
- .createSettings(veranst)
- .createMaterials()
- .materialsInit(listContainer)
- ~makeItem(item) ⇒
string
- ~makeItem(item) ⇒
- .materialsFilterUpdate()
- .materialsListBreadcrumbs()
- .createTags()
- .tagsDialog(presetFilter)
- .updateTags()
- .updateTagSelects()
- .updateTaxonomy(veranst)
- .updateButtonsTaxonomy(element, veranst)
- .updateRahmenbedingungen(veranst)
- .createSelectTaxonomie(element, veranst)
- .createVerbs(element, veranst)
- ~btngroup(level, dimension) ⇒
string
- ~btngroup(level, dimension) ⇒
- .createProgressBarTaxonomy(element, altTax, veranst)
- .createProgressBarLernstand(element, veranst)
- .createProgressBarStatus(element, veranst)
- .createTableKompetenzen(element, veranst)
- .checkTerminplanung(veranst) ⇒
boolean
- .checkVeranstaltung(veranst) ⇒
boolean
- .fixDates(rahmen) ⇒
number
- .highestTaxonomyReached(veranst) ⇒
number
- .highestTaxonomyReachedDate(date, veranst) ⇒
number
- .countTaxonomyDateBadge(taxonomy, date, veranst) ⇒
number
- .countTaxonomyOverviewBadge(taxonomy, veranst) ⇒
number
- .gesamtLehreinheit(veranst) ⇒
number
- .dateNumbering(terminid, veranst) ⇒
number
- .createNavTermin(element, activetermin, veranst)
- .createNavReflexTermin(element, terminkey, veranst)
- .navwidth(navtype) ⇒
number
- .navScroll(nav, key, dontTrigger)
- .updateTabsTermin(element, activetermin, activephase, reloadSelect, veranst)
- .checkOrder(lehreinh) ⇒
object
- .updatePhaseRowOrder(element, termin, lehreinh, veranst)
- .checkSubcontentOrder(subcontent, row) ⇒
object
- .updateSubContentOrder(element, termin, lehreinh, row, veranst)
- .makeCKEditorForActive(termin, lehreinheit, veranst)
- .createPaneLehreinh(element, terminindex, lehreinhindex, veranst)
- .createTabReflex(element, terminkey, veranst)
- .createOverviewRahmenbedingungen(veranst)
- .createOverviewKompetenzen(veranst)
- .createOverviewTerminplanung(veranst)
- .createPDF(options, callback, veranst)
- .createPDFCollection(options, callback, altCollection)
- .createDoc(options, callback, veranst)
- .saveVeranstaltung(veranst, defaultName)
- .saveCollection(collection, defaultName)
- .checkChildrenCheckboxType1(elem)
- .checkChildrenCheckboxType2(elem)
- .deleteVeranst(veranstId)
- .selectVeranst(veranstId, stay)
- .deselectVeranst()
- .createVeranst(opts)
- .editVeranst(veranst)
- .veranstChangeDates(newDates, veranst)
- .createCollection()
- .getVeranstaltungTitle(veranst, defaultName) ⇒
string
- .getVeranstaltungTitleFull(veranst) ⇒
string
- .calendar :
object
- .$ :
object
- .fillCollections(element)
- .$ :
- .resources :
eLP.resources : object
Object of the currently loaded Resources
Kind: static property of eLP
Example
eLP.resources = {
bildungseinrichtung_versions: {...},
bildungseinrichtungen: {...},
kompetenzen: [...],
languageKeys: {...},
methoden: [...],
oer: [...],
pruefungsmethoden: [...],
taxonomy: {...},
technik: [...],
veranstaltungstypen: [...],
versions: {...},
webapplikationen: [...]
}
eLP.config : object
eLP-Config Object
Kind: static property of eLP
- .config :
object
- .type :
string
- .svgzoom :
number
- .ckeditor4 :
string
- .resizepolyfill :
boolean
- .portfolio_name :
string
- .bildungseinrichtung :
string
- .bildungseinrichtung_selection :
boolean
- .language :
string
- .tools :
Array
- .datetypes :
Array.<string>
- .phasetypes :
Array.<string>
- .kompetenzen_array
- .type :
config.type : string
Loaded Version of eLP, corresponding to an .html-file
eLP.config.type === 'index' || 'lehrportal' || 'lernportal'
Kind: static property of config
config.svgzoom : number
Zoom in on SVGs when converting them to PNGs
Kind: static property of config
Default: 4
config.ckeditor4 : string
Path to the config-file for CKEditor4, relative from 'Resources/packages/ckeditor4/ckeditor.js'
Kind: static property of config
Default: "'../../Resources/Js/ckeditor4-config.js'"
config.resizepolyfill : boolean
If true, use interact-js to polyfill a resizer for textareas, either if default css-resize is not supported by the browser or if touch-interaction is detected (as the default css-resize doesn't support touch-interactions)
Kind: static property of config
Default: false, not finished testing
config.portfolio_name : string
Name of the loaded portfolio
Kind: static property of config
Default: "''"
config.bildungseinrichtung : string
Selected Bildungseinrichtung
'-1' for unselected
Kind: static property of config
Default: "'-1'"
config.bildungseinrichtung_selection : boolean
Configuration if bildungseinrichtung-selection in veranstaltung-tab is shown
Kind: static property of config
Default: true
config.language : string
Selected language
Currently supported: 'de' || 'en'
French in development
Kind: static property of config
Default: "'de'"
config.tools : Array
Loaded tools
Intended for automatic generation of the navigation, API unstable
Kind: static property of config
config.datetypes : Array.<string>
Custom date-types
Kind: static property of config
Default: empty Array
config.phasetypes : Array.<string>
Custom phase-types
Kind: static property of config
Default: empty Array
config.kompetenzen_array
TODO: Description
Kind: static property of config
eLP.collections : Array
Array of the Collections of Veranstaltungen
Kind: static property of eLP
Example
eLP.collections[0] = {
name: 'Name of the Collection',
veranstaltungen: [ 'ei18' ] // veranstaltungs-ids
}
eLP.queries : object
Object of often used media-queries
Kind: static property of eLP
- .queries :
object
- .phone :
object
- .tablet :
object
- .desktopSmall :
object
- .desktopBig :
object
- .touch :
object
- .orientation :
object
- .phone :
queries.phone : object
Media-Query for phones: Width under 767px
Kind: static property of queries
queries.tablet : object
Media-Query for Tablets: Width between 768px and 991px
Kind: static property of queries
queries.desktopSmall : object
Media-Query for Small Desktop-View: Width between 992px and 1199px
Kind: static property of queries
queries.desktopBig : object
Media-Query for the widest View: Width greater than 1200px
Kind: static property of queries
queries.touch : object
Media-Query for touch-devices
Kind: static property of queries
queries.orientation : object
Media-Query for current orientation, if applying = portrait
Kind: static property of queries
eLP.veranstaltungen : Array
Array with all loaded [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}
Kind: static property of eLP
eLP.utils : object
Namespace for utility functions
Kind: static namespace of eLP
- .utils :
object
- .getPngDimensions ⇒
object
- .bowser :
object
- .loaderVisible :
number
- .sortName(a, b) ⇒
number
- .makeBool(variable) ⇒
boolean
- .nullCoal(...expressions) ⇒
*
- .btoaWrapper(string) ⇒
string
- .atobWrapper(string) ⇒
string
- .decodeHtmlEntities(html) ⇒
string
- .byString(o, s) ⇒
*
- .isObject(obj) ⇒
boolean
- .isDOM(obj) ⇒
boolean
- .findByIdShallow(o, id) ⇒
string
|number
|undefined
- .findIndexByIdShallow(o, id) ⇒
string
|number
|undefined
- .findById(o, id) ⇒
object
|number
- .showClosestTabsCollapse(target, container, nav) ⇒
boolean
- .newerVersion(now, test) ⇒
boolean
- .testIfCORSViolation(url, editor)
- .imageURLtoBase64(url) ⇒
Promise.<string>
- .SVGtoPNG(svg) ⇒
string
- .SVGtoPNGdefer(svg) ⇒
Promise.<string>
- .convertHtmlToPdf(html, images) ⇒
object
- .hslToHex(h, s, l) ⇒
string
- .hexToRGB(h) ⇒
string
- .rgbToHex(rgb) ⇒
string
- .defer() ⇒
Promise
- .makeCKEditor(elem, config, startValue, forceRecreate)
- .makeFlatpickr(element, config) ⇒
object
|null
- .removeFlatpickr(element, keepNative)
- .fixCKEBlur()
- .objectToHtml(obj) ⇒
string
- .objectToLink(obj) ⇒
string
- .objectToElement(obj) ⇒
string
- .literatureObjectToReference(obj) ⇒
string
- .testReadonlySome(obj) ⇒
boolean
- .templatePreserve(data) ⇒
string
|object
- .getListSortWithFilterBound(listObj) ⇒
function
- .formToDates(data, ids) ⇒
Array
- .serialize(elements) ⇒
object
- .isInArray(x, array) ⇒
boolean
- .outputPhase(lehreinheit, termin, veranst) ⇒
string
- .readJsonFile(file) ⇒
object
- .readMarkdownFile(file) ⇒
Promise.<*>
- .updateResources(language, bildungseinrichtung, veranstSet, prevBildung) ⇒
number
- .dragStartPhaseRow(event)
- .dragEnterPhaseRow(event)
- .dragOverPhaseRow(event)
- .dragEndPhaseRow(event)
- .dropPhaseRow(event)
- .phaseRowOrderUp()
- .phaseRowOrderDown()
- .rowClose()
- .dragStartSubContent(event)
- .dragEnterSubContent(event)
- .dragOverSubContent(event)
- .dragEndSubContent(event)
- .dropSubContent(event)
- .subContentOrderUp()
- .subContentOrderDown()
- .subcontentRowClose()
- .dragStartVeranstaltung(event)
- .dragEnterVeranstaltung(event)
- .dragOverVeranstaltung(event)
- .dragEndVeranstaltung()
- .dropVeranstaltung(event)
- .dragStartCollection(event)
- .dragEnterCollection(event)
- .dragOverCollection(event)
- .dragEndCollection(event)
- .dropCollection(event)
- .dragStartTermin(event)
- .dragEnterTermin(event)
- .dragOverTermin(event)
- .dragEndTermin(event)
- .dropTermin(event)
- .dragStartReflex(event)
- .dragEnterReflex(event)
- .dragOverReflex(event)
- .dragEndReflex(event)
- .dropReflex(event)
- .dragStartPhase(event)
- .dragEnterPhase(event)
- .dragOverPhase(event)
- .dragEndPhase(event)
- .dropPhase(event)
- .loaderShow()
- .loaderHide()
- .phoneResizeHandler()
- .resizeHandlerPolyfill(element)
- .getPngDimensions ⇒
utils.getPngDimensions ⇒ object
Parse png-dimension out of dataURL (can't wait for asynchronous in parseHtml)
Kind: static property of utils
Returns: object
- Object with Object.width and Object.height being Integer of width/height
Param | Type | Description |
---|---|---|
dataURL | string | DataURL of png-image to parse |
utils.bowser : object
Object of bowser parsing current userAgent at pageload
Kind: static property of utils
utils.loaderVisible : number
How many often eLP.utils.loaderShow has been called MORE than eLP.utils.loaderHide Start at 1 as loader is visible per default (while JS is loading)
Kind: static property of utils
utils.sortName(a, b) ⇒ number
Sort-Function for Arrays of Objects, sorting elements with .children to the top, otherwise sorting by .name
Kind: static method of utils
Returns: number
- Number following sort-convention to indicate sorting of a and b
Param | Type | Description |
---|---|---|
a | object | Object A to sort |
b | object | Object B to sort |
utils.makeBool(variable) ⇒ boolean
Parse Value as boolean
Only the boolean or string 'true' return true, otherwise return false
Kind: static method of utils
Returns: boolean
- Return-Value
Param | Type | Description |
---|---|---|
variable | * | Variable to parse |
utils.nullCoal(...expressions) ⇒ *
utility function for the nullish coallescing operator
Kind: static method of utils
Returns: *
- first expression that satisfies != null
Param | Type | Description |
---|---|---|
...expressions | * | Expressions to check |
utils.btoaWrapper(string) ⇒ string
Wrapper for btoa, unescape and encodeURI to enable btoa to extend btoa to UTF
Kind: static method of utils
Returns: string
- Base64-encoded ASCII string
Param | Type | Description |
---|---|---|
string | string | binary string |
utils.atobWrapper(string) ⇒ string
Wrapper for atob, escape and decodeURI to enable atob to extend btoa to UTF
Kind: static method of utils
Returns: string
- binary string
Param | Type | Description |
---|---|---|
string | string | Base64-encoded ASCII string |
utils.decodeHtmlEntities(html) ⇒ string
Decode HTML-Entities, necessary for vex-js
Browser-Hack, use plugin "he" if cross-browser standard-conform is necessary
Kind: static method of utils
Returns: string
- Decoded String
Param | Type | Description |
---|---|---|
html | string | String including the html-entity |
utils.byString(o, s) ⇒ *
Parse the path as string inside an object
Kind: static method of utils
Returns: *
- Value at specified path
Param | Type | Description |
---|---|---|
o | object | Object in which to look the path up |
s | string | Path to look up |
utils.isObject(obj) ⇒ boolean
Test if value is an Object
Kind: static method of utils
Returns: boolean
- Truthy if obj is Object
Param | Type | Description |
---|---|---|
obj | * | Value to test |
utils.isDOM(obj) ⇒ boolean
Test if value is an HTML Object, relies on duck-typing for property nodeType
Kind: static method of utils
Returns: boolean
- True when DOM Element
Param | Type | Description |
---|---|---|
obj | * | Value to test |
utils.findByIdShallow(o, id) ⇒ string
| number
| undefined
In an Object, find the Object with the specified 'id' and return the key
Kind: static method of utils
Returns: string
| number
| undefined
- Key of found Object or undefined
Param | Type | Description |
---|---|---|
o | object | Object to search in |
id | * | Id to find |
Example
eLP.utils.findByIdShallow({
1: { id: 1 },
2: { id: 3 }
}, 3) // == 2
utils.findIndexByIdShallow(o, id) ⇒ string
| number
| undefined
In an Object, find the Object with the specified 'id' and return the key
Kind: static method of utils
Returns: string
| number
| undefined
- Key of found Object or undefined
Param | Type | Description |
---|---|---|
o | object | Object to search in |
id | * | Id to find |
Example
eLP.utils.findByIdShallow({
1: { id: 1 },
2: { id: 3 }
}, 3) // == 2
utils.findById(o, id) ⇒ object
| number
In an Object, find deep through children-objects and return the Object with the specified 'id'
Kind: static method of utils
Returns: object
| number
- Found Object or 0
Throws:
- 'No result for id in o'
Param | Type | Description |
---|---|---|
o | object | Object to search in |
id | * | Id to find |
utils.showClosestTabsCollapse(target, container, nav) ⇒ boolean
Look for closest tabs and collapse including itself to given id and show each
Kind: static method of utils
Returns: boolean
- If true, failed
Param | Type | Description |
---|---|---|
target | string | ID of element to show |
container | object | DOM-Element of container to look for links in |
nav | object | DOM-Element of the navigation aka container of tab-elements, if existing |
utils.newerVersion(now, test) ⇒ boolean
Test two version-Strings if the second is newer
Kind: static method of utils
Returns: boolean
- True if test is newer, else false
Param | Type | Description |
---|---|---|
now | string | Previous Version String |
test | string | Version String to test |
utils.testIfCORSViolation(url, editor)
Test if image accessible without CORS-Violation, if not show Notification in CKEditor4
Kind: static method of utils
Param | Type | Description |
---|---|---|
url | string | URL of image to test |
editor | object | CKEditor4-Instance to show the notificatio in |
utils.imageURLtoBase64(url) ⇒ Promise.<string>
Load image URL and convert it to Base64
Try to ensure compatibility with PDF and docx
Kind: static method of utils
Returns: Promise.<string>
- Promise that resolves to the Base64-String
Param | Type | Description |
---|---|---|
url | string | Image-URL |
utils.SVGtoPNG(svg) ⇒ string
Convert SVG to PNG (Base64-String), synchronous Consider as deprecated, should be transitioned to asynchronous and using native browser
Kind: static method of utils
Returns: string
- Base64-DataURL String of PNG
Param | Type | Description |
---|---|---|
svg | string | SVG-String |
utils.SVGtoPNGdefer(svg) ⇒ Promise.<string>
Convert SVG to PNG (Base64-String), asynchronous, unused but potential fallback if canvg-library has issues
Kind: static method of utils
Returns: Promise.<string>
- Base64-DataURL String of PNG
Param | Type | Description |
---|---|---|
svg | string | SVG-String |
utils.convertHtmlToPdf(html, images) ⇒ object
Convert HTML to Object in pdfmake-format Heavily influenced by OpenSlides, https://github.com/OpenSlides/OpenSlides For native support of pdfmake or standarized plugin to use instead, follow https://github.com/bpampuch/pdfmake/issues/205
Kind: static method of utils
Returns: object
- Object in the pdfmake-format
Param | Type | Description |
---|---|---|
html | string | HTML-String that is supposed to be converted |
images | Array.<string> | Array of Data64 of images to load, correct key is the src-attribute |
utils.hslToHex(h, s, l) ⇒ string
Convert Color in HSL-format to Hex-format inspired by https://stackoverflow.com/a/44134328
Kind: static method of utils
Returns: string
- HEX-value with leading '#'
Param | Type | Description |
---|---|---|
h | number | hue, angle |
s | number | saturation, percentage |
l | number | lightness, percentage |
utils.hexToRGB(h) ⇒ string
Convert Color in Hex-format to RGB-format (hexadecimal to decimal) copied from https://css-tricks.com/converting-color-spaces-in-javascript/
Kind: static method of utils
Returns: string
- rgb values as string, without the function (so it can be put into both rgb and rgba)
Param | Type | Description |
---|---|---|
h | string | hexadecimal color-string |
utils.rgbToHex(rgb) ⇒ string
Convert Color in RGB-format to Hex-format (decimal to hexadecimal) inspired by hexToRGB
Kind: static method of utils
Returns: string
- hexadecimal-color, starting with '#'
Param | Type | Description |
---|---|---|
rgb | string | rgb color-string |
utils.defer() ⇒ Promise
Make Promise which is resolvable from the outside
Kind: static method of utils
Returns: Promise
- Promise with Promise.resolve and Promise.reject the corresponding functions
utils.makeCKEditor(elem, config, startValue, forceRecreate)
Wrapper to handle CKEditor instance creation
If already existing (and not deleted), check:
- if same config, do nothing
- if different config and ready, destroy current instance and create new
- if different config and still creating, delay destroying until finished creating (CKEditor is unhappy with being destroyed while still creating)
- else create new
Kind: static method of utils
Param | Type | Description |
---|---|---|
elem | object | string | jQuery-Selector or node-Element |
config | object | Configuration-Object, for details the CKEditor Documentation: check https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html |
startValue | string | Start-Value for the Editor |
forceRecreate | boolean | Force to recreate even if same config |
utils.makeFlatpickr(element, config) ⇒ object
| null
Wrapper to handle Flatpickr instance creation
Kind: static method of utils
Returns: object
| null
- new flatpickr instance, or null
Param | Type | Description |
---|---|---|
element | object | HTMLElement to create flatpickr at |
config | object | flatpickr-options Object, for details check the flatpickr Documentation: https://flatpickr.js.org/options/ |
utils.removeFlatpickr(element, keepNative)
Destroy flatpickr instance and unbind elp's .flatpickrChange events
Kind: static method of utils
Param | Type | Description |
---|---|---|
element | object | HTMLElement of flatpickr |
keepNative | boolean | Only unbinds .flatpickrChange events, does NOT destroy instance |
utils.fixCKEBlur()
Fix some occasions of CKEditor not triggering expected event and thus loosing last changes: check all editors for unsaved changes To be safe, always cast this before processing data depending on CKEditor input
Kind: static method of utils
utils.objectToHtml(obj) ⇒ string
Convert object in special format to html-String, accepts primitives and Arrays too
- If primitive (number or string), directly casts that to string and returns that
- If Array, convert each element and concatenate the results
- If Object following special Object.template format, proceed from there
- If Object.element, convert with eLP.utils.objectToElement
- If other Object, follow the special community-Object rules
- Else log error in console and return empty string
Kind: static method of utils
Returns: string
- html-String
See: [Tutorial]{@tutorial Spezielle-Formate-ObjectHtml}
Param | Type | Description |
---|---|---|
obj | * | Object in special format to convert to html |
utils.objectToLink(obj) ⇒ string
Convert object to html-String of a link
- If String, use it as href and text
- If Object, put following values on the link-Element:
- id
- class
- rel
- target
- data-toggle
- href
- langkey
Additionally, if obj.langkey, add "translate" as class, get href from obj.url, obj.name or obj.text if not supplied, and the shown text is either the translated obj.langkey or obj.text, obj.name, obj.href or obj.url - passthrough to just append additional HTML directly into the
<a>
-Element
Kind: static method of utils
Returns: string
- html-String of link-Element
Param | Type | Description |
---|---|---|
obj | * | Object or primitive to convert to html-String of link-Element |
utils.objectToElement(obj) ⇒ string
Convert object in special format to html-String, accepts primitives and Arrays too
- If primitive, directly returns that
- If Array, convert each element and concatenate the results
- Otherwise parse to element with following rules:
Parse every Object.keys(obj)-entry as attribute, unless it's a special jQuery function which gets parsed with the value instead
obj.element becomes the element-type
obj.langkey adds class "translate" and changes text to eLP.core.translate(obj.langkey) and gets added as data-langkey
Kind: static method of utils
Returns: string
- html-String
See: [Tutorial]{@tutorial Spezielle-Formate-ObjectElement}
Param | Type | Description |
---|---|---|
obj | * | Object in special format to convert to html |
utils.literatureObjectToReference(obj) ⇒ string
Convert Object in literature-format to reference No official reference-specification applied for now!
Kind: static method of utils
Returns: string
- String of reference
Param | Type | Description |
---|---|---|
obj | object | Object in literature-format |
utils.testReadonlySome(obj) ⇒ boolean
Testfunction evaluating obj.readonly as truthy
Kind: static method of utils
Returns: boolean
- True if obj.readonly is truthy, false otherwise
Param | Type | Description |
---|---|---|
obj | object | Object to test |
utils.templatePreserve(data) ⇒ string
| object
Function for use in select2 as templateSelection/templateResult-option Takes care of translating if data.langkey is truthy and preserves previous html5-data on data.element
Kind: static method of utils
Returns: string
| object
- String or jQuery-Object to be shown as selection/result
Param | Type | Description |
---|---|---|
data | object | data-Object with the select2-data |
utils.getListSortWithFilterBound(listObj) ⇒ function
Get sort-function bound to List-Object that sorts based on additional item-property item.filter, reverts to naturalSort otherwise
Kind: static method of utils
Returns: function
- search-function
Param | Type | Description |
---|---|---|
listObj | object | List-Object |
utils.formToDates(data, ids) ⇒ Array
Parse the vex-date form to the dates format
Kind: static method of utils
Returns: Array
- Values from data in the dates format
Param | Type | Description |
---|---|---|
data | object | Serialized values of the form |
ids | Array.<(number|string)> | Array of the used IDs for the form-rows |
utils.serialize(elements) ⇒ object
Serialize a form to an Object with the Objectkeys equalling the corresponding form-element name
Kind: static method of utils
Returns: object
- Get serialized Object for form-elements
Param | Type | Description |
---|---|---|
elements | * | jQuery-Selector or NodeElement which descendant form-element to serialize |
Example
<div id="form-wrap"><form><input name="test" type="number" value="1234"></form></div>
eLP.utils.serialize('#form-wrap') // { test: 1234 }
utils.isInArray(x, array) ⇒ boolean
Test if x and array are the same or if x is in array, recursively and using non-strict equality (==)
Kind: static method of utils
Returns: boolean
- True when x is equal to array or x is in array, false else
Param | Type | Description |
---|---|---|
x | * | Parameter to find |
array | Array | * | Array to search in or Value to compare with |
utils.outputPhase(lehreinheit, termin, veranst) ⇒ string
Parse phase-type of a phase to human-readable name and append number of occurance
if this phase-type is set multiple times for one date
If lehreinheit.phase is falsy, returns eLP.core.translate('phase')
Kind: static method of utils
Returns: string
- The parsed phase-Type and potentially appended number of occurance
Param | Type | Description |
---|---|---|
lehreinheit | object | Lehreinheit-Object of which the .phase-attribute is to be parsed |
termin | object | undefined | Termin-Object which includes the Lehreinheit-Object |
veranst | object | undefined | Veranstaltungs-Object which includes the Termin-Object with the Lehreinheit-Object only relevant if termin is not set, defaults to currently selected Veranstaltung. If none is selected, number is omitted |
utils.readJsonFile(file) ⇒ object
Read a URL and parse to JSON, using eLP.storage.puffer[file] as buffer To force re-reading without using eLP.storage.puffer, make sure to clear that first
Kind: static method of utils
Returns: object
- deep clone of Object at eLP.storage.puffer[file] or from reading the URL
Param | Type | Description |
---|---|---|
file | string | URL to read and parse as JSON, preferred relative |
utils.readMarkdownFile(file) ⇒ Promise.<*>
Read a URL as text without parsing, using eLP.storage.puffer[file] as buffer To force re-reading without using eLP.storage.puffer, make sure to clear that first WARNING: No check to ensure eLP.storage.puffer[file] is text and not an Object
Kind: static method of utils
Returns: Promise.<*>
- Value at eLP.storage.puffer[file] or from reading the URL as text
Param | Type | Description |
---|---|---|
file | string | URL to read as text, preferred relative |
utils.updateResources(language, bildungseinrichtung, veranstSet, prevBildung) ⇒ number
Update resources according to version-number (Resources/infothek/Data/versions.json or the version.json for bildungseinrichtung), this includes:
- eLP.resources
- eLP.toolbar.general
- eLP.toolbar.netzwerk or veranstaltung.toolbar.netzwerk
- eLP.toolbar.einrichtung or veranstaltung.toolbar.einrichtung where "veranstaltung" is the currently selected veranstaltung (if applicable)
Kind: static method of utils
Returns: number
- Approximate counter of how many resources have been updated
Param | Type | Description |
---|---|---|
language | string | Language to access ('de' |
bildungseinrichtung | string | Selected bildungseinrichtung, defaults to veranstaltung.config.bildungseinrichtung or eLP.config.bildungseinrichtung If the version-number of the "Bildungseinrichtung" is outdated, the elements of the object are reloading. If all ELP-Tabs are closed, all elements are deleted anyways. |
veranstSet | boolean | If truthy, change Resources of the selected Veranstaltung, else change Resources for portfolio. The influence is only for the reloading of the toolbar. Defaults to true if a Veranstaltung is selected, false otherwise |
prevBildung | string | If set to bildungseinrichtung, reset all bildungseinrichtung-specific settings which aren't set by bildungseinrichtung to default |
updateResources~execChange(item)
Set up changes to item based on change of bildungseinrichtung
Change itself is performed afterward
Kind: inner method of updateResources
Param | Type | Description |
---|---|---|
item | string | key to change |
utils.dragStartPhaseRow(event)
Function for use in the drag&drop API at the dragStart-event on PhaseRow Custom data in dataTransfer: dragged rowtype as 'elp-row' Effect allowed: 'move'
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEnterPhaseRow(event)
Function for use in the drag&drop API at the dragEnter-event on PhaseRow
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragOverPhaseRow(event)
Function for use in the drag&drop API at the dragOver-event on PhaseRow
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEndPhaseRow(event)
Function for use in the drag&drop API at the dragEnd-event on PhaseRow
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dropPhaseRow(event)
Function for use in the drag&drop API at the drop-event on PhaseRow
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.phaseRowOrderUp()
Function for use at a click-event, the clicked PhaseRow is sorted one earlier in the current PhaseRow-Order Calls eLP.core.updatePhaseRowOrder
Kind: static method of utils
utils.phaseRowOrderDown()
Function for use at a click-event, the clicked PhaseRow is sorted one later in the current PhaseRow-Order Calls eLP.core.updatePhaseRowOrder
Kind: static method of utils
utils.rowClose()
Function for use as an click-event to unselect a materialien-row from PhaseRow
Kind: static method of utils
utils.dragStartSubContent(event)
Function for use in the drag&drop API at the dragStart-event on SubContent Custom data in dataTransfer: dragged subcontent as 'elp-subcontent' dragged rowtype as 'elp-rowtype' Effect allowed: 'move'
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEnterSubContent(event)
Function for use in the drag&drop API at the dragEnter-event on SubContent
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragOverSubContent(event)
Function for use in the drag&drop API at the dragOver-event on SubContent
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEndSubContent(event)
Function for use in the drag&drop API at the dragEnd-event on SubContent
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dropSubContent(event)
Function for use in the drag&drop API at the drop-event on SubContent
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.subContentOrderUp()
Function for use at a click-event, the clicked SubContent is sorted one earlier in the current SubContent-Order Calls eLP.core.updateSubContentOrder
Kind: static method of utils
utils.subContentOrderDown()
Function for use at a click-event, the clicked SubContent is sorted one later in the current SubContent-Order Calls eLP.core.updateSubContentOrder
Kind: static method of utils
utils.subcontentRowClose()
Function for use as an click-event to unselect a materialien-row from SubContent
Kind: static method of utils
utils.dragStartVeranstaltung(event)
Function for use in the drag&drop API at the dragStart-event on veranstaltung Custom data in dataTransfer: dragged veranstaltung as 'elp-veranstaltung' Custom data in dataTransfer: dragged collection as 'elp-ver-collection' Effect allowed: 'move'
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEnterVeranstaltung(event)
Function for use in the drag&drop API at the dragEnter-event on veranstaltung
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragOverVeranstaltung(event)
Function for use in the drag&drop API at the dragOver-event on veranstaltung
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEndVeranstaltung()
Function for use in the drag&drop API at the dragEnd-event on veranstaltung
Kind: static method of utils
utils.dropVeranstaltung(event)
Function for use in the drag&drop API at the drop-event on veranstaltung
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragStartCollection(event)
Function for use in the drag&drop API at the dragStart-event on collection Custom data in dataTransfer: dragged collection as 'elp-collection' Effect allowed: 'move'
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEnterCollection(event)
Function for use in the drag&drop API at the dragEnter-event on collection
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragOverCollection(event)
Function for use in the drag&drop API at the dragOver-event on collection
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEndCollection(event)
Function for use in the drag&drop API at the dragEnd-event on collection
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dropCollection(event)
Function for use in the drag&drop API at the drop-event on collection
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragStartTermin(event)
Function for use in the drag&drop API at the dragStart-event on dates Custom data in dataTransfer: dragged date as 'elp-termin' Effect allowed: 'move'
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEnterTermin(event)
Function for use in the drag&drop API at the dragEnter-event on dates
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragOverTermin(event)
Function for use in the drag&drop API at the dragOver-event on dates
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEndTermin(event)
Function for use in the drag&drop API at the dragEnd-event on dates
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dropTermin(event)
Function for use in the drag&drop API at the drop-event on dates
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragStartReflex(event)
Function for use in the drag&drop API at the dragStart-event on reflex-dates Custom data in dataTransfer: dragged date as 'elp-reflex' Effect allowed: 'move'
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEnterReflex(event)
Function for use in the drag&drop API at the dragEnter-event on dates
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragOverReflex(event)
Function for use in the drag&drop API at the dragOver-event on dates
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEndReflex(event)
Function for use in the drag&drop API at the dragEnd-event on dates
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dropReflex(event)
Function for use in the drag&drop API at the drop-event on dates
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragStartPhase(event)
Function for use in the drag&drop API at the dragStart-event on phases Custom data in dataTransfer: dragged phase as 'elp-phase' Effect allowed: 'move'
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEnterPhase(event)
Function for use in the drag&drop API at the dragEnter-event on phases
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragOverPhase(event)
Function for use in the drag&drop API at the dragOver-event on phases
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dragEndPhase(event)
Function for use in the drag&drop API at the dragEnd-event on phases
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.dropPhase(event)
Function for use in the drag&drop API at the drop-event on phases
Kind: static method of utils
Param | Type | Description |
---|---|---|
event | object | Event-Object |
utils.loaderShow()
Show loader
Kind: static method of utils
utils.loaderHide()
Hide loader
Kind: static method of utils
utils.phoneResizeHandler()
Handler for when the site is resized to/from smallest/phone width Mostly visuals, disables infothek
Kind: static method of utils
utils.resizeHandlerPolyfill(element)
Polyfill to resize textarea if browser doesn't support it natively AND enabling resizing with touch
Kind: static method of utils
Param | Type | Description |
---|---|---|
element | object | NodeElement, parent of textarea-Element and element with class 'resize-polyfill-grapper' to use as grabber |
eLP.storage : object
storage-related Namespace, e.g. saving to disk or to localStorage
Kind: static namespace of eLP
- .storage :
object
- .puffer :
object
- .storageSaving :
number
- .menuSaving :
number
- .storageFunction()
- .loadStorageFunction(testrun) ⇒
object
|undefined
- .cleanDeprecatedStorage()
- .speichernHighlight()
- .save(opts)
- .resetStorage()
- .puffer :
storage.puffer : object
Buffer for loaded files, intended for the loading-process only
Content is stored under the key of their file-path
Kind: static property of storage
storage.storageSaving : number
intervalID of the timer saving current portfolio in storage with eLP.storage.storageFunction() every 5 minutes
Kind: static property of storage
storage.menuSaving : number
intervalID of the timer highlighting the save-Icon with eLP.storage.speichernHighlight() every 5 minutes
Kind: static property of storage
storage.storageFunction()
Store current portfolio in localStorage, key is equal to eLP.config.type
Kind: static method of storage
storage.loadStorageFunction(testrun) ⇒ object
| undefined
Load current portfolio from localStorage, key is equal to eLP.config.type
Kind: static method of storage
Returns: object
| undefined
- Return localStorage[eLP.config.type] if testrun
Param | Type | Description |
---|---|---|
testrun | boolean | if truthy, return localStorage[eLP.config.type] without changing anything |
storage.cleanDeprecatedStorage()
Clean localStorage from deprecated keys used in old versions of eLP
Kind: static method of storage
storage.speichernHighlight()
Function highlighting the save-Icon, for automatic use
Kind: static method of storage
storage.save(opts)
Save portfolio or collection browser-handling depends on browser-settings, usually either opens save-dialog or saves at default download-location
Kind: static method of storage
Param | Type | Description |
---|---|---|
opts | object | Object with options |
opts.type | string | Download-type, either 'portfolio' or 'collection', defaults to 'portfolio' |
opts.collectionid | string | If saving a collection, specifies the collection to save |
opts.callback | function | Callback-function to call after saving |
storage.resetStorage()
Reset localStorage and reload page, to use at encountering errors with storage
Kind: static method of storage
eLP.toolbar : object
toolbar- and toolbox-related Namespace
Kind: static namespace of eLP
- .toolbar :
object
- .general :
Array
- .einrichtung :
Array
- .netzwerk :
Array
- .user :
Array
- .toolbox :
Array
- .createTools(elem)
- .bookmark_drag_start_veranst(event)
- .bookmark_drag_start_toolbox(event)
- .bookmark_drag_move_veranst(event)
- .bookmark_drag_move_toolbox(event)
- .bookmark_drag_new(event)
- .bookmark_drop_move_veranst(event)
- .bookmark_drop_move_toolbox(event)
- .bookmark_drop_new_veranst(event)
- .bookmark_drop_new_toolbox(event)
- .newToolbarBookmark(link, title, veranst)
- .newToolboxBookmark(link, title, group)
- .editBookmark(bookmark, additionalObj, callback)
- .mergeFunction(origArray, addedArray) ⇒
Array
- .create(veranst)
- .createToolbox(veranst)
- ~arrayBookmarks(array, toolbox) ⇒
string
- ~arrayBookmarks(array, toolbox) ⇒
- .general :
toolbar.general : Array
Array of general links
Kind: static property of toolbar
Example
eLP.toolbar[0] = {
// displayed name
name: 'ELP-Chat',
// src-link to the displayed icon
src: 'Resources/ELP_media/picture/elp_chat.png',
// actual link
link: 'https://elp-community.uni-wuppertal.de'
}
Example
eLP.toolbar[1] = {
name: 'ELP-Tutorial',
// classes which display an icon, mostly from fontawesome
icon: 'fa-file-video-o fa-lg',
link: 'http://dl.medienlabor.uni-wuppertal.de/zim4learners/elp/index.html'
}
toolbar.einrichtung : Array
Array of Toolbar-Links from selected einrichtung
Kind: static property of toolbar
See: general for the syntax of link-Objects
toolbar.netzwerk : Array
Array of Toolbar-Links for netzwerk-apps which the selected einrichtung is part of
Kind: static property of toolbar
See: general for the syntax of link-Objects
toolbar.user : Array
Array of Toolbar-Links for user-apps
Kind: static property of toolbar
See: general for the syntax of link-Objects
toolbar.toolbox : Array
Array of Links saved in the Toolbox Is named Toolbar now and you can find it under Dashboard.
Kind: static property of toolbar
See: general for the syntax of link-Objects
toolbar.createTools(elem)
Create the tools-column in the toolbar
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
elem | object | string | jQuery-Selector or node-Element |
toolbar.bookmark_drag_start_veranst(event)
Function for use in the drag&drop API at the dragStart-event on bookmarks in the toolbar
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
event | object | Event-Object |
toolbar.bookmark_drag_start_toolbox(event)
Function for use in the drag&drop API at the dragStart-event on bookmarks in the toolbox
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
event | object | Event-Object |
toolbar.bookmark_drag_move_veranst(event)
Function for use in the drag&drop API at the dragMove-event on bookmarks in the toolbar
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
event | object | Event-Object |
toolbar.bookmark_drag_move_toolbox(event)
Function for use in the drag&drop API at the dragMove-event on bookmarks in the toolbox
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
event | object | Event-Object |
toolbar.bookmark_drag_new(event)
Function for use in the drag&drop API at the dragEnter-event and dragOver-event on bookmarks in the toolbar/toolbox
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
event | object | Event-Object |
toolbar.bookmark_drop_move_veranst(event)
Function for use in the drag&drop API at the drop-event on bookmarks in the toolbar, moving bookmark which is already part of the toolbar
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
event | object | Event-Object |
toolbar.bookmark_drop_move_toolbox(event)
Function for use in the drag&drop API at the drop-event on bookmarks in the toolbox, moving bookmark which is already part of the toolbox
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
event | object | Event-Object |
toolbar.bookmark_drop_new_veranst(event)
Function for use in the drag&drop API at the drop-event on bookmarks in the toolbar, creating new bookmark
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
event | object | Event-Object |
toolbar.bookmark_drop_new_toolbox(event)
Function for use in the drag&drop API at the drop-event on bookmarks in the toolbox, creating new bookmark
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
event | object | Event-Object |
toolbar.newToolbarBookmark(link, title, veranst)
Open Dialog to create new Bookmark in toolbar
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
link | string | Pre-entered value for the link |
title | string | Pre-entered value for the title |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} for which the new bookmark is created, defaults to currently selected Veranstaltung-Object |
toolbar.newToolboxBookmark(link, title, group)
Open Dialog to create new Bookmark in toolbox
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
link | string | Pre-entered value for the link |
title | string | Pre-entered value for the title |
group | number | Index of group in which to insert the new Bookmark, defaults to 0 |
toolbar.editBookmark(bookmark, additionalObj, callback)
Open Dialog to change existing Bookmark in toolbar
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
bookmark | object | Bookmark-Object as used in toolbar and toolbox |
bookmark.title | string | Previous title of the bookmark |
bookmark.link | string | Previous link of the bookmark |
additionalObj | object | additional info |
additionalObj.type | string | type of bookmark, used for updating eLP.config.tags; 'toolbar' |
additionalObj.group | number | group-index if additionalObj.type == 'toolbox' |
additionalObj.elpid | string | id of veranstaltung if additionalObj.type == 'veranstToolbar' |
additionalObj.bookmark | number | index of bookmark |
callback | function | Callback-function to execute after dialog is closed |
toolbar.mergeFunction(origArray, addedArray) ⇒ Array
Special way of merging two arrays, elements with same arguments name and link will be left intact, other new elements will be added, other old elements will be removed To be used for using the new array but leaving changes (e.g. hide-settings) intact
Kind: static method of toolbar
Returns: Array
- Altered array, generally the same as origArray
Param | Type | Description |
---|---|---|
origArray | Array | * | Array to merge onto, if not an array will be used as first element in new array |
addedArray | Array | * | Array to merge into origArray, if not an array will be used as first element in new array |
toolbar.create(veranst)
Create/update toolbar
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to use toolbar-links and the selected bildungseinrichtung of, defaults to currently selected Veranstaltung-Object, otherwise to eLP.toolbar and eLP.config.bildungseinrichtung |
toolbar.createToolbox(veranst)
Create and update the toolbox-view
Kind: static method of toolbar
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the view to, defaults to currently selected Veranstaltung-Object |
createToolbox~arrayBookmarks(array, toolbox) ⇒ string
Create HTML-String for carousel-items
Kind: inner method of createToolbox
Returns: string
- HTML-String
Param | Type | Description |
---|---|---|
array | Array | Array to make carousel-items |
toolbox | boolean | If true, prepare for toolbox-HTML, if false prepare for Veranstaltung-Links-HTML |
eLP.sidebar : object
Namespace for the sidebar "ELP entdecken"
Kind: static namespace of eLP
sidebar.discoverChange(boolean)
Hide/Show buttons to show sidebar, changing eLP.config.discover If hiding and sidebar is open, hide sidebar
Kind: static method of sidebar
Param | Type | Description |
---|---|---|
boolean | boolean | Value to use and set eLP.config.discover to, defaults to eLP.config.discover |
sidebar.create()
Create a sidebar, removing a previous one if existing
Kind: static method of sidebar
create~createPage(object)
Create a page for the sidebar, output in array "pages", no return-value
Kind: inner method of create
Param | Type | Description |
---|---|---|
object | object | Object with parameters to create Page with |
sidebar.show(targetId)
Change sidebar to a specified subpage, unhiding sidebar and if necessary creating the sidebar via eLP.sidebar.create();
Kind: static method of sidebar
Param | Type | Description |
---|---|---|
targetId | string | If string, the key under which the content can be found in eLP.sidebar If it doesn't find targetId, tries again with 'sidebar-' + targetId or 'sidebar-start' |
eLP.settings : object
Namespace for settings-View
Kind: static namespace of eLP
eLP.infothek : object
infothek-related Namespace
Kind: static namespace of eLP
- .infothek :
object
- .listen :
object
- .listoptionen :
object
- .create() ⇒
Promise
- .parseSubmenu(submenu, prevFile, prevId, prevPath, promiseChain) ⇒
object
- .createInfothekPane(options) ⇒
string
- .createIntern()
- .toListjsObject(beforeObj, panelid, additionalobj) ⇒
object
- .getFilterOptions(filtertype, liste) ⇒
string
- .getFilterOptionsForTaxonomy(model) ⇒
string
- .updateListen(bildungseinrichtung, language)
- .infothekListenFilterInit(element)
- .getFiltervalues(element) ⇒
Array
- .updateFilterBreadcrumbs(element, filtervalues)
- .changeBildungseinrichtung(bildung)
- .ensureShowingOfItem(target)
- .listen :
infothek.listen : object
Object of all (dynamic, listjs) infothek-lists Standard-Lists: -"infothek-activities-methodlist" -"infothek-exams-methods" -"infothek-exams-tasks-questionliste" -"infothek-apps-applist" -"infothek-resources-mediarights-oer-list"
Kind: static property of infothek
infothek.listoptionen : object
Options of the list with same key in eLP.infothek.listen
Kind: static property of infothek
infothek.create() ⇒ Promise
Initialize the infothek, processing infothek/menu.json and building the html, afterwards calling eLP.infothek.createIntern to setup the javascript functionality and dynamic lists
Kind: static method of infothek
Returns: Promise
- Promise to be resolved when infothek-html is build AND eLP.infothek.createIntern is finished
infothek.parseSubmenu(submenu, prevFile, prevId, prevPath, promiseChain) ⇒ object
Parse submenu from menu.json as part of eLP.infothek.create
Kind: static method of infothek
Returns: object
- Object.result = html-String of parsed submenu, Object.promiseChain is new promiseChain-end
Param | Type | Description |
---|---|---|
submenu | Array | Submenu entries |
prevFile | string | Path of previous file |
prevId | string | Id of previous menu/submenu-entry |
prevPath | Array.<string> | Paths of previous entries |
promiseChain | Promise | Promise to append the processing of each submenu-entry to |
infothek.createInfothekPane(options) ⇒ string
Return html-String of pane for infothek
Kind: static method of infothek
Returns: string
- html-String for the infothek-pane
Param | Type | Description |
---|---|---|
options | object | Options-Object, with: |
options.id | string | Id of the pane |
options.class | string | className of the pane |
options.language | string | language of the pane, defaults to eLP.config.language |
options.pfad | Array.<string> | langkeys to create the breadcrumb from |
options.file | string | path to the file to create the pane from, either markdown or html format |
options.type | string | Identifying the file-type, "md" for markdown, defaults to html-file |
infothek.createIntern()
Setup the javascript functionality and dynamic lists in infothek, usually called from inside eLP.infothek.create
Kind: static method of infothek
infothek.toListjsObject(beforeObj, panelid, additionalobj) ⇒ object
Convert Object from resources-format (e.g. methoden) to the Listjs-specification
Kind: static method of infothek
Returns: object
- Object in Listjs-format
Param | Type | Description |
---|---|---|
beforeObj | Array | Array of resources to be converted |
panelid | string | html-id for the panel, make sure to be unique |
additionalobj | object | Object of additional information to overwrite resources-array values |
infothek.getFilterOptions(filtertype, liste) ⇒ string
Get the options for the specified filter in that list
Kind: static method of infothek
Returns: string
- html-String of the filter-options
Param | Type | Description |
---|---|---|
filtertype | string | Type of the filter |
liste | object | Liste to generate the options from |
infothek.getFilterOptionsForTaxonomy(model) ⇒ string
Get select-options for a given taxonomymodel (first dimension only)
Kind: static method of infothek
Returns: string
- html-String of the filter-options
Param | Type | Description |
---|---|---|
model | string | Taxonomy-Model |
infothek.updateListen(bildungseinrichtung, language)
Update the infothek lists, with new bildungseinrichtung and/or language
Kind: static method of infothek
Param | Type | Description |
---|---|---|
bildungseinrichtung | string | bildungseinrichtung-shortname |
language | string | new language of the list-elements |
infothek.infothekListenFilterInit(element)
Initialize the filters for a specific infothek-list
Kind: static method of infothek
Param | Type | Description |
---|---|---|
element | * | jQuery-Selector or NodeElement containing the filters (elements with class 'filter') to be initialized |
infothek.getFiltervalues(element) ⇒ Array
Get currently selected filters and search
Kind: static method of infothek
Returns: Array
- Array of Objects with the filtervalues, Object.filtertype holds the type of the filter, Object.value holds the value of the filter, specifically for the taxonomy-filter Object.taxmodell holds the selected taxonomy model
Param | Type | Description |
---|---|---|
element | * | jQuery-Selector or NodeElement whose descendant filters and search to parse |
infothek.updateFilterBreadcrumbs(element, filtervalues)
Updates the Filter-Breadcrumbs (which can be clicked to quickly clear them)
Kind: static method of infothek
Param | Type | Description |
---|---|---|
element | * | jQuery-Selector or NodeElement whose descendant filters and to parse and insert into the descendant with class 'filter-breadcrumb' |
filtervalues | Array | Filtervalues to use for the Filter-Breadcrumbs, defaults to callin eLP.infothek.getFiltervalues on element |
infothek.changeBildungseinrichtung(bildung)
Change the bildungseinrichtung only for the infothek, handles updating all dynamic lists and update bildungseinrichtung-specific changes to the infothek
Kind: static method of infothek
Param | Type | Description |
---|---|---|
bildung | string | Bildungseinrichtung-shortname |
infothek.ensureShowingOfItem(target)
Ensure/Enforce to show a given target, given as id of the panel, in a list
Kind: static method of infothek
Param | Type | Description |
---|---|---|
target | string | ID-String of the target-panel to show |
eLP.core : object
Main Namespace for the planning tool
Kind: static namespace of eLP
- .core :
object
- .createCommunity()
- .createLernportalBildungseinrichtungen()
- .openTerminDialog(prevTermin, callback)
- ~updateCount()
- ~newRow(termin) ⇒
string
- ~checkWeekday(day) ⇒
boolean
- ~updateCountRow()
- ~checkWeekday(day) ⇒
- .datesToArray(termine) ⇒
Array
- .datesToOutput(termine) ⇒
Array
- .datesToHtmlRows(termine, leaveSpaceForButton) ⇒
string
- .datesToHtmlTable(termine, withoutCountComplete) ⇒
string
- .datesToPdf(termin, layout) ⇒
Array
- ~objectToText(obj) ⇒
string
- ~objectToText(obj) ⇒
- .oldDateToDates(date) ⇒
Array
- .oldTerminToDates(rhythmus, termine) ⇒
Array
- .calcDatesCount(dates) ⇒
number
- .findDateInDates(dates, date, id) ⇒
object
- .findDateDuplicateId(terminid, veranst) ⇒
number
- .decipherTaxonomyLevel(level, dim, standard, veranst) ⇒
string
- .defaultTaxonomy(standard) ⇒
Array.<Array.<string>>
|Array.<string>
|string
- .getTaxonomy(taxmodell, veranst) ⇒
object
- .getTaxonomyDimension(dim, taxmodell, veranst) ⇒
object
- .getTaxonomyLevels(level, dim, taxmodell, veranst) ⇒
object
- .newVerId() ⇒
string
- .newVeranstaltung() ⇒
object
- .newVeranstaltungTermin() ⇒
object
- .newVeranstaltungTerminPhase() ⇒
object
- .changeBildungseinrichtung(bildungseinrichtung, veranst)
- .changeLanguage(language, veranst)
- .translate(langkey, language, veranst) ⇒
string
- .translateAll(language, veranst, elem)
- .newMaterial(defaultValues, callback)
- .editMaterial(materialId, callback)
- .showMaterial(materialId)
- .getLicenses(additionalLicenses) ⇒
Array
- .createBreadcrumb(target)
- ~sidebarLink(link) ⇒
string
- ~sidebarLink(link) ⇒
- .createKacheln(elem)
- .getComputedData(data, bildungseinrichtung, language) ⇒
object
- .init(ohneStorage)
- .reset()
- .updatePlaner(terminkey, lehreinheitkey, reloadSelect, veranst)
- .updateOverview(veranst)
- .updateTermine(terminkey, lehreinhkey, reloadSelect, veranst)
- .updateKompetenzen(veranst)
- .createSettings(veranst)
- .createMaterials()
- .materialsInit(listContainer)
- ~makeItem(item) ⇒
string
- ~makeItem(item) ⇒
- .materialsFilterUpdate()
- .materialsListBreadcrumbs()
- .createTags()
- .tagsDialog(presetFilter)
- .updateTags()
- .updateTagSelects()
- .updateTaxonomy(veranst)
- .updateButtonsTaxonomy(element, veranst)
- .updateRahmenbedingungen(veranst)
- .createSelectTaxonomie(element, veranst)
- .createVerbs(element, veranst)
- ~btngroup(level, dimension) ⇒
string
- ~btngroup(level, dimension) ⇒
- .createProgressBarTaxonomy(element, altTax, veranst)
- .createProgressBarLernstand(element, veranst)
- .createProgressBarStatus(element, veranst)
- .createTableKompetenzen(element, veranst)
- .checkTerminplanung(veranst) ⇒
boolean
- .checkVeranstaltung(veranst) ⇒
boolean
- .fixDates(rahmen) ⇒
number
- .highestTaxonomyReached(veranst) ⇒
number
- .highestTaxonomyReachedDate(date, veranst) ⇒
number
- .countTaxonomyDateBadge(taxonomy, date, veranst) ⇒
number
- .countTaxonomyOverviewBadge(taxonomy, veranst) ⇒
number
- .gesamtLehreinheit(veranst) ⇒
number
- .dateNumbering(terminid, veranst) ⇒
number
- .createNavTermin(element, activetermin, veranst)
- .createNavReflexTermin(element, terminkey, veranst)
- .navwidth(navtype) ⇒
number
- .navScroll(nav, key, dontTrigger)
- .updateTabsTermin(element, activetermin, activephase, reloadSelect, veranst)
- .checkOrder(lehreinh) ⇒
object
- .updatePhaseRowOrder(element, termin, lehreinh, veranst)
- .checkSubcontentOrder(subcontent, row) ⇒
object
- .updateSubContentOrder(element, termin, lehreinh, row, veranst)
- .makeCKEditorForActive(termin, lehreinheit, veranst)
- .createPaneLehreinh(element, terminindex, lehreinhindex, veranst)
- .createTabReflex(element, terminkey, veranst)
- .createOverviewRahmenbedingungen(veranst)
- .createOverviewKompetenzen(veranst)
- .createOverviewTerminplanung(veranst)
- .createPDF(options, callback, veranst)
- .createPDFCollection(options, callback, altCollection)
- .createDoc(options, callback, veranst)
- .saveVeranstaltung(veranst, defaultName)
- .saveCollection(collection, defaultName)
- .checkChildrenCheckboxType1(elem)
- .checkChildrenCheckboxType2(elem)
- .deleteVeranst(veranstId)
- .selectVeranst(veranstId, stay)
- .deselectVeranst()
- .createVeranst(opts)
- .editVeranst(veranst)
- .veranstChangeDates(newDates, veranst)
- .createCollection()
- .getVeranstaltungTitle(veranst, defaultName) ⇒
string
- .getVeranstaltungTitleFull(veranst) ⇒
string
core.createCommunity()
Setup the community-tab with the information from eLP.resources.bildungseinrichtungen
Kind: static method of core
core.createLernportalBildungseinrichtungen()
Setup the bildungseinrichtungen-tab with the information from eLP.resources.bildungseinrichtungen
Kind: static method of core
core.openTerminDialog(prevTermin, callback)
Open the dialog to let the user input an dates-object
Kind: static method of core
Param | Type | Description |
---|---|---|
prevTermin | Array | Previous dates object to be supplied as default and used as "new" when aborted |
callback | function | Function to call with the new dates-object as first parameter |
- .openTerminDialog(prevTermin, callback)
- ~updateCount()
- ~newRow(termin) ⇒
string
- ~checkWeekday(day) ⇒
boolean
- ~updateCountRow()
- ~checkWeekday(day) ⇒
openTerminDialog~updateCount()
Update count-element
Kind: inner method of openTerminDialog
openTerminDialog~newRow(termin) ⇒ string
Create HTML-String for new row
Kind: inner method of openTerminDialog
Returns: string
- HTML-String for new row
Param | Type | Description |
---|---|---|
termin | object | Termin-object to make new row for |
- ~newRow(termin) ⇒
string
- ~checkWeekday(day) ⇒
boolean
- ~updateCountRow()
- ~checkWeekday(day) ⇒
newRow~checkWeekday(day) ⇒ boolean
Check if given day is same as variable weekdayPuffer
Kind: inner method of newRow
Returns: boolean
- Return if given day is same as variable weekdayPuffer
Param | Type | Description |
---|---|---|
day | object | Day-Object, important is function day.getDay() |
newRow~updateCountRow()
Update count in new row
Kind: inner method of newRow
core.datesToArray(termine) ⇒ Array
Convert dates-format to an array of each date as String
Kind: static method of core
Returns: Array
- Array of Strings with the specific days in momentjs-format 'DD.MM.YYYY', timeframes are arrays of two strings themselfes
Param | Type | Description |
---|---|---|
termine | Array | Dates-format, if not Array cast to Array, allows to run on each entry in dates alone |
core.datesToOutput(termine) ⇒ Array
Convert dates-format to a special output-format, usually called by eLP.core.datesToHtmlRows, eLP.core.datesToHtmlTable, eLP.core.datesToPdf
Kind: static method of core
Returns: Array
- Three-dimensional array in the special output-format:
First dimension for each "row" in the dates-format
Second dimension for each information specifying the "row"
Third dimension to differentiate header and value
First value is an Object representing the header
Second value is an Object representing the value of this information for the "row"
Param | Type | Description |
---|---|---|
termine | Array | Array in the dates-format |
core.datesToHtmlRows(termine, leaveSpaceForButton) ⇒ string
Convert dates-format to a html-String utilizing bootstrap-rows
Kind: static method of core
Returns: string
- html-String that represents termine utilizing bootstrap-rows
Param | Type | Description |
---|---|---|
termine | Array | Array in dates-format to convert to html-String |
leaveSpaceForButton | string | String to insert as own row in the end, especially used to insert a button which opens the terminDialog again |
core.datesToHtmlTable(termine, withoutCountComplete) ⇒ string
Convert dates-format to a html-String for a table (insert into the table-Element)
CAREFUL! For now depends on header being the same across similar values, like termin (single) vs termin1 & termin2 (weekly)
Special handling for row if its only header is { langkey: 'datecount-complete' }
by making it into tfooter
Kind: static method of core
Returns: string
- HTML-String representing termine as theader and tbody
Param | Type | Description |
---|---|---|
termine | Array | Array in dates-format to convert to html-String |
withoutCountComplete | boolean | If true, don't print extra-row with count-complete |
core.datesToPdf(termin, layout) ⇒ Array
Convert dates-format to the pdfmake-format
Kind: static method of core
Returns: Array
- Array in pdfmake-format
Param | Type | Description |
---|---|---|
termin | Array | Array in dates-format |
layout | string | If 'text' prepare for use in stacks, if 'table' prepare for use in tables -> createPdf |
datesToPdf~objectToText(obj) ⇒ string
Make object simplified to Name: if obj.langkey translate, else obj.text else obj itself
Kind: inner method of datesToPdf
Returns: string
- Text-Representation
Param | Type | Description |
---|---|---|
obj | object | string | Object to get Text-Representation for |
core.oldDateToDates(date) ⇒ Array
Convert legacy-versions of date to dates (date format was only used in the testing stage)
Kind: static method of core
Returns: Array
- Array in dates-format
Param | Type | Description |
---|---|---|
date | object | Object in date-format |
core.oldTerminToDates(rhythmus, termine) ⇒ Array
Convert legacy-versions of rhythmus + termine to dates
Kind: static method of core
Returns: Array
- Array in new dates format
Param | Type | Description |
---|---|---|
rhythmus | string | String of a number representing the rhythmus |
termine | object | Object in old termine-format |
core.calcDatesCount(dates) ⇒ number
Calculates the amount of dates in a Dates-Array, ignoring dates.count
Kind: static method of core
Returns: number
- Amount of dates in dates
Param | Type | Description |
---|---|---|
dates | Array | Dates-Array to calculate amount of dates from |
core.findDateInDates(dates, date, id) ⇒ object
Search for Date-Object with a specific date in Dates-Array
Kind: static method of core
Returns: object
- Date-Object
Param | Type | Description |
---|---|---|
dates | Array | Dates-Array to search in |
date | string | object | Array | Date in 'DD.MM.YYYY' format or moment-Object or Array of either for timeframe |
id | number | Id to find correct Date-Object if multiple apply at the same day, defaults to 0 |
core.findDateDuplicateId(terminid, veranst) ⇒ number
Get duplicate-ID to use in eLP.core.findDateInDates
Kind: static method of core
Returns: number
- duplicate-ID
Param | Type | Description |
---|---|---|
terminid | number | terminid for termin in veranst.terminplanung |
veranst | object | veranstaltung to look in |
core.decipherTaxonomyLevel(level, dim, standard, veranst) ⇒ string
Get the human readable representation/name of selected taxonomy level, potentially multiple if multiple selections are allowed, only for one dimension
Kind: static method of core
Returns: string
- Human-readable Name of the selected Taxonomy, or an empty string
Param | Type | Description |
---|---|---|
level | Array.<Array.<string>> | Array.<string> | string | ID(s) of select(ed) level(s) for one dimension, depending on taxonomy model there can be multiple selections resulting in an Array of IDs |
dim | string | When the taxonomy model uses multiple dimensions, select the dimension to look for, defaults to first dimension (in array-order) |
standard | string | Taxonomy model to be used, defaults to veranstaltung.taxonomien.standard or 'anderson' |
veranst | object | The [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to get the taxonomy-model from, especially important if a custom model is requested as those are only saved with a Veranstaltung-Object |
core.defaultTaxonomy(standard) ⇒ Array.<Array.<string>>
| Array.<string>
| string
Generate the default selection for the taxonomy standard
Kind: static method of core
Returns: Array.<Array.<string>>
| Array.<string>
| string
- ID of selected level, depending on taxonomy model there can be multiple selections and/or multiple dimensions resulting in one- or two-dimensional Arrays of IDs; if a dimension is allowed to be empty the default selection for it is an empty Array
Param | Type | Description |
---|---|---|
standard | string | Taxonomy model to be used, defaults to veranstaltung.taxonomien.standard or 'anderson' |
defaultTaxonomy~getEarliestIdNotDisabled(dimension) ⇒ Array
Get earliest ID for a level of a dimension, that is not disabled
Kind: inner method of defaultTaxonomy
Returns: Array
- ID of earliest not-disabled level in the dimension,
if all are disabled, default to first id
Param | Type | Description |
---|---|---|
dimension | object | Dimension-Object to look in |
core.getTaxonomy(taxmodell, veranst) ⇒ object
Get a Taxonomy Model Object, from eLP.resources.taxonomy, eLP.config.taxonomies or the given Veranstaltung-Object
Kind: static method of core
Returns: object
- Taxonomy-Model Object
Param | Type | Description |
---|---|---|
taxmodell | string | The taxonomy model to be used, defaults to veranst.taxonomien.standard or 'anderson' |
veranst | object | The [Veranstaltung-Object]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to get the taxonomy-model from, especially important if a custom model is requested as those are only saved in a Veranstaltung-Object |
core.getTaxonomyDimension(dim, taxmodell, veranst) ⇒ object
Get an Taxonomy Dimension Object, based on eLP.core.getTaxonomy
Kind: static method of core
Returns: object
- Dimension-Object
Param | Type | Description |
---|---|---|
dim | string | ID for dimension, defaults to 0 |
taxmodell | string | The taxonomy model to be used, defaults to veranst.taxonomien.standard or 'anderson' |
veranst | object | The [Veranstaltung-Object]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to get the taxonomy-model from, especially important if a custom model is requested as those are only saved in a Veranstaltung-Object |
core.getTaxonomyLevels(level, dim, taxmodell, veranst) ⇒ object
Get an Taxonomy Level Object
Kind: static method of core
Returns: object
- Level-Object
Param | Type | Description |
---|---|---|
level | string | ID of level, defaults to 0 |
dim | string | ID of dimension if there are multiple dimensions, defaults to 0 |
taxmodell | string | The taxonomy model to be used, defaults to veranst.taxonomien.standard or 'anderson' |
veranst | object | The [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to get the taxonomy-model from, especially important if a custom model is requested as those are only saved with a Veranstaltung-Object |
core.newVerId() ⇒ string
Generate a random 4-digit hexadecimal number and avoiding already used numbers to use for [Veranstaltungs-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} IDs, avoiding those already in use (locally)
Kind: static method of core
Returns: string
- 4-digit hexadecimal number as String
core.newVeranstaltung() ⇒ object
Get a new, with minimum-default settings pre-filled [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}
Kind: static method of core
Returns: object
- Veranstaltung-Object
core.newVeranstaltungTermin() ⇒ object
Get a new, with minimum-default settings pre-filled [Veranstaltung-Termin-Objekt]{@tutorial Spezielle-Formate-Terminobjekt}
Kind: static method of core
Returns: object
- Veranstaltung-Termin-Object
core.newVeranstaltungTerminPhase() ⇒ object
Get a new, with minimum-default settings pre-filled [Veranstaltung-Termin-Phase-Objekt]{@tutorial Spezielle-Formate-Phaseobjekt}
Kind: static method of core
Returns: object
- Veranstaltung-Termin-Phase-Object
core.changeBildungseinrichtung(bildungseinrichtung, veranst)
Change bildungseinrichtung and load appropriatly altered resources
Kind: static method of core
Param | Type | Description |
---|---|---|
bildungseinrichtung | string | Bildungseinrichtung-shortname specifying which bildungseinrichtung is newly loaded |
veranst | object | If provided or defaulting to currently selected veranstaltung, change bildungseinrichtung for this [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, otherwise change bildungseinrichtung for portfolio, if false do NOT default to selected veranstaltung, instead always change portfolio-bildungseinrichtung |
core.changeLanguage(language, veranst)
Change language, load appropriate resources new and translate the page
Kind: static method of core
Param | Type | Description |
---|---|---|
language | string | Language-key to select ('de' |
veranst | object | Change standard-kompetenzen for provided [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object or null |
core.translate(langkey, language, veranst) ⇒ string
Translate from eLP.resources.languageKeys or eLP.resources.bildungseinrichtungen[bildungseinrichtung][language], resolving placeholder $langkey^ and &veranstaltung.path|eLP.path|default&
Kind: static method of core
Returns: string
- Found translation or empty string
Param | Type | Description |
---|---|---|
langkey | string | object | Array | Find the translation with this key, if Object use langkey.langkey, if Array try each entry and return first successfull translation |
language | string | String for the target language, defaults to eLP.config.language |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, important if placeholder resolves to a path in veranstaltung (should only happen when a Veranstaltung-Object has been selected), defaults to currently selected Veranstaltung-Object |
core.translateAll(language, veranst, elem)
Translate all elements with translate-classes with eLP.core.translate() The translate-classes are:
- 'translate' to translate the innerHTML, langkey to use is elem.data-langkey
- 'translatetitle' to translate the title-attribute, langkey to use is elem.data-titlekey
- 'translateplaceholder' to translate the placeholder-attribute, langkey to use is elem.data-placeholderkey In addition also changes localization for flatpickr, timepicker and the vex cancel-button
Kind: static method of core
Param | Type | Description |
---|---|---|
language | string | Target-Language ('de' |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to pass to eLP.core.translate(), defaults to selected Veranstaltung |
elem | * | jQuery-Selector or nodeElement to translate all descendants from, defaults to 'body' |
core.newMaterial(defaultValues, callback)
Open Dialog to create new material in eLP.config.materials
Kind: static method of core
Param | Type | Description |
---|---|---|
defaultValues | object | Object with default values, if any |
defaultValues.link | string | Pre-entered value for the link |
defaultValues.title | string | Pre-entered value for the title |
callback | function | callback-function, first argument: new id |
core.editMaterial(materialId, callback)
Open Dialog to change existing material in eLP.config.materials
Kind: static method of core
Param | Type | Description |
---|---|---|
materialId | number | id of material in eLP.config.materials |
callback | function | Callback-function to execute after dialog is closed |
core.showMaterial(materialId)
Open Dialog to show material in eLP.config.materials
Kind: static method of core
Param | Type | Description |
---|---|---|
materialId | number | id of material in eLP.config.materials |
core.getLicenses(additionalLicenses) ⇒ Array
Get array of default Creative Commons Licenses and custom licenses in materials
Kind: static method of core
Returns: Array
- Array of Creative-Commons-Licenses and custom licenses in materials
Param | Type | Description |
---|---|---|
additionalLicenses | string | Array | additional License(s) to add to the Array after the CC-Licenses but before other custom licenses |
core.createBreadcrumb(target)
Create Breadcrumb in element with id 'breadcrumb'
Kind: static method of core
Param | Type | Description |
---|---|---|
target | object | Currently selected tab-pane |
createBreadcrumb~sidebarLink(link) ⇒ string
Generate HTML for sidebar-link
Kind: inner method of createBreadcrumb
Returns: string
- HTML for sidebar-link
Param | Type | Description |
---|---|---|
link | string | Link indicating targeted sidebar-panel |
core.createKacheln(elem)
Create Dashboard-"Kacheln"
Kind: static method of core
Param | Type | Description |
---|---|---|
elem | object | NodeElement in which to create the Dashboard-Kacheln Expected to have class 'row' |
core.getComputedData(data, bildungseinrichtung, language) ⇒ object
Get and combine the general data.json and the data.json from bildungseinrichtung Uses eLP.storage.puffer[data] if data specified and both language and bildungseinrichtung are currently selected
Kind: static method of core
Returns: object
- Combined data-Object with general and bildungseinrichtung-specific data
Param | Type | Description |
---|---|---|
data | string | Requested type of data |
bildungseinrichtung | string | Bildungseinrichtung to request from, defaults to veranstaltung.config.bildungseinrichtung or eLP.config.bildungseinrichtung or '-1' |
language | string | Language-String, defaults to eLP.config.language or 'de' |
core.init(ohneStorage)
Initialize eLP-settings from default settings, supplied get-parameters and localStorage
Kind: static method of core
Param | Type | Description |
---|---|---|
ohneStorage | boolean | If truthy, ignore portfolio in localStorage Does NOT ignore localStorage[language] |
core.reset()
Reset portfolio-related settings to an empty/new state Calls eLP.storage.storageFunction() afterwards
Kind: static method of core
core.updatePlaner(terminkey, lehreinheitkey, reloadSelect, veranst)
Update the planer-view, including each sub-view
Kind: static method of core
Param | Type | Description |
---|---|---|
terminkey | number | Passed as parameter with same name to eLP.core.updateTermine |
lehreinheitkey | number | Passed as parameter with same name to eLP.core.updateTermine |
reloadSelect | boolean | Passed as parameter with same name to eLP.core.updateTermine |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the planer-view to, defaults to currently selected Veranstaltung-Object |
core.updateOverview(veranst)
Update the full Overview-view
Kind: static method of core
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update view to, defaults to currently selected Veranstaltung-Object |
core.updateTermine(terminkey, lehreinhkey, reloadSelect, veranst)
Update the content-planning-view
Kind: static method of core
Param | Type | Description |
---|---|---|
terminkey | number | ID of currently selected termin in veranst |
lehreinhkey | number | ID of currently selected lehreinheit, in currently selected termin in veranst |
reloadSelect | boolean | Passed as parameter with same name to eLP.core.updateTabsTermin |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the view to, defaults to currently selected Veranstaltung-Object |
core.updateKompetenzen(veranst)
Update the competence-part of the organization-view
Kind: static method of core
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the view to, defaults to currently selected Veranstaltung-Object |
core.createSettings(veranst)
Create and update the settings-view
Kind: static method of core
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the view to, defaults to currently selected Veranstaltung-Object |
createSettings~arrayBookmarks(array, type, standard) ⇒ string
Create HTML-String for carousel-items
Kind: inner method of createSettings
Returns: string
- HTML-String
Param | Type | Description |
---|---|---|
array | Array | Array to make carousel-items |
type | string | String identifying which type of bookmark it is, mandatory for linkid |
standard | boolean | If truthy, do not allow deleting of bookmarks |
core.createMaterials()
Populate and update the list of materials on #nav-materials
Includes initializing/updating filters
Kind: static method of core
core.materialsInit(listContainer)
Initialize materials-list and associated functions/eventlisteners
Kind: static method of core
Param | Type | Description |
---|---|---|
listContainer | object | container-element for List |
materialsInit~makeItem(item) ⇒ string
Create HTML-String for list-item
Kind: inner method of materialsInit
Returns: string
- HTML-String
Param | Type | Description |
---|---|---|
item | object | list-item to make html of |
core.materialsFilterUpdate()
Populate the options of select-filters for materialsList
Kind: static method of core
core.materialsListBreadcrumbs()
Update breadcrumbs for materialsList-filter
Kind: static method of core
core.createTags()
Populate and update the list of tags at #nav-tags
Kind: static method of core
core.tagsDialog(presetFilter)
Open dialog to jump to tag-locations
Kind: static method of core
Param | Type | Description |
---|---|---|
presetFilter | object | Preset filters |
core.updateTags()
Update eLP.config.tags: first empty then search exhaustivly through every veranstaltung
Kind: static method of core
updateTags~addTag(key, object)
Add tag to eLP.config.tag
Kind: inner method of updateTags
Param | Type | Description |
---|---|---|
key | string | String-key for the tag |
object | object | Path-Object for the tag |
core.updateTagSelects()
Update all tag-selects (rahmenbedingungen, termin, lehreinheit, subcontent) with current eLP.config.tags
Kind: static method of core
core.updateTaxonomy(veranst)
Update changes to taxonomy-model and taxonomy-selections across different views, including the shareauswahl-modal
Kind: static method of core
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with the selected taxonomy-model and selections, defaults to currently selected Veranstaltung-Object |
core.updateButtonsTaxonomy(element, veranst)
Update the buttons to select a taxonomy-model
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement where the buttons are added as children |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with currently selected taxonomy-model, defaults to currently selected Veranstaltung-Object |
core.updateRahmenbedingungen(veranst)
Create and update the organization-view
Kind: static method of core
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} to update the view to, defaults to currently selected Veranstaltung-Object |
core.createSelectTaxonomie(element, veranst)
Create select-elements for currently selected taxonomy model for use in content-planning -> phase
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement to create select-elements as children of, expected to be row[data-rowtype='objective'] > div |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with taxonomy model and previously-selected values, defaults to currently selected Veranstaltung-Object |
core.createVerbs(element, veranst)
Create verbs-buttons depending on selected taxonomy, for use in content-planning -> phase -> objective
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement to create verb-buttons as children of |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with taxonomy model and previously-selected values, defaults to currently selected Veranstaltung-Object |
createVerbs~btngroup(level, dimension) ⇒ string
Create HTML-String of the button-group and verbs to make
Kind: inner method of createVerbs
Returns: string
- HTML-String
Param | Type | Description |
---|---|---|
level | object | Taxonomy-Level-Object to make verbs for |
dimension | object | Taxonomy-Dimension-Object containing the level-object |
core.createProgressBarTaxonomy(element, altTax, veranst)
Create progress-bar for a taxonomy model, if multiple categories are in the model, always use first
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement to create progress-bar in |
altTax | string | Taxonomy model, defaults to veranst.taxonomien.standard |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with taxonomy model, defaults to currently selected Veranstaltung-Object |
core.createProgressBarLernstand(element, veranst)
Create progress-bar for lernstand
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement to create progress-bar in |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with lernstand, defaults to currently selected Veranstaltung-Object |
core.createProgressBarStatus(element, veranst)
Create progress-bar for status
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement to create progress-bar in |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with status, defaults to currently selected Veranstaltung-Object |
core.createTableKompetenzen(element, veranst)
Create table-content for competences, part of organization-view
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement of the table-element |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} with taxonomy model, defaults to currently selected Veranstaltung-Object |
core.checkTerminplanung(veranst) ⇒ boolean
Ensure that terminplanung-Array and reflexion-Array of [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} is according to the model
Kind: static method of core
Returns: boolean
- If true, terminplanung-Array or reflexion-Array had to be fixed at least once
Param | Type | Description |
---|---|---|
veranst | object | Veranstaltung-Object whose terminplanung-Array and reflexion-Array are to be checked and potentially fixed, defaults to currently selected Veranstaltung-Object |
core.checkVeranstaltung(veranst) ⇒ boolean
Ensure that [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} is according to the model
Kind: static method of core
Returns: boolean
- If true, Veranstaltung-Object had to be fixed at least once
Param | Type | Description |
---|---|---|
veranst | object | Veranstaltung-Object that is to be checked and potentially fixed, defaults to currently selected Veranstaltung-Object |
core.fixDates(rahmen) ⇒ number
Fix dates-Objects in the given Rahmenbedingungen-Object (part of [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt})
- Fix old formats to current format
- Calculate and set dates.count if undefined
Kind: static method of core
Returns: number
- Approximate number of changes performed
Param | Type | Description |
---|---|---|
rahmen | object | Rahmenbedingungen-Object, as part of Veranstaltung-Object |
core.highestTaxonomyReached(veranst) ⇒ number
Get highest taxonomy-level reached in phases with objectiveactive
Kind: static method of core
Returns: number
- Highest taxonomy-level reached
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object |
core.highestTaxonomyReachedDate(date, veranst) ⇒ number
Highest taxonomy-level reached at a specific date
Kind: static method of core
Returns: number
- Highest taxonomy-level reached on the date
Param | Type | Description |
---|---|---|
date | number | ID of the date as part of the Terminplanung-Array of Veranstaltung-Object |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object |
core.countTaxonomyDateBadge(taxonomy, date, veranst) ⇒ number
Count how often the specific taxonomy-level is selected on the specific date, only consideres first taxonomy-category
Kind: static method of core
Returns: number
- Count
Param | Type | Description |
---|---|---|
taxonomy | number | ID of the taxonomy to check |
date | number | ID of the date as part of the Terminplanung-Array of [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} |
veranst | object | Veranstaltung-Object, defaults to currently selected Veranstaltung-Object |
core.countTaxonomyOverviewBadge(taxonomy, veranst) ⇒ number
Count how often the specific taxonomy-level is selected over the whole Terminplanung-Array, only considers first taxonomy-category
Kind: static method of core
Returns: number
- Count
Param | Type | Description |
---|---|---|
taxonomy | number | ID of the taxonomy to check |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object |
core.gesamtLehreinheit(veranst) ⇒ number
Count all Phase-Array-lengths across the Terminplanung-Array of an [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}
Kind: static method of core
Returns: number
- Count
Param | Type | Description |
---|---|---|
veranst | object | Veranstaltung-Object, defaults to currently selected Veranstaltung-Object |
core.dateNumbering(terminid, veranst) ⇒ number
Provide human readable number for date in veranstaltung, excluding timeframes
Kind: static method of core
Returns: number
- Count
Param | Type | Description |
---|---|---|
terminid | number | ID of date in terminplanung |
veranst | object | Veranstaltung-Object, defaults to currently selected Veranstaltung-Object |
core.createNavTermin(element, activetermin, veranst)
Create the navigation for dates in Terminplanung-Array, part of content-planning-view
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement of the Navigation, expected to be list-Element with data-navtype="termin" |
activetermin | number | Which date is the currently active one, caps at length of dates, defaults to 1 |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object |
core.createNavReflexTermin(element, terminkey, veranst)
Create the navigation for dates in Reflexion-Array, part of reflexion-view
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement of the Navigation, expected to be list-Element with data-navtype="reflextermin" |
terminkey | number | Which date is the currently active one, caps at length of dates, defaults to 1 |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object |
core.navwidth(navtype) ⇒ number
Get the maximum amount of elements in the date- and phase-navigations visible at once
Kind: static method of core
Returns: number
- Maximum amount of elements
Param | Type | Description |
---|---|---|
navtype | string | Type of navigation, currently 'lehreinheit' has special values |
core.navScroll(nav, key, dontTrigger)
Scroll date- or phase-navigation to an active element
Kind: static method of core
Param | Type | Description |
---|---|---|
nav | object | NodeElement of the navigation or NodeElement in the navigation |
key | number | ID of the active element, always ensures that's visible |
dontTrigger | boolean | If truthy, skip triggering the active element |
core.updateTabsTermin(element, activetermin, activephase, reloadSelect, veranst)
Update all date-tabs in content-planning-view
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement of the panel-body with the content-planning view |
activetermin | number | Which date is the currently active one, caps at length of dates, defaults to 1 |
activephase | number | Which phase is the currently active one in the currently active date, caps at length of phases in the date, defaults to 1 |
reloadSelect | boolean | Forces to reload all selects |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object |
core.checkOrder(lehreinh) ⇒ object
Modify lehreinh.order-array to remove not-active and duplicates (in reverse order)
Kind: static method of core
Returns: object
- Lehreinheit-Object with modified order
Param | Type | Description |
---|---|---|
lehreinh | object | Lehreinheit-Object |
lehreinh.order | Array | Array to modify |
core.updatePhaseRowOrder(element, termin, lehreinh, veranst)
Update order of PhaseRows to the specified order in a [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement of the tab-content with tabtype "termin", of descendent or of ancestor of said NodeElement (looked up in this order, only first hit is used) |
termin | number | Which date is the currently active one, caps at length of terminplanung, defaults to 0 |
lehreinh | number | Which phase is the currently active one in the currently active date, caps at length of phases in the date, defaults to 0 |
veranst | object | Veranstaltung-Object, defaults to currently selected Veranstaltung-Object |
core.checkSubcontentOrder(subcontent, row) ⇒ object
Modify subcontent-array to remove duplicates
Kind: static method of core
Returns: object
- subcontent-Object with modified order
Param | Type | Description |
---|---|---|
subcontent | object | subcontent-Object |
row | string | specify which subcontent in the object (subcontent[row]) |
core.updateSubContentOrder(element, termin, lehreinh, row, veranst)
Update order of subcontents to the specified order in a [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement of the tab-content with tabtype "termin", of descendent or of ancestor of said NodeElement (looked up in this order, only first hit is used) |
termin | number | Which date is the currently active one, caps at length of terminplanung, defaults to 0 |
lehreinh | number | Which phase is the currently active one in the currently active date, caps at length of phases in the date, defaults to 0 |
row | string | Which subcontent order in the phase has to be updated, defaults to 'phasecontent' |
veranst | object | Veranstaltung-Object, defaults to currently selected Veranstaltung-Object |
core.makeCKEditorForActive(termin, lehreinheit, veranst)
Make all CKEditor in active or given termin
Kind: static method of core
Param | Type | Description |
---|---|---|
termin | number | Which date is the currently active one, caps at length of terminplanung, defaults to 1 |
lehreinheit | number | Which phase is the currently active one in the currently active date, caps at length of phases in the date, defaults to 1 |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object |
core.createPaneLehreinh(element, terminindex, lehreinhindex, veranst)
Update all lehreinheit-Panels for a date in content-planning-view
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement of the panel-body with the content-planning view |
terminindex | number | Which date is the currently active one, defaults to 1 |
lehreinhindex | number | Which phase is the currently active one in the currently active date, caps at length of phases in the date, defaults to 1 |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object |
core.createTabReflex(element, terminkey, veranst)
Create and update the content-planning-view
Kind: static method of core
Param | Type | Description |
---|---|---|
element | object | NodeElement of the panel-body with the content-planning view |
terminkey | number | Which date is the currently active one, defaults to 1 |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently |
core.createOverviewRahmenbedingungen(veranst)
Create and update the Rahmenbedinugunen-view
Kind: static method of core
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currentl |
core.createOverviewKompetenzen(veranst)
Show the overview of competences which have an outcome
Kind: static method of core
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently |
core.createOverviewTerminplanung(veranst)
Create and show the overview of the content-planning
Kind: static method of core
Param | Type | Description |
---|---|---|
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently |
core.createPDF(options, callback, veranst)
Create pdf to an [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}
Kind: static method of core
Param | Type | Description |
---|---|---|
options | object | Settings-Object |
options.lehrplan | boolean | Show small-print "Lehrplan" |
options.orientation | string | 'portrait' |
options.layout | string | 'table' |
options.cover | string | If truthy, pass to convertHtmlToPdf and use that output for the first page, disabling default cover-page |
options.toc | boolean | If truthy, print table of contents |
options.rinstitute | boolean | Include institute in PDF |
options.rstudiengang | boolean | Include studiengang in PDF |
options.rfaculty | boolean | Include faculty in PDF |
options.rnr | boolean | Include event number in PDF |
options.rtyp | boolean | Include event type in PDF |
options.rname | boolean | Include event name in PDF |
options.rdates | boolean | Include dates, date rhythm and time in overview in PDF |
options.rbeschreibung | boolean | Include the instructional context in PDF |
options.rgesamtziel | boolean | Include the overall objective |
options.kompetenzen | boolean | Include competences |
options.phasecontent | boolean | Include the content description for each phase |
options.tphase | boolean | If truthy, include the phase-header for content planning; only relevant if ttermindatephase falsy |
options.ttermin | boolean | If truthy, include the date-header for content planning; only relevant if ttermindatephase and ttermindate falsy |
options.tdate | boolean | If truthy, include the date of a session for content planning; only relevant if ttermindatephase and ttermindate falsy |
options.tthema | boolean | Include the topic of the session |
options.tcategory | boolean | Include the category of a session |
options.tbreak | boolean | Include break-phases |
options.tzeit | boolean | Include the start- and endtime of phases |
options.ttechnik | boolean | Include devices |
options.ttaxziel | boolean | Include both taxonomy-values and outcomes; if truthy, ignore ttax and tziel |
options.ttax | boolean | Include selected taxonomy levels of phases; only relevant if ttaxziel falsy |
options.tziel | boolean | Include learning outcomes; only relevant if ttaxziel falsy |
options.tmethode | boolean | Include learning method; only relevant if tmethodeaktiv falsy |
options.tapps | boolean | Include applications |
options.tmaterials | boolean | Include materials |
options.taktiv | boolean | Include learning activities; only relevant if tmethodeaktiv falsy |
options.tmethodeaktiv | boolean | Include both learning method and learning outcome; if truthy, ignore tmethode and taktiv |
options.tpmethode | boolean | Include assessment methods; only relevant if tpmethodebesch falsy |
options.tpmethodebesch | boolean | Include assessment method and the description of the learning success test in the PDF; if truthy, ignore tpmethode and tpruefung |
options.tpruefung | boolean | Include the description of the learning success; only relevant if tpmethodebesch is falsy |
options.tpruefungsfrage | boolean | Include assessment tasks |
options.tarbeitsblatt | boolean | Include the worksheet in the PDF |
options.turl | boolean | Include linked URLs in the PDF |
options.tfeedback | boolean | Include linked Feedback-Systems in the PDF |
options.tliterature | boolean | Include the literature list in the PDF |
options.notizen | boolean | Include the notes in the PDF |
options.rreflexiontermin | boolean | Include the reflection of each session in the PDF |
options.rreflexiongesamt | boolean | Include the reflection for the whole class in the PDF |
callback | function | Function to call when createPDF finished |
veranst | object | Veranstaltung-Object, defaults to currently selected Veranstaltung-Object |
core.createPDFCollection(options, callback, altCollection)
Create pdf to an Collection, including all [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} included
Kind: static method of core
Param | Type | Description |
---|---|---|
options | object | Settings-Object |
options.lehrplan | boolean | Show small-print "Lehrplan" |
options.orientation | string | 'portrait' |
options.layout | string | 'table' |
options.cover | string | If truthy, pass to convertHtmlToPdf and use that output for the first page, disabling default cover-page |
options.toc | boolean | If truthy, print table of contents |
options.rinstitute | boolean | Include institute in PDF |
options.rstudiengang | boolean | Include studiengang in PDF |
options.rfaculty | boolean | Include faculty in PDF |
options.rnr | boolean | Include event number in PDF |
options.rtyp | boolean | Include event type in PDF |
options.rname | boolean | Include event name in PDF |
options.rdates | boolean | Include dates, date rhythm and time in overview in PDF |
options.rbeschreibung | boolean | Include the instructional context in PDF |
options.rgesamtziel | boolean | Include the overall objective |
options.kompetenzen | boolean | Include competences |
options.phasecontent | boolean | Include the content description for each phase |
options.tphase | boolean | If truthy, include the phase-header for content planning; only relevant if ttermindatephase falsy |
options.ttermin | boolean | If truthy, include the date-header for content planning; only relevant if ttermindatephase and ttermindate falsy |
options.tdate | boolean | If truthy, include the date of a session for content planning; only relevant if ttermindatephase and ttermindate falsy |
options.tthema | boolean | Include the topic of the session |
options.tcategory | boolean | Include the category of a session |
options.tbreak | boolean | Include break-phases |
options.tzeit | boolean | Include the start- and endtime of phases |
options.ttechnik | boolean | Include devices |
options.ttaxziel | boolean | Include both taxonomy-values and outcomes; if truthy, ignore ttax and tziel |
options.ttax | boolean | Include selected taxonomy levels of phases; only relevant if ttaxziel falsy |
options.tziel | boolean | Include learning outcomes; only relevant if ttaxziel falsy |
options.tmethode | boolean | Include learning method; only relevant if tmethodeaktiv falsy |
options.tapps | boolean | Include applications |
options.tmaterials | boolean | Include materials |
options.taktiv | boolean | Include learning activities; only relevant if tmethodeaktiv falsy |
options.tmethodeaktiv | boolean | Include both learning method and learning outcome; if truthy, ignore tmethode and taktiv |
options.tpmethode | boolean | Include assessment methods; only relevant if tpmethodebesch falsy |
options.tpmethodebesch | boolean | Include assessment method and the description of the learning success test in the PDF; if truthy, ignore tpmethode and tpruefung |
options.tpruefung | boolean | Include the description of the learning success; only relevant if tpmethodebesch is falsy |
options.tpruefungsfrage | boolean | Include assessment tasks |
options.tarbeitsblatt | boolean | Include the worksheet in the PDF |
options.turl | boolean | Include linked URLs in the PDF |
options.tfeedback | boolean | Include linked Feedback-Systems in the PDF |
options.tliterature | boolean | Include the literature list in the PDF |
options.notizen | boolean | Include the notes in the PDF |
options.rreflexiontermin | boolean | Include the reflection of each session in the PDF |
options.rreflexiongesamt | boolean | Include the reflection for the whole class in the PDF |
callback | function | Function to call when createPDF finished |
altCollection | object | Collection-Object, defaults to eLP.collections[0] |
core.createDoc(options, callback, veranst)
Create text-document to an [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} Soon-ish will be .docx-document, for now an old .doc-document
Kind: static method of core
Param | Type | Description |
---|---|---|
options | object | Settings-Object |
options.lehrplan | boolean | Show small-print "Lehrplan" |
options.orientation | string | 'portrait' |
options.layout | string | 'table' |
options.cover | string | If truthy, pass to convertHtmlToPdf and use that output for the first page, disabling default cover-page |
options.toc | boolean | If truthy, print table of contents |
options.rinstitute | boolean | Include institute in PDF |
options.rstudiengang | boolean | Include studiengang in PDF |
options.rfaculty | boolean | Include faculty in PDF |
options.rnr | boolean | Include event number in PDF |
options.rtyp | boolean | Include event type in PDF |
options.rname | boolean | Include event name in PDF |
options.rdates | boolean | Include dates, date rhythm and time in overview in PDF |
options.rbeschreibung | boolean | Include the instructional context in PDF |
options.rgesamtziel | boolean | Include the overall objective |
options.kompetenzen | boolean | Include competences |
options.phasecontent | boolean | Include the content description for each phase |
options.tphase | boolean | If truthy, include the phase-header for content planning; only relevant if ttermindatephase falsy |
options.ttermin | boolean | If truthy, include the date-header for content planning; only relevant if ttermindatephase and ttermindate falsy |
options.tdate | boolean | If truthy, include the date of a session for content planning; only relevant if ttermindatephase and ttermindate falsy |
options.tthema | boolean | Include the topic of the session |
options.tcategory | boolean | Include the category of a session |
options.tbreak | boolean | Include break-phases |
options.tzeit | boolean | Include the start- and endtime of phases |
options.ttechnik | boolean | Include devices |
options.ttaxziel | boolean | Include both taxonomy-values and outcomes; if truthy, ignore ttax and tziel |
options.ttax | boolean | Include selected taxonomy levels of phases; only relevant if ttaxziel falsy |
options.tziel | boolean | Include learning outcomes; only relevant if ttaxziel falsy |
options.tmethode | boolean | Include learning method; only relevant if tmethodeaktiv falsy |
options.tapps | boolean | Include applications |
options.tmaterials | boolean | Include applications |
options.taktiv | boolean | Include learning activities; only relevant if tmethodeaktiv falsy |
options.tmethodeaktiv | boolean | Include both learning method and learning outcome; if truthy, ignore tmethode and taktiv |
options.tpmethode | boolean | Include assessment methods; only relevant if tpmethodebesch falsy |
options.tpmethodebesch | boolean | Include assessment method and the description of the learning success test in the PDF; if truthy, ignore tpmethode and tpruefung |
options.tpruefung | boolean | Include the description of the learning success; only relevant if tpmethodebesch is falsy |
options.tpruefungsfrage | boolean | Include assessment tasks |
options.tarbeitsblatt | boolean | Include the worksheet in the PDF |
options.turl | boolean | Include linked URLs in the PDF |
options.tfeedback | boolean | Include linked Feedback-Systems in the PDF |
options.tliterature | boolean | Include the literature list in the PDF |
options.notizen | boolean | Include the notes in the PDF |
options.rreflexiontermin | boolean | Include the reflection of each session in the PDF |
options.rreflexiongesamt | boolean | Include the reflection for the whole class in the PDF |
callback | function | Function to call when createDoc finished |
veranst | object | [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to currently selected Veranstaltung-Object |
core.saveVeranstaltung(veranst, defaultName)
Save [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} as json-File
Kind: static method of core
Param | Type | Description |
---|---|---|
veranst | object | string | Veranstaltung-Object or key of one to save |
defaultName | string | String to use as defaultName-parameter for eLP.core.getVeranstaltungTitle, defaults to eLP.core.translate('save_defaultname') |
core.saveCollection(collection, defaultName)
Save Collection-Object as json-File
Kind: static method of core
Param | Type | Description |
---|---|---|
collection | object | string | Collection-Object or key of one to save |
defaultName | string | String to use if collection.name is falsy, defaults to eLP.core.translate('save_defaultname') |
core.checkChildrenCheckboxType1(elem)
To use on input-checkbox which has "children"-checkboxes in the ul-element next after the parent element, checks the "children"-checkbox to change properties "checked" and "indeterminate" for "parent"-checkbox Afterwards calls eLP.core.checkChildrenCheckboxType2 on sibling-checkbox with nth-type(2) of elem
Kind: static method of core
Param | Type | Description |
---|---|---|
elem | object | string | NodeElement(s) or jQuery-Selector of "parent"-checkboxes |
core.checkChildrenCheckboxType2(elem)
To use on secondary "parent"-checkbox which has "children"-checkboxes in the ul-element next after the parent element, only consideres secondary checkboxes if appropriate primary checkbox is checked, if no primary checkbox is checked, disables elem
Kind: static method of core
Param | Type | Description |
---|---|---|
elem | object | string | NodeElement(s) or jQuery-Selector of secondary "parent"-checkboxes |
core.deleteVeranst(veranstId)
Delete [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, looking through collections to delete there too and fixing Veranstaltungsliste-view and Calendar-view
Kind: static method of core
Param | Type | Description |
---|---|---|
veranstId | string | ID of Veranstaltung-Object to delete |
core.selectVeranst(veranstId, stay)
Select [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}
Kind: static method of core
Param | Type | Description |
---|---|---|
veranstId | string | ID of Veranstaltung-Object to select |
stay | boolean | If falsy, change to rahmenbedingungen-view after selecting the Veranstaltung-Object |
core.deselectVeranst()
De-Select currently selected [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}
Kind: static method of core
core.createVeranst(opts)
Create new [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt} by opening a vex-dialog
Kind: static method of core
Param | Type | Description |
---|---|---|
opts | object | Options-Object with pre-selected Values |
opts.start | object | * | Moment-Object or moment-castable value, to use as start-date and -time, defaults to current time |
opts.end | object | * | Moment-Object or moment-castable value, to use as end-date and -time, defaults to current time plus 2 hours |
opts.collection | string | Key for Collection-Object in eLP.collections of which the new Veranstaltung-Object is part of |
core.editVeranst(veranst)
Open vex-dialog to change [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}
Kind: static method of core
Param | Type | Description |
---|---|---|
veranst | object | Veranstaltung-Object to change, defaults to currently selected Veranstaltung-Object |
core.veranstChangeDates(newDates, veranst)
Change the Dates-Object in the Veranstaltung-Object and apply appropriate changes to Terminplanung-Array:
- Terminplanung-Array is at least dates.count long
- Termin.termine becomes nth-entry in eLP.core.datesToArray(dates)
- Starttime of first phase in each Termin-Object becomes appropriate date.time1
- Endtime of last phase in each Termin-Object becomes appropriate date.time2
Kind: static method of core
Param | Type | Description |
---|---|---|
newDates | object | New Dates-Object |
veranst | object | Veranstaltung-Object, defaults to currently selected Veranstaltung-Object |
core.createCollection()
Create new Collection-Object, append it to eLP.collections and update Veranstaltungsliste-view
Kind: static method of core
core.getVeranstaltungTitle(veranst, defaultName) ⇒ string
Get (short) title of [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, uses name or nummer or defaultName
Kind: static method of core
Returns: string
- (Short) title of the Veranstaltung-Object
Param | Type | Description |
---|---|---|
veranst | object | Veranstaltung-Object, defaults to currently selected Veranstaltung-Object |
defaultName | string | String to use if Veranstaltung-Object doesn't specify name or nummer, defaults to 'Veranstaltung' |
core.getVeranstaltungTitleFull(veranst) ⇒ string
Get full title of [Veranstaltung-Objekt]{@tutorial Spezielle-Formate-Veranstaltungsobjekt}, defaults to eLP.core.translate('lecture')
Kind: static method of core
Returns: string
- Full title of the Veranstaltung-Object
Param | Type | Description |
---|---|---|
veranst | object | Veranstaltung-Object, defaults to currently selected Veranstaltung-Object |
eLP.calendar : object
Namespace for the Calendar-view of loaded Veranstaltungen
Kind: static namespace of eLP
- .calendar :
object
- .$ :
object
- .fillCollections(element)
- .$ :
calendar.$ : object
fullCalendar-instance on the Calendar-view
Kind: static property of calendar
calendar.fillCollections(element)
Fill collections-list and free-events-list in Veranstaltungsliste-view
Kind: static method of calendar
Param | Type | Description |
---|---|---|
element | object | string | NodeElement or jQuery-Selector of NodeElement, defaults to the body-element |