Skip to content

Commit

Permalink
#22149 Adding into the bundle just the selected user when one exists (#…
Browse files Browse the repository at this point in the history
…22504)

* #22149 Adding into the bundle just the selected user when one exists

* #22149 Change menu message when no User is Selected

* #22149 Add Id to menu Item

* Changing message
  • Loading branch information
freddyDOTCMS authored Jul 5, 2022
1 parent 88aef64 commit 6ff401d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
2 changes: 2 additions & 0 deletions dotCMS/src/main/webapp/WEB-INF/messages/Language.properties
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ add-tag = Add Tag
Add-Template = Add Template
add-template = Add Template
Add-To-Bundle = Add To Bundle
Add-To-Bundle-all-users = Add all Users to Bundle
Add-to-List = Add to List
Add-User = Add User
add-variable = Add Variable
Expand Down Expand Up @@ -3359,6 +3360,7 @@ Remote-Address = Remote Address
remote-host-ip = Remote Site/IP
Remote-Publish-Bundle = Push Publish Bundle
Remote-Publish = Push Publish
Remote-Publish-all-users = Push Publish all Users
remote-syncronization-title = Push Publish Categories
Remote-Syncronization = Push Publish
remove-address-confirmation = Are you sure you want to remove this Address? (This operation cannot be undone)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@
</div>
<% if ( enterprise ) {%>
<% if ( endPoints ) {%>
<div data-dojo-type="dijit/MenuItem" data-dojo-props="onClick: remotePublishUsers">
<%= LanguageUtil.get(pageContext, "Remote-Publish") %>
<div id="remotePublishUsersDiv" data-dojo-type="dijit/MenuItem" data-dojo-props="onClick: remotePublishUsers">
<%= LanguageUtil.get(pageContext, "Remote-Publish-all-users") %>
</div>
<%}%>
<div data-dojo-type="dijit/MenuItem" data-dojo-props="onClick: addToBundleUsers">
<%= LanguageUtil.get(pageContext, "Add-To-Bundle") %>
<div id="addToBundleUsersDiv" data-dojo-type="dijit/MenuItem" data-dojo-props="onClick: addToBundleUsers">
<%= LanguageUtil.get(pageContext, "Add-To-Bundle-all-users")%>
</div>
<%}%>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@
};
var remotePublishUsers = function () {
pushHandler.showDialog( "users_", true );
if (window.selectedUser) {
pushHandler.showDialog( "user_" + window.selectedUser, true );
}else{
pushHandler.showDialog( "users_", true );
}
};
var addToBundleUser = function () {
Expand All @@ -226,7 +230,13 @@
};
var addToBundleUsers = function () {
pushHandler.showAddToBundleDialog("users_", '<%=LanguageUtil.get(pageContext, "Add-To-Bundle")%>', true);
if (window.selectedUser) {
pushHandler.showAddToBundleDialog("user_" + window.selectedUser, '<%=LanguageUtil.get(pageContext, "Add-To-Bundle")%>', true);
}else{
pushHandler.showAddToBundleDialog("users_", '<%=LanguageUtil.get(pageContext, "Add-To-Bundle")%>', true);
}
};
var filterUsersHandler;
Expand Down Expand Up @@ -293,6 +303,10 @@
if(userChanged && currentUser && userId != currentUser.id &&
!confirm(abondonUserChangesConfirm))
return;
document.getElementById('remotePublishUsersDiv_text').innerHTML = '<%=LanguageUtil.get(pageContext, "Remote-Publish")%>';
document.getElementById('addToBundleUsersDiv_text').innerHTML = '<%=LanguageUtil.get(pageContext, "Add-To-Bundle")%>';
dojo.byId('userProfileTabs').style.display = 'none';
dojo.byId('loadingUserProfile').style.display = '';
dojo.byId('gravatarTextHolder').display='none';
Expand Down

0 comments on commit 6ff401d

Please sign in to comment.