}
return artifactValue;
}, this);
- }
+ };
mapLegacyArtifactPaths=function(data){
if (data){
}):[mapLegacyArtifactPath(data)];
}
return [];
- }
+ };
mapLegacyArtifactPath=function(data){
return data?new LegacyArtifactPath(data.path,data.groupId,data.artifactId,data.version,data.classifier,data.type):null;
- }
+ };
activateLegacyArtifactPathFormValidation=function(){
- var theForm=$("#main-content #legacy-artifact-paths-edit-form");
+ var theForm=$("#main-content" ).find("#legacy-artifact-paths-edit-form");
var validator = theForm.validate({
showErrors: function(validator, errorMap, errorList) {
customShowError("#main-content #legacy-artifact-paths-edit-form",validator,errorMap,errorMap);
}
});
- }
+ };
LegacyArtifactPathViewModel=function(legacyArtifactPath,update,legacyArtifactPathsViewModel){
var self=this;
mainContent.find("#legacy-artifact-paths-view-tabs-li-edit a").html($.i18n.prop("edit"));
activateLegacyArtifactPathFormValidation();
activateLegacyArtifactPathsEditTab();
- }
+ };
displayGrid=function(){
activateLegacyArtifactPathsGridTab();
- }
+ };
calculatePath=function(){
var path="";
path+="."+self.legacyArtifactPath.type();
}
self.legacyArtifactPath.path(path);
- }
+ };
this.save=function(){
- var theForm=$("#main-content #legacy-artifact-paths-edit-form");
+ var theForm=$("#main-content" ).find("#legacy-artifact-paths-edit-form");
if (!theForm.valid()){
return;
}
);
}
}
- }
+ };
LegacyArtifactPathsViewModel=function(){
var self=this;
],
pageSize: 5,
gridUpdateCallBack: function(networkProxy){
- $("#main-content #legacy-artifact-paths-table [title]").tooltip();
+ $("#main-content").find("#legacy-artifact-paths-table" ).find("[title]").tooltip();
}
});
editLegacyArtifactPath=function(legacyArtifactPath){
var legacyArtifactPathViewModel=new LegacyArtifactPathViewModel(legacyArtifactPath,true);
legacyArtifactPathViewModel.display();
- }
+ };
removeLegacyArtifactPath=function(legacyArtifactPath){
}, $.i18n.prop('ok'), $.i18n.prop('cancel'), $.i18n.prop('legacy-artifact-path.delete.confirm',legacyArtifactPath.path()),
$("#legacy-artifact-path-delete-warning-tmpl" ).tmpl(legacyArtifactPath));
- }
+ };
updateLegacyArtifactPath=function(legacyArtifactPath){
}
- }
+ };
displayLegacyArtifactPathSupport=function(){
clearUserMessages();
});
- }
+ };
activateLegacyArtifactPathsGridTab=function(){
mainContent.find("#legacy-artifact-paths-view").addClass("active");
mainContent.find("#legacy-artifact-paths-view-tabs-li-edit a").html($.i18n.prop("add"));
- }
+ };
activateLegacyArtifactPathsEditTab=function(){
var mainContent = $("#main-content");
mainContent.find("#legacy-artifact-paths-view-tabs-li-edit").addClass("active");
mainContent.find("#legacy-artifact-paths-edit").addClass("active");
- }
+ };
//---------------------------
//private List<String> patterns;
this.patterns=ko.observableArray(patterns);
- }
+ };
mapFileType=function(data){
return new FileType(data.id,data.patterns);
- }
+ };
mapFileTypes=function(data){
if (data!=null){
}):[mapFileType(data)];
}
return [];
- }
+ };
AdminRepositoryConsumer=function(enabled,id,description){
//private boolean enabled = false;
this.networkConfiguration=ko.observable(networkConfiguration);
save=function(){
- if (!$("#main-content #network-configuration-edit-form").valid()){
+ if (!$("#main-content" ).find("#network-configuration-edit-form").valid()){
return;
}
clearUserMessages();
displayCacheEntries=function(){
- var divContent = $("#main-content #status_caches");
+ var divContent = $("#main-content" ).find("#status_caches");
divContent.html(smallSpinnerImg());
$.ajax("restServices/archivaServices/systemStatusService/cacheEntries", {
type: "GET",
flushCache=function(key){
clearUserMessages();
- $("#main-content #status_caches").html(smallSpinnerImg());
+ $("#main-content" ).find("#status_caches").html(smallSpinnerImg());
$.ajax("restServices/archivaServices/systemStatusService/clearCache/"+encodeURIComponent(key), {
type: "GET",
success: function(data){
flushAllCaches=function(){
clearUserMessages();
- $("#main-content #status_caches").html(smallSpinnerImg());
+ $("#main-content" ).find("#status_caches").html(smallSpinnerImg());
$.ajax("restServices/archivaServices/systemStatusService/clearAllCaches", {
type: "GET",
success: function(data){
}
displayScanningStats=function(){
- var divContent = $("#main-content #status_scanning");
+ var divContent = $("#main-content" ).find("#status_scanning");
divContent.html(smallSpinnerImg());
$.ajax("restServices/archivaServices/systemStatusService/repositoryScannerStatistics", {
type: "GET",
}
displayMemoryUsage=function(){
- var divContent = $("#main-content #status_memory_info");
+ var divContent = $("#main-content" ).find("#status_memory_info");
divContent.html(smallSpinnerImg());
$.ajax("restServices/archivaServices/systemStatusService/memoryStatus", {
type: "GET",
}
displayQueueEntries=function(){
- var divContent = $("#main-content #status_queues");
+ var divContent = $("#main-content" ).find("#status_queues");
divContent.html(smallSpinnerImg());
$.ajax("restServices/archivaServices/systemStatusService/queueEntries", {
type: "GET",
}
displayServerTime=function(){
- var divContent = $("#main-content #status_current_time");
+ var divContent = $("#main-content" ).find("#status_current_time");
divContent.html(smallSpinnerImg());
$.ajax("restServices/archivaServices/systemStatusService/currentServerTime/"+encodeURIComponent(usedLang()), {
type: "GET",
}
}
activateOrganisationInformationFormValidation=function(){
- var validate = $("#main-content #appearance-configuration-form-id").validate({
+ var validate = $("#main-content" ).find("#appearance-configuration-form-id").validate({
rules: {
name: {
required: true
this.organisationInformation=ko.observable(organisationInformation);
this.save=function(){
- if (!$("#main-content #appearance-configuration-form-id").valid()) {
+ if (!$("#main-content" ).find("#appearance-configuration-form-id").valid()) {
return;
}
clearUserMessages();
var organisationInformation=new OrganisationInformation(data.name,data.url,data.logoLocation);
var organisationInformationViewModel=new OrganisationInformationViewModel(organisationInformation);
ko.applyBindings(organisationInformationViewModel, mainContent.get(0));
- var validator = $("#main-content #appearance-configuration-form-id").validate({
+ var validator = $("#main-content" ).find("#appearance-configuration-form-id").validate({
showErrors: function(validator,errorMap,errorList) {
customShowError(mainContent.find("#appearance-configuration-form-id").get(0),validator,errorMap,errorMap);
}
reportStatisticsFormValidator=function(){
$.log("reportStatisticsFormValidator");
- var validate = $("#main-content #report-statistics-form-id").validate({
+ var validate = $("#main-content" ).find("#report-statistics-form-id").validate({
rules: {
rowCountStatistics: {
required:true,
resultTabContent.html( $( "#report-statistics" ).tmpl() );
var reportStatistics = new ReportStatisticsResultViewModel( data );
ko.applyBindings( reportStatistics, resultTabContent.get( 0 ) );
- $( "#report-result-tab-li" ).removeClass( "hide" );
- $( "#report-result-tab-li" ).addClass( "active" );
+ var reportResultTabLi=$( "#report-result-tab-li");
+ reportResultTabLi.removeClass( "hide" );
+ reportResultTabLi.addClass( "active" );
$( "#report-stat-tab-li" ).removeClass( "active" );
$( "#report-stat-tab-content" ).removeClass( "active" );
resultTabContent.addClass( "active" );
}
reportHealthFormValidator=function(){
- var validate = $("#main-content #report-health-form-id").validate({
+ var validate = $("#main-content" ).find("#report-health-form-id").validate({
rules: {
rowCountHealth: {
required: true,
this.healthReport = ko.observable(new HealthReportRequest());
this.showHealth=function() {
- if (!$("#main-content #report-health-form-id").valid()) {
+ if (!$("#main-content" ).find("#report-health-form-id").valid()) {
return;
}
- var resultTabContent = $("#main-content #report-result");
+ var resultTabContent = $("#main-content" ).find("#report-result");
var url =
"restServices/archivaServices/reportServices/getHealthReports/" + this.healthReport().repositoryId() + "/"
var reports = new ReportHealthResultViewModel( mapHealthReportResults( data ) );
resultTabContent.html( $( "#report-health" ).tmpl() );
ko.applyBindings( reports, resultTabContent.get( 0 ) );
- $( "#report-result-tab-li" ).removeClass( "hide" );
- $( "#report-result-tab-li" ).addClass( "active" );
+ var reportResultTabLi=$( "#report-result-tab-li" );
+ reportResultTabLi.removeClass( "hide" );
+ reportResultTabLi.addClass( "active" );
$( "#report-health-tab-li" ).removeClass( "active" );
$( "#report-health-tab-content" ).removeClass( "active" );
resultTabContent.addClass( "active" );