};
};
+ var getMailing = function ($route, crmApi) {
+ return ($route.current.params.id == 'new') ? createMailing() : crmApi('Mailing', 'getsingle', {id: $route.current.params.id});
+ };
+
crmMailing2.config(['$routeProvider',
function ($routeProvider) {
$routeProvider.when('/mailing2', {
template: '<div></div>',
controller: 'ListMailingsCtrl'
});
-
$routeProvider.when('/mailing2/:id', {
templateUrl: partialUrl('edit.html'),
controller: 'EditMailingCtrl',
resolve: {
- selectedMail: function ($route, crmApi) {
- return ($route.current.params.id == 'new')
- ? createMailing()
- : crmApi('Mailing', 'getsingle', {id: $route.current.params.id});
- }
+ selectedMail: getMailing
+ }
+ });
+ $routeProvider.when('/mailing2/:id/unified', {
+ templateUrl: partialUrl('edit-unified.html'),
+ controller: 'EditMailingCtrl',
+ resolve: {
+ selectedMail: getMailing
+ }
+ });
+ $routeProvider.when('/mailing2/:id/unified2', {
+ templateUrl: partialUrl('edit-unified2.html'),
+ controller: 'EditMailingCtrl',
+ resolve: {
+ selectedMail: getMailing
+ }
+ });
+ $routeProvider.when('/mailing2/:id/wizard', {
+ templateUrl: partialUrl('edit-wizard.html'),
+ controller: 'EditMailingCtrl',
+ resolve: {
+ selectedMail: getMailing
}
});
}
--- /dev/null
+<form name="crmMailing2">
+ <div class="crm-block crm-form-block crmMailing2">
+
+ <div ng-include="partialUrl('summary.html')"/>
+ <div ng-include="partialUrl('mailing.html')" />
+
+ <div crm-ui-tab-set>
+ <div crm-ui-tab id="tab-schedule" crm-title="ts('Schedule')">
+ <div ng-include="partialUrl('schedule.html')" />
+ </div>
+ <div crm-ui-tab id="tab-attachment" crm-title="ts('Attachments')">
+ <div ng-include="partialUrl('attachments.html')" />
+ </div>
+ <div crm-ui-tab id="tab-header" crm-title="ts('Header and Footer')">
+ <div ng-include="partialUrl('headerFooter.html')" />
+ </div>
+ <div crm-ui-tab id="tab-pub" crm-title="ts('Publication')">
+ <div ng-include="partialUrl('publication.html')" />
+ </div>
+ <div crm-ui-tab id="tab-response" crm-title="ts('Responses')">
+ <div ng-include="partialUrl('responses.html')" />
+ </div>
+ <div crm-ui-tab id="tab-tracking" crm-title="ts('Tracking')">
+ <div ng-include="partialUrl('tracking.html')" />
+ </div>
+ </div>
+
+ <div crm-ui-accordion crm-title="ts('Preview')">
+ <div ng-include="partialUrl('preview.html')" />
+ </div>
+
+ <button ng-click="send();
+ leave();">{{ts('Submit Mailing')}}</button>
+ <button ng-click="save();
+ leave();">{{ts('Save Draft')}}</button>
+ <button ng-click="cancel();
+ leave();">{{ts('Delete Draft')}}</button>
+ </div>
+</form>
\ No newline at end of file
--- /dev/null
+<form name="crmMailing2">
+ <div class="crm-block crm-form-block crmMailing2">
+
+ <div ng-include="partialUrl('summary.html')"/>
+ <div ng-include="partialUrl('mailing.html')" />
+
+ <div crm-ui-accordion crm-title="ts('HTML')">
+ <div ng-include="partialUrl('field/body_html.html')" />
+ </div>
+ <div crm-ui-accordion crm-title="ts('Plain Text')" crm-collapsed='true'>
+ <div ng-include="partialUrl('field/body_text.html')" />
+ </div>
+ <div crm-ui-accordion id="tab-header" crm-title="ts('Header and Footer')" crm-collapsed='true'>
+ <div ng-include="partialUrl('headerFooter.html')" />
+ </div>
+ <div crm-ui-accordion id="tab-attachment" crm-title="ts('Attachments')" crm-collapsed='true'>
+ <div ng-include="partialUrl('attachments.html')" />
+ </div>
+ <div crm-ui-accordion id="tab-pub" crm-title="ts('Publication')" crm-collapsed='true'>
+ <div ng-include="partialUrl('publication.html')" />
+ </div>
+ <div crm-ui-accordion id="tab-response" crm-title="ts('Responses')" crm-collapsed='true'>
+ <div ng-include="partialUrl('responses.html')" />
+ </div>
+ <div crm-ui-accordion id="tab-tracking" crm-title="ts('Tracking')" crm-collapsed='true'>
+ <div ng-include="partialUrl('tracking.html')" />
+ </div>
+ <div crm-ui-accordion crm-title="ts('Preview')">
+ <div ng-include="partialUrl('preview.html')" />
+ </div>
+ <div crm-ui-accordion id="tab-schedule" crm-title="ts('Schedule')">
+ <div ng-include="partialUrl('schedule.html')" />
+ </div>
+
+ <button ng-click="send();
+ leave();">{{ts('Submit Mailing')}}</button>
+ <button ng-click="save();
+ leave();">{{ts('Save Draft')}}</button>
+ <button ng-click="cancel();
+ leave();">{{ts('Delete Draft')}}</button>
+ </div>
+</form>
\ No newline at end of file
--- /dev/null
+<form name="crmMailing2">
+ <div class="crm-block crm-form-block crmMailing2">
+
+ <div crm-ui-wizard>
+
+ <div crm-ui-wizard-step crm-title="ts('Setup')">
+ <div ng-include="partialUrl('summary.html')" />
+ </div>
+
+ <div crm-ui-wizard-step crm-title="ts('Content')">
+ <div ng-include="partialUrl('mailing.html')" />
+ <div crm-ui-accordion crm-title="ts('Header and Footer')" crm-collapsed="true">
+ <div ng-include="partialUrl('headerFooter.html')" />
+ </div>
+ <div crm-ui-accordion crm-title="ts('Attachments')" crm-collapsed="true">
+ <div ng-include="partialUrl('attachments.html')" />
+ </div>
+ <div crm-ui-accordion crm-title="ts('Preview')">
+ <div ng-include="partialUrl('preview.html')" />
+ </div>
+ </div>
+
+ <div crm-ui-wizard-step crm-title="ts('Options')">
+ <div crm-ui-accordion crm-title="ts('Schedule')">
+ <div ng-include="partialUrl('schedule.html')" />
+ </div>
+
+ <div crm-ui-accordion crm-title="ts('Responses')" crm-collapsed="true">
+ <div ng-include="partialUrl('responses.html')" />
+ </div>
+ <div crm-ui-accordion crm-title="ts('Tracking')" crm-collapsed="true">
+ <div ng-include="partialUrl('tracking.html')" />
+ </div>
+ <div crm-ui-accordion crm-title="ts('Publication')" crm-collapsed="true">
+ <div ng-include="partialUrl('publication.html')" />
+ </div>
+ </div>
+
+ <div crm-ui-wizard-step crm-title="ts('Review')">
+ <div crm-ui-accordion crm-title="ts('Review')">
+ <div ng-include="partialUrl('review.html')" />
+ <button ng-click="send();
+ leave();">{{ts('Submit Mailing')}}</button>
+ </div>
+ </div>
+
+ <span crm-ui-wizard-buttons style="float:right;">
+ <button ng-click="cancel();
+ leave();">{{ts('Delete Draft')}}</button>
+ <button ng-click="save();
+ leave();">{{ts('Save Draft')}}</button>
+ </span>
+ </div>
+ </div>
+</form>
\ No newline at end of file
-<div crm-ui-wizard>
- <div crm-ui-wizard-step crm-title="ts('Define Mailing')">
- <div crm-ui-accordion crm-title="ts('Summary')">
- <div ng-include="partialUrl('summary.html')" />
- </div>
- <div crm-ui-tab-set>
- <div crm-ui-tab id="tab-mailing" crm-title="ts('Mailing')">
- <div ng-include="partialUrl('mailing.html')" />
- </div>
- <div crm-ui-tab id="tab-attachment" crm-title="ts('Attachments')">
- <div ng-include="partialUrl('attachments.html')" />
- </div>
- <div crm-ui-tab id="tab-header" crm-title="ts('Header and Footer')">
- <div ng-include="partialUrl('headerFooter.html')" />
- </div>
- <div crm-ui-tab id="tab-pub" crm-title="ts('Publication')">
- <div ng-include="partialUrl('publication.html')" />
- </div>
- <div crm-ui-tab id="tab-response" crm-title="ts('Responses')">
- <div ng-include="partialUrl('responses.html')" />
+<div crm-ui-accordion crm-title="ts('Debug')" crm-collapsed="true">
+ <pre>{{mailing|json}}</pre>
+</div>
+
+<form name="crmMailing2">
+ <div class="crm-block crm-form-block crmMailing2">
+ <div crm-ui-wizard>
+ <div crm-ui-wizard-step crm-title="ts('Define Mailing')">
+ <div crm-ui-accordion crm-title="ts('Summary')">
+ <div ng-include="partialUrl('summary.html')" />
+ </div>
+ <div crm-ui-tab-set>
+ <div crm-ui-tab id="tab-mailing" crm-title="ts('Mailing')">
+ <div ng-include="partialUrl('mailing.html')" />
+ </div>
+ <div crm-ui-tab id="tab-attachment" crm-title="ts('Attachments')">
+ <div ng-include="partialUrl('attachments.html')" />
+ </div>
+ <div crm-ui-tab id="tab-header" crm-title="ts('Header and Footer')">
+ <div ng-include="partialUrl('headerFooter.html')" />
+ </div>
+ <div crm-ui-tab id="tab-pub" crm-title="ts('Publication')">
+ <div ng-include="partialUrl('publication.html')" />
+ </div>
+ <div crm-ui-tab id="tab-response" crm-title="ts('Responses')">
+ <div ng-include="partialUrl('responses.html')" />
+ </div>
+ <div crm-ui-tab id="tab-tracking" crm-title="ts('Tracking')">
+ <div ng-include="partialUrl('tracking.html')" />
+ </div>
+ </div>
+ <div crm-ui-accordion crm-title="ts('Preview')">
+ <div ng-include="partialUrl('preview.html')" />
+ </div>
</div>
- <div crm-ui-tab id="tab-tracking" crm-title="ts('Tracking')">
- <div ng-include="partialUrl('tracking.html')" />
+ <div crm-ui-wizard-step crm-title="ts('Review and Schedule')">
+ <div crm-ui-accordion crm-title="ts('Review')">
+ <div ng-include="partialUrl('review.html')" />
+ </div>
+ <div crm-ui-accordion crm-title="ts('Schedule')">
+ <div ng-include="partialUrl('schedule.html')" />
+ <button ng-click="send();
+ leave();">{{ts('Schedule')}}</button>
+ </div>
</div>
- </div>
- <div crm-ui-accordion crm-title="ts('Preview')">
- <div ng-include="partialUrl('preview.html')" />
- </div>
- </div>
- <div crm-ui-wizard-step crm-title="ts('Review and Schedule')">
- <div crm-ui-accordion crm-title="ts('Review')">
- <div ng-include="partialUrl('review.html')" />
- </div>
- <div crm-ui-accordion crm-title="ts('Schedule')">
- <div ng-include="partialUrl('schedule.html')" />
- <button ng-click="send();leave();">{{ts('Schedule')}}</button>
+
+ <span crm-ui-wizard-buttons style="float:right;">
+ <button ng-click="cancel();
+ leave();">{{ts('Delete Draft')}}</button>
+ <button ng-click="save();
+ leave();">{{ts('Save Draft')}}</button>
+ </span>
</div>
</div>
- <span crm-ui-wizard-buttons style="float:right;">
- <button ng-click="cancel();leave();">{{ts('Delete Draft')}}</button>
- <button ng-click="save();leave();">{{ts('Save Draft')}}</button>
- </span>
-</div>
\ No newline at end of file
+</form>