PHP8
[Pman.BAdmin] / Pman.Dialog.BAdminEmail.js
index ca59f73..65852fc 100644 (file)
@@ -38,16 +38,16 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
  _named_strings : {
   'description_fieldLabel' : 'b5a7adde1af5c87d7fd797b6245c2a39' /* Description */ ,
   'active_boxLabel' : '28690be026c0bb9003aa58e45e5662ca' /* Enabled - will be sent out */ ,
-  'to_group_id_name_loadingText' : '843627586c62e389041a4d8800143974' /* Searching */ ,
-  'to_group_id_name_fieldLabel' : 'fb981fe689fbec75c6531eb7410971f4' /* To group: */ ,
   '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_name_placeholder' : 'e05f77bdf3f659c1fd354a88526c03da' /* Select Group */ ,
+  '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 */ ,
@@ -67,7 +67,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
 
   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);
@@ -81,6 +81,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
   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 */,
@@ -292,8 +293,8 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
                       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();
                   
@@ -314,6 +315,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
               
               if (action.type == 'load') {
                   
+                  /*
                   this.findField('name').setDisabled(false);
                   this.findField('test_class').setDisabled(false);
                   
@@ -321,6 +323,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
                       this.findField('name').setDisabled(true);
                       this.findField('test_class').setDisabled(true);
                   }
+                  */
                   
                   _this.dialog.el.unmask();
                   
@@ -334,6 +337,10 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
                   
                   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;
@@ -541,7 +548,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
               xtype : 'ComboBox',
               allowBlank : true,
               alwaysQuery : true,
-              displayField : 'name',
+              displayField : 'display_name',
               editable : false,
               fieldLabel : _this._strings['fb981fe689fbec75c6531eb7410971f4'] /* To group: */,
               forceSelection : true,
@@ -551,7 +558,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
               labelWidth : 4,
               loadingText : _this._strings['843627586c62e389041a4d8800143974'] /* Searching */,
               minChars : 2,
-              name : 'to_group_id_name',
+              name : 'to_group_id_display_name',
               pageSize : 20,
               placeholder : _this._strings['e05f77bdf3f659c1fd354a88526c03da'] /* Select Group */,
               triggerAction : 'all',
@@ -574,6 +581,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
                      o.params = o.params || {};
                      
                      o.params._direct_return = 1;
+                     o.params.limit = 100;
                  }
                },
                xns : Roo.data,
@@ -587,7 +595,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
                },
                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',
@@ -793,7 +801,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
                         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){
@@ -802,10 +810,10 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
                                     '<img src="{0}/Images/{1}/{2}#image-{1}" height="{3}" width="{4}" alt="{5}" align="{6}">',
                                     baseURL,
                                     img.id,
-                                    img.filename,
+                                    img.filename.replace('%', '-'),
                                     img.height,
                                     img.width,
-                                    img.alt,
+                                    img.descript,
                                     img.align
                                 )
                             )
@@ -996,7 +1004,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
               disabled : true,
               fieldLabel : _this._strings['292f75d54a6892cfe18a93e64230112a'] /* Mailout Name: */,
               indicatorpos : 'right',
-              labelWidth : 3,
+              labelAlign : 'top',
               name : 'name',
               xns : Roo.bootstrap,
               '|xns' : 'Roo.bootstrap'
@@ -1011,6 +1019,7 @@ Roo.apply(Pman.Dialog.BAdminEmail.prototype, {
             items  : [
              {
               xtype : 'Input',
+              disabled : true,
               fieldLabel : _this._strings['3858712080cb3d846ea206d1d1070674'] /* Test Class (for system reference only): */,
               labelAlign : 'top',
               name : 'test_class',