Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
Class for readonly
Browse files Browse the repository at this point in the history
Added classes to identify whether the widget is rendered as read-only or
not.
  • Loading branch information
JelleDekker committed Sep 5, 2018
1 parent 4a00591 commit 1f222c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/ComboSelector/widget/ComboSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
========================
@file : ComboSelector.js
@version : 1.2.1
@version : 1.2.2
@author : Jelle Dekker
@date : 2017/10/16
@copyright : Bizzomate 2017
@date : 2018/09/05
@copyright : Bizzomate 2018
@license : Apache 2
Documentation
Expand Down Expand Up @@ -294,8 +294,10 @@ define([
displayValue = (value ? value.get(this.associationDisplay) : ""),
guid = (value ? value.getGuid() : null);
if (this._readOnly) {
dojoHtml.set(this.inputWrapper, "<p>" + displayValue + "</p>");
dojoHtml.set(this.inputWrapper, "<p class='form-control-static'>" + displayValue + "</p>");
dojoClass.add(this.inputWrapper, "readonly");
} else {
dojoClass.remove(this.inputWrapper, "readonly");
var item = this._comboBoxStore.get(guid);
if (item && typeof item != "undefined") {
if (this._comboBox.item != item) {
Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="ComboSelector" version="1.2.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="ComboSelector" version="1.2.2" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="ComboSelector/ComboSelector.xml" />
</widgetFiles>
Expand Down
Binary file modified test/widgets/ComboSelector.mpk
Binary file not shown.

0 comments on commit 1f222c1

Please sign in to comment.