mirror of https://github.com/apache/archiva.git
reuse selector!
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1411408 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b74dfd1513
commit
90e2c00727
|
@ -521,9 +521,10 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
|||
this.networkConfiguration=ko.observable(networkConfiguration);
|
||||
|
||||
save=function(){
|
||||
$("#user-messages" ).html(mediumSpinnerImg());
|
||||
var userMessages=$("#user-messages");
|
||||
userMessages.html(mediumSpinnerImg());
|
||||
var mainContent=$("#main-content");
|
||||
if (!$("#main-content" ).find("#network-configuration-edit-form").valid()){
|
||||
if (!mainContent.find("#network-configuration-edit-form").valid()){
|
||||
return;
|
||||
}
|
||||
mainContent.find("#network-configuration-btn-save" ).button('loading');
|
||||
|
@ -536,7 +537,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
|||
displaySuccessMessage( $.i18n.prop("network-configuration.updated"));
|
||||
},
|
||||
complete: function(){
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
mainContent.find("#network-configuration-btn-save" ).button('reset');
|
||||
}
|
||||
});
|
||||
|
@ -605,7 +606,8 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
|||
var self=this;
|
||||
save=function(){
|
||||
var mainContent=$("#main-content" );
|
||||
$("#user-messages").html( mediumSpinnerImg());
|
||||
var userMessages=$("#user-messages");
|
||||
userMessages.html( mediumSpinnerImg());
|
||||
mainContent.find("#ui-configuration-btn-save" ).button('loading');
|
||||
$.ajax("restServices/archivaServices/archivaAdministrationService/setUiConfiguration", {
|
||||
type: "POST",
|
||||
|
@ -616,7 +618,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
|||
displaySuccessMessage( $.i18n.prop("ui-configuration.updated"));
|
||||
},
|
||||
complete: function(){
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
mainContent.find("#ui-configuration-btn-save" ).button('reset');
|
||||
}
|
||||
});
|
||||
|
@ -856,7 +858,8 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
|||
return;
|
||||
}
|
||||
clearUserMessages();
|
||||
$("#user-messages" ).html(mediumSpinnerImg());
|
||||
var userMessages=$("#user-messages");
|
||||
userMessages.html(mediumSpinnerImg());
|
||||
mainContent.find("#appearance-configuration-btn-save" ).button('loading');
|
||||
$.ajax("restServices/archivaServices/archivaAdministrationService/setOrganisationInformation", {
|
||||
type: "POST",
|
||||
|
@ -871,7 +874,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
|
|||
displayErrorMessage($.i18n.prop('appearance-configuration.updating-error'));
|
||||
},
|
||||
complete: function(){
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
mainContent.find("#appearance-configuration-btn-save" ).button('reset');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -88,7 +88,8 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
|
||||
this.saveProxyConnectorRule=function(proxyConnectorRule,url,add,completeFnCallback){
|
||||
$.log("saveProxyConnectorRule:"+url);
|
||||
$("#user-messages" ).html(mediumSpinnerImg());
|
||||
var userMessages=$("#user-messages");
|
||||
userMessages.html(mediumSpinnerImg());
|
||||
$.ajax(url,
|
||||
{
|
||||
type: "POST",
|
||||
|
@ -112,7 +113,7 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
displayRestError(res);
|
||||
},
|
||||
complete:function(data){
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
if(completeFnCallback){
|
||||
completeFnCallback();
|
||||
}
|
||||
|
@ -134,7 +135,8 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
|
||||
this.deleteProxyConnectorRule=function(proxyConnectorRule){
|
||||
$("#main-content" ).find("proxy-connectors-rules-view-tabsTable").find(".btn").button("loading");
|
||||
$("#user-messages" ).html(mediumSpinnerImg());
|
||||
var userMessages=$("#user-messages");
|
||||
userMessages.html(mediumSpinnerImg());
|
||||
$.ajax("restServices/archivaServices/proxyConnectorRuleService/deleteProxyConnectorRule",
|
||||
{
|
||||
type:"POST",
|
||||
|
@ -151,7 +153,7 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
displayRestError(res);
|
||||
},
|
||||
complete:function(data){
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
$("#main-content" ).find("proxy-connectors-rules-view-tabsTable").find(".btn").button("reset");
|
||||
}
|
||||
}
|
||||
|
@ -278,7 +280,8 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
screenChange();
|
||||
var mainContent = $("#main-content");
|
||||
mainContent.html($("#proxyConnectorsRulesMain").tmpl());
|
||||
$("#user-messages").html(mediumSpinnerImg());
|
||||
var userMessages=$("#user-messages");
|
||||
userMessages.html(mediumSpinnerImg());
|
||||
loadAllProxyConnectors(function(data){
|
||||
var proxyConnectors = mapProxyConnectors(data);
|
||||
|
||||
|
@ -292,7 +295,7 @@ define("archiva.proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstra
|
|||
activateProxyConnectorRulesGridTab();
|
||||
},
|
||||
complete: function(data){
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -204,7 +204,8 @@ define("archiva.proxy-connectors",["jquery","i18n","jquery.tmpl","bootstrap","jq
|
|||
this.save=function(){
|
||||
//FIXME data controls !!!
|
||||
clearUserMessages();
|
||||
$("#user-messages" ).html(mediumSpinnerImg());
|
||||
var userMessages=$("#user-messages");
|
||||
userMessages.html(mediumSpinnerImg());
|
||||
$("#proxy-connector-btn-save" ).button("loading");
|
||||
// update is delete then add
|
||||
if (this.update){
|
||||
|
@ -224,7 +225,7 @@ define("archiva.proxy-connectors",["jquery","i18n","jquery.tmpl","bootstrap","jq
|
|||
displayRestError(res);
|
||||
},
|
||||
complete: function(){
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
$("#proxy-connector-btn-save" ).button("reset");
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +249,7 @@ define("archiva.proxy-connectors",["jquery","i18n","jquery.tmpl","bootstrap","jq
|
|||
displayRestError(res);
|
||||
},
|
||||
complete: function(){
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
$("#proxy-connector-btn-save" ).button("reset");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
|
|||
},
|
||||
complete: function(){
|
||||
$("#managed-repository-save-button" ).button('reset');
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -561,7 +561,8 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
|
|||
}
|
||||
|
||||
mergeRepo=function(managedRepository){
|
||||
$("#user-messages" ).html(mediumSpinnerImg());
|
||||
var userMessages=$("#user-messages");
|
||||
userMessages.html(mediumSpinnerImg());
|
||||
// is there any artifacts to merge ?
|
||||
var artifactsNumberUrl = "restServices/archivaServices/browseService/artifacts/"+encodeURIComponent(managedRepository.id());
|
||||
$.ajax(artifactsNumberUrl,{
|
||||
|
@ -595,8 +596,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
|
|||
|
||||
},
|
||||
complete: function(){
|
||||
$.log("complete removeMediumSpinnerImg");
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -647,7 +647,8 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
|
|||
doMerge=function(sourceRepository,targetRepository,skipConflicts){
|
||||
$.log("doMerge:"+sourceRepository+" to " + targetRepository + ", skipConflicts: " + skipConflicts);
|
||||
window.modalMergeRepoDialog.modal('hide');
|
||||
$("#user-messages" ).html(mediumSpinnerImg());
|
||||
var userMessages=$("#user-messages");
|
||||
userMessages.html(mediumSpinnerImg());
|
||||
var url = "restServices/archivaServices/mergeRepositoriesService/mergeRepositories/"+encodeURIComponent(sourceRepository);
|
||||
url+="/"+encodeURIComponent(targetRepository);
|
||||
url+="/"+skipConflicts;
|
||||
|
@ -658,7 +659,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
|
|||
displaySuccessMessage($.i18n.prop("managedrepository.merge.success", sourceRepository,targetRepository));
|
||||
},
|
||||
complete: function(){
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1181,7 +1182,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
|
|||
ko.applyBindings(managedRepositoriesViewModel,mainContent.find("#managed-repositories-view").get(0));
|
||||
activatePopoverDoc();
|
||||
mainContent.find("#managed-repositories-pills #managed-repositories-view-a").tab('show');
|
||||
removeMediumSpinnerImg("#main-content #managed-repositories-content");
|
||||
removeMediumSpinnerImg(mainContent.find("#managed-repositories-content"));
|
||||
activateManagedRepositoriesGridTab();
|
||||
if(successFnManagedRepositories){
|
||||
successFnManagedRepositories(managedRepositoriesViewModel);
|
||||
|
@ -1220,7 +1221,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
|
|||
var mainContent = $("#main-content");
|
||||
ko.applyBindings(remoteRepositoriesViewModel,mainContent.find("#remote-repositories-view").get(0));
|
||||
mainContent.find("#remote-repositories-pills #remote-repositories-view-a").tab('show')
|
||||
removeMediumSpinnerImg("#main-content #remote-repositories-content");
|
||||
removeMediumSpinnerImg(mainContent.find("#remote-repositories-content"));
|
||||
activatePopoverDoc();
|
||||
if(successFnRemoteRepositories){
|
||||
successFnRemoteRepositories(managedRepositoriesViewModel);
|
||||
|
|
|
@ -207,7 +207,8 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,jqueryUi,ko) {
|
|||
|
||||
this.saveRepositoryGroup=function(repositoryGroup){
|
||||
clearUserMessages();
|
||||
$("#user-messages").html(mediumSpinnerImg());
|
||||
var userMessages=$("#user-messages");
|
||||
userMessages.html(mediumSpinnerImg());
|
||||
$("#repository-group-save" ).button('loading');
|
||||
$.ajax("restServices/archivaServices/repositoryGroupService/updateRepositoryGroup",
|
||||
{
|
||||
|
@ -227,7 +228,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,jqueryUi,ko) {
|
|||
},
|
||||
complete:function(data){
|
||||
$("#repository-group-save" ).button('reset');
|
||||
removeMediumSpinnerImg("#user-messages");
|
||||
removeMediumSpinnerImg(userMessages);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -86,15 +86,12 @@
|
|||
{{/each}}
|
||||
<th>Releases</th>
|
||||
<th>Snapshots</th>
|
||||
<!--th title="${$.i18n.prop('managedrepository.scan.index')}">${$.i18n.prop('managedrepository.scan.grid.header')}</th-->
|
||||
<th>${$.i18n.prop('managedrepository.actions')}</th>
|
||||
<th>${$.i18n.prop('edit')}</th>
|
||||
<th>${$.i18n.prop('delete')}</th>
|
||||
<th>${$.i18n.prop('modified')}</th>
|
||||
<!--th>${$.i18n.prop('description')}</th-->
|
||||
<th>${$.i18n.prop('managed.repository.rss.header')}</th>
|
||||
<th title="${$.i18n.prop('managedrepository.stats')}">${$.i18n.prop('managedrepository.stats.grid.header')}</th>
|
||||
<!--th title="${$.i18n.prop('managedrepository.scan.directories')}">${$.i18n.prop('managedrepository.scan.directories.grid.header')}</th-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -187,15 +184,6 @@
|
|||
<td>
|
||||
<a href="${row.feedsUrl}"><img src="images/atom.gif" alt="" title="${$.i18n.prop('managedrepository.feeds')} ${row.name()}"/></a>
|
||||
</td>
|
||||
<!--td>
|
||||
{{if row.description()}}
|
||||
<a class="btn btn-warning btn-mini popover-doc" id="managedrepo-description-help"
|
||||
data-content="${row.description()}" data-title="${$.i18n.prop('description')}"
|
||||
data-placement="left">
|
||||
<i class="icon-question-sign icon-white"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
</td-->
|
||||
<td id="managedrepository-stats-${row.id()}">
|
||||
<img src="images/utilities-system-monitor-22-22.png" data-original-title="${$.i18n.prop('managedrepository.stats')}"
|
||||
data-bind="event: { mouseover: function(){ showStats(row) }, mouseout: function(){ hideStats(row) },}"
|
||||
|
|
Loading…
Reference in New Issue