Showing
5 changed files
with
50 additions
and
12 deletions
| ... | @@ -6869,6 +6869,18 @@ This expression is called if a node and a predicate/subject type combination is | ... | @@ -6869,6 +6869,18 @@ This expression is called if a node and a predicate/subject type combination is |
| 6869 | rdfs:range app:WeightedExpression ; | 6869 | rdfs:range app:WeightedExpression ; |
| 6870 | rdfs:subPropertyOf app:systemProperty . | 6870 | rdfs:subPropertyOf app:systemProperty . |
| 6871 | 6871 | ||
| 6872 | +app:reloadable | ||
| 6873 | + rdf:type ui:NodeClass ; | ||
| 6874 | + rdfs:comment "Marks the children of this element as reloadable through an Ajax request. The JavaScript function appReload (which can also be produced through the SPIN function app:reload) can be used to trigger a reload."^^xsd:string ; | ||
| 6875 | + rdfs:label "reloadable"^^xsd:string ; | ||
| 6876 | + rdfs:subClassOf ui:ControlElement ; | ||
| 6877 | + spin:constraint | ||
| 6878 | + [ rdf:type spl:Argument ; | ||
| 6879 | + rdfs:comment "The id of the reloadable element."^^xsd:string ; | ||
| 6880 | + spl:predicate arg:id ; | ||
| 6881 | + spl:valueType xsd:string | ||
| 6882 | + ] . | ||
| 6883 | + | ||
| 6872 | app:removeUniqueId | 6884 | app:removeUniqueId |
| 6873 | rdf:type spin:Function ; | 6885 | rdf:type spin:Function ; |
| 6874 | rdfs:comment "Takes a string and removes everything after the :: (including the :: itself). This is needed to de-code tree node ids."^^xsd:string ; | 6886 | rdfs:comment "Takes a string and removes everything after the :: (including the :: itself). This is needed to de-code tree node ids."^^xsd:string ; | ... | ... |
| ... | @@ -173,6 +173,14 @@ a:active.appFormHeaderLink { | ... | @@ -173,6 +173,14 @@ a:active.appFormHeaderLink { |
| 173 | background-position: -16px 0px !important; | 173 | background-position: -16px 0px !important; |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | +.appLoadingIndicator { | ||
| 177 | + background-image: url(images/appLoadingIndicator.gif); | ||
| 178 | + background-repeat: no-repeat; | ||
| 179 | + background-position: 8px 8px; | ||
| 180 | + width: 32px; | ||
| 181 | + height: 32px; | ||
| 182 | +} | ||
| 183 | + | ||
| 176 | div.appTop {text-align:right} | 184 | div.appTop {text-align:right} |
| 177 | div.appTop div {display:inline; white-space:nowrap} | 185 | div.appTop div {display:inline; white-space:nowrap} |
| 178 | div.appTop div.appLeft {float:left} | 186 | div.appTop div.appLeft {float:left} | ... | ... |
| ... | @@ -212,6 +212,27 @@ function appLoadSearchForm(oldElementId, resultsId, resourceTypeURI, queryGraphU | ... | @@ -212,6 +212,27 @@ function appLoadSearchForm(oldElementId, resultsId, resourceTypeURI, queryGraphU |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | 214 | ||
| 215 | +function appReload(id, args) { | ||
| 216 | + var e = $('#' + id); | ||
| 217 | + var base = e.attr('reload'); | ||
| 218 | + if(!base) { | ||
| 219 | + alert('Error: Invalid use of appReload: Missing reload attribute at ' + id); | ||
| 220 | + return; | ||
| 221 | + } | ||
| 222 | + var url = base; | ||
| 223 | + if(args) { | ||
| 224 | + var c = {}; | ||
| 225 | + for(var key in args) { | ||
| 226 | + c['_scope' + key] = args[key]; | ||
| 227 | + } | ||
| 228 | + var p = jQuery.param(c); | ||
| 229 | + url = p + "&" + base; | ||
| 230 | + } | ||
| 231 | + e.html('<div class="appLoadingIndicator" />'); | ||
| 232 | + e.load(uispinServlet, url); | ||
| 233 | +} | ||
| 234 | + | ||
| 235 | + | ||
| 215 | /** | 236 | /** |
| 216 | * Loads a SearchResultsGrid based on the selections in a form with | 237 | * Loads a SearchResultsGrid based on the selections in a form with |
| 217 | * a given id. Will replace the content of a given target element. | 238 | * a given id. Will replace the content of a given target element. | ... | ... |
673 Bytes
| ... | @@ -47,28 +47,25 @@ log:LogBrowser | ... | @@ -47,28 +47,25 @@ log:LogBrowser |
| 47 | [ rdf:type app:Tree ; | 47 | [ rdf:type app:Tree ; |
| 48 | arg:dataProvider log:LogEventClassTreeDataProvider ; | 48 | arg:dataProvider log:LogEventClassTreeDataProvider ; |
| 49 | arg:id "classTree"^^xsd:string ; | 49 | arg:id "classTree"^^xsd:string ; |
| 50 | - arg:onSelect | 50 | + arg:onSelect "appReload('form', {resourceType: '<' + resource + '>'})"^^xsd:string ; |
| 51 | - [ rdf:type app:createLoadSearchFormCall ; | ||
| 52 | - arg:noBorder "true"^^xsd:boolean ; | ||
| 53 | - arg:oldElementId "searchForm" ; | ||
| 54 | - arg:queryGraph <http://www.reportinghub.no/graph/logging> ; | ||
| 55 | - arg:resourceTypeCode | ||
| 56 | - "resource" ; | ||
| 57 | - arg:resultsId "results" | ||
| 58 | - ] ; | ||
| 59 | ui:childIndex 1 | 51 | ui:childIndex 1 |
| 60 | ] ; | 52 | ] ; |
| 61 | ui:childIndex 0 | 53 | ui:childIndex 0 |
| 62 | ] ; | 54 | ] ; |
| 63 | ui:child | 55 | ui:child |
| 64 | - [ rdf:type html:Div ; | 56 | + [ rdf:type app:reloadable ; |
| 65 | - html:id "formHolder"^^xsd:string ; | 57 | + arg:id "form"^^xsd:string ; |
| 66 | ui:child | 58 | ui:child |
| 67 | [ rdf:type app:SearchForm ; | 59 | [ rdf:type app:SearchForm ; |
| 68 | arg:formId "searchForm"^^xsd:string ; | 60 | arg:formId "searchForm"^^xsd:string ; |
| 69 | arg:noBorder "true"^^xsd:boolean ; | 61 | arg:noBorder "true"^^xsd:boolean ; |
| 70 | arg:queryGraph <http://www.reportinghub.no/graph/logging> ; | 62 | arg:queryGraph <http://www.reportinghub.no/graph/logging> ; |
| 71 | - arg:resourceType log:LogEvent ; | 63 | + arg:resourceType |
| 64 | + [ rdf:type sp:coalesce ; | ||
| 65 | + sp:arg1 [ sp:varName "resourceType"^^xsd:string | ||
| 66 | + ] ; | ||
| 67 | + sp:arg2 log:LogEvent | ||
| 68 | + ] ; | ||
| 72 | arg:resultsId "results"^^xsd:string ; | 69 | arg:resultsId "results"^^xsd:string ; |
| 73 | ui:childIndex 0 | 70 | ui:childIndex 0 |
| 74 | ] ; | 71 | ] ; | ... | ... |
-
Please register or login to post a comment