Holger Knublauch

UI progress

......@@ -325,6 +325,46 @@ app:isDatatypeEnumeration
spin:private "true"^^xsd:boolean ;
spin:returnType xsd:boolean .
app:isDatatypeRange
rdf:type spin:Function ;
rdfs:comment "Checks whether a given resource (typically the range of a property) is a datatype. It must either be equal to rdfs:Literal or an instance of rdfs:Datatype."^^xsd:string ;
rdfs:label "is datatype range"^^xsd:string ;
rdfs:subClassOf app:Functions ;
spin:body
[ rdf:type sp:Ask ;
sp:where ([ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:bound ;
sp:arg1 [ sp:varName "range"^^xsd:string
]
]
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:or ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 [ sp:varName "range"^^xsd:string
] ;
sp:arg2 rdfs:Literal
] ;
sp:arg2 [ rdf:type sp:exists ;
sp:elements ([ sp:object rdfs:Datatype ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "range"^^xsd:string
]
])
]
]
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The range to check."^^xsd:string ;
spl:predicate arg:range ;
spl:valueType rdfs:Resource
] ;
spin:returnType xsd:boolean .
app:isImageURL
rdf:type spin:Function ;
rdfs:comment "Checks whether a given URL represents an image based on its suffix (.jpg, .gif or .png are recognized by default, but others can be added by putting an imageURLSuffix triple into a SWP file)."^^xsd:string ;
......@@ -1208,6 +1248,11 @@ arg:property
rdfs:label "property"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
arg:range
rdf:type rdf:Property ;
rdfs:label "range"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
arg:resource
rdf:type rdf:Property ;
rdfs:label "resource"^^xsd:string ;
......
......@@ -126,6 +126,13 @@ app:AbstractObject
rdfs:subClassOf app:ObjectElements ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "True to suppress this if the given subject has no value for the given predicate. Has no effect if we are not in view mode."^^xsd:string ;
spl:optional "true"^^xsd:boolean ;
spl:predicate arg:hideIfEmpty ;
spl:valueType xsd:boolean
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "A label, overriding the default label."^^xsd:string ;
spl:optional "true"^^xsd:boolean ;
spl:predicate arg:label ;
......@@ -139,6 +146,13 @@ app:AbstractObject
spl:predicate arg:labelWidth ;
spl:valueType xsd:string
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "True to use a fixed labelWidth so that all objects show up in a tabular alignment."^^xsd:string ;
spl:optional "true"^^xsd:boolean ;
spl:predicate arg:tabular ;
spl:valueType xsd:boolean
] ;
ui:abstract "true"^^xsd:boolean .
app:AbstractRadioButtonsEditor
......@@ -248,6 +262,13 @@ app:AbstractSubject
spl:optional "true"^^xsd:boolean ;
spl:predicate arg:labelWidth ;
spl:valueType xsd:string
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "True to set labels to a fixed width so that all subjects appear in a tabular layout."^^xsd:string ;
spl:optional "true"^^xsd:boolean ;
spl:predicate arg:tabular ;
spl:valueType xsd:boolean
] .
app:AutoComplete
......@@ -1950,81 +1971,131 @@ app:LabeledObjects
] ;
ui:private "true"^^xsd:boolean ;
ui:prototype
[ rdf:type html:Table ;
html:class "appLabeledObjectsTable"^^xsd:string ;
[ rdf:type ui:if ;
ui:child
[ rdf:type html:Tr ;
html:class "appLabeledObjectsTR"^^xsd:string ;
[ rdf:type html:Table ;
html:class "appLabeledObjectsTable"^^xsd:string ;
ui:child
[ rdf:type html:Td ;
html:class "appLabeledObjectsLabelTD"^^xsd:string ;
html:style
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "labelWidth"^^xsd:string
[ rdf:type html:Tr ;
html:class "appLabeledObjectsTR"^^xsd:string ;
ui:child
[ rdf:type html:Td ;
html:class
[ rdf:type ui:concat ;
sp:arg1 "appLabeledObjectsLabelTD "^^xsd:string ;
sp:arg2 [ rdf:type sp:if ;
sp:arg1 [ sp:varName "tabular"^^xsd:string
] ;
sp:arg2 "appLabeledObjectsTabularLabel" ;
sp:arg3 [ sp:varName "none"^^xsd:string
]
]
] ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 "width: " ;
sp:arg2 [ sp:varName "labelWidth"^^xsd:string
html:style
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "labelWidth"^^xsd:string
]
] ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 "width: " ;
sp:arg2 [ sp:varName "labelWidth"^^xsd:string
]
] ;
sp:arg3 [ sp:varName "none"^^xsd:string
]
] ;
sp:arg3 [ sp:varName "none"^^xsd:string
]
] ;
ui:child
[ rdf:type html:Div ;
html:class "appShiftedLabel"^^xsd:string ;
ui:child
[ rdf:type app:PropertyLabel ;
arg:label
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "label"^^xsd:string
[ rdf:type html:Div ;
html:class "appShiftedLabel"^^xsd:string ;
ui:child
[ rdf:type app:PropertyLabel ;
arg:label
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "label"^^xsd:string
]
] ;
sp:arg2 [ sp:varName "label"^^xsd:string
] ;
sp:arg3 [ rdf:type ui:label ;
sp:arg1 [ sp:varName "predicate"^^xsd:string
]
]
] ;
sp:arg2 [ sp:varName "label"^^xsd:string
arg:property
[ sp:varName "predicate"^^xsd:string
] ;
sp:arg3 [ rdf:type ui:label ;
sp:arg1 [ sp:varName "predicate"^^xsd:string
]
]
] ;
arg:property
[ sp:varName "predicate"^^xsd:string
ui:childIndex 0
] ;
ui:childIndex 0
] ;
ui:childIndex 0
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Td ;
html:class "appLabeledObjectsIconsTD"^^xsd:string ;
ui:child
[ rdf:type html:Span ;
html:class "appErrorIndicator appIcon"^^xsd:string ;
html:id [ rdf:type fn:concat ;
sp:arg1 "error-"^^xsd:string ;
sp:arg2 [ sp:varName "predicate"^^xsd:string
]
[ rdf:type html:Td ;
html:class "appLabeledObjectsIconsTD"^^xsd:string ;
ui:child
[ rdf:type html:Span ;
html:class "appErrorIndicator appIcon"^^xsd:string ;
html:id [ rdf:type ui:concat ;
sp:arg1 "error-"^^xsd:string ;
sp:arg2 [ sp:varName "predicate"^^xsd:string
]
] ;
ui:childIndex 0
] ;
ui:childIndex 0
ui:childIndex 1
] ;
ui:childIndex 1
] ;
ui:child
[ rdf:type html:Td ;
html:class "appLabeledObjectsBodyTD"^^xsd:string ;
ui:child
[ rdf:type app:ObjectsBody ;
ui:args "*"^^xsd:string ;
ui:childIndex 0
[ rdf:type html:Td ;
html:class "appLabeledObjectsBodyTD"^^xsd:string ;
ui:child
[ rdf:type app:ObjectsBody ;
ui:args "*"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 2
] ;
ui:childIndex 2
ui:childIndex 0
] ;
ui:childIndex 0
] ;
ui:condition
[ rdf:type sp:or ;
sp:arg1 [ rdf:type sp:or ;
sp:arg1 [ rdf:type sp:or ;
sp:arg1 [ rdf:type sp:not ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "hideIfEmpty"^^xsd:string
]
]
] ;
sp:arg2 [ rdf:type sp:ne ;
sp:arg1 [ sp:varName "hideIfEmpty"^^xsd:string
] ;
sp:arg2 "true"^^xsd:boolean
]
] ;
sp:arg2 [ rdf:type sp:ne ;
sp:arg1 [ rdf:type app:mode
] ;
sp:arg2 [ rdf:type app:ViewMode
]
]
] ;
sp:arg2 [ rdf:type sp:exists ;
sp:elements ([ sp:object
[ sp:varName "anyObject"^^xsd:string
] ;
sp:predicate
[ sp:varName "predicate"^^xsd:string
] ;
sp:subject
[ sp:varName "subject"^^xsd:string
]
])
]
]
] .
......@@ -2040,7 +2111,17 @@ app:LabeledSubjects
html:class "appLabeledObjectsTR"^^xsd:string ;
ui:child
[ rdf:type html:Td ;
html:class "appLabeledObjectsLabelTD"^^xsd:string ;
html:class
[ rdf:type ui:concat ;
sp:arg1 "appLabeledObjectsLabelTD "^^xsd:string ;
sp:arg2 [ rdf:type sp:if ;
sp:arg1 [ sp:varName "tabular"^^xsd:string
] ;
sp:arg2 "appLabeledObjectsTabularLabel" ;
sp:arg3 [ sp:varName "none"^^xsd:string
]
]
] ;
html:style
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:bound ;
......@@ -2795,20 +2876,77 @@ app:ObjectViewer
]
] ;
ui:child
[ rdf:type ui:dynamicView ;
arg:object
[ sp:varName "object"^^xsd:string
] ;
arg:predicate
[ sp:varName "predicate"^^xsd:string
] ;
arg:subject
[ sp:varName "subject"^^xsd:string
[ rdf:type ui:if ;
ui:child
[ rdf:type ui:dynamicView ;
arg:object
[ sp:varName "object"^^xsd:string
] ;
arg:predicate
[ sp:varName "predicate"^^xsd:string
] ;
arg:subject
[ sp:varName "subject"^^xsd:string
] ;
ui:childIndex 0 ;
ui:class
[ sp:varName "class"^^xsd:string
]
] ;
ui:childIndex 0 ;
ui:class
[ sp:varName "class"^^xsd:string
ui:condition
[ rdf:type sp:bound ;
sp:arg1 [ sp:varName "class"^^xsd:string
]
]
] ;
ui:child
[ rdf:type ui:else ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "[Error: no ObjectViewer found for "^^xsd:string
] ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 1 ;
ui:text [ rdf:type ui:label ;
sp:arg1 [ sp:varName "subject"^^xsd:string
]
]
] ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 2 ;
ui:text ", "^^xsd:string
] ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 3 ;
ui:text [ rdf:type ui:label ;
sp:arg1 [ sp:varName "predicate"^^xsd:string
]
]
] ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 4 ;
ui:text ", "^^xsd:string
] ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 5 ;
ui:text [ rdf:type ui:label ;
sp:arg1 [ sp:varName "object"^^xsd:string
]
]
] ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 6 ;
ui:text "]"^^xsd:string
] ;
ui:childIndex 1
]
] .
......@@ -3316,13 +3454,13 @@ app:ObjectsGroup
[ rdf:type ui:forEach ;
ui:child
[ rdf:type app:Objects ;
arg:labelWidth "160px"^^xsd:string ;
arg:predicate
[ sp:varName "predicate"^^xsd:string
] ;
arg:subject
[ sp:varName "subject"^^xsd:string
] ;
arg:tabular "true"^^xsd:boolean ;
ui:childIndex 0
] ;
ui:childIndex 1 ;
......@@ -3624,10 +3762,10 @@ app:ResourceFacet
]
] ;
sp:arg2 [ rdf:type sp:not ;
sp:arg1 [ rdf:type spl:instanceOf ;
sp:arg1 [ sp:varName "range"^^xsd:string
] ;
sp:arg2 rdfs:Datatype
sp:arg1 [ rdf:type app:isDatatypeRange ;
arg:range
[ sp:varName "range"^^xsd:string
]
]
]
]
......@@ -4254,52 +4392,35 @@ app:StringFacet
[ rdf:type app:WeightedExpression ;
app:expression
[ rdf:type sp:or ;
sp:arg1 [ rdf:type sp:or ;
sp:arg1 [ rdf:type sp:not ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "range"^^xsd:string
]
]
] ;
sp:arg2 [ rdf:type spl:instanceOf ;
sp:arg1 [ rdf:type sp:not ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "range"^^xsd:string
] ;
sp:arg2 rdfs:Datatype
]
]
] ;
sp:arg2 [ rdf:type sp:eq ;
sp:arg1 [ sp:varName "range"^^xsd:string
] ;
sp:arg2 rdfs:Literal
sp:arg2 [ rdf:type app:isDatatypeRange ;
arg:range
[ sp:varName "range"^^xsd:string
]
]
]
] ;
ui:prototype
[ rdf:type ui:group ;
let:datatype
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "node"^^xsd:string
]
] ;
sp:arg2 [ rdf:type sp:datatype ;
sp:arg1 [ sp:varName "node"^^xsd:string
]
[ rdf:type app:localRange ;
arg:predicate
[ sp:varName "predicate"^^xsd:string
] ;
sp:arg3 [ rdf:type app:localRange ;
arg:predicate
[ sp:varName "predicate"^^xsd:string
] ;
arg:subject
[ sp:varName "subject"^^xsd:string
]
arg:subject
[ sp:varName "subject"^^xsd:string
]
] ;
ui:child
[ rdf:type html:Input ;
html:name
[ rdf:type fn:concat ;
sp:arg1 "regex" ;
[ rdf:type ui:concat ;
sp:arg1 "regex"^^xsd:string ;
sp:arg2 [ sp:varName "uid"^^xsd:string
]
] ;
......@@ -5195,13 +5316,13 @@ app:SubjectsGroup
[ rdf:type ui:forEach ;
ui:child
[ rdf:type app:Subjects ;
arg:labelWidth "160px"^^xsd:string ;
arg:object
[ sp:varName "object"^^xsd:string
] ;
arg:predicate
[ sp:varName "predicate"^^xsd:string
] ;
arg:tabular "true"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 1 ;
......@@ -5705,33 +5826,6 @@ app:ViewForm
arg:resource
[ sp:varName "resource"^^xsd:string
] ;
ui:child
[ rdf:type ui:insert ;
ui:child
[ rdf:type ui:if ;
ui:child
[ rdf:type app:FormToggleButton ;
arg:formId
[ sp:varName "formId"^^xsd:string
] ;
arg:label "Edit"^^xsd:string ;
arg:modeName "edit"^^xsd:string ;
arg:resource
[ sp:varName "resource"^^xsd:string
] ;
ui:childIndex 0
] ;
ui:childIndex 0 ;
ui:condition
[ rdf:type app:canEditResource ;
arg:resource
[ sp:varName "resource"^^xsd:string
]
]
] ;
ui:childIndex 0 ;
ui:into "toolBar"^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
......@@ -7003,6 +7097,11 @@ arg:height
rdfs:label "height"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
arg:hideIfEmpty
rdf:type rdf:Property ;
rdfs:label "hide if empty"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
arg:id
rdf:type rdf:Property ;
rdfs:label "id"^^xsd:string ;
......@@ -7133,6 +7232,11 @@ arg:switchable
rdfs:label "switchable"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
arg:tabular
rdf:type rdf:Property ;
rdfs:label "tabular"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
arg:targetId
rdf:type rdf:Property ;
rdfs:label "target id"^^xsd:string ;
......
......@@ -18,7 +18,7 @@ body {
.appAutoComplete {
}
.appBaseFont, .appObjectWidget, .appLabeledObjectsLabelTD {
.appBaseFont, .appObjectWidget, .appLabeledObjectsTable {
font-size: 12px;
}
......@@ -30,7 +30,11 @@ body {
}
.appLabeledObjectsBodyTD {
padding: 0px;
padding: 0px 0px 1px 0px;
}
.appLabeledObjectsTabularLabel {
width: 160px;
}
.appLabeledObjectsTable {
......@@ -228,14 +232,14 @@ td.appPropertyWidgetObjectTD {
.appSubTitle {
color: gray;
font-size: 18px;
font-size: 15px;
font-weight: bold;
margin-bottom: 6px;
}
.appTitle {
color: gray;
font-size: 22px;
font-size: 18px;
font-weight: bold;
margin-bottom: 14px;
}
......
......@@ -44,7 +44,8 @@
</ui:if>
<ui:else>
{
name : 'label'
name : 'label',
width: 400
}
</ui:else>
],
......