gd-sprest-bs 10.12.1 → 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 +60 -60
- 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 +67 -67
|
@@ -668,50 +668,34 @@ exports.ListForm.renderEditForm = function (props) {
|
|
|
668
668
|
text: fileInfo.name
|
|
669
669
|
},
|
|
670
670
|
options: {
|
|
671
|
-
content: core_1.Components.
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
attachments.new.splice(i, 1);
|
|
686
|
-
break;
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
// Get the files
|
|
690
|
-
var files = btnGroup.querySelectorAll(".btn.file-attachment");
|
|
691
|
-
for (var i = 0; i < files.length; i++) {
|
|
692
|
-
var file = files[i];
|
|
693
|
-
// See if this is the target button
|
|
694
|
-
if (file.innerText == fileName) {
|
|
695
|
-
// Remove this popover
|
|
696
|
-
file.parentElement.removeChild(file);
|
|
697
|
-
break;
|
|
698
|
-
}
|
|
699
|
-
}
|
|
671
|
+
content: core_1.Components.Button({
|
|
672
|
+
data: fileInfo,
|
|
673
|
+
isSmall: true,
|
|
674
|
+
text: "Remove",
|
|
675
|
+
type: core_1.Components.ButtonTypes.Danger,
|
|
676
|
+
onClick: function (btn, ev) {
|
|
677
|
+
var fileName = btn.data.name;
|
|
678
|
+
// Parse the array
|
|
679
|
+
for (var i = 0; i < attachments.new.length; i++) {
|
|
680
|
+
// See if this is the target attachment
|
|
681
|
+
if (attachments.new[i].name == fileName) {
|
|
682
|
+
// Remove this attachment
|
|
683
|
+
attachments.new.splice(i, 1);
|
|
684
|
+
break;
|
|
700
685
|
}
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
window.open(fileUrl, "_blank");
|
|
686
|
+
}
|
|
687
|
+
// Get the files
|
|
688
|
+
var files = btnGroup.querySelectorAll(".btn.file-attachment");
|
|
689
|
+
for (var i = 0; i < files.length; i++) {
|
|
690
|
+
var file = files[i];
|
|
691
|
+
// See if this is the target button
|
|
692
|
+
if (file.innerText == fileName) {
|
|
693
|
+
// Remove this popover
|
|
694
|
+
file.parentElement.removeChild(file);
|
|
695
|
+
break;
|
|
712
696
|
}
|
|
713
697
|
}
|
|
714
|
-
|
|
698
|
+
}
|
|
715
699
|
}).el
|
|
716
700
|
}
|
|
717
701
|
}).el);
|
|
@@ -737,27 +721,43 @@ exports.ListForm.renderEditForm = function (props) {
|
|
|
737
721
|
text: attachment.FileName,
|
|
738
722
|
},
|
|
739
723
|
options: {
|
|
740
|
-
content: core_1.Components.
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
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");
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
|
-
|
|
760
|
+
]
|
|
761
761
|
}).el
|
|
762
762
|
}
|
|
763
763
|
}).el);
|