mirror of https://github.com/apache/archiva.git
use bootstrap toggle button feature
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1391470 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
08d17fd8dd
commit
08a7645623
|
@ -521,10 +521,12 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
|||
this.networkConfiguration=ko.observable(networkConfiguration);
|
||||
|
||||
save=function(){
|
||||
$("#user-messages" ).html(mediumSpinnerImg());
|
||||
var mainContent=$("#main-content");
|
||||
if (!$("#main-content" ).find("#network-configuration-edit-form").valid()){
|
||||
return;
|
||||
}
|
||||
clearUserMessages();
|
||||
mainContent.find("#network-configuration-btn-save" ).button('loading');
|
||||
$.ajax("restServices/archivaServices/archivaAdministrationService/setNetworkConfiguration", {
|
||||
type: "POST",
|
||||
contentType: 'application/json',
|
||||
|
@ -532,6 +534,10 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
|||
dataType: 'json',
|
||||
success: function(data){
|
||||
displaySuccessMessage( $.i18n.prop("network-configuration.updated"));
|
||||
},
|
||||
complete: function(){
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
mainContent.find("#network-configuration-btn-save" ).button('reset');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -311,7 +311,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<button id="network-configuration-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
|
||||
<button id="network-configuration-btn-save" data-loading-text="${$.i18n.prop('common.loading')}"
|
||||
data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
|
||||
</form>
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue