Showing
5 changed files
with
73 additions
and
19 deletions
This diff is collapsed. Click to expand it.
... | @@ -35,6 +35,7 @@ body { | ... | @@ -35,6 +35,7 @@ body { |
35 | 35 | ||
36 | .appLabeledObjectsTabularLabel { | 36 | .appLabeledObjectsTabularLabel { |
37 | width: 160px; | 37 | width: 160px; |
38 | + min-width: 160px; | ||
38 | } | 39 | } |
39 | 40 | ||
40 | .appLabeledObjectsTable { | 41 | .appLabeledObjectsTable { |
... | @@ -46,6 +47,7 @@ body { | ... | @@ -46,6 +47,7 @@ body { |
46 | 47 | ||
47 | .appLabeledObjectsIconsTD { | 48 | .appLabeledObjectsIconsTD { |
48 | width: 16px; | 49 | width: 16px; |
50 | + min-width: 16px; | ||
49 | vertical-align: top; | 51 | vertical-align: top; |
50 | padding-top: 4px; | 52 | padding-top: 4px; |
51 | } | 53 | } | ... | ... |
... | @@ -157,8 +157,9 @@ function appInsertLoadingIndicator(e) { | ... | @@ -157,8 +157,9 @@ function appInsertLoadingIndicator(e) { |
157 | * syntax, e.g. '<http://example.org/MyClass>' or '"2011-11-11"^^xsd:date'. | 157 | * syntax, e.g. '<http://example.org/MyClass>' or '"2011-11-11"^^xsd:date'. |
158 | * @param id the id of the loadable | 158 | * @param id the id of the loadable |
159 | * @param args a JavaScript object with additional parameters | 159 | * @param args a JavaScript object with additional parameters |
160 | + * @param callback an optional callback that is called after loading | ||
160 | */ | 161 | */ |
161 | -function appLoad(id, args) { | 162 | +function appLoad(id, args, callback) { |
162 | var e = $('#' + id); | 163 | var e = $('#' + id); |
163 | var base = e.attr('uistate'); | 164 | var base = e.attr('uistate'); |
164 | if(!base) { | 165 | if(!base) { |
... | @@ -179,6 +180,9 @@ function appLoad(id, args) { | ... | @@ -179,6 +180,9 @@ function appLoad(id, args) { |
179 | // TODO: Error handling may not work yet | 180 | // TODO: Error handling may not work yet |
180 | e.load(uispinServlet, url, function() { | 181 | e.load(uispinServlet, url, function() { |
181 | appLoadPostProcessAll(e); | 182 | appLoadPostProcessAll(e); |
183 | + if(callback) { | ||
184 | + callback.call(); | ||
185 | + } | ||
182 | }); | 186 | }); |
183 | } | 187 | } |
184 | 188 | ||
... | @@ -266,17 +270,6 @@ function appLoadSearchResultsGrid(formId, targetId, onSelect) { | ... | @@ -266,17 +270,6 @@ function appLoadSearchResultsGrid(formId, targetId, onSelect) { |
266 | } | 270 | } |
267 | 271 | ||
268 | 272 | ||
269 | -function appResizeGrid(pane, $Pane, paneState) { | ||
270 | - /* | ||
271 | - if(grid = $('.ui-jqgrid')) { //}-btable:visible')) { | ||
272 | - grid.each(function(index) { | ||
273 | - var gridId = $(this).attr('id'); | ||
274 | - $('#' + gridId).setGridWidth(paneState.innerWidth - 2); | ||
275 | - }); | ||
276 | - }*/ | ||
277 | -} | ||
278 | - | ||
279 | - | ||
280 | /** | 273 | /** |
281 | * Loads a given ui:loadable with a given variable pre-bound to | 274 | * Loads a given ui:loadable with a given variable pre-bound to |
282 | * a given URI resource. | 275 | * a given URI resource. |
... | @@ -320,6 +313,33 @@ function appNavigateToInTab(resourceURI, queryGraphURI) { | ... | @@ -320,6 +313,33 @@ function appNavigateToInTab(resourceURI, queryGraphURI) { |
320 | 313 | ||
321 | 314 | ||
322 | /** | 315 | /** |
316 | + * Loads and then opens a dialog that was inserted into the current | ||
317 | + * document using app:ResourceViewDialog. | ||
318 | + * @param loadId the id of the loadable (same as arg:loadId of the app:ResourceViewDialog) | ||
319 | + * @param resourceURI the URI of the resource to display | ||
320 | + * @param width (optional) the width in pixels | ||
321 | + * @param height (optional) the height in pixels | ||
322 | + */ | ||
323 | +function appOpenResourceViewDialog(loadId, resourceURI, width, height) { | ||
324 | + appLoad(loadId, { resource: '<' + resourceURI + '>' }, function() { | ||
325 | + var div = $('#div-' + loadId); | ||
326 | + var title = div.attr('title'); | ||
327 | + var options = { | ||
328 | + modal: true, | ||
329 | + title: title | ||
330 | + }; | ||
331 | + if(width) { | ||
332 | + options.width = width; | ||
333 | + } | ||
334 | + if(width) { | ||
335 | + options.height = height; | ||
336 | + } | ||
337 | + div.dialog(options); | ||
338 | + }); | ||
339 | +} | ||
340 | + | ||
341 | + | ||
342 | +/** | ||
323 | * Walks up the parents of a 'link' element with a given id until it | 343 | * Walks up the parents of a 'link' element with a given id until it |
324 | * finds a form. Then it replaces that form with a new form displaying | 344 | * finds a form. Then it replaces that form with a new form displaying |
325 | * a given resource. | 345 | * a given resource. |
... | @@ -338,6 +358,18 @@ function appReloadForm(resourceURI, queryGraphURI, linkElementId) { | ... | @@ -338,6 +358,18 @@ function appReloadForm(resourceURI, queryGraphURI, linkElementId) { |
338 | } | 358 | } |
339 | 359 | ||
340 | 360 | ||
361 | +function appResizeGrid(pane, $Pane, paneState) { | ||
362 | + // TODO: not working well | ||
363 | + /* | ||
364 | + if(grid = $('.ui-jqgrid')) { //}-btable:visible')) { | ||
365 | + grid.each(function(index) { | ||
366 | + var gridId = $(this).attr('id'); | ||
367 | + $('#' + gridId).setGridWidth(paneState.innerWidth - 2); | ||
368 | + }); | ||
369 | + }*/ | ||
370 | +} | ||
371 | + | ||
372 | + | ||
341 | /** | 373 | /** |
342 | * Selects a given node in a given tree. | 374 | * Selects a given node in a given tree. |
343 | * Will expand if necessary, using a server-side shortest path algorithm. | 375 | * Will expand if necessary, using a server-side shortest path algorithm. | ... | ... |
... | @@ -48,7 +48,8 @@ log:LogEvent | ... | @@ -48,7 +48,8 @@ log:LogEvent |
48 | app:keyProperties (<http://purl.org/dc/terms/created> rdf:type log:initiatedBy log:onBehalfOf log:outcome rdfs:comment) ; | 48 | app:keyProperties (<http://purl.org/dc/terms/created> rdf:type log:initiatedBy log:onBehalfOf log:outcome rdfs:comment) ; |
49 | ui:instanceView | 49 | ui:instanceView |
50 | [ rdf:type log:LogEventFormBody ; | 50 | [ rdf:type log:LogEventFormBody ; |
51 | - arg:resource spin:_this | 51 | + arg:resource spin:_this ; |
52 | + ui:id "search"^^xsd:string | ||
52 | ] ; | 53 | ] ; |
53 | ui:view [ rdf:type log:LogBrowser | 54 | ui:view [ rdf:type log:LogBrowser |
54 | ] . | 55 | ] . |
... | @@ -226,7 +227,8 @@ log:ReportDownloadEvent | ... | @@ -226,7 +227,8 @@ log:ReportDownloadEvent |
226 | ui:childIndex 1 | 227 | ui:childIndex 1 |
227 | ] ; | 228 | ] ; |
228 | ui:childIndex 1 | 229 | ui:childIndex 1 |
229 | - ] | 230 | + ] ; |
231 | + ui:id "search"^^xsd:string | ||
230 | ] . | 232 | ] . |
231 | 233 | ||
232 | log:ReportEvent | 234 | log:ReportEvent |
... | @@ -243,7 +245,8 @@ log:ReportEvent | ... | @@ -243,7 +245,8 @@ log:ReportEvent |
243 | arg:label "Report type"^^xsd:string ; | 245 | arg:label "Report type"^^xsd:string ; |
244 | arg:predicate log:reportType ; | 246 | arg:predicate log:reportType ; |
245 | ui:childIndex 1 | 247 | ui:childIndex 1 |
246 | - ] | 248 | + ] ; |
249 | + ui:id "search"^^xsd:string | ||
247 | ] . | 250 | ] . |
248 | 251 | ||
249 | log:ReportUploadEvent | 252 | log:ReportUploadEvent |
... | @@ -273,7 +276,8 @@ log:ReportUploadEvent | ... | @@ -273,7 +276,8 @@ log:ReportUploadEvent |
273 | ui:childIndex 1 | 276 | ui:childIndex 1 |
274 | ] ; | 277 | ] ; |
275 | ui:childIndex 1 | 278 | ui:childIndex 1 |
276 | - ] | 279 | + ] ; |
280 | + ui:id "search"^^xsd:string | ||
277 | ] . | 281 | ] . |
278 | 282 | ||
279 | log:TableBrowser | 283 | log:TableBrowser |
... | @@ -342,6 +346,7 @@ log:TableBrowser | ... | @@ -342,6 +346,7 @@ log:TableBrowser |
342 | [ rdf:type app:SearchForm ; | 346 | [ rdf:type app:SearchForm ; |
343 | arg:formId "searchForm"^^xsd:string ; | 347 | arg:formId "searchForm"^^xsd:string ; |
344 | arg:noBorder "true"^^xsd:boolean ; | 348 | arg:noBorder "true"^^xsd:boolean ; |
349 | + arg:onSelect "appOpenResourceViewDialog('viewDialog', resource, 500, 400)"^^xsd:string ; | ||
345 | arg:queryGraph | 350 | arg:queryGraph |
346 | [ sp:varName "queryGraph"^^xsd:string | 351 | [ sp:varName "queryGraph"^^xsd:string |
347 | ] ; | 352 | ] ; |
... | @@ -395,6 +400,18 @@ log:TableBrowser | ... | @@ -395,6 +400,18 @@ log:TableBrowser |
395 | });"""^^xsd:string | 400 | });"""^^xsd:string |
396 | ] ; | 401 | ] ; |
397 | ui:childIndex 2 | 402 | ui:childIndex 2 |
403 | + ] ; | ||
404 | + ui:child | ||
405 | + [ rdf:type ui:setContext ; | ||
406 | + ui:child | ||
407 | + [ rdf:type app:ResourceViewDialog ; | ||
408 | + arg:loadId "viewDialog"^^xsd:string ; | ||
409 | + ui:childIndex 0 | ||
410 | + ] ; | ||
411 | + ui:childIndex 3 ; | ||
412 | + ui:queryGraph | ||
413 | + [ sp:varName "queryGraph"^^xsd:string | ||
414 | + ] | ||
398 | ] | 415 | ] |
399 | ] . | 416 | ] . |
400 | 417 | ... | ... |
... | @@ -22,7 +22,8 @@ report:AbstractDR | ... | @@ -22,7 +22,8 @@ report:AbstractDR |
22 | app:keyProperties (<http://purl.org/dc/terms/created> <http://purl.org/dc/terms/date> rdf:type <http://rdfs.org/sioc/ns#id>) ; | 22 | app:keyProperties (<http://purl.org/dc/terms/created> <http://purl.org/dc/terms/date> rdf:type <http://rdfs.org/sioc/ns#id>) ; |
23 | ui:instanceView | 23 | ui:instanceView |
24 | [ rdf:type report:DRFormBody ; | 24 | [ rdf:type report:DRFormBody ; |
25 | - arg:resource spin:_this | 25 | + arg:resource spin:_this ; |
26 | + ui:id "search"^^xsd:string | ||
26 | ] . | 27 | ] . |
27 | 28 | ||
28 | report:DDR | 29 | report:DDR |
... | @@ -40,7 +41,8 @@ report:DDR | ... | @@ -40,7 +41,8 @@ report:DDR |
40 | arg:label "Well bore id"^^xsd:string ; | 41 | arg:label "Well bore id"^^xsd:string ; |
41 | arg:predicate report:wellBoreId ; | 42 | arg:predicate report:wellBoreId ; |
42 | ui:childIndex 1 | 43 | ui:childIndex 1 |
43 | - ] | 44 | + ] ; |
45 | + ui:id "search"^^xsd:string | ||
44 | ] . | 46 | ] . |
45 | 47 | ||
46 | report:DPR | 48 | report:DPR |
... | @@ -52,7 +54,8 @@ report:DPR | ... | @@ -52,7 +54,8 @@ report:DPR |
52 | [ rdf:type report:DRFormBody ; | 54 | [ rdf:type report:DRFormBody ; |
53 | arg:resource spin:_this ; | 55 | arg:resource spin:_this ; |
54 | ui:childIndex 0 | 56 | ui:childIndex 0 |
55 | - ] | 57 | + ] ; |
58 | + ui:id "search"^^xsd:string | ||
56 | ] . | 59 | ] . |
57 | 60 | ||
58 | report:DRFormBody | 61 | report:DRFormBody | ... | ... |
-
Please register or login to post a comment