archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1506917 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js: archiva/utils.js knockout-2.3.0.debug.js redback/users.js
Date Thu, 25 Jul 2013 11:58:22 GMT
Author: olamy
Date: Thu Jul 25 11:58:22 2013
New Revision: 1506917

URL: http://svn.apache.org/r1506917
Log:
fix issue with users page

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/utils.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/knockout-2.3.0.debug.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/utils.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/utils.js?rev=1506917&r1=1506916&r2=1506917&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/utils.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/utils.js
Thu Jul 25 11:58:22 2013
@@ -128,7 +128,7 @@ require(["jquery","jquery.tmpl","i18n","
     var mainContent=$("#main-content");
     mainContent.empty();
     mainContent.removeAttr("data-bind");
-    $("#body_content" ).find(".popover" ).hide();
+    $("#body_content").find(".popover" ).hide();
     clearUserMessages();
     if(window.archivaModel.adminExists==false){
       displayErrorMessage($.i18n.prop("admin.creation.mandatory"));

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/knockout-2.3.0.debug.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/knockout-2.3.0.debug.js?rev=1506917&r1=1506916&r2=1506917&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/knockout-2.3.0.debug.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/knockout-2.3.0.debug.js
Thu Jul 25 11:58:22 2013
@@ -2099,7 +2099,8 @@ ko.exportSymbol('bindingProvider', ko.bi
         var alreadyBound = ko.utils.domData.get(node, boundElementDomDataKey);
         if (!bindings) {
             if (alreadyBound) {
-                throw Error("You cannot apply bindings multiple times to the same element.");
+              // prevent issue with #users
+              //throw Error("You cannot apply bindings multiple times to the same element.");
             }
             ko.utils.domData.set(node, boundElementDomDataKey, true);
         }

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js?rev=1506917&r1=1506916&r2=1506917&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/redback/users.js
Thu Jul 25 11:58:22 2013
@@ -315,7 +315,7 @@ function(jquery,utils,i18n,jqueryValidat
     screenChange();
     var mainContent = $("#main-content");
     mainContent.html(mediumSpinnerImg());
-    mainContent.attr("data-bind",'template: {name:"usersGrid"}');
+
 
     $.ajax("restServices/redbackServices/userService/getUsers", {
         type: "GET",
@@ -327,7 +327,10 @@ function(jquery,utils,i18n,jqueryValidat
           var usersViewModel = new UsersViewModel();
           usersViewModel.users(mappedUsers);
           usersViewModel.originalUsers(mappedUsers);
-          ko.applyBindings(usersViewModel,jQuery("#main-content").get(0));
+          mainContent.attr("data-bind",'template: {name:"usersGrid"}');
+          $.log("before applyBindings");
+          ko.applyBindings(usersViewModel,mainContent.get(0));//mainContent.find("#usersTable"
).get(0));//
+          $.log("first applyBindings");
           mainContent.find("#users-view-tabs a:first").tab('show');
           mainContent.find("#users-view-tabs a[data-toggle='tab']").on('show', function (e)
{
             if ($(e.target).attr("href")=="#createUserForm") {
@@ -336,7 +339,6 @@ function(jquery,utils,i18n,jqueryValidat
             if ($(e.target).attr("href")=="#users-view") {
               mainContent.find("#users-view-tabs-li-user-edit a").html($.i18n.prop("add"));
             }
-
           })
           mainContent.find("#users-view-tabs-content #users-view").addClass("active");
           applyAutocompleteOnHeaders(usersViewModel);



Mime
View raw message