};
})
+ // Display a date widget.
// example: <input crm-ui-date="myobj.datefield" />
// example: <input crm-ui-date="myobj.datefield" crm-ui-date-format="yy-mm-dd" />
+ // WISHLIST: use ngModel
.directive('crmUiDate', function ($parse, $timeout) {
return {
restrict: 'AE',
};
})
+ // Display a date-time widget.
// example: <div crm-ui-date-time="myobj.mydatetimefield"></div>
+ // WISHLIST: use ngModel
.directive('crmUiDateTime', function ($parse) {
return {
restrict: 'AE',
};
})
+ // Define a scope in which a name like "subform.foo" maps to a unique ID.
// example: <div ng-form="subform" crm-ui-id-scope><label crm-ui-for="subform.foo">Foo:</label><input crm-ui-id="subform.foo" name="foo"/></div>
.directive('crmUiIdScope', function () {
return {
};
})
+ // Display an HTML blurb inside an IFRAME.
// example: <iframe crm-ui-iframe="getHtmlContent()"></iframe>
.directive('crmUiIframe', function ($parse) {
return {
};
scope.$parent.$watch(attrs.crmUiIframe, refresh);
- //setTimeout(function () { refresh(); }, 50);
}
};
})
+ // Define a rich text editor.
// example: <textarea crm-ui-id="myForm.body_html" crm-ui-richtext name="body_html" ng-model="mailing.body_html"></textarea>
+ // WISHLIST: use ngModel
.directive('crmUiRichtext', function ($timeout) {
return {
require: '?ngModel',
};
})
+ // Display a lock icon (based on a boolean).
// example: <a crm-ui-lock binding="mymodel.boolfield"></a>
// example: <a crm-ui-lock
// binding="mymodel.boolfield"
};
})
+ // Display a fancy SELECT (based on select2).
// usage: <select crm-ui-select="{placeholder:'Something',allowClear:true,...}" ng-model="myobj.field"><option...></select>
.directive('crmUiSelect', function ($parse, $timeout) {
return {
};
})
+ // Display a time-entry field.
// example: <input crm-ui-time="myobj.mytimefield" />
+ // WISHLIST: use ngModel
.directive('crmUiTime', function ($parse, $timeout) {
return {
restrict: 'AE',
};
})
+ // Generic, field-independent form validator.
// example: <span ng-model="placeholder" crm-ui-validate="foo && bar || whiz" />
// example: <span ng-model="placeholder" crm-ui-validate="foo && bar || whiz" crm-ui-validate-name="myError" />
- // Generic, field-independent validator.
.directive('crmUiValidate', function() {
return {
restrict: 'EA',
// Controller for the "Preview Mailing Component" segment
// which displays header/footer/auto-responder
- angular.module('crmMailing').controller('PreviewComponentCtrl', function PreviewMailingDialogCtrl($scope, dialogService) {
+ angular.module('crmMailing').controller('PreviewComponentCtrl', function PreviewComponentCtrl($scope, dialogService) {
var ts = $scope.ts = CRM.ts(null);
$scope.previewComponent = function previewComponent(title, componentId) {
};
});
- // Controller for the "Preview Mailing" dialog
+ // Controller for the "Preview Mailing Component" dialog
// Note: Expects $scope.model to be an object with properties:
// - "name"
// - "subject"
// - "body_html"
// - "body_text"
- angular.module('crmMailing').controller('PreviewComponentDialogCtrl', function PreviewMailingDialogCtrl($scope) {
+ angular.module('crmMailing').controller('PreviewComponentDialogCtrl', function PreviewComponentDialogCtrl($scope) {
$scope.ts = CRM.ts(null);
});