cronapp-framework-js 3.0.0-SP.4 → 3.0.0-SP.41
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/components/crn-dynamic-file.components.json +65 -34
- package/components/crn-dynamic-menu.components.json +0 -21
- package/components/crn-enterprise-combobox-multiple.components.json +6 -0
- package/components/crn-navbar.components.json +26 -1
- package/components/templates/Component_Container/crn-eight-four-container.template.html +2 -2
- package/components/templates/Component_Container/crn-four-eight-container.template.html +2 -2
- package/components/templates/Component_Container/crn-one-container.template.html +1 -1
- package/components/templates/Component_Container/crn-three-container.template.html +3 -3
- package/components/templates/Component_Container/crn-three-six-three-container.template.html +3 -3
- package/components/templates/Component_Container/crn-two-container.template.html +2 -2
- package/components/templates/cron-autocomplete.designtime.html +2 -2
- package/components/templates/cron-combobox-multiple.template.html +1 -1
- package/components/templates/cron-grid.designtime.html +5 -4
- package/components/templates/dynamicfile.designtime.html +5 -0
- package/components/templates/dynamicfile.template.html +20 -3
- package/css/themes/custom/aquamarine/custom-aquamarine.css +13 -1
- package/css/themes/custom/cerulean/custom-cerulean.css +1 -0
- package/css/themes/custom/cosmo/custom-cosmo.css +16 -16
- package/css/themes/custom/cosmo/panel-cosmo.css +1 -1
- package/css/themes/custom/cyborg/button-cyborg.css +61 -1
- package/css/themes/custom/cyborg/custom-cyborg.css +227 -39
- package/css/themes/custom/cyborg/navbar-cyborg.css +4 -4
- package/css/themes/custom/cyborg/panel-cyborg.css +2 -2
- package/css/themes/custom/darkly/custom-darkly.css +1 -0
- package/css/themes/custom/dsgov/custom-dsgov.css +12 -1
- package/css/themes/custom/flatly/custom-flatly.css +1 -0
- package/css/themes/custom/fuse/custom-fuse.css +13 -1
- package/css/themes/custom/journal/custom-journal.css +1 -0
- package/css/themes/custom/krypton/custom-krypton.css +991 -236
- package/css/themes/custom/krypton/grid-krypton.css +253 -66
- package/css/themes/custom/krypton/navbar-krypton.css +13 -12
- package/css/themes/custom/krypton/panel-krypton.css +29 -26
- package/css/themes/custom/lumen/button-lumen.css +8 -8
- package/css/themes/custom/lumen/custom-lumen.css +46 -34
- package/css/themes/custom/lumen/navbar-lumen.css +1 -1
- package/css/themes/custom/lumen/panel-lumen.css +17 -13
- package/css/themes/custom/material/custom-material.css +12 -1
- package/css/themes/custom/material/navbar-material.css +13 -0
- package/css/themes/custom/material-round/custom-material-round.css +187 -34
- package/css/themes/custom/material-round/grid-material-round.css +174 -18
- package/css/themes/custom/materialui/custom-materialui.css +1 -0
- package/css/themes/custom/navigator/custom-navigator.css +80 -21
- package/css/themes/custom/paper/custom-paper.css +284 -27
- package/css/themes/custom/readable/button-readable.css +61 -1
- package/css/themes/custom/readable/custom-readable.css +242 -26
- package/css/themes/custom/readable/navbar-readable.css +1 -2
- package/css/themes/custom/readable/panel-readable.css +6 -8
- package/css/themes/custom/sandstone/button-sandstone.css +12 -0
- package/css/themes/custom/sandstone/custom-sandstone.css +1 -0
- package/css/themes/custom/simplex/custom-simplex.css +1 -0
- package/css/themes/custom/slate/custom-slate.css +1 -0
- package/css/themes/custom/spacelab/custom-spacelab.css +1 -0
- package/css/themes/custom/superhero/button-superhero.css +1 -1
- package/css/themes/custom/superhero/custom-superhero.css +348 -45
- package/css/themes/custom/superhero/navbar-superhero.css +5 -1
- package/css/themes/custom/superhero/panel-superhero.css +4 -5
- package/css/themes/custom/superhero/tabs-superhero.css +1 -1
- package/css/themes/custom/theme-general/button.css +4 -0
- package/css/themes/custom/theme-general/menu-vertical-retratil.css +35 -22
- package/css/themes/custom/theme-general/menu.css +2 -2
- package/css/themes/custom/theme-general/table-grid.css +3 -2
- package/css/themes/custom/theme-general/theme-general.css +30 -0
- package/css/themes/custom/united/custom-united.css +1 -0
- package/css/themes/custom/yeti/custom-yeti.css +1 -0
- package/dist/components/js/format.min.js +1 -1
- package/dist/components/js/jquery.inputmask.bundle.js +1 -1
- package/dist/components/templates/Component_Container/crn-eight-four-container.template.html +1 -1
- package/dist/components/templates/Component_Container/crn-four-eight-container.template.html +1 -1
- package/dist/components/templates/Component_Container/crn-one-container.template.html +1 -1
- package/dist/components/templates/Component_Container/crn-three-container.template.html +1 -1
- package/dist/components/templates/Component_Container/crn-three-six-three-container.template.html +1 -1
- package/dist/components/templates/Component_Container/crn-two-container.template.html +1 -1
- package/dist/components/templates/cron-autocomplete.designtime.html +1 -1
- package/dist/components/templates/cron-combobox-multiple.template.html +1 -1
- package/dist/components/templates/cron-grid.designtime.html +1 -1
- package/dist/components/templates/dynamicfile.designtime.html +1 -0
- package/dist/components/templates/dynamicfile.template.html +1 -1
- package/dist/css/themes/custom/aquamarine/custom-aquamarine.css +1 -1
- package/dist/css/themes/custom/cerulean/custom-cerulean.css +1 -1
- package/dist/css/themes/custom/cosmo/custom-cosmo.css +1 -1
- package/dist/css/themes/custom/cosmo/panel-cosmo.css +1 -1
- package/dist/css/themes/custom/cyborg/button-cyborg.css +1 -1
- package/dist/css/themes/custom/cyborg/custom-cyborg.css +1 -1
- package/dist/css/themes/custom/cyborg/navbar-cyborg.css +1 -1
- package/dist/css/themes/custom/darkly/custom-darkly.css +1 -1
- package/dist/css/themes/custom/dsgov/custom-dsgov.css +1 -1
- package/dist/css/themes/custom/flatly/custom-flatly.css +1 -1
- package/dist/css/themes/custom/fuse/custom-fuse.css +1 -1
- package/dist/css/themes/custom/journal/custom-journal.css +1 -1
- package/dist/css/themes/custom/krypton/custom-krypton.css +1 -1
- package/dist/css/themes/custom/krypton/grid-krypton.css +1 -1
- package/dist/css/themes/custom/krypton/navbar-krypton.css +1 -1
- package/dist/css/themes/custom/krypton/panel-krypton.css +1 -1
- package/dist/css/themes/custom/lumen/button-lumen.css +1 -1
- package/dist/css/themes/custom/lumen/custom-lumen.css +1 -1
- package/dist/css/themes/custom/lumen/navbar-lumen.css +1 -1
- package/dist/css/themes/custom/lumen/panel-lumen.css +1 -1
- package/dist/css/themes/custom/material/custom-material.css +1 -1
- package/dist/css/themes/custom/material/navbar-material.css +1 -1
- package/dist/css/themes/custom/material-round/custom-material-round.css +1 -1
- package/dist/css/themes/custom/material-round/grid-material-round.css +1 -1
- package/dist/css/themes/custom/materialui/custom-materialui.css +1 -1
- package/dist/css/themes/custom/navigator/custom-navigator.css +1 -1
- package/dist/css/themes/custom/paper/custom-paper.css +1 -1
- package/dist/css/themes/custom/readable/button-readable.css +1 -1
- package/dist/css/themes/custom/readable/custom-readable.css +1 -1
- package/dist/css/themes/custom/readable/navbar-readable.css +1 -1
- package/dist/css/themes/custom/readable/panel-readable.css +1 -1
- package/dist/css/themes/custom/sandstone/button-sandstone.css +1 -1
- package/dist/css/themes/custom/sandstone/custom-sandstone.css +1 -1
- package/dist/css/themes/custom/simplex/custom-simplex.css +1 -1
- package/dist/css/themes/custom/slate/custom-slate.css +1 -1
- package/dist/css/themes/custom/spacelab/custom-spacelab.css +1 -1
- package/dist/css/themes/custom/superhero/button-superhero.css +1 -1
- package/dist/css/themes/custom/superhero/custom-superhero.css +1 -1
- package/dist/css/themes/custom/superhero/navbar-superhero.css +1 -1
- package/dist/css/themes/custom/superhero/panel-superhero.css +1 -1
- package/dist/css/themes/custom/superhero/tabs-superhero.css +1 -1
- package/dist/css/themes/custom/theme-general/button.css +1 -1
- package/dist/css/themes/custom/theme-general/menu-vertical-retratil.css +1 -1
- package/dist/css/themes/custom/theme-general/menu.css +1 -1
- package/dist/css/themes/custom/theme-general/table-grid.css +1 -1
- package/dist/css/themes/custom/theme-general/theme-general.css +1 -1
- package/dist/css/themes/custom/united/custom-united.css +1 -1
- package/dist/css/themes/custom/yeti/custom-yeti.css +1 -1
- package/dist/js/app.js +1 -1
- package/dist/js/controllers.js +1 -1
- package/dist/js/directives.js +17 -12
- package/dist/js/reports/reports.service.js +1 -1
- package/dist/js/upload.service.js +1 -1
- package/js/app.js +5 -4
- package/js/controllers.js +42 -19
- package/js/directives.js +325 -77
- package/js/reports/reports.service.js +5 -5
- package/js/upload.service.js +7 -4
- package/package.json +1 -1
- package/postupdate.json +6 -0
package/js/directives.js
CHANGED
|
@@ -2688,6 +2688,67 @@
|
|
|
2688
2688
|
return attributes;
|
|
2689
2689
|
}
|
|
2690
2690
|
|
|
2691
|
+
function commandClick(e, column) {
|
|
2692
|
+
e.preventDefault();
|
|
2693
|
+
let tr = $(e.target).closest("tr");
|
|
2694
|
+
let grid = tr.closest('table');
|
|
2695
|
+
let itemAsObj = this.dataItem(tr);
|
|
2696
|
+
let item = this.dataItem(tr);
|
|
2697
|
+
let index = $(grid.find('tbody')[0]).children().index(tr);
|
|
2698
|
+
let call = undefined;
|
|
2699
|
+
if (column.dataType == "Customized" || column.dataType == "CustomizedLink" || column.dataType == "GroupedButtons")
|
|
2700
|
+
call = column.execute;
|
|
2701
|
+
else
|
|
2702
|
+
call = generateBlocklyCall(column.blocklyInfo);
|
|
2703
|
+
let cronappDatasource = this.dataSource.transport.options.cronappDatasource;
|
|
2704
|
+
let currentGrid = options.refComponent;
|
|
2705
|
+
let selectedRows = [];
|
|
2706
|
+
currentGrid.select().each(function() {
|
|
2707
|
+
let gridRow = currentGrid.dataItem(this);
|
|
2708
|
+
cronappDatasource.data.forEach(function(dsRow) {
|
|
2709
|
+
if (dsRow.__$id == gridRow.__$id)
|
|
2710
|
+
selectedRows.push(dsRow);
|
|
2711
|
+
});
|
|
2712
|
+
});
|
|
2713
|
+
|
|
2714
|
+
if (!(cronappDatasource.inserting || cronappDatasource.editing)) {
|
|
2715
|
+
let tr = e.currentTarget.parentElement.parentElement;
|
|
2716
|
+
this.select(tr);
|
|
2717
|
+
}
|
|
2718
|
+
|
|
2719
|
+
let selectedRowsKeyOrObj = [];
|
|
2720
|
+
if (options.fieldType && options.fieldType === 'key') {
|
|
2721
|
+
item = helperDirective.changeObjectField(cronappDatasource, cronappDatasource.findObjInDs(item));
|
|
2722
|
+
selectedRows.forEach(row => {
|
|
2723
|
+
selectedRowsKeyOrObj.push(helperDirective.changeObjectField(cronappDatasource, cronappDatasource.findObjInDs(row)));
|
|
2724
|
+
});
|
|
2725
|
+
}
|
|
2726
|
+
else {
|
|
2727
|
+
selectedRowsKeyOrObj = selectedRows;
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
let consolidated = {
|
|
2731
|
+
item: item,
|
|
2732
|
+
index: index
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
let contextVars = {
|
|
2736
|
+
'currentData': cronappDatasource.data,
|
|
2737
|
+
'datasource': cronappDatasource.copyWithoutAngularObj(),
|
|
2738
|
+
'selectedIndex': index,
|
|
2739
|
+
'index': index,
|
|
2740
|
+
'selectedRow': item,
|
|
2741
|
+
'consolidated': consolidated,
|
|
2742
|
+
'item': item,
|
|
2743
|
+
'selectedKeys': cronappDatasource.getKeyValues(cronappDatasource.findObjInDs(itemAsObj), true),
|
|
2744
|
+
'selectedRows': selectedRowsKeyOrObj
|
|
2745
|
+
};
|
|
2746
|
+
|
|
2747
|
+
cronappDatasource.goTo(itemAsObj);
|
|
2748
|
+
scope.$eval(call, contextVars);
|
|
2749
|
+
return;
|
|
2750
|
+
};
|
|
2751
|
+
|
|
2691
2752
|
var columns = [];
|
|
2692
2753
|
if (options.columns) {
|
|
2693
2754
|
options.columns.forEach(function(column) {
|
|
@@ -2757,7 +2818,7 @@
|
|
|
2757
2818
|
className = 'k-custom-command' + (label ? ' k-button-with-label' : '');
|
|
2758
2819
|
}
|
|
2759
2820
|
if (column.theme)
|
|
2760
|
-
className += ' ' + column.theme;
|
|
2821
|
+
className += ' btn ' + column.theme;
|
|
2761
2822
|
|
|
2762
2823
|
var tooltip = '';
|
|
2763
2824
|
if (column.tooltip && column.tooltip.length)
|
|
@@ -2769,79 +2830,21 @@
|
|
|
2769
2830
|
className += ' ' + classForTooltip;
|
|
2770
2831
|
}
|
|
2771
2832
|
|
|
2833
|
+
let width = column.width;
|
|
2834
|
+
if (width) {
|
|
2835
|
+
width += 'px';
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2772
2838
|
let idForCommand = app.common.generateId();
|
|
2773
2839
|
let ariaLabel = tooltip || label || idForCommand;
|
|
2774
|
-
let template = `<a href class='k-button ${className} k-grid-${idForCommand}' aria-label='${ariaLabel}'><span class='${column.iconClass}'></span>${label}</a>`;
|
|
2840
|
+
let template = `<a href class='k-button ${className} k-grid-${idForCommand}' aria-label='${ariaLabel}' style='width:${width}'><span class='${column.iconClass}'></span>${label}</a>`;
|
|
2775
2841
|
|
|
2776
2842
|
var addColumn = {
|
|
2777
2843
|
command: [{
|
|
2778
2844
|
name: idForCommand,
|
|
2779
2845
|
template: template,
|
|
2780
2846
|
click: function(e) {
|
|
2781
|
-
|
|
2782
|
-
var tr = $(e.target).closest("tr");
|
|
2783
|
-
var grid = tr.closest('table');
|
|
2784
|
-
|
|
2785
|
-
var itemAsObj = this.dataItem(tr);
|
|
2786
|
-
var item = this.dataItem(tr);
|
|
2787
|
-
var index = $(grid.find('tbody')[0]).children().index(tr)
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
var call = undefined;
|
|
2791
|
-
if (column.dataType == "Customized" || column.dataType == "CustomizedLink")
|
|
2792
|
-
call = column.execute;
|
|
2793
|
-
else
|
|
2794
|
-
call = generateBlocklyCall(column.blocklyInfo);
|
|
2795
|
-
|
|
2796
|
-
var cronappDatasource = this.dataSource.transport.options.cronappDatasource;
|
|
2797
|
-
var currentGrid = options.refComponent;
|
|
2798
|
-
var selectedRows = [];
|
|
2799
|
-
currentGrid.select().each(function() {
|
|
2800
|
-
var gridRow = currentGrid.dataItem(this);
|
|
2801
|
-
cronappDatasource.data.forEach(function(dsRow) {
|
|
2802
|
-
if (dsRow.__$id == gridRow.__$id)
|
|
2803
|
-
selectedRows.push(dsRow);
|
|
2804
|
-
});
|
|
2805
|
-
});
|
|
2806
|
-
|
|
2807
|
-
if (!(cronappDatasource.inserting || cronappDatasource.editing)) {
|
|
2808
|
-
var tr = e.currentTarget.parentElement.parentElement;
|
|
2809
|
-
this.select(tr);
|
|
2810
|
-
}
|
|
2811
|
-
|
|
2812
|
-
let selectedRowsKeyOrObj = [];
|
|
2813
|
-
if(options.fieldType && options.fieldType === 'key') {
|
|
2814
|
-
item = helperDirective.changeObjectField(cronappDatasource, cronappDatasource.findObjInDs(item));
|
|
2815
|
-
selectedRows.forEach(row => {
|
|
2816
|
-
selectedRowsKeyOrObj.push(helperDirective.changeObjectField(cronappDatasource, cronappDatasource.findObjInDs(row)));
|
|
2817
|
-
});
|
|
2818
|
-
}
|
|
2819
|
-
else {
|
|
2820
|
-
selectedRowsKeyOrObj = selectedRows;
|
|
2821
|
-
}
|
|
2822
|
-
|
|
2823
|
-
var consolidated = {
|
|
2824
|
-
item: item,
|
|
2825
|
-
index: index
|
|
2826
|
-
}
|
|
2827
|
-
|
|
2828
|
-
var contextVars = {
|
|
2829
|
-
'currentData': cronappDatasource.data,
|
|
2830
|
-
'datasource': cronappDatasource.copyWithoutAngularObj(),
|
|
2831
|
-
'selectedIndex': index,
|
|
2832
|
-
'index': index,
|
|
2833
|
-
'selectedRow': item,
|
|
2834
|
-
'consolidated': consolidated,
|
|
2835
|
-
'item': item,
|
|
2836
|
-
'selectedKeys': cronappDatasource.getKeyValues(cronappDatasource.findObjInDs(itemAsObj), true),
|
|
2837
|
-
'selectedRows': selectedRowsKeyOrObj
|
|
2838
|
-
};
|
|
2839
|
-
|
|
2840
|
-
if (this.element.find('input[type=checkbox]').length === 0) {
|
|
2841
|
-
cronappDatasource.goTo(itemAsObj);
|
|
2842
|
-
}
|
|
2843
|
-
scope.$eval(call, contextVars);
|
|
2844
|
-
return;
|
|
2847
|
+
commandClick.bind(this)(e, column);
|
|
2845
2848
|
}
|
|
2846
2849
|
}],
|
|
2847
2850
|
width: widthDevice.width,
|
|
@@ -2852,6 +2855,62 @@
|
|
|
2852
2855
|
columns.push(addColumn);
|
|
2853
2856
|
setIdCommandButton.bind(this)(idForCommand, column.dataType);
|
|
2854
2857
|
}
|
|
2858
|
+
else if (column.dataType == "GroupedButtons") {
|
|
2859
|
+
|
|
2860
|
+
if (column.buttonColumns && column.buttonColumns.length) {
|
|
2861
|
+
|
|
2862
|
+
let commands = [];
|
|
2863
|
+
|
|
2864
|
+
column.buttonColumns.forEach(function(buttonColumn) {
|
|
2865
|
+
let label = buttonColumn.label == undefined ? '': buttonColumn.label;
|
|
2866
|
+
if (buttonColumn.iconClass && label)
|
|
2867
|
+
label = ' ' + label;
|
|
2868
|
+
|
|
2869
|
+
let className = 'k-custom-command' + (label ? ' k-button-with-label' : '');
|
|
2870
|
+
if (buttonColumn.theme)
|
|
2871
|
+
className += ' btn ' + buttonColumn.theme;
|
|
2872
|
+
|
|
2873
|
+
let tooltip = '';
|
|
2874
|
+
if (buttonColumn.tooltip && buttonColumn.tooltip.length)
|
|
2875
|
+
tooltip = buttonColumn.tooltip;
|
|
2876
|
+
|
|
2877
|
+
if (tooltip) {
|
|
2878
|
+
let classForTooltip = app.common.generateId();
|
|
2879
|
+
tooltips[classForTooltip] = tooltip;
|
|
2880
|
+
className += ' ' + classForTooltip;
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
let width = buttonColumn.width;
|
|
2884
|
+
if (width) {
|
|
2885
|
+
width += 'px';
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2888
|
+
let idForCommand = app.common.generateId();
|
|
2889
|
+
let ariaLabel = tooltip || label || idForCommand;
|
|
2890
|
+
let template = `<a href class='k-button ${className} k-grid-${idForCommand}' aria-label='${ariaLabel}' style='width:${width}'><span class='${buttonColumn.iconClass}'></span>${label}</a>`;
|
|
2891
|
+
|
|
2892
|
+
let command = {
|
|
2893
|
+
name: idForCommand,
|
|
2894
|
+
template: template,
|
|
2895
|
+
click: function(e) {
|
|
2896
|
+
buttonColumn.dataType = column.dataType;
|
|
2897
|
+
commandClick.bind(this)(e, buttonColumn);
|
|
2898
|
+
}
|
|
2899
|
+
};
|
|
2900
|
+
commands.push(command);
|
|
2901
|
+
});
|
|
2902
|
+
|
|
2903
|
+
var addColumn = {
|
|
2904
|
+
command: commands,
|
|
2905
|
+
width: widthDevice.width,
|
|
2906
|
+
title: column.headerText ? column.headerText: '',
|
|
2907
|
+
hidden: !widthDevice.visible,
|
|
2908
|
+
attributes: getAttributes(column)
|
|
2909
|
+
};
|
|
2910
|
+
columns.push(addColumn);
|
|
2911
|
+
setIdCommandButton.bind(this)(app.common.generateId(), column.dataType);
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2855
2914
|
else if (column.dataType == "Selectable") {
|
|
2856
2915
|
var checkColumn = {
|
|
2857
2916
|
selectable: true,
|
|
@@ -2989,7 +3048,11 @@
|
|
|
2989
3048
|
var cronappDatasource = this.dataSource.transport.options.cronappDatasource;
|
|
2990
3049
|
if (!(cronappDatasource.inserting || cronappDatasource.editing)) {
|
|
2991
3050
|
if (this.selectable) {
|
|
3051
|
+
setToActiveInCronappDataSource.bind(this)(e.data);
|
|
2992
3052
|
this.select(e.masterRow);
|
|
3053
|
+
if (options.columns.find(c => c.dataType == 'Selectable') !== undefined) {
|
|
3054
|
+
collapseAllExcecptCurrent(this, e.detailRow, e.masterRow);
|
|
3055
|
+
}
|
|
2993
3056
|
}
|
|
2994
3057
|
else {
|
|
2995
3058
|
setToActiveInCronappDataSource.bind(this)(e.data);
|
|
@@ -3217,14 +3280,22 @@
|
|
|
3217
3280
|
},
|
|
3218
3281
|
change: function(e) {
|
|
3219
3282
|
var item = this.dataItem(this.select());
|
|
3220
|
-
|
|
3283
|
+
if ((options.details && options.details.length == 0) || (!cronapi.internal.hasMethodInCallStack('detailInit'))) {
|
|
3284
|
+
setToActiveInCronappDataSource.bind(this)(item);
|
|
3285
|
+
}
|
|
3221
3286
|
var cronappDatasource = this.dataSource.transport.options.cronappDatasource;
|
|
3222
3287
|
if(options.fieldType && options.fieldType === 'key'){
|
|
3223
3288
|
cronappDatasource.active = helperDirective.changeObjectField(cronappDatasource, cronappDatasource.active);
|
|
3224
3289
|
}
|
|
3290
|
+
|
|
3291
|
+
let trDetails = this.select().next();
|
|
3292
|
+
let trMasters = this.select();
|
|
3293
|
+
|
|
3225
3294
|
if (ngModelCtrl) {
|
|
3226
3295
|
if ("multiple" === options.allowSelectionRowType) {
|
|
3227
3296
|
let selecteds = [];
|
|
3297
|
+
trDetails = [];
|
|
3298
|
+
trMasters = [];
|
|
3228
3299
|
this.select().each((i, row)=> {
|
|
3229
3300
|
let item = this.dataItem(row);
|
|
3230
3301
|
let objInDs = cronappDatasource.findObjInDs(item, false);
|
|
@@ -3234,6 +3305,10 @@
|
|
|
3234
3305
|
if (objInDs !== null){
|
|
3235
3306
|
selecteds.push(objInDs);
|
|
3236
3307
|
}
|
|
3308
|
+
if (item["_objectKey"] === cronappDatasource.active["_objectKey"]) {
|
|
3309
|
+
trMasters.push(this.select()[i]);
|
|
3310
|
+
trDetails.push(this.select().next()[i]);
|
|
3311
|
+
}
|
|
3237
3312
|
});
|
|
3238
3313
|
ngModelCtrl.$setViewValue(selecteds);
|
|
3239
3314
|
}
|
|
@@ -3246,7 +3321,7 @@
|
|
|
3246
3321
|
}
|
|
3247
3322
|
}
|
|
3248
3323
|
}
|
|
3249
|
-
collapseAllExcecptCurrent(this,
|
|
3324
|
+
collapseAllExcecptCurrent(this, trDetails, trMasters);
|
|
3250
3325
|
|
|
3251
3326
|
if (attrs && attrs.ngChange) {
|
|
3252
3327
|
scope.$eval(attrs.ngChange);
|
|
@@ -3269,8 +3344,8 @@
|
|
|
3269
3344
|
command = 'edit';
|
|
3270
3345
|
}
|
|
3271
3346
|
|
|
3272
|
-
|
|
3273
|
-
|
|
3347
|
+
let modelName = helperDirective.getModelName(attrs);
|
|
3348
|
+
if (item && item["_objectKey"]) {
|
|
3274
3349
|
let key = item["_objectKey"];
|
|
3275
3350
|
let id = `${modelName}-${command}-${key}`;
|
|
3276
3351
|
$elem.attr('id', id);
|
|
@@ -3445,11 +3520,63 @@
|
|
|
3445
3520
|
}
|
|
3446
3521
|
});
|
|
3447
3522
|
|
|
3523
|
+
grid.selectable.userEvents.unbind("select");
|
|
3524
|
+
|
|
3448
3525
|
});
|
|
3449
3526
|
|
|
3527
|
+
let contextMenuId = app.common.generateId();
|
|
3528
|
+
let contextMenuValue = app.common.generateId();
|
|
3529
|
+
let contextMenuClose = app.common.generateId();
|
|
3530
|
+
let contextMenuHtml = $(`<ul id="${contextMenuId}">
|
|
3531
|
+
<li id="copyText">
|
|
3532
|
+
<input id="${contextMenuValue}">
|
|
3533
|
+
<span id="${contextMenuClose}" class="k-icon k-i-close" style="margin-left: 5px;"></span>
|
|
3534
|
+
</li>
|
|
3535
|
+
</ul>`);
|
|
3450
3536
|
element.html($templateDyn);
|
|
3537
|
+
element.append(contextMenuHtml);
|
|
3451
3538
|
$compile($templateDyn)(element.scope());
|
|
3452
3539
|
|
|
3540
|
+
let contextMenu = $(`#${contextMenuId}`).kendoContextMenu({
|
|
3541
|
+
target: $templateDyn,
|
|
3542
|
+
filter: "td",
|
|
3543
|
+
close: (e) => {
|
|
3544
|
+
if (!closeContextMenu) {
|
|
3545
|
+
e.preventDefault();
|
|
3546
|
+
}
|
|
3547
|
+
},
|
|
3548
|
+
open: (e) => {
|
|
3549
|
+
let cell = e.target;
|
|
3550
|
+
let row = $(cell).parent()[0];
|
|
3551
|
+
let grid = $templateDyn.data("kendoGrid");
|
|
3552
|
+
let itemId = e.item.id;
|
|
3553
|
+
|
|
3554
|
+
let cellText = cell.innerText;
|
|
3555
|
+
if (cellText.length && cellText !== '') {
|
|
3556
|
+
$(e.item).find(`#${contextMenuValue}`).val(cellText);
|
|
3557
|
+
closeContextMenu = false;
|
|
3558
|
+
}
|
|
3559
|
+
else {
|
|
3560
|
+
let menuRejected = () => {
|
|
3561
|
+
return new Promise((resolve, reject) => {
|
|
3562
|
+
let waiting = setInterval(() => {
|
|
3563
|
+
if ($(`#${contextMenuId}`).is(':visible')) {
|
|
3564
|
+
clearInterval(waiting);
|
|
3565
|
+
$(`#${contextMenuId}`).hide();
|
|
3566
|
+
}
|
|
3567
|
+
});
|
|
3568
|
+
});
|
|
3569
|
+
}
|
|
3570
|
+
menuRejected();
|
|
3571
|
+
}
|
|
3572
|
+
}
|
|
3573
|
+
}).data("kendoContextMenu");
|
|
3574
|
+
|
|
3575
|
+
$(`#${contextMenuClose}`).on("click", (e) => {
|
|
3576
|
+
closeContextMenu = true;
|
|
3577
|
+
contextMenu.close();
|
|
3578
|
+
});
|
|
3579
|
+
|
|
3453
3580
|
}
|
|
3454
3581
|
};
|
|
3455
3582
|
}])
|
|
@@ -3531,8 +3658,8 @@
|
|
|
3531
3658
|
getAllParent(cronappDatasource, itemResult.d.results[0], ids, resolve, reject);
|
|
3532
3659
|
},
|
|
3533
3660
|
beforeSend: (xhr) => {
|
|
3534
|
-
if (window.
|
|
3535
|
-
xhr.setRequestHeader ("X-AUTH-TOKEN",
|
|
3661
|
+
if (!window.isUsingCookie()) {
|
|
3662
|
+
xhr.setRequestHeader ("X-AUTH-TOKEN", cronapi.util.getUserToken());
|
|
3536
3663
|
}
|
|
3537
3664
|
},
|
|
3538
3665
|
error: () => reject(),
|
|
@@ -3673,8 +3800,8 @@
|
|
|
3673
3800
|
resolve();
|
|
3674
3801
|
},
|
|
3675
3802
|
beforeSend: (xhr) => {
|
|
3676
|
-
if (window.
|
|
3677
|
-
xhr.setRequestHeader ("X-AUTH-TOKEN",
|
|
3803
|
+
if (!window.isUsingCookie()) {
|
|
3804
|
+
xhr.setRequestHeader ("X-AUTH-TOKEN", cronapi.util.getUserToken());
|
|
3678
3805
|
}
|
|
3679
3806
|
},
|
|
3680
3807
|
error: () => reject(),
|
|
@@ -4175,9 +4302,10 @@
|
|
|
4175
4302
|
options.dataBound = attrs.ngDataBound ? function (){scope.$eval(attrs.ngDataBound)}: undefined;
|
|
4176
4303
|
options.filtering = attrs.ngFiltering ? function (){scope.$eval(attrs.ngFiltering)}: undefined;
|
|
4177
4304
|
options.open = function(e) {
|
|
4178
|
-
if (!dataSourceScreen.fetched || (dataSourceScreen.
|
|
4305
|
+
if (!dataSourceScreen.fetched || (dataSourceScreen.lastLoadedTime !== combobox.dataSource.lastLoadedTime)) {
|
|
4179
4306
|
combobox.options.firstLazyRead = true;
|
|
4180
4307
|
combobox.dataSource.read();
|
|
4308
|
+
combobox.dataSource.lastLoadedTime = dataSourceScreen.lastLoadedTime;
|
|
4181
4309
|
}
|
|
4182
4310
|
};
|
|
4183
4311
|
|
|
@@ -4225,6 +4353,13 @@
|
|
|
4225
4353
|
|
|
4226
4354
|
this.toComboType(attrs, parent, select, combobox);
|
|
4227
4355
|
|
|
4356
|
+
let forcedRefreshModelAt;
|
|
4357
|
+
let canRefresh = () => {
|
|
4358
|
+
let check = performance.now();
|
|
4359
|
+
if (!forcedRefreshModelAt) return true;
|
|
4360
|
+
return check - forcedRefreshModelAt > 2000;
|
|
4361
|
+
};
|
|
4362
|
+
|
|
4228
4363
|
var forceChangeModel = async function(value) {
|
|
4229
4364
|
|
|
4230
4365
|
$log.debug("forceChangeModel | " + attrs['id'] + " | " + value);
|
|
@@ -4331,7 +4466,7 @@
|
|
|
4331
4466
|
overRideRefresh: function() {
|
|
4332
4467
|
dataSourceScreen.fetched = false;
|
|
4333
4468
|
dataSourceScreen.cleanup();
|
|
4334
|
-
defineInitialValue();
|
|
4469
|
+
canRefresh() && defineInitialValue();
|
|
4335
4470
|
}
|
|
4336
4471
|
});
|
|
4337
4472
|
}
|
|
@@ -4465,6 +4600,10 @@
|
|
|
4465
4600
|
});
|
|
4466
4601
|
|
|
4467
4602
|
$("[aria-owns='" + `${attrs.id}_listbox` + "']").attr('aria-label', $translate.instant('template.crud.search'));
|
|
4603
|
+
if (ngModelCtrl.$modelValue) {
|
|
4604
|
+
_scope.cronapi.internal.forceRefreshNgModel(attrs.ngModel, ngModelCtrl.$modelValue);
|
|
4605
|
+
forcedRefreshModelAt = performance.now();
|
|
4606
|
+
}
|
|
4468
4607
|
}
|
|
4469
4608
|
};
|
|
4470
4609
|
})
|
|
@@ -5262,6 +5401,87 @@
|
|
|
5262
5401
|
return false;
|
|
5263
5402
|
});
|
|
5264
5403
|
}
|
|
5404
|
+
$('#checkCollapsibleMenu').on('click', function() {
|
|
5405
|
+
var mainView = document.getElementById("main-view");
|
|
5406
|
+
if (this.checked) {
|
|
5407
|
+
mainView.classList.remove("main-view-retratil");
|
|
5408
|
+
} else {
|
|
5409
|
+
mainView.classList.add("main-view-retratil");
|
|
5410
|
+
}
|
|
5411
|
+
});
|
|
5412
|
+
|
|
5413
|
+
let baseNav = element.closest('nav');
|
|
5414
|
+
if (baseNav && baseNav.length) {
|
|
5415
|
+
|
|
5416
|
+
let subMenuOnHover = !baseNav.hasClass('submenu-click');
|
|
5417
|
+
let baseNavId = baseNav.attr('id');
|
|
5418
|
+
|
|
5419
|
+
if (!baseNavId) {
|
|
5420
|
+
baseNavId = app.common.generateId();
|
|
5421
|
+
baseNav.attr('id', baseNavId);
|
|
5422
|
+
}
|
|
5423
|
+
|
|
5424
|
+
if (subMenuOnHover) {
|
|
5425
|
+
let alreadyHooked = $(`#${baseNavId} .dropdown-submenu`).data('hooked');
|
|
5426
|
+
if (!alreadyHooked) {
|
|
5427
|
+
$(`#${baseNavId} .dropdown-submenu`).on('mouseenter', function (e) {
|
|
5428
|
+
$(this).children('.dropdown-menu').addClass('show');
|
|
5429
|
+
}).on('mouseleave', function (e) {
|
|
5430
|
+
$(this).children('.dropdown-menu').removeClass('show');
|
|
5431
|
+
});
|
|
5432
|
+
$(`#${baseNavId} .dropdown-submenu`).data('hooked', true);
|
|
5433
|
+
}
|
|
5434
|
+
|
|
5435
|
+
}
|
|
5436
|
+
else {
|
|
5437
|
+
let alreayHooked = $(`#${baseNavId} .dropdown-menu a.dropdown-toggle`).data('hooked');
|
|
5438
|
+
if (!alreayHooked) {
|
|
5439
|
+
$(`#${baseNavId} .dropdown-menu a.dropdown-toggle`).on('click', function(e) {
|
|
5440
|
+
if (!$(this).next().hasClass('show')) {
|
|
5441
|
+
$(this).parents('.dropdown-menu').first().find('.show').removeClass('show');
|
|
5442
|
+
}
|
|
5443
|
+
var $subMenu = $(this).next('.dropdown-menu');
|
|
5444
|
+
$subMenu.toggleClass('show');
|
|
5445
|
+
|
|
5446
|
+
$(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) {
|
|
5447
|
+
$('.dropdown-submenu .show').removeClass('show');
|
|
5448
|
+
});
|
|
5449
|
+
|
|
5450
|
+
if ($subMenu.length) {
|
|
5451
|
+
return false;
|
|
5452
|
+
}
|
|
5453
|
+
else {
|
|
5454
|
+
$('.dropdown-menu').removeClass('show');
|
|
5455
|
+
}
|
|
5456
|
+
});
|
|
5457
|
+
$(`#${baseNavId} .dropdown-menu a.dropdown-toggle`).data('hooked', true);
|
|
5458
|
+
}
|
|
5459
|
+
|
|
5460
|
+
let alreadyHookedBs = $(`#${baseNavId} .dropdown.nav-item`).data('hooked');
|
|
5461
|
+
if (!alreadyHookedBs) {
|
|
5462
|
+
$(`#${baseNavId} .dropdown.nav-item`).on('hidden.bs.dropdown', function (e) {
|
|
5463
|
+
$('.dropdown-submenu .show').removeClass("show");
|
|
5464
|
+
$('.dropdown-menu .show').removeClass('show');
|
|
5465
|
+
});
|
|
5466
|
+
$(`#${baseNavId} .dropdown.nav-item`).data('hooked', true);
|
|
5467
|
+
}
|
|
5468
|
+
|
|
5469
|
+
}
|
|
5470
|
+
|
|
5471
|
+
}
|
|
5472
|
+
else {
|
|
5473
|
+
let menuWihtoutNavBar_id = $(element).find('ul:first').attr('id')
|
|
5474
|
+
let alreadyHooked = $(`#${menuWihtoutNavBar_id} .dropdown-submenu`).data('hooked');
|
|
5475
|
+
if (!alreadyHooked) {
|
|
5476
|
+
$(`#${menuWihtoutNavBar_id} .dropdown-submenu`).on('mouseenter', function (e) {
|
|
5477
|
+
$(this).children('.dropdown-menu').addClass('show');
|
|
5478
|
+
}).on('mouseleave', function (e) {
|
|
5479
|
+
$(this).children('.dropdown-menu').removeClass('show');
|
|
5480
|
+
});
|
|
5481
|
+
$(`#${menuWihtoutNavBar_id} .dropdown-submenu`).data('hooked', true);
|
|
5482
|
+
}
|
|
5483
|
+
}
|
|
5484
|
+
|
|
5265
5485
|
});
|
|
5266
5486
|
});
|
|
5267
5487
|
}
|
|
@@ -7258,6 +7478,33 @@ function cronReportViewer($compile) {
|
|
|
7258
7478
|
|
|
7259
7479
|
executeReport(attrs.options);
|
|
7260
7480
|
|
|
7481
|
+
// Não inicia em em Tab não ativa
|
|
7482
|
+
// Verifica se esta dentro de um tab
|
|
7483
|
+
let elementTab = element[0].parentElement;
|
|
7484
|
+
while (elementTab) {
|
|
7485
|
+
if (elementTab.tagName === "BODY") {
|
|
7486
|
+
elementTab = null;
|
|
7487
|
+
} else if (elementTab.classList.contains("tab-pane")) {
|
|
7488
|
+
break;
|
|
7489
|
+
} else {
|
|
7490
|
+
elementTab = elementTab.parentElement;
|
|
7491
|
+
}
|
|
7492
|
+
}
|
|
7493
|
+
// Se estiver dentro de um tab e esta não estiver ativa, inclui observador para ler o relatorio ao ativar a tab
|
|
7494
|
+
if (elementTab && !elementTab.classList.contains("active")) {
|
|
7495
|
+
let observerClassChange = new MutationObserver(function(mutationsList, observer) {
|
|
7496
|
+
for (let mutation of mutationsList) {
|
|
7497
|
+
if (mutation.attributeName === "class" && mutation.target.classList.contains("active")) {
|
|
7498
|
+
executeReport(attrs.options);
|
|
7499
|
+
// Desconecta observador, pois só precisa ser executado uma vez.
|
|
7500
|
+
observer.disconnect();
|
|
7501
|
+
break;
|
|
7502
|
+
}
|
|
7503
|
+
}
|
|
7504
|
+
});
|
|
7505
|
+
observerClassChange.observe(elementTab, { attributes: true });
|
|
7506
|
+
}
|
|
7507
|
+
|
|
7261
7508
|
var filterTimeout = null;
|
|
7262
7509
|
scope.$watch(function(){ return attrs.options }, function(value, old){
|
|
7263
7510
|
if (value !== old) {
|
|
@@ -7276,4 +7523,5 @@ function cronReportViewer($compile) {
|
|
|
7276
7523
|
|
|
7277
7524
|
}
|
|
7278
7525
|
};
|
|
7279
|
-
}
|
|
7526
|
+
}
|
|
7527
|
+
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// data
|
|
15
15
|
this.getReport = function(reportName) {
|
|
16
16
|
var req = {
|
|
17
|
-
url : 'api/rest/report',
|
|
17
|
+
url : window.hostApp + 'api/rest/report',
|
|
18
18
|
method : 'POST',
|
|
19
19
|
data : angular.toJson({
|
|
20
20
|
'reportName' : reportName
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
// bytes[]
|
|
27
27
|
this.getPDF = function(report) {
|
|
28
28
|
var req = {
|
|
29
|
-
url : 'api/rest/report/pdf',
|
|
29
|
+
url : window.hostApp + 'api/rest/report/pdf',
|
|
30
30
|
method : 'POST',
|
|
31
31
|
responseType : 'arraybuffer',
|
|
32
32
|
data : angular.toJson(report)
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
// file
|
|
38
38
|
this.getPDFAsFile = function(report) {
|
|
39
39
|
var req = {
|
|
40
|
-
url : 'api/rest/report/pdfasfile',
|
|
40
|
+
url : window.hostApp + 'api/rest/report/pdfasfile',
|
|
41
41
|
method : 'POST',
|
|
42
42
|
data : angular.toJson(report)
|
|
43
43
|
};
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
this.getContentAsString = function(report) {
|
|
48
48
|
var req = {
|
|
49
|
-
url : 'api/rest/report/contentasstring',
|
|
49
|
+
url : window.hostApp + 'api/rest/report/contentasstring',
|
|
50
50
|
method : 'POST',
|
|
51
51
|
data : angular.toJson(report)
|
|
52
52
|
};
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
this.getDataSourcesParams = function(datasourcesInBand) {
|
|
57
57
|
var req = {
|
|
58
|
-
url : 'api/rest/report/getdatasourcesparams',
|
|
58
|
+
url : window.hostApp + 'api/rest/report/getdatasourcesparams',
|
|
59
59
|
method : 'POST',
|
|
60
60
|
data : angular.toJson(datasourcesInBand)
|
|
61
61
|
};
|
package/js/upload.service.js
CHANGED
|
@@ -80,14 +80,17 @@
|
|
|
80
80
|
console.log(files[i].$valid);
|
|
81
81
|
}
|
|
82
82
|
var _u = JSON.parse(localStorage.getItem('_u'));
|
|
83
|
+
let headerValues = window.isUsingCookie() ? {
|
|
84
|
+
'Content-Type' : undefined
|
|
85
|
+
} : {
|
|
86
|
+
'Content-Type' : undefined,
|
|
87
|
+
'X-AUTH-TOKEN' : (_u ?_u.token : '')
|
|
88
|
+
};
|
|
83
89
|
this.$promise = $http({
|
|
84
90
|
method: 'POST',
|
|
85
91
|
url: (window.hostApp || "") + uploadUrl,
|
|
86
92
|
data: formData,
|
|
87
|
-
headers:
|
|
88
|
-
'Content-Type': undefined,
|
|
89
|
-
'X-AUTH-TOKEN': (_u ?_u.token : '')
|
|
90
|
-
},
|
|
93
|
+
headers: headerValues,
|
|
91
94
|
onProgress: function(event) {
|
|
92
95
|
this.safeApply(function() {
|
|
93
96
|
if (event.lengthComputable) {
|
package/package.json
CHANGED
package/postupdate.json
CHANGED