Skip to content

Commit

Permalink
Merge pull request #141 from exadel-inc/release/4.0.0
Browse files Browse the repository at this point in the history
Release/4.0.0
  • Loading branch information
AlKaliada authored May 14, 2024
2 parents 2f2e33e + e1e0c1a commit 809bafe
Show file tree
Hide file tree
Showing 19 changed files with 85 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
jcr:title="EToolbox">

<backpack jcr:primaryType="nt:unstructured"
jcr:title="Backpack"
jcr:title="EToolbox Backpack"
jcr:description="Create packages with referenced resources"
order="{Long}101"
href="/tools/etoolbox/backpack.html"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
text="Path...">
<data jcr:primaryType="nt:unstructured"
nesting="hide"
src.uritemplate="/mnt/overlay/etoolbox-backpack/admin/new/addPath.html?packagePath=${granite:encodeURIPath(param.packagePath)}"/>
src.uritemplate="/mnt/overlay/etoolbox-backpack/admin/console/addPath.html?packagePath=${granite:encodeURIPath(param.packagePath)}"/>
</path>
<query
jcr:primaryType="nt:unstructured"
Expand All @@ -46,7 +46,7 @@
text="Query...">
<data jcr:primaryType="nt:unstructured"
nesting="hide"
src.uritemplate="/mnt/overlay/etoolbox-backpack/admin/new/addQuery.html?packagePath=${granite:encodeURIPath(param.packagePath)}"/>
src.uritemplate="/mnt/overlay/etoolbox-backpack/admin/console/addQuery.html?packagePath=${granite:encodeURIPath(param.packagePath)}"/>
</query>
<list
jcr:primaryType="nt:unstructured"
Expand All @@ -55,42 +55,29 @@
text="List...">
<data jcr:primaryType="nt:unstructured"
nesting="hide"
src.uritemplate="/mnt/overlay/etoolbox-backpack/admin/new/addList.html?packagePath=${granite:encodeURIPath(param.packagePath)}"/>
src.uritemplate="/mnt/overlay/etoolbox-backpack/admin/console/addList.html?packagePath=${granite:encodeURIPath(param.packagePath)}"/>
</list>
</items>
</add>
<edit
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/collection/actionlink"
granite:class="coral3-Button coral3-Button--secondary _coral-Button _coral-Button--secondary"
granite:id="editDialogButton"
action="foundation.dialog"
icon="edit"
text="Edit"
variant="secondary">
<data jcr:primaryType="nt:unstructured"
nesting="hide"
src.uritemplate="/mnt/overlay/etoolbox-backpack/admin/new/editpackagedialog.html?${querystring}"/>
</edit>
<excludeChildren
<includeChildren
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/collection/action"
granite:class="selection-action"
granite:id="excludeChildrenAction"
granite:id="includeChildrenAction"
disabled="{Boolean}true"
target=".package-list"
icon="pagesExclude"
text="Exclude Children"
icon="pages"
text="Include Children"
variant="actionBar"/>
<includeChildren
<excludeChildren
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/collection/action"
granite:class="selection-action"
granite:id="includeChildrenAction"
granite:id="excludeChildrenAction"
disabled="{Boolean}true"
target=".package-list"
icon="pages"
text="Include Children"
icon="pagesExclude"
text="Exclude Children"
variant="actionBar"/>
<liveCopies
jcr:primaryType="nt:unstructured"
Expand Down Expand Up @@ -147,7 +134,7 @@
disabled="{Boolean}true"
target=".package-list"
icon="delete"
text="Delete"
text="Delete item"
variant="actionBar"/>
</primary>
<secondary jcr:primaryType="nt:unstructured">
Expand Down Expand Up @@ -197,6 +184,18 @@
granite:id="replicateAction"
text="Replicate"
variant="secondary"/>
<edit
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/collection/action"
granite:class="coral3-Button coral3-Button--secondary _coral-Button _coral-Button--secondary"
granite:id="editDialogButton"
action="foundation.dialog"
text="Package properties"
variant="secondary">
<data jcr:primaryType="nt:unstructured"
nesting="hide"
src.uritemplate="/mnt/overlay/etoolbox-backpack/admin/console/editpackagedialog.html?${querystring}"/>
</edit>
<delete
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/button"
Expand All @@ -217,8 +216,8 @@
foundation-selections-mode="single">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/apps/etoolbox-backpack/admin/new/list/datasource"
itemResourceType="/apps/etoolbox-backpack/admin/new/list/item"/>
sling:resourceType="/apps/etoolbox-backpack/admin/console/list/datasource"
itemResourceType="/apps/etoolbox-backpack/admin/console/list/item"/>
<layout jcr:primaryType="nt:unstructured"
sling:resourceType = "granite/ui/components/foundation/layouts/listview"
itemprop="item"
Expand All @@ -227,15 +226,15 @@
</list>
<status
jcr:primaryType="nt:unstructured"
sling:resourceType="/apps/etoolbox-backpack/admin/new/components/statusbar"/>
sling:resourceType="/apps/etoolbox-backpack/admin/console/components/statusbar"/>
</items>
</stack>
</views>
</jcr:content>

<addPath
jcr:primaryType="nt:unstructured"
jcr:title="Add Path"
jcr:title="Add by Path"
sling:resourceType="granite/ui/components/coral/foundation/dialog"
granite:class="modal-form">
<items jcr:primaryType="nt:unstructured">
Expand All @@ -252,7 +251,7 @@
sling:resourceType="granite/ui/components/coral/foundation/form/responses/openprompt"/>
<items jcr:primaryType="nt:unstructured">
<content jcr:primaryType="nt:unstructured"
jcr:title="Add Path"
jcr:title="Add by Path"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column jcr:primaryType="nt:unstructured"
Expand Down Expand Up @@ -317,6 +316,7 @@
sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
name="payload"
fieldLabel="Query (in JCR-SQL2 format)"
validation="text-validation"
required="{Boolean}true"
rows="{Long}10"/>
<path
Expand Down Expand Up @@ -371,6 +371,7 @@
sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
name="payload"
fieldLabel="List"
validation="text-validation"
required="{Boolean}true"
rows="{Long}10"/>
<path
Expand Down Expand Up @@ -407,6 +408,6 @@
</buildLogs>
<editpackagedialog
jcr:primaryType="nt:unstructured"
sling:resourceType="/apps/etoolbox-backpack/admin/new/components/package/info">
sling:resourceType="/apps/etoolbox-backpack/admin/console/components/package/info">
</editpackagedialog>
</jcr:root>
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,6 @@

const foundationUi = $(window).adaptTo('foundation-ui');

$(document)
.ajaxStart(function () {
foundationUi.wait();
})
.ajaxStop(function () {
foundationUi.clearWait();
});

// Make top-level package entries collapsible

$(document).on('click', '.toggler', function() {
Expand Down Expand Up @@ -201,7 +193,7 @@
const dialog = openLogsDialog(data.log, 'Test Build', 'Close');
const assetText = data.dataSize === 0
? 'There are no assets in the package'
: '<h4>Approximate size of the assets in the package: ' + bytesToSize(data.dataSize) + '</h4>';
: '<h4>Approximate size of the package: ' + bytesToSize(data.dataSize) + '</h4>';
$(dialog.content).append('<div>' + assetText + '</div>');
setTimeout(function () {
$(dialog.content).children("div").last()[0].scrollIntoView(false);
Expand All @@ -223,7 +215,7 @@
const dialog = openLogsDialog(data.log, 'Replication', 'Close');
const assetText = data.dataSize === 0
? 'There are no assets in the package'
: '<h4>Approximate size of the assets in the package: ' + bytesToSize(data.dataSize) + '</h4>';
: '<h4>Approximate size of the package: ' + bytesToSize(data.dataSize) + '</h4>';
$(dialog.content).append('<div>' + assetText + '</div>');
setTimeout(function () {
$(dialog.content).children("div").last()[0].scrollIntoView(false);
Expand Down Expand Up @@ -332,6 +324,12 @@
data: {packagePath: packagePath},
success: function (data) {
callback(data);
},
beforeSend: function () {
foundationUi.wait();
},
complete: function () {
foundationUi.clearWait();
}
})
}
Expand All @@ -353,6 +351,12 @@
success: success,
error: function(data) {
console.log(data);
},
beforeSend: function () {
foundationUi.wait();
},
complete: function () {
foundationUi.clearWait();
}
});
}
Expand Down Expand Up @@ -445,6 +449,12 @@
}, success: function (data) {
callback(data);
},
beforeSend: function () {
foundationUi.wait();
},
complete: function () {
foundationUi.clearWait();
},
dataType: 'json'
});
}
Expand Down Expand Up @@ -550,4 +560,13 @@
}
});

$(window).adaptTo("foundation-registry").register("foundation.validation.validator", {
selector: "[data-validation='text-validation']",
validate: function(el) {
if (!el.value || !el.value.trim()) {
return "Please enter a value";
}
}
});

})(Granite, Granite.$);
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
if (resource != null && hasPermission(acm, resource, Privilege.JCR_READ)) {
%>
<coral-quickactions-item icon="edit" class="foundation-collection-action" data-foundation-collection-action='{"action": "cq.wcm.open", "data": {"cookiePath":"<%= request.getContextPath() %>/","href":"/apps/etoolbox-backpack/admin/new.html?packagePath=<%= xssAPI.getValidHref(path) %>"}}'
<coral-quickactions-item icon="edit" class="foundation-collection-action" data-foundation-collection-action='{"action": "cq.wcm.open", "data": {"cookiePath":"<%= request.getContextPath() %>/","href":"/apps/etoolbox-backpack/admin/console.html?packagePath=<%= xssAPI.getValidHref(path) %>"}}'
><%= xssAPI.encodeForHTML(i18n.get("Edit")) %></coral-quickactions-item><%
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<sly data-sly-use.model="com.exadel.etoolbox.backpack.core.model.PackageDataModel"
data-sly-use.template="/apps/etoolbox-backpack/admin/new/components/package/templates/dialog.html"
data-sly-use.template="/apps/etoolbox-backpack/admin/console/components/package/templates/dialog.html"
data-sly-call="${template.dialogTemplate @ packageModel = model.packageModel, initialResources = model.initialResources}"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
aria-label="New Package"
value="${packageModel.packageName}" aria-required="true" is="coral-textfield" />
</div>
<sly data-sly-use.template="/apps/etoolbox-backpack/admin/new/components/package/templates/group.html"
<sly data-sly-use.template="/apps/etoolbox-backpack/admin/console/components/package/templates/group.html"
data-sly-call="${template.autocompleteTemplate @ selectedPackageGroup = packageModel.group}"/>
<div class="coral-Form-fieldwrapper">
<label class="coral-Form-fieldlabel">Version</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
<sly data-sly-use.statusBarModel="com.exadel.etoolbox.backpack.core.model.StatusBarModel"/>
<div class="package-status">
<span><b>Name:</b> ${statusBarModel.name}</span>
|
<sly data-sly-test="${statusBarModel.group}">
<span><b>Group:</b> ${statusBarModel.group}</span>
|
<span><b>Group:</b> ${statusBarModel.group}</span>
</sly>
<sly data-sly-test="${statusBarModel.version}">
<span><b>Version:</b> ${statusBarModel.version}</span>
|
<span><b>Version:</b> ${statusBarModel.version}</span>
</sly>
<sly data-sly-test="${statusBarModel.size}">
<span ><b>Size:</b> ${statusBarModel.size}</span>
|
<span ><b>Size:</b> ${statusBarModel.size}</span>
</sly>
<sly data-sly-test="${statusBarModel.lastBuilt}">
<span><b>Last built:</b> ${statusBarModel.lastBuilt}</span>
|
<span><b>Last built:</b> ${statusBarModel.lastBuilt}</span>
</sly>
<sly data-sly-test="${statusBarModel.lastInstalled}">
<span ><b>Last installed:</b> ${statusBarModel.lastInstalled}</span>
|
<span ><b>Last installed:</b> ${statusBarModel.lastInstalled}</span>
</sly>
<span data-sly-test="${statusBarModel.lastReplicated}"><b>Last replicated:</b> ${statusBarModel.lastReplicated} <b>by</b> ${statusBarModel.lastModifiedBy}</span>
<span data-sly-test="${statusBarModel.lastReplicated}">
|
<b>Last replicated:</b> ${statusBarModel.lastReplicated} <b>by</b> ${statusBarModel.lastModifiedBy}</span>
</div>
<sly data-sly-include="/apps/etoolbox-backpack/admin/new/components/package/install/install.html"></sly>
<sly data-sly-include="/apps/etoolbox-backpack/admin/console/components/package/install/install.html"></sly>
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,10 @@
rootPath="/etc/packages"/>
<actions jcr:primaryType="nt:unstructured">
<secondary jcr:primaryType="nt:unstructured">
<crxPM
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/anchorbutton"
href="/crx/packmgr"
x-cq-linkchecker="valid"
text="CRX Package Manager">
</crxPM>
<create
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/anchorbutton"
href="/apps/etoolbox-backpack/admin/new.html"
href="/apps/etoolbox-backpack/admin/console.html"
target=".screens-dcc-collection-resources"
text="Create"
variant="primary">
Expand All @@ -131,6 +124,14 @@
nesting="hide"
src.uritemplate="/apps/etoolbox-backpack/admin/console/page/content/uploadpackagedialog.html"/>
</upload>
<crxPM
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/anchorbutton"
target="_blank"
href="/crx/packmgr"
x-cq-linkchecker="valid"
text="CRX Package Manager">
</crxPM>
</secondary>
</actions>
</jcr:content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ $(function () {

$(document).on("click", '.js-create-package-activator', function(event) {
var path = $('.js-create-package-activator').data('path');
window.location.replace('/apps/etoolbox-backpack/admin/new.html?item=' + path);
window.location.replace('/apps/etoolbox-backpack/admin/console.html?item=' + path);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
variant="actionBar">
<data
jcr:primaryType="nt:unstructured"
href.uritemplate="/apps/etoolbox-backpack/admin/new.html{?item*}"/>
href.uritemplate="/apps/etoolbox-backpack/admin/console.html{?item*}"/>
</backpack>
</selection>
</actions>
Expand Down

0 comments on commit 809bafe

Please sign in to comment.