-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from episerver/AFORM-4094-Number-element-not-…
…working-with-e-value Aform 4094 number element not working with e value
- Loading branch information
Showing
5 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
samples/ManagementSite/wwwroot/ClientResources/Scripts/Initializer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
define([ | ||
"dojo/_base/declare", | ||
"epi/_Module", | ||
"epi-cms/contentediting/ContentDetails", | ||
"epi-cms/contentediting/viewmodel/ContentDetailsViewModel", | ||
"dojo/text!templates/ContentDetailsWithGuid.html" | ||
], function (declare, _Module, ContentDetails, ContentDetailsViewModel, template) { | ||
|
||
return declare([_Module], { | ||
initialize: function () { | ||
this.inherited(arguments); | ||
|
||
|
||
//Implement extended functionality | ||
|
||
Object.assign(ContentDetails.prototype, { | ||
templateString: template, | ||
_setContentGuidAttr: { node: "guidNode", type: "innerHTML" }, | ||
modelBindingMap: { | ||
contentTypeName: ["contentTypeName"], | ||
contentId: ["contentId"], | ||
contentGuid: ["contentGuid"], | ||
existingLanguages: ["existingLanguages"], | ||
visibleToEveryOne: ["visibleTo"] | ||
} | ||
}) | ||
|
||
var original = ContentDetailsViewModel.prototype.onDataModelChange; //Store original functionality in variable | ||
Object.assign(ContentDetailsViewModel.prototype, { | ||
contentGuid: null, | ||
onDataModelChange: function () { | ||
this.set("contentGuid", this.dataModel.contentData.contentGuid); | ||
return original.apply(this, arguments); | ||
} | ||
}) | ||
|
||
ContentDetailsViewModel.prototype.onDataModelChange.nom = "onDataModelChange"; | ||
} | ||
}) | ||
}); | ||
|
34 changes: 34 additions & 0 deletions
34
samples/ManagementSite/wwwroot/ClientResources/Templates/ContentDetailsWithGuid.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<ul class="epi-form-container__section"> | ||
<ul data-dojo-type="epi/shell/layout/SimpleContainer" data-dojo-attach-point="widgetContainer"></ul> | ||
<li class="epi-form-container__section__row"> | ||
<label>${resources.visibleto.title}</label> | ||
<div class="epi-previewableTextBox-wrapper dijitInline"> | ||
<span data-dojo-attach-point="visibleToNode" class="epi-previewableTextBox-text dojoxEllipsis dijitInline"></span> | ||
<div data-dojo-type="dijit/form/Button" data-dojo-attach-point="manageAccessRightsButton" data-dojo-attach-event="onClick: _onManageAccessRightsClick" class="epi-chromelessButton epi-chromelessLinkButton epi-functionLink epi-valign--top">${resources.manage}</div> | ||
</div> | ||
</li> | ||
<li class="epi-form-container__section__row"> | ||
<label>${resources.existinglanguages}</label> | ||
<span data-dojo-attach-point="languagesNode" class="epi-previewableTextBox-text dijitInline"></span> | ||
</li> | ||
<li class="epi-form-container__section__row"> | ||
<label>${resources.idandtypename}</label> | ||
<div class="epi-previewableTextBox-wrapper dijitInline"> | ||
<span class="epi-previewableTextBox-text dojoxEllipsis dijitInline"> | ||
<span data-dojo-attach-point="idNode"></span>, <span data-dojo-attach-point="typeNode"></span> | ||
</span> | ||
</div> | ||
</li> | ||
<li class="epi-form-container__section__row"> | ||
<label>Guid</label> | ||
<span data-dojo-attach-point="guidNode" class="dojoxEllipsis dijitInline"></span> | ||
</li> | ||
<li class="epi-form-container__section__row"> | ||
<label></label> | ||
<div data-dojo-attach-point="dropdownButton" data-dojo-type="dijit/form/DropDownButton" class="dijit dijitReset dijitInline epi-mediumButton"> | ||
<span>${resources.toolsbutton.label}</span> | ||
<div data-dojo-type="dijit/DropDownMenu" data-dojo-attach-point="additionalActionsMenu"></div> | ||
</div> | ||
</li> | ||
</ul> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters