@resconet/jsbridge 18.0.0 → 18.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/JSBridge.d.ts +12 -0
- package/src/JSBridge.js +19 -0
package/package.json
CHANGED
package/src/JSBridge.d.ts
CHANGED
|
@@ -2446,6 +2446,16 @@ declare module MobileCRM.UI {
|
|
|
2446
2446
|
* @param scope The scope for handler calls.
|
|
2447
2447
|
*/
|
|
2448
2448
|
public static onClick(handler: (entityList: EntityList) => void, bind: boolean, scope?: any);
|
|
2449
|
+
/**
|
|
2450
|
+
* @since 18.1
|
|
2451
|
+
* Binds or unbinds the handler for onCellClick event on EntityList.
|
|
2452
|
+
* Bound handler is called with the EntityList object as an argument. The EntityList context object contains "entities" property with the list of clicked entities (just one entity), property "propertyName" with the field name that was clicked within the list item and property "event" with event details.
|
|
2453
|
+
* @param propertyName The name of desired cell within the list item. (mostly logical name of the field).
|
|
2454
|
+
* @param handler The handler function that has to be bound or unbound.
|
|
2455
|
+
* @param bind Determines whether to bind or unbind the handler.
|
|
2456
|
+
* @param scope The scope for handler calls.
|
|
2457
|
+
*/
|
|
2458
|
+
public static onCellClick(propertyName: string, handler: (entityList: EntityList) => void, bind: boolean, scope?: any);
|
|
2449
2459
|
/**
|
|
2450
2460
|
* @since 10.0
|
|
2451
2461
|
* Asynchronously gets the list of entities that were changed on the list.
|
|
@@ -2915,6 +2925,8 @@ declare module MobileCRM.UI {
|
|
|
2915
2925
|
class Form {
|
|
2916
2926
|
canMaximize: boolean;
|
|
2917
2927
|
isMaximized: boolean;
|
|
2928
|
+
/** Indicates whether this form is presented as modal window. */
|
|
2929
|
+
isModal: boolean;
|
|
2918
2930
|
caption: string;
|
|
2919
2931
|
selectedViewIndex: number;
|
|
2920
2932
|
showTitle: boolean;
|
package/src/JSBridge.js
CHANGED
|
@@ -724,6 +724,7 @@
|
|
|
724
724
|
/// <summary>[v8.0] Represents the Javascript equivalent of the form object.</summary>
|
|
725
725
|
/// <field name="canMaximize" type="Boolean">Gets or sets whether form can be maximized to fullscreen (full application frame).</field>
|
|
726
726
|
/// <field name="isMaximized" type="Boolean">Gets or sets whether form is currently maximized to fullscreen (full application frame).</field>
|
|
727
|
+
/// <field name="isModal" type="Boolean">Indicates whether this form is presented as modal window.</field>
|
|
727
728
|
/// <field name="caption" type="String">Gets or sets the form caption.</field>
|
|
728
729
|
/// <field name="selectedViewIndex" type="Number">Gets or sets the selected view (tab) index.</field>
|
|
729
730
|
/// <field name="showTitle" type="Boolean">[v8.1] Determines whether the form caption bar should be visible.</field>
|
|
@@ -4989,6 +4990,24 @@
|
|
|
4989
4990
|
MobileCRM.bridge.command("registerEvents", "onClick");
|
|
4990
4991
|
}
|
|
4991
4992
|
};
|
|
4993
|
+
MobileCRM.UI.EntityList.onCellClick = function (propertyName, handler, bind, scope) {
|
|
4994
|
+
/// <summary>[v18.1] Binds or unbinds the handler for onCellClick event on EntityList.</summary>
|
|
4995
|
+
/// <remarks>Bound handler is called with the EntityList object as an argument. The EntityList context property contains <see cref="MobileCRM.UI.EntityListClickContext">EntityListClickContext</see> object.</remarks>
|
|
4996
|
+
/// <param name="propertyName" type="String">The name of desired cell within the list item.</param>
|
|
4997
|
+
/// <param name="handler" type="function(entityList)">The handler function that has to be bound or unbound.</param>
|
|
4998
|
+
/// <param name="bind" type="Boolean">Determines whether to bind or unbind the handler.</param>
|
|
4999
|
+
/// <param name="scope" type="Object">The scope for handler calls.</param>
|
|
5000
|
+
var handlerName = "onCellClick:" + propertyName;
|
|
5001
|
+
var handlers = MobileCRM.UI.EntityList._handlers[handlerName];
|
|
5002
|
+
if (!handlers) {
|
|
5003
|
+
MobileCRM.UI.EntityList._handlers[handlerName] = handlers = [];
|
|
5004
|
+
}
|
|
5005
|
+
var register = handlers.length == 0;
|
|
5006
|
+
_bindHandler(handler, handlers, bind, scope);
|
|
5007
|
+
if (register) {
|
|
5008
|
+
MobileCRM.bridge.command("registerEvents", handlerName);
|
|
5009
|
+
}
|
|
5010
|
+
};
|
|
4992
5011
|
MobileCRM.UI.EntityListClickContext = function () {
|
|
4993
5012
|
/// <summary>Represents a context for the <see cref="MobileCRM.UI.EntityList.onClick">MobileCRM.UI.EntityList.onClick</see> handler.</summary>
|
|
4994
5013
|
/// <field name="entities" type="Array">Single item array containing the <see cref="MobileCRM.DynamicEntity">DynamicEntity</see> object representing clicked entity.</field>
|