@schneideress/dashboardframework 0.0.256 → 0.0.258

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.
@@ -280,6 +280,12 @@
280
280
  /**To Update widgetInfo in database */
281
281
  RaDashboardService.prototype.updateWidget = function (widgetInfo, appConfig) {
282
282
  this.baseUrl = appConfig.apiBaseUrl;
283
+ var info = {};
284
+ info.widgetConfigInfo = widgetInfo.widgetConfigInfo;
285
+ info.widgetInstanceId = widgetInfo.widgetInstanceId;
286
+ info.widgetTitle = widgetInfo.widgetTitle;
287
+ info.widgetType = widgetInfo.widgetType;
288
+ info.widgetId = widgetInfo.widgetId;
283
289
  return this.post('widget/UpdateUserWidget', widgetInfo);
284
290
  };
285
291
  /** To Move or change position if current widget container*/
@@ -407,7 +413,7 @@
407
413
  var GridsterConfigDefaultSettings = {
408
414
  gridType: 'scrollVertical',
409
415
  compactType: 'none',
410
- margin: 0,
416
+ margin: 10,
411
417
  outerMargin: true,
412
418
  outerMarginTop: 10,
413
419
  outerMarginRight: 0,
@@ -564,7 +570,7 @@
564
570
  widget.settings = JSON.parse(widget.widgetSettings);
565
571
  }
566
572
  if (widget.templateSettings) {
567
- widget.templateSettings = JSON.parse(widget.templateSettings);
573
+ widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
568
574
  }
569
575
  var gridsterItem = {
570
576
  cols: this.getWidth(widget.width),
@@ -1802,11 +1808,11 @@
1802
1808
  var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
1803
1809
  var settings = '';
1804
1810
  if (this.isWidgetMgmnt) {
1805
- if (!this.data.widgetInfo.templateSettings.hideEdit)
1811
+ if (!this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideEdit)
1806
1812
  settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
1807
- if (!this.data.widgetInfo.templateSettings.hideCopy)
1813
+ if (!this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideCopy)
1808
1814
  settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
1809
- if (!this.data.widgetInfo.templateSettings.hideMove)
1815
+ if (!this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideMove)
1810
1816
  settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
1811
1817
  }
1812
1818
  var customPageParams = false;
@@ -1816,14 +1822,14 @@
1816
1822
  customPageParams = true;
1817
1823
  }
1818
1824
  }
1819
- if (!this.data.widgetInfo.templateSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
1825
+ if (!this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
1820
1826
  settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
1821
1827
  settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
1822
1828
  settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
1823
1829
  settings += this.translateService.translate('Common.visitpage');
1824
1830
  settings += '</span></a>';
1825
1831
  }
1826
- if (!this.data.widgetInfo.templateSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
1832
+ if (!this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideVisitPage && (this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
1827
1833
  html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
1828
1834
  html += this.translateService.translate('Common.settings') + '</div>';
1829
1835
  html += settings;
@@ -1855,7 +1861,7 @@
1855
1861
  if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
1856
1862
  html += this.getHr();
1857
1863
  }
1858
- if (this.isWidgetMgmnt && !this.data.widgetInfo.templateSettings.hideDelete) {
1864
+ if (this.isWidgetMgmnt && !this.data.widgetInfo.templateWidgetSettings && !this.data.widgetInfo.templateWidgetSettings.hideDelete) {
1859
1865
  html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
1860
1866
  html += this.deleteText;
1861
1867
  html += '</span></a>';
@@ -2708,7 +2714,7 @@
2708
2714
  else {
2709
2715
  var x = Math.round(this.gridster.curColWidth * item.x);
2710
2716
  var y = Math.round(this.gridster.curRowHeight * item.y);
2711
- var width = this.gridster.curColWidth * item.cols - this.gridster.$options.margin;
2717
+ var width = this.gridster.curColWidth * item.cols - this.gridster.$options.margin - 7;
2712
2718
  var height = (this.gridster.curRowHeight * item.rows - this.gridster.$options.margin);
2713
2719
  // set the cell style
2714
2720
  this.setCellPosition(renderer, el, x, y);