WAB 2.1 Print widget - disable copyright text

1110
8
Jump to solution
08-22-2016 10:29 AM
DavidColey
Frequent Contributor

Hi -  I know this info has been posted up before but I just can't find it.  Does anyone recall where to disable copyright text?  Would it be here in the Print.js:

var hasCopyrightText = lang.getObject(
 'layoutOptions.hasCopyrightText', false, templateInfo);
 if (!hasCopyrightText) {
 html.setStyle(this.copyrightTr, 'display', 'none');
 } else {
 html.setStyle(this.copyrightTr, 'display', '');
 }‍‍‍‍‍‍‍

?

Thanks-

David

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

David,

  In the Print.js change the print function as indicated below (add line 24):

print: function() {
      if (this.printSettingsFormDijit.isValid()) {
        var form = this.printSettingsFormDijit.get('value');
        lang.mixin(form, this.layoutMetadataDijit.get('value'));
        this.preserve = this.preserveFormDijit.get('value');
        lang.mixin(form, this.preserve);
        this.layoutForm = this.layoutFormDijit.get('value');
        var mapQualityForm = this.mapQualityFormDijit.get('value');
        var mapOnlyForm = this.mapOnlyFormDijit.get('value');
        lang.mixin(mapOnlyForm, mapQualityForm);

        var elementsObj = this.customTextElementsDijit.get('value');
        var cteArray = [];
        for (var p in elementsObj) {
          var cte = {};
          cte[p] = elementsObj[p];
          cteArray.push(cte);
        }

        var templateInfo = this._currentTemplateInfo;
        var hasAuthorText = lang.getObject('layoutOptions.hasAuthorText', false, templateInfo);
        var hasCopyrightText = lang.getObject('layoutOptions.hasCopyrightText',
          false, templateInfo);
        hasCopyrightText = false;

View solution in original post

8 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

David,

  In the Print.js change the print function as indicated below (add line 24):

print: function() {
      if (this.printSettingsFormDijit.isValid()) {
        var form = this.printSettingsFormDijit.get('value');
        lang.mixin(form, this.layoutMetadataDijit.get('value'));
        this.preserve = this.preserveFormDijit.get('value');
        lang.mixin(form, this.preserve);
        this.layoutForm = this.layoutFormDijit.get('value');
        var mapQualityForm = this.mapQualityFormDijit.get('value');
        var mapOnlyForm = this.mapOnlyFormDijit.get('value');
        lang.mixin(mapOnlyForm, mapQualityForm);

        var elementsObj = this.customTextElementsDijit.get('value');
        var cteArray = [];
        for (var p in elementsObj) {
          var cte = {};
          cte[p] = elementsObj[p];
          cteArray.push(cte);
        }

        var templateInfo = this._currentTemplateInfo;
        var hasAuthorText = lang.getObject('layoutOptions.hasAuthorText', false, templateInfo);
        var hasCopyrightText = lang.getObject('layoutOptions.hasCopyrightText',
          false, templateInfo);
        hasCopyrightText = false;
DavidColey
Frequent Contributor

Ah yes, that's it thanks.

0 Kudos
DavidColey
Frequent Contributor

I also unfortunately misspelled 'copyright' in the post title. . . geez

0 Kudos
RebeccaStrauch__GISP
MVP Esteemed Contributor

you should be able to edit/update your title.  Probably worth fixing.

0 Kudos
DavidColey
Frequent Contributor

I tried but I can't get at the text

0 Kudos
RebeccaStrauch__GISP
MVP Esteemed Contributor

ha...someone was able to fix it. 

RobertScheitlin__GISP
MVP Esteemed Contributor

David when you go to edit a post it does not look like you can click in the title and change it but you can (FYI as I have done it already). 

DavidColey
Frequent Contributor

Ha! Good one, thanks Robert-

0 Kudos