+ },
+ "remoteSort" : true,
+ "xtype" : "Store"
+ },
+ {
+ "$ xns" : "Roo",
+ "* prop" : "footer",
+ "displayInfo" : true,
+ "displayMsg" : "Displaying Message{0} - {1} of {2}",
+ "emptyMsg" : "Nothing found",
+ "items" : [
+ {
+ "$ xns" : "Roo.Toolbar",
+ "listeners" : {
+ "|click" : [
+ "function()",
+ "{",
+ " ",
+ "new Pman.Download({",
+ " url : baseURL + '/Roo/Core_email',",
+ " method : 'GET',",
+ " params : {",
+ " csvCols : '*',",
+ " csvTitles : '*'",
+ " }",
+ "});",
+ "Roo.MessageBox.alert(\"Notice\", \"Should be downloading now\");",
+ " ",
+ "}",
+ ""
+ ]
+ },
+ "text" : "Download to Excel",
+ "xtype" : "Button"
+ }
+ ],
+ "pageSize" : 25,
+ "xtype" : "PagingToolbar"
+ },
+ {
+ "$ xns" : "Roo",
+ "* prop" : "toolbar",
+ "items" : [
+ {
+ "$ xns" : "Roo.form",
+ "listeners" : {
+ "render" : [
+ "function (_self)",
+ "{",
+ " _this.searchBox = _self;",
+ "}"
+ ],
+ "specialkey" : [
+ "function (_self, e)",
+ "{",
+ " _this.grid.footer.onClick('first');",
+ "}"
+ ]
+ },
+ "xtype" : "TextField"
+ },
+ {
+ "$ icon" : "rootURL + '/Pman/templates/images/search.gif'",
+ "$ xns" : "Roo.Toolbar",
+ "cls" : "x-btn-icon",
+ "listeners" : {
+ "click" : [
+ "function (_self, e)",
+ "{",
+ " _this.grid.footer.onClick('first');",
+ "}"
+ ]
+ },
+ "xtype" : "Button"
+ },
+ {
+ "$ icon" : "rootURL + '/Pman/templates/images/edit-clear.gif'",
+ "$ xns" : "Roo.Toolbar",
+ "cls" : "x-btn-icon",
+ "listeners" : {
+ "click" : [
+ "function (_self, e)",
+ "{",
+ " _this.searchBox.setValue('');\r",
+ " _this.grid.footer.onClick('first');\r",
+ "}"
+ ]
+ },
+ "xtype" : "Button"
+ },
+ {
+ "$ xns" : "Roo.Toolbar",
+ "xtype" : "Fill"
+ },
+ {
+ "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+ "$ xns" : "Roo.Toolbar",
+ "cls" : "x-btn-text-icon",
+ "listeners" : {
+ "|click" : [
+ "function()",
+ "{",
+ " var sel = _this.grid.selModel.getSelected();",
+ " if (!sel) {",
+ " Roo.MessageBox.alert(\"Error\", \"Select a message to copy\");",
+ " return;",
+ " }",
+ "new Pman.Request({",
+ " url : baseURL + '/Roo/Core_email',",
+ " method : 'POST',",
+ " params : {",
+ " id : sel.data.id,",
+ " _make_copy : 1",
+ " },",
+ " success : function() {",
+ " _this.grid.footer.onClick('refresh');",
+ " }",
+ "});",
+ " ",
+ "}",
+ ""
+ ]
+ },
+ "text" : "Copy",
+ "xtype" : "Button"
+ },
+ {
+ "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
+ "$ xns" : "Roo.Toolbar",
+ "cls" : "x-btn-text-icon",
+ "listeners" : {
+ "|click" : [
+ "function()",
+ "{",
+ " if (!_this.dialog) {",
+ " return;",
+ " }",
+ " _this.dialog.show( { id : 0, module : 'core_email' } , function() {",
+ " _this.grid.footer.onClick('first');",
+ " }); ",
+ "}",
+ ""
+ ]
+ },
+ "text" : "Add",
+ "xtype" : "Button"
+ },
+ {
+ "$ xns" : "Roo.Toolbar",
+ "xtype" : "Separator"
+ },
+ {
+ "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
+ "$ xns" : "Roo.Toolbar",
+ "cls" : "x-btn-text-icon",
+ "listeners" : {
+ "|click" : [
+ "function()",
+ "{",
+ " Pman.genericDelete(_this, 'core_email');",
+ " ",
+ "}",
+ ""
+ ]
+ },
+ "text" : "Delete",
+ "xtype" : "Button"
+ }
+ ],
+ "xtype" : "Toolbar"
+ },
+ {
+ "$ renderer" : [
+ "function(v,x,r) ",
+ "{ ",
+ " if (r.data.description.length > 0) {",
+ " v = r.data.description;",
+ " }",
+ " ",
+ " ",
+ " if(r.data.active * 1 < 1){",
+ " return String.format('<s>{0}</s>', v ? v : ''); ",
+ " }",
+ " ",
+ " return String.format('{0}', v ? v : ''); ",
+ "}"
+ ],
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "Boolean sortable" : true,
+ "dataIndex" : "name",
+ "header" : "Name",
+ "width" : 250,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : [
+ "function(v,x,r) ",
+ "{ ",
+ " if(r.data.active * 1 < 1){",
+ " return String.format('<s>{0}</s>', v ? v : ''); ",
+ " }",
+ " ",
+ " return String.format('{0}', v ? v : ''); ",
+ "}"
+ ],
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "Boolean sortable" : true,
+ "dataIndex" : "subject",
+ "header" : "Title",
+ "width" : 300,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "Boolean sortable" : true,
+ "dataIndex" : "from_name",
+ "header" : "From Name",
+ "width" : 150,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "Boolean sortable" : true,
+ "dataIndex" : "from_email",
+ "header" : "From Email",
+ "width" : 150,
+ "xtype" : "ColumnModel"
+ },
+ {
+ "$ renderer" : "function(v) { return String.format('{0}', v ? v : ''); }",
+ "$ xns" : "Roo.grid",
+ "* prop" : "cm[]",
+ "Boolean sortable" : true,
+ "dataIndex" : "bcc_group_name",
+ "header" : "BCC Group",
+ "width" : 150,
+ "xtype" : "ColumnModel"
+ }
+ ],
+ "listeners" : {
+ "rowclick" : [
+ "function (_self, rowIndex, e)",
+ "{",
+ " // _this.grid.ds.load({});",
+ " _this.viewPanel.view.store.load({});",
+ "}"
+ ],
+ "|render" : [
+ "function() ",
+ "{",
+ " _this.grid = this; ",
+ " _this.dialog = Pman.Dialog.CoreEmail;",
+ " if (_this.panel.active) {",
+ " _this.grid.footer.onClick('first');",
+ " }",
+ "}"
+ ],
+ "|rowdblclick" : [
+ "function (_self, rowIndex, e)",
+ "{",
+ " if (!_this.dialog) { ",
+ " return;",
+ " }",
+ " var data = this.getDataSource().getAt(rowIndex).data;",
+ " _this.dialog.show( {id : data.id, module : 'core_email'} , function() {",
+ " _this.grid.footer.onClick('first');",
+ " }); ",
+ "}",
+ ""
+ ]
+ },
+ "loadMask" : true,
+ "xtype" : "Grid"