Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified dist/EnumToggle.mpk
Binary file not shown.
9,380 changes: 0 additions & 9,380 deletions npm-debug.log

This file was deleted.

17 changes: 9 additions & 8 deletions src/EnumToggle/EnumToggle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ EFys9HZcqkKgz6qKu6pwhzavYcnVruf/CTAAJfBPNMYgZnwAAAAASUVORK5CYII=
<property key="name" type="attribute" required="true" isPath="optional" pathType="reference">
<caption>Attribute</caption>
<category>Data source</category>
<description>The attribute to manipulate</description>
<description>The attribute to manipulate</description>
<attributeTypes>
<attributeType name="String"/>
<attributeType name="Enum"/>
<attributeType name="String"/>
<attributeType name="Enum"/>
<attributeType name="Boolean"/>
</attributeTypes>
</property>
<property key="readonlyval" type="boolean" defaultValue="false">
Expand All @@ -63,7 +64,7 @@ EFys9HZcqkKgz6qKu6pwhzavYcnVruf/CTAAJfBPNMYgZnwAAAAASUVORK5CYII=
<property key="captions" type="string" required="true">
<caption>Enum key</caption>
<category>Appearance</category>
<description>This should be exactly the same values as the connected enumeration.</description>
<description>This should be exactly the same values as the connected enumeration.</description>
</property>
<property key="pictures" type="image">
<caption>Picture</caption>
Expand All @@ -73,15 +74,15 @@ EFys9HZcqkKgz6qKu6pwhzavYcnVruf/CTAAJfBPNMYgZnwAAAAASUVORK5CYII=
<property key="alts" type="translatableString" required="false">
<caption>Hint</caption>
<category>Appearance</category>
<description>A text that is displayed when the mouse is moved over the image (also known as alt).</description>
<description>A text that is displayed when the mouse is moved over the image (also known as alt).</description>
</property>
</properties>
</property>
</property>
<property key="onChangemf" type="microflow" required="false" >
<caption>On change</caption>
<category>Events</category>
<description>Microflow to trigger on change.</description>
<returnType type="Boolean"/>
</property>
</property>
</properties>
</widget>
</widget>
28 changes: 10 additions & 18 deletions src/EnumToggle/widget/EnumToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,14 @@ define([
this.domNode.appendChild(this._alertDiv);
},

// Reset subscriptions.
_resetSubscriptions: function() {
// Reset subscriptions.
_resetSubscriptions: function () {
// Release handles on previous object, if any.
if (this._handles) {
dojoArray.forEach(this._handles, function (handle) {
mx.data.unsubscribe(handle);
});
this._handles = [];
}
this.unsubscribeAll();

// When a mendix object exists create subscriptions.
if (this.contextGUID) {
console.log('subscribe');
var attrHandle = this.subscribe({
// When a mendix object exists create subscribtions.
if (this._contextObj) {
this.subscribe({
guid: this.contextGUID,
attr: this.name,
callback: dojo.hitch(this, function(guid, attr, attrValue) {
Expand All @@ -190,16 +184,14 @@ define([
this._setValueAttr(attrValue);
}
})
});
});

var validationHandle = this.subscribe({
this.subscribe({
guid: this.contextGUID,
val: true,
callback: dojo.hitch(this, this._handleValidation)
});

this._handles = [attrHandle, validationHandle ];
}
}
}
},
});
});
Binary file removed test/EnumToggleTest.mpk
Binary file not shown.
Binary file added test/EnumToggleTest.mpr
Binary file not shown.
61 changes: 61 additions & 0 deletions test/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.mendix.com/package/1.0/">
<modelerProject xmlns="http://www.mendix.com/modelerProject/1.0/">
<project />
<projectFile path="EnumToggleTest.mpr" />
<files>
<file path="javasource\administration\proxies\Account.java" />
<file path="javasource\administration\proxies\AccountPasswordData.java" />
<file path="javasource\administration\proxies\microflows\Microflows.java" />
<file path="javasource\appcloudservices\CommonsLoggingListener.java" />
<file path="javasource\appcloudservices\DefaultLoginHandler.java" />
<file path="javasource\appcloudservices\ILoginHandler.java" />
<file path="javasource\appcloudservices\OpenIDHandler.java" />
<file path="javasource\appcloudservices\OpenIDUtils.java" />
<file path="javasource\appcloudservices\SessionInitializer.java" />
<file path="javasource\appcloudservices\actions\GenerateRandomPassword.java" />
<file path="javasource\appcloudservices\actions\LogOutUser.java" />
<file path="javasource\appcloudservices\actions\StartSignOnServlet.java" />
<file path="javasource\appcloudservices\proxies\constants\Constants.java" />
<file path="javasource\appcloudservices\proxies\microflows\Microflows.java" />
<file path="javasource\com\mendix\core\Core.java" />
<file path="javasource\inviteapi\proxies\microflows\Microflows.java" />
<file path="javasource\permissionsapi\proxies\AppRole.java" />
<file path="javasource\permissionsapi\proxies\microflows\Microflows.java" />
<file path="javasource\profileservice\proxies\GetDisplayNameResponse.java" />
<file path="javasource\profileservice\proxies\microflows\Microflows.java" />
<file path="javasource\system\UserActionsRegistrar.java" />
<file path="javasource\system\actions\VerifyPassword.java" />
<file path="javasource\system\proxies\DeviceType.java" />
<file path="javasource\system\proxies\Error.java" />
<file path="javasource\system\proxies\EventStatus.java" />
<file path="javasource\system\proxies\FileDocument.java" />
<file path="javasource\system\proxies\Image.java" />
<file path="javasource\system\proxies\Language.java" />
<file path="javasource\system\proxies\ScheduledEventInformation.java" />
<file path="javasource\system\proxies\Session.java" />
<file path="javasource\system\proxies\SoapFault.java" />
<file path="javasource\system\proxies\Statistics.java" />
<file path="javasource\system\proxies\TimeZone.java" />
<file path="javasource\system\proxies\User.java" />
<file path="javasource\system\proxies\UserRole.java" />
<file path="javasource\system\proxies\XASInstance.java" />
<file path="javasource\system\proxies\microflows\Microflows.java" />
<file path="javasource\testsuite\proxies\ChangeLog.java" />
<file path="javasource\testsuite\proxies\Employee.java" />
<file path="javasource\testsuite\proxies\Level.java" />
<file path="javasource\testsuite\proxies\microflows\Microflows.java" />
<file path="userlib\axiom-api-1.2.12.jar" />
<file path="userlib\commons-lang-2.5.jar" />
<file path="userlib\commons-logging-1.1.jar" />
<file path="userlib\guice-2.0.jar" />
<file path="userlib\openid4java-0.9.8.jar" />
<file path="widgets\EnumToggle.mpk" />
<file path="widgets\MendixAppCloudNavigation.mpk" />
<file path="widgets\MendixAppSwitcher.mpk" />
<file path="widgets\MendixProfileMenu.mpk" />
<file path="widgets\RadioButtonList.mpk" />
<file path="widgets\SprintrFeedbackWidget.mpk" />
</files>
</modelerProject>
</package>
Binary file modified test/widgets/EnumToggle.mpk
100644 → 100755
Binary file not shown.
Binary file added test/widgets/MendixAppCloudNavigation.mpk
Binary file not shown.
Binary file added test/widgets/MendixAppSwitcher.mpk
Binary file not shown.
Binary file added test/widgets/MendixProfileMenu.mpk
Binary file not shown.
Binary file added test/widgets/RadioButtonList.mpk
Binary file not shown.
Binary file added test/widgets/SprintrFeedbackWidget.mpk
Binary file not shown.