success: function(data) {
displaySuccessMessage($.i18n.prop("fileupload.artifacts.saved"));
self.artifactUploads=[];
- $("#main-content" ).find("#uploaded-files-list" ).html('');
+ $("#main-content" ).find("#uploaded-files-list" ).empty();
$.ajax("restServices/archivaUiServices/fileUploadService/clearUploadedFiles", {type: "GET", dataType: 'json'});
clearForm("#main-content #fileupload");
},
addExtraParameter=function(){
var mainContent=$("#main-content");
- mainContent.find("#extra-parameters-error" ).html("");
+ mainContent.find("#extra-parameters-error" ).empty();
var key=mainContent.find("#extraParameter-key").val();
if($.trim(key).length<1){
displayErrorMessage( $.i18n.prop("key.empty.error.message"),"extra-parameters-error");
addExtraHeader=function(){
var mainContent=$("#main-content");
- mainContent.find("#extra-headers-error" ).html("");
+ mainContent.find("#extra-headers-error" ).empty();
var key=mainContent.find("#extraHeader-key").val();
if( $.trim(key).length<1){
if($.trim(key).length<1){
self.groupId=groupId;
self.artifactId=artifactId;
self.version=version;
- $("#main-content" ).find("#browse_artifact_detail" ).html("");
+ $("#main-content" ).find("#browse_artifact_detail" ).empty();
window.sammyArchivaApplication.setLocation(location);
}
$.get(artifactDownloadInfosUrl,function(data){
$("#artifact-details-files-content" ).html($("#artifact-details-files-content_tmpl").tmpl({artifactDownloadInfos:data}));
mainContent.find("#artifact-content-list-files li" ).on("click",function(){
- mainContent.find("#artifact_content_tree").html("");
- mainContent.find("#artifact-content-text" ).html("");
+ mainContent.find("#artifact_content_tree").empty();
+ mainContent.find("#artifact-content-text" ).empty();
var idValue = $(this ).attr("id");
var splitted = idValue.split(":");
*/
screenChange=function(){
var mainContent=$("#main-content");
- mainContent.html("");
+ mainContent.empty();
mainContent.removeAttr("data-bind");
$("#body_content" ).find(".popover" ).hide();
clearUserMessages();
*/
clearUserMessages=function(idToAppend){
var textId = idToAppend ? $("#"+idToAppend) : $("#user-messages");
- $(textId).html('');
+ $(textId).empty();
}
/**
if (window.modalConfirmDialog==null) {
window.modalConfirmDialog = $("#dialog-confirm-modal").modal();
window.modalConfirmDialog.bind('hidden', function () {
- $("#dialog-confirm-modal-header-title").html("");
- $("#dialog-confirm-modal-body-text").html("");
+ $("#dialog-confirm-modal-header-title").empty();
+ $("#dialog-confirm-modal-body-text").empty();
})
dialogCancel.on("click", function(){
window.modalConfirmDialog.modal('hide');
},
statusCode: {
500: function(data){
- $("#modal-password-change-err-message" ).html('');
+ $("#modal-password-change-err-message" ).empty();
displayRestError($.parseJSON(data.responseText),"modal-password-change-err-message");
$("#modal-password-change-err-message" ).show();
}
login=function(){
$.log("user.js#login");
- $("#modal-login-err-message").html("");
+ $("#modal-login-err-message").empty();
var valid = $("#user-login-form").valid();
if (!valid) {
editUserDetailsBox=function(){
clearUserMessages();
$("#modal-user-edit-err-message").hide();
- $("#modal-user-edit-err-message").html("");
+ $("#modal-user-edit-err-message").empty();
if (window.modalEditUserBox == null) {
window.modalEditUserBox = $("#modal-user-edit").modal({backdrop:'static',show:false});
window.modalEditUserBox.bind('hidden', function () {
* @param user
*/
editUserDetails=function(user){
- $("#modal-user-edit-err-message").html("");
+ $("#modal-user-edit-err-message").empty();
$.ajax("restServices/redbackServices/userService/updateMe", {
data: ko.toJSON(user),
contentType: 'application/json',
this.addUser=function() {
clearUserMessages();
var mainContent = $("#main-content");
- mainContent.find("#createUserForm").html("");
+ mainContent.find("#createUserForm").empty();
mainContent.find("#user-edit").remove();
mainContent.find("#user-create").show();
var viewModel = new UserViewModel(new User(),false,self);