diff --git a/src/outline/licenseOptions.js b/src/outline/licenseOptions.js deleted file mode 100644 index 6b6e63b..0000000 --- a/src/outline/licenseOptions.js +++ /dev/null @@ -1,105 +0,0 @@ -// This was a student project to -// allow the user to chose favoite CC license terms and have them highlighted - -// tabulator.options becaome UI.licenseOptions -// Possible future alternative directoons: Store license preferences in a solid preferences file -import { store } from 'solid-logic' - -export const licenseURI = [ - 'http://creativecommons.org/licenses/by-nc-nd/3.0/', - 'http://creativecommons.org/licenses/by-nc-sa/3.0/', - 'http://creativecommons.org/licenses/by-nc/3.0/', - 'http://creativecommons.org/licenses/by-nd/3.0/', - 'http://creativecommons.org/licenses/by-sa/3.0/', - 'http://creativecommons.org/licenses/by/3.0/' -] - -const names = ['BY-NC-ND', 'BY-NC-SA', 'BY-NC', 'BY-ND', 'BY-SA', 'BY'] - -export function licenseOptions () { - this.options = {} - this.references = [] - this.checkedLicenses = [] - - this.openCheckBoxWindow = function () { - this.this.display = window.open( - ' ', - 'NewWin', - 'menubar=0,location=no,status=no,directories=no,toolbar=no,scrollbars=yes,height=200,width=200' - ) - } - let message = "
" - const lics = this.checkedLicenses - for (let kk = 0; kk < lics.length; kk++) { - message += - "CC: ' + - names[kk] + - '
' - } - - message += - "
[Select All] " // @@ FIXME - message += " [Deselect All]" // @@ FIXME - message += '
' - - this.display.document.write(message) - - this.display.document.close() - - let i - for (i = 0; i < 6; i++) { - this.references[i] = this.this.display.document.checkboxes.elements[i] - } - - this.selectAll = function () { - let i - for (i = 0; i < 6; i++) { - this.display.document.checkboxes.elements[i].checked = true - this.references[i].checked = true - this.checkedLicenses[i] = true - } - } - - this.deselectAll = function () { - let i - for (i = 0; i < 6; i++) { - this.display.document.checkboxes.elements[i].checked = false - this.references[i].checked = false - this.checkedLicenses[i] = false - } - } - - this.submit = function () { - // alert('this.submit: checked=' + this.references[0].checked) - for (let i = 0; i < 6; i++) { - this.checkedLicenses[i] = !!this.references[i].checked - } - } - - this.checkLicense = function checkLicense (statement) { - const licenses = store.each( - statement.why, - store.sym('http://creativecommons.org/ns#license'), - null, - statement.why - ) - // UI.log.info('licenses:' + statement.why + ': ' + licenses) - for (let i = 0; i < licenses.length; i++) { - for (let j = 0; j < this.checkedLicenses.length; j++) { - if (this.checkedLicenses[j] && licenses[i].uri === licenseURI[j]) { - return true - // theClass += ' licOkay' // icon_expand - // break - } - } - } - return false - } - return this -} - -// ends diff --git a/src/outline/manager.js b/src/outline/manager.js index 12e780b..50541ab 100644 --- a/src/outline/manager.js +++ b/src/outline/manager.js @@ -7,8 +7,6 @@ import * as $rdf from 'rdflib' import * as UI from 'solid-ui' import { authn, authSession, store } from 'solid-logic' import { propertyViews } from './propertyViews' -import { licenseOptions } from './licenseOptions' - import { outlineIcons } from './outlineIcons.js' // @@ chec import { UserInput } from './userInput.js' import * as queryByExample from './queryByExample.js' @@ -179,13 +177,6 @@ export default function (context) { td.setAttribute('notSelectable', 'false') let theClass = 'obj' - // check the IPR on the data. Ok if there is any checked license which is one the document has. - if (statement && statement.why) { - if (licenseOptions && licenseOptions.checklicense && licenseOptions.checklicense()) { - theClass += ' licOkay' // flag as light green etc .licOkay {background-color: #dfd} - } - } - // set about and put 'expand' icon if ( obj.termType === 'NamedNode' ||