Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-8002

dialogIcon not handled properly in CreateContent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.0RC2
    • None
    • None
    • None

      In this file :

      /Ametys - 07 CMS/main/plugin-cms/resources/js/Ametys/cms/uihelper/CreateContent.js

          /**
           * @private
           * Initialize and show dialog box
           * @param {Object} config The configuration
           */
          _initializeAndShowDialogBox : function (config)
          {
              this._delayedInitialize (
                  config.title || "{{i18n PLUGINS_CMS_CONTENT_UIHELPER_CREATECONTENT_TITLE}}" + " " + this._contentTypes[0].getLabel() + "...",
                  Ametys.CONTEXT_PATH + (config.icon || this._contentTypes[0].getIconSmall() || '/plugins/cms/resources/img/content/content_16.png'),
                  this._contentTypes[0].getIconGlyph() + (this._contentTypes[0].getIconDecorator() ? " " + this._contentTypes[0].getIconDecorator() : ""),
                  config.helpmessage1 || (this._contentTypes.length == 1 ? (this._contentLanguage ? "{{i18n PLUGINS_CMS_CONTENT_UIHELPER_CREATECONTENT_MESSAGE1}}" : "{{i18n PLUGINS_CMS_CONTENT_UIHELPER_CREATECONTENT_MULTI_LANGUAGES_MESSAGE1}}") : (this._contentLanguage ? "{{i18n PLUGINS_CMS_CONTENT_UIHELPER_CREATECONTENT_MULTI_CTYPES_MESSAGE1}}" : "{{i18n PLUGINS_CMS_CONTENT_UIHELPER_CREATECONTENT_MULTI_CTYPES_LANGUAGES_MESSAGE1}}")),
                  config.helpmessage2 || "{{i18n PLUGINS_CMS_CONTENT_UIHELPER_CREATECONTENT_MESSAGE2}}"
              );
              
              this._init(config.defaultContentTitle || this._contentTypes[0].getDefaultTitle() || "{{i18n PLUGINS_CMS_CONTENT_UIHELPER_CREATECONTENT_DEFAULT_NAME}}");
          },
      

      The second parameter passed to _delayedInitialize, if there is no iconGlyph will be computed as

      null + ""
      

       which will return

      "null"
      

      And then, _delayedInitialize will think there is a glyph to use, called null.

            Unassigned Unassigned
            pgros Pierre Gros (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: