~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to dhis-2/dhis-web/dhis-web-openhealth-integration/src/main/webapp/dhis-web-openhealth-integration/javascript/view.js

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
// -----------------------------------------------------------------------------
 
3
// View details
 
4
// -----------------------------------------------------------------------------
 
5
 
 
6
function showOlapURLDetails( id )
 
7
{
 
8
    var request = new Request();
 
9
    request.setResponseTypeXML( 'url' );
 
10
    request.setCallbackSuccess( olapURLReceived );
 
11
    request.send( 'getOlapURL.action?id=' + id );
 
12
}
 
13
 
 
14
function olapURLReceived( xmlObject )
 
15
{
 
16
    setFieldValue( 'nameField', getElementValue( xmlObject, 'name' ) );
 
17
    setFieldValue( 'urlField', getElementValue( xmlObject, 'url' ) );
 
18
    
 
19
    showDetails();
 
20
}
 
21
 
 
22
// -----------------------------------------------------------------------------
 
23
// Remove
 
24
// -----------------------------------------------------------------------------
 
25
 
 
26
function removeView( viewId )
 
27
{
 
28
        var dialog = confirm( i18n_confirm_remove_view );
 
29
        
 
30
        if ( dialog )
 
31
        {
 
32
                window.location.href = "deleteOlapURL.action?id=" + viewId;
 
33
        }
 
34
}
 
35
 
 
36
// -----------------------------------------------------------------------------
 
37
// Dashboard
 
38
// -----------------------------------------------------------------------------
 
39
 
 
40
function addToDashboard( id )
 
41
{
 
42
    var dialog = window.confirm( i18n_confirm_add_to_dashboard );
 
43
    
 
44
    if ( dialog )
 
45
    {
 
46
        var request = new Request(); 
 
47
        request.send( "addOlapUrlToDashboard.action?id=" + id );
 
48
    }
 
49
}