'3858712080cb3d846ea206d1d1070674' :"Test Class (for system reference only):",
'31fde7b05ac8952dacf4af8a704074ec' :"Preview",
'5b8ef4e762c00a15a41cfc26dc3ef99c' :"Send me a test copy",
- '0a5fecb1d88a50f47cc2ed2fd985c304' :"BCC Group:",
'4182c8f19d40c7ca236a5f4f83faeb6b' :"Unsubscribe",
'b2bce8099bf8e6f51345bee5c9015c89' :"Convert HTML to Plain Text",
'ea4788705e6873b424c65e91c2846b19' :"Cancel",
'c4ca4238a0b923820dcc509a6f75849b' :"1",
'1e6d57e813355689e9c77e947d73ad8f' :"From:",
- '292f75d54a6892cfe18a93e64230112a' :"Mailout Name:",
'47a0be8d1015d526a1fbaa56c3102135' :"Subject:",
'5feb9bf3c03b32635135006cbacb9542' :"Insert Field",
+ '292f75d54a6892cfe18a93e64230112a' :"Mailout Name:",
'7038eac66e387c3b3a0834d786a88757' :"Insert Image",
'e71c729cd7f3c6b6ebdb447e65952dfd' :"From email address:",
+ 'edddfc18b2ffb806573a1b3f341832cd' :"BCC to Group:",
'bd88a20b53a47f7b5704a83a15ff5506' :"Saved Version",
'e44b145bd8b49b06e0ad2ced1ad56466' :"Plain Text",
'c9cc8cce247e49bae79f15173ce97354' :"Save",
+ 'b5a7adde1af5c87d7fd797b6245c2a39' :"Description",
'49ee3087348e8d44e1feda1917443987' :"Name",
+ '28690be026c0bb9003aa58e45e5662ca' :"Enabled - will be sent out",
'fb981fe689fbec75c6531eb7410971f4' :"To group:",
'e05f77bdf3f659c1fd354a88526c03da' :"Select Group",
'36a65bbd12f7586ea1f9b0be4e8848aa' :"HTML Editor"
},
+ _named_strings : {
+ 'description_fieldLabel' : 'b5a7adde1af5c87d7fd797b6245c2a39' /* Description */ ,
+ 'active_boxLabel' : '28690be026c0bb9003aa58e45e5662ca' /* Enabled - will be sent out */ ,
+ 'save_html' : 'c9cc8cce247e49bae79f15173ce97354' /* Save */ ,
+ 'to_group_id_display_name_loadingText' : '843627586c62e389041a4d8800143974' /* Searching */ ,
+ 'bcc_group_id_name_placeholder' : '2c466a2c159463f1d9ef5a7b57b52827' /* Select BCC Group */ ,
+ 'name_fieldLabel' : '292f75d54a6892cfe18a93e64230112a' /* Mailout Name: */ ,
+ 'cancel_html' : 'ea4788705e6873b424c65e91c2846b19' /* Cancel */ ,
+ 'from_email_fieldLabel' : 'e71c729cd7f3c6b6ebdb447e65952dfd' /* From email address: */ ,
+ 'to_group_id_display_name_fieldLabel' : 'fb981fe689fbec75c6531eb7410971f4' /* To group: */ ,
+ 'preview_html' : '31fde7b05ac8952dacf4af8a704074ec' /* Preview */ ,
+ 'active_value' : 'c4ca4238a0b923820dcc509a6f75849b' /* 1 */ ,
+ 'to_group_id_display_name_placeholder' : 'e05f77bdf3f659c1fd354a88526c03da' /* Select Group */ ,
+ 'send_html' : '5b8ef4e762c00a15a41cfc26dc3ef99c' /* Send me a test copy */ ,
+ 'from_name_fieldLabel' : '1e6d57e813355689e9c77e947d73ad8f' /* From: */ ,
+ 'bcc_group_id_name_loadingText' : '843627586c62e389041a4d8800143974' /* Searching */ ,
+ 'bcc_group_id_name_fieldLabel' : 'edddfc18b2ffb806573a1b3f341832cd' /* BCC to Group: */ ,
+ 'subject_fieldLabel' : '47a0be8d1015d526a1fbaa56c3102135' /* Subject: */ ,
+ 'test_class_fieldLabel' : '3858712080cb3d846ea206d1d1070674' /* Test Class (for system reference only): */
+ },
dialog : false,
callback: false,
this.callback = cb;
this.data = data;
- this.dialog.show(this.data._el);
+ this.dialog.show.apply(this.dialog, Array.prototype.slice.call(arguments).slice(2));
if (this.form) {
this.form.reset();
this.form.setValues(data);
var _this = this;
this.dialog = Roo.factory({
xtype : 'Modal',
+ bodyOverflow : true,
cls : 'modal-body-enable-overflow-y',
fitwindow : true,
title : _this._strings['396ecabf0cd1f9503e591418851ef406'] /* Edit / Create Message */,
listeners : {
click : function (_self, e)
{
- //_this.dialog.hide();
-
var id = _this.form.findField('id').getValue();
if(id*1 < 1){
errorMask : true,
hideshow : function()
{
- if (this.findField('to_group').getValue() == -1) {
- _this.to_group_row.hide();
- } else {
- _this.to_group_row.show();
+ _this.to_group_row.hide();
+
+ if (this.findField('to_group_id').getValue() == -1) {
+ return;
}
+
+ _this.to_group_row.show();
},
method : 'POST',
preValidate : function(done_callback) {
_this.dialog.el.mask("Loading");
this.doAction(
'load',
- { method: 'GET', params: { '_id' : _this.data.id }}
+ { method: 'GET', params: { '_id' : _this.data.id, '_with_css' : 1 }}
);
return;
}
- this.findField('name').setDisabled(false);
- this.findField('test_class').setDisabled(false);
+ //this.findField('name').setDisabled(false);
+ //this.findField('test_class').setDisabled(false);
this.reset();
- this.findField('to_group').setValue(-1);
+ this.findField('to_group_id').setValue(-1);
this.findField('bodytext').setValue('');
this.setValues({
if (action.type == 'load') {
+ /*
this.findField('name').setDisabled(false);
this.findField('test_class').setDisabled(false);
this.findField('name').setDisabled(true);
this.findField('test_class').setDisabled(true);
}
+ */
_this.dialog.el.unmask();
this.findField('bodytext').originalValue = this.findField('bodytext').getValue();
_this.form_data = action.result.data;
+
+ if(_this.form_data._css && _this.form_data._css.length){
+ _this.htmleditor.editorcore.setStyle(_this.form_data._css);
+ }
+
this.findField('_ignore_group_count').setValue('0');
+
+ if(!_this.form_data.description.length){
+ _this.form_data.findField('description').setValue(_this.form_data.name);
+ }
+
this.hideshow();
return;
if(action.result.errors.errcode) {
switch (action.result.errors.errcode) {
case 100:
- Roo.bootstrap.MessageBox.confirm('Confirm Save', 'No member found in To Group: ' + _this.combo_to_group.getRawValue() ,function(ret) {
- if(ret == 'no'){
- return;
+
+ Roo.bootstrap.MessageBox.show({
+ title: 'Confirm Save',
+ msg: 'No member found in To Group: '+ _this.combo_to_group.getRawValue(),
+ buttons: {yes:'OK Save anyway', no:'Change to another group'},
+ fn: function(ret){
+
+ if(ret == 'no'){
+ return;
+ }
+
+ _this.form.findField('_ignore_group_count').setValue('1');
+ _this.form.doAction("submit");
}
- _this.form.findField('_ignore_group_count').setValue('1');
- _this.form.doAction("submit");
- }, this);
+ });
+
+
break;
default:
{
xtype : 'Input',
allowBlank : false,
- fieldLabel : _this._strings['292f75d54a6892cfe18a93e64230112a'] /* Mailout Name: */,
+ fieldLabel : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
indicatorpos : 'right',
labelWidth : 3,
- name : 'name',
+ name : 'description',
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap'
}
items : [
{
xtype : 'CheckBox',
- boxLabel : 'Enabled - will be sent out',
+ boxLabel : _this._strings['28690be026c0bb9003aa58e45e5662ca'] /* Enabled - will be sent out */,
checked : true,
indicatorpos : 'right',
name : 'active',
},
{
xtype : 'Row',
- listeners : {
- render : function (_self)
- {
- _this.to_group_row = this;
- }
- },
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap',
items : [
xtype : 'Column',
md : 6,
xs : 12,
+ listeners : {
+ render : function (_self)
+ {
+ _this.to_group_row = this;
+ }
+ },
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap',
items : [
xtype : 'ComboBox',
allowBlank : true,
alwaysQuery : true,
- displayField : 'name',
+ displayField : 'display_name',
editable : false,
fieldLabel : _this._strings['fb981fe689fbec75c6531eb7410971f4'] /* To group: */,
forceSelection : true,
- hiddenName : 'to_group',
+ hiddenName : 'to_group_id',
+ indicatorpos : 'right',
labelAlign : 'left',
labelWidth : 4,
loadingText : _this._strings['843627586c62e389041a4d8800143974'] /* Searching */,
minChars : 2,
- name : 'to_group_name',
+ name : 'to_group_id_display_name',
pageSize : 20,
placeholder : _this._strings['e05f77bdf3f659c1fd354a88526c03da'] /* Select Group */,
triggerAction : 'all',
o.params = o.params || {};
o.params._direct_return = 1;
+ o.params.limit = 100;
}
},
xns : Roo.data,
},
reader : {
xtype : 'JsonReader',
- fields : [{"name":"name","type":"string"},{"name":"id","type":"int"}],
+ fields : ['name','display_name',{"name":"id","type":"int"}],
id : 'name',
root : 'data',
totalProperty : 'total',
alwaysQuery : true,
displayField : 'name',
editable : false,
- fieldLabel : _this._strings['0a5fecb1d88a50f47cc2ed2fd985c304'] /* BCC Group: */,
+ fieldLabel : _this._strings['edddfc18b2ffb806573a1b3f341832cd'] /* BCC to Group: */,
forceSelection : true,
- hiddenName : 'bcc_group',
+ hiddenName : 'bcc_group_id',
+ indicatorpos : 'right',
labelAlign : 'left',
labelWidth : 4,
loadingText : _this._strings['843627586c62e389041a4d8800143974'] /* Searching */,
minChars : 2,
- name : 'bcc_group_name',
+ name : 'bcc_group_id_name',
pageSize : 20,
placeholder : _this._strings['2c466a2c159463f1d9ef5a7b57b52827'] /* Select BCC Group */,
triggerAction : 'all',
items : [
{
xtype : 'HtmlEditor',
+ bodyCls : 'roo-email',
name : 'bodytext',
+ stylesheets : '',
listeners : {
autosave : function (_self)
{
var ontable = (_this.data.module) ? _this.data.module : 'crm_mailing_list_message';
Pman.Dialog.BAdminImageManager.show({
- id : 0,
+ id: 0,
onid: id,
ontable: ontable
+ }, function(img){
+ _this.form.findField('bodytext').editorcore.insertAtCursor(
+ String.format(
+ '<img src="{0}/Images/{1}/{2}#image-{1}" height="{3}" width="{4}" alt="{5}" align="{6}">',
+ baseURL,
+ img.id,
+ img.filename.replace('%', '-'),
+ img.height,
+ img.width,
+ img.descript,
+ img.align
+ )
+ )
});
}
items : [
{
xtype : 'Column',
- md : 12,
+ md : 6,
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'Input',
+ allowBlank : false,
+ disabled : true,
+ fieldLabel : _this._strings['292f75d54a6892cfe18a93e64230112a'] /* Mailout Name: */,
+ indicatorpos : 'right',
+ labelAlign : 'top',
+ name : 'name',
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ }
+ ]
+ },
+ {
+ xtype : 'Column',
+ md : 6,
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap',
items : [
{
xtype : 'Input',
+ disabled : true,
fieldLabel : _this._strings['3858712080cb3d846ea206d1d1070674'] /* Test Class (for system reference only): */,
labelAlign : 'top',
name : 'test_class',