mirror of
https://github.com/apache/archiva.git
synced 2025-02-23 02:56:38 +00:00
use .empty() rather than .html('') as handlers removed too.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1412658 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4bdfe03192
commit
cbafd70328
@ -57,7 +57,7 @@ define("archiva.artifacts-management",["jquery","i18n","utils","jquery.tmpl","kn
|
||||
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");
|
||||
},
|
||||
|
@ -880,7 +880,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
|
||||
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");
|
||||
@ -909,7 +909,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
|
||||
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){
|
||||
|
@ -567,7 +567,7 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
|
||||
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);
|
||||
}
|
||||
@ -734,8 +734,8 @@ define("archiva.search",["jquery","i18n","jquery.tmpl","choosen","knockout","kno
|
||||
$.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(":");
|
||||
|
||||
|
@ -126,7 +126,7 @@ require(["jquery","jquery.tmpl","i18n","knockout"], function(jquery,jqueryTmpl,i
|
||||
*/
|
||||
screenChange=function(){
|
||||
var mainContent=$("#main-content");
|
||||
mainContent.html("");
|
||||
mainContent.empty();
|
||||
mainContent.removeAttr("data-bind");
|
||||
$("#body_content" ).find(".popover" ).hide();
|
||||
clearUserMessages();
|
||||
@ -142,7 +142,7 @@ require(["jquery","jquery.tmpl","i18n","knockout"], function(jquery,jqueryTmpl,i
|
||||
*/
|
||||
clearUserMessages=function(idToAppend){
|
||||
var textId = idToAppend ? $("#"+idToAppend) : $("#user-messages");
|
||||
$(textId).html('');
|
||||
$(textId).empty();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -172,8 +172,8 @@ require(["jquery","jquery.tmpl","i18n","knockout"], function(jquery,jqueryTmpl,i
|
||||
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');
|
||||
|
@ -498,7 +498,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) {
|
||||
},
|
||||
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();
|
||||
}
|
||||
@ -556,7 +556,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) {
|
||||
login=function(){
|
||||
$.log("user.js#login");
|
||||
|
||||
$("#modal-login-err-message").html("");
|
||||
$("#modal-login-err-message").empty();
|
||||
|
||||
var valid = $("#user-login-form").valid();
|
||||
if (!valid) {
|
||||
@ -653,7 +653,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) {
|
||||
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 () {
|
||||
@ -702,7 +702,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) {
|
||||
* @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',
|
||||
|
@ -46,7 +46,7 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid) {
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user