DataObjects/Core_notify_recur.php
[Pman.Core] / Pman.Dialog.CoreNotifyRecur.bjs
index aed8be4..d866a16 100644 (file)
@@ -34,7 +34,7 @@
    "xtype" : "LayoutDialog",
    "width" : 800,
    "$ xns" : "Roo",
-   "resizable" : false,
+   "resizable" : true,
    "height" : 550,
    "items" : [
     {
      "items" : [
       {
        "listeners" : {
-        "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n    var di = this.colModel.getDataIndex(columnIndex);\n    if (di != 'keyword_filters') {\n        return;\n    }\n    \n    var d = this.ds.getAt(rowIndex);\n    \n    Roo.log(d);\n    \n    return;\n    \n    Pman.Dialog.CoreNotifyRecurKeywords.show({}, function(res){\n        Roo.log(res);\n    });\n    \n}",
+        "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n    var di = this.colModel.getDataIndex(columnIndex);\n    if (di != 'keyword_filters') {\n        return;\n    }\n    \n    var d = this.ds.getAt(rowIndex);\n    \n    if(!d || d.data.id * 1 < 1){\n        return;\n    }\n    \n    Pman.Dialog.CoreNotifyRecurKeywords.show({id : d.data.id}, function(res){\n        _this.grid.ds.load({});\n    });\n    \n}",
         "|render" : "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n    //   this.footer.onClick('first');\n    }\n}",
         "afteredit" : "function (e)\n{\n   e.record.commit();\n}"
        },
-       "autoExpandColumn" : "freq_day",
+       "autoExpandColumn" : "keyword_filters",
        "xtype" : "EditorGrid",
        "loadMask" : true,
        "clicksToEdit" : 1,
         {
          "xtype" : "ColumnModel",
          "header" : "on day(s)",
-         "width" : 100,
+         "width" : 150,
          "$ renderer" : "function(v,x,r) { \n    \n    if (v.length) {\n     \n        var cm = _this.grid.colModel;\n       \n        var ci = cm.getColumnByDataIndex(this.name);\n       \n         var tv = [];\n        var vals = Roo.decode(v);\n        Roo.each(vals, function(k) {\n            var r = this.findRecord(this.valueField, k);\n            if(r){\n                tv.push(r.data[this.displayField]);\n            }else if(this.valueNotFoundText !== undefined){\n                tv.push( this.valueNotFoundText );\n            }\n        },ci.editor.field);\n\n        r.data[this.name + '_name'] = tv.join(', ');\n        return String.format('{0}',tv.join(', '));\n\n        \n    \n    }\n    r.data[this.name + '_name'] = '';\n    return String.format('{0}', r.data.freq_day_name || v); \n    \n}",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
          "xtype" : "ColumnModel",
          "header" : "Keywords",
          "width" : 75,
-         "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
+         "$ renderer" : "function(v,x,r) { \n    return String.format('{0}', v ? r.data.keywords : ''); \n}",
          "$ xns" : "Roo.grid",
          "* prop" : "colModel[]",
          "dataIndex" : "keyword_filters"