gd-sprest-bs 10.12.0 → 10.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/listForm/index.js +35 -19
- package/dist/gd-sprest-bs-icons.js +1 -1
- package/dist/gd-sprest-bs-icons.js.LICENSE.txt +89 -89
- package/dist/gd-sprest-bs-icons.min.js +1 -1
- package/dist/gd-sprest-bs.js +1 -1
- package/dist/gd-sprest-bs.js.LICENSE.txt +1 -1
- package/dist/gd-sprest-bs.min.js +1 -1
- package/package.json +2 -2
- package/src/components/listForm/index.ts +39 -22
|
@@ -721,27 +721,43 @@ exports.ListForm.renderEditForm = function (props) {
|
|
|
721
721
|
text: attachment.FileName,
|
|
722
722
|
},
|
|
723
723
|
options: {
|
|
724
|
-
content: core_1.Components.
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
724
|
+
content: core_1.Components.ButtonGroup({
|
|
725
|
+
buttons: [
|
|
726
|
+
{
|
|
727
|
+
data: attachment,
|
|
728
|
+
isSmall: true,
|
|
729
|
+
text: "Remove",
|
|
730
|
+
type: core_1.Components.ButtonTypes.Danger,
|
|
731
|
+
onClick: function (btn, ev) {
|
|
732
|
+
var attachment = btn.data;
|
|
733
|
+
// Add this file for deletion
|
|
734
|
+
attachments.delete.push(attachment);
|
|
735
|
+
// Get the files
|
|
736
|
+
var files = btnGroup.querySelectorAll(".btn.file-attachment");
|
|
737
|
+
for (var i_1 = 0; i_1 < files.length; i_1++) {
|
|
738
|
+
var file = files[i_1];
|
|
739
|
+
// See if this is the target button
|
|
740
|
+
if (file.innerText == attachment.FileName) {
|
|
741
|
+
// Remove this popover
|
|
742
|
+
file.parentElement.removeChild(file);
|
|
743
|
+
break;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
data: attachment,
|
|
750
|
+
isDisabled: attachment.ServerRelativeUrl ? false : true,
|
|
751
|
+
isSmall: true,
|
|
752
|
+
text: "View",
|
|
753
|
+
type: core_1.Components.ButtonTypes.Primary,
|
|
754
|
+
onClick: function (btn, ev) {
|
|
755
|
+
var fileUrl = btn.data.ServerRelativeUrl;
|
|
756
|
+
// Show the file in a new tab
|
|
757
|
+
window.open(fileUrl, "_blank");
|
|
742
758
|
}
|
|
743
759
|
}
|
|
744
|
-
|
|
760
|
+
]
|
|
745
761
|
}).el
|
|
746
762
|
}
|
|
747
763
|
}).el);
|