------------------------------------------------------------ revno: 15422 committer: Morten Olav Hansen <morte...@gmail.com> branch nick: dhis2 timestamp: Mon 2014-05-26 23:36:48 +0200 message: minor fix for sharing dialog, create dialog before autocomplete widget modified: dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js
-- lp:dhis2 https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk Your team DHIS 2 developers is subscribed to branch lp:dhis2. To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js 2014-05-06 03:55:23 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.sharing.js 2014-05-26 21:36:48 +0000 @@ -166,6 +166,29 @@ $(document).on('click', '.removeUserGroupAccess', removeUserGroupAccess); $('#addUserGroupAccess').unbind('click').bind('click', addUserGroupAccessSelectedItem); + $('#sharingSettings').dialog({ + modal: true, + resizable: false, + width: 485, + height: 480, + buttons: { + 'Cancel': function() { + $(this).dialog('close'); + }, + 'Save': function() { + var me = $(this); + + data.object.publicAccess = getPublicAccess(); + data.object.externalAccess = getExternalAccess(); + data.object.userGroupAccesses = getUserGroupAccesses(); + + saveSharingSettings(type, uid, data).done(function() { + me.dialog('close'); + }); + } + } + }); + $('#sharingFindUserGroup').autocomplete({ source: function( request, response ) { $.ajax({ @@ -209,28 +232,5 @@ $('#addUserGroupAccess').removeAttr('disabled'); } }); - - $('#sharingSettings').dialog({ - modal: true, - resizable: false, - width: 485, - height: 480, - buttons: { - 'Cancel': function() { - $(this).dialog('close'); - }, - 'Save': function() { - var me = $(this); - - data.object.publicAccess = getPublicAccess(); - data.object.externalAccess = getExternalAccess(); - data.object.userGroupAccesses = getUserGroupAccesses(); - - saveSharingSettings(type, uid, data).done(function() { - me.dialog('close'); - }); - } - } - }); }); }
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp