]> source.dussan.org Git - archiva.git/commitdiff
use .empty() rather than .html('') as handlers removed too.
authorOlivier Lamy <olamy@apache.org>
Thu, 22 Nov 2012 20:28:02 +0000 (20:28 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 22 Nov 2012 20:28:02 +0000 (20:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1412658 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/artifacts-management.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js

index 61cf260b212c3ef379fa58cdbc3ca4adb8be86cd..efeaf7d4c460b62247f75b87c58ad9d2b5ab20d1 100644 (file)
@@ -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");
           },
index bd8a6f74ad985717357f817870be288dce7d9609..7ca34435ff9bc87d9b25a05f31efc566b5d8d38c 100644 (file)
@@ -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){
index 71211b8611824da24302b88b65ff440063d776ac..84aeac7014d8f30d001a03ce89cedd9daf1bd985 100644 (file)
@@ -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(":");
 
index 61fb2dcd4d23a4be68765738b91f950b7192f4bc..6a2378e0b8f87c34f41c1a8fce4d055b76f5dd83 100644 (file)
@@ -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');
index 865be4fff2c8ff58d6cb50b5de3cc3f368418614..77c07b42d053248cd0c38cb31ce351fcac761139 100644 (file)
@@ -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',
index 871d00dde610e235f98fa961735c1a8022049aa0..b3e5aa53bee501ded36df76c59055f8c34f662fa 100644 (file)
@@ -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);