listeners : {
activate : function (_self)
{
+ _this.type_edit_btn.hide();
+
if(_this.type_grid) {
_this.type_grid.footer.onClick('first');
}
'|xns' : 'Roo.bootstrap',
items : [
{
- xtype : 'Button',
- glyphicon : 'plus',
- html : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
- style : 'margin: 10px;',
- weight : 'default',
- listeners : {
- click : function (_self, e)
- {
- Pman.Dialog.BAdminCoreEnum.show({
- id : 0
- }, function(res) {
- _this.type_grid.footer.onClick('first');
- });
-
- }
- },
+ xtype : 'Element',
xns : Roo.bootstrap,
- '|xns' : 'Roo.bootstrap'
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'Row',
+ cls : 'roo-toolbar',
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'Column',
+ md : 12,
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'Button',
+ cls : 'roo-toolbar-button',
+ glyphicon : 'plus',
+ html : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
+ weight : 'default',
+ listeners : {
+ click : function (_self, e)
+ {
+ Pman.Dialog.BAdminCoreEnum.show({
+ id : 0
+ }, function(res) {
+ _this.type_grid.footer.onClick('first');
+ });
+
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ },
+ {
+ xtype : 'Button',
+ cls : 'roo-toolbar-button',
+ glyphicon : 'edit',
+ html : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
+ weight : 'default',
+ listeners : {
+ click : function (_self, e)
+ {
+ var sel = _this.type_grid.getSelectionModel().getSelected();
+
+ if(!sel || sel.data.id * 1 < 1){
+ Roo.bootstrap.MessageBox.alert('Error', 'Please select a type');
+ return;
+ }
+
+ Pman.Dialog.BAdminCoreEnum.show({
+ id : sel.data.id
+ }, function(res) {
+ _this.type_grid.footer.onClick('first');
+ });
+ },
+ render : function (_self)
+ {
+ _this.type_edit_btn = this;
+
+ this.hide();
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ }
+ ]
+ }
+ ]
+ }
+ ]
}
]
}
cls : 'table-fixed',
hover : true,
loadMask : true,
- responsive : true,
rowSelection : true,
striped : false,
listeners : {
listeners : {
beforeload : function (_self, o)
{
+ if (!Pman.buildCompleted) {
+ return false;
+ }
+
o.params = o.params || {};
o.params['query[empty_etype]'] = 1;
+ },
+ load : function (_self, records, options)
+ {
+ _this.type_edit_btn.hide();
}
},
xns : Roo.data,
listeners : {
selectionchange : function (_self)
{
+ _this.type_edit_btn.hide();
+
+ if(this.getSelected()){
+ _this.type_edit_btn.show();
+ }
+
_this.option_grid.store.load({});
}
},
cm : [
{
xtype : 'ColumnModel',
+ cursor : 'pointer',
dataIndex : 'display_name',
header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
renderer : function(v,x,r) {
'|xns' : 'Roo.bootstrap',
items : [
{
- xtype : 'Button',
- glyphicon : 'plus',
- html : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
- style : 'margin: 10px;',
- weight : 'default',
- listeners : {
- click : function (_self, e)
- {
- var sel = _this.type_grid.getSelectionModel().getSelected();
-
- if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length ){
- Roo.bootstrap.MessageBox.alert('Error', 'Please select a type');
- return;
- }
-
- Pman.Dialog.BAdminCoreEnum.show({
- id : 0,
- etype : sel.data.name
- }, function(res) {
- _this.option_grid.store.load({});
- });
-
- }
- },
- xns : Roo.bootstrap,
- '|xns' : 'Roo.bootstrap'
- },
- {
- xtype : 'Button',
- glyphicon : 'edit',
- html : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
- style : 'margin: 10px;',
- weight : 'default',
- listeners : {
- click : function (_self, e)
- {
- var sel = _this.option_grid.getSelectionModel().getSelected();
-
- if(!sel || sel.data.id * 1 < 1){
- Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
- return;
- }
-
- Pman.Dialog.BAdminCoreEnum.show({
- id : sel.data.id
- }, function(res) {
- _this.option_grid.store.load({});
- });
-
- },
- render : function (_self)
- {
- _this.edit_btn = this;
-
- this.hide();
- }
- },
- xns : Roo.bootstrap,
- '|xns' : 'Roo.bootstrap'
- },
- {
- xtype : 'Button',
- glyphicon : 'trash',
- html : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
- style : 'margin: 10px;',
- weight : 'primary',
- listeners : {
- click : function (_self, e)
- {
- var sel = _this.option_grid.getSelectionModel().getSelected();
-
- if(!sel || sel.data.id * 1 < 1){
- Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
- return;
- }
-
- new Pman.Request({
- url: baseURL + '/Roo/Core_enum.php',
- method : 'POST',
- params : {
- _delete : sel.data.id
- },
- success : function(res) {
- _this.option_grid.store.load({});
- }
- });
-
- }
- },
+ xtype : 'Element',
xns : Roo.bootstrap,
- '|xns' : 'Roo.bootstrap'
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'Row',
+ cls : 'roo-toolbar',
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'Column',
+ md : 12,
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'Button',
+ cls : 'roo-toolbar-button',
+ glyphicon : 'plus',
+ html : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
+ weight : 'default',
+ listeners : {
+ click : function (_self, e)
+ {
+ var sel = _this.type_grid.getSelectionModel().getSelected();
+
+ if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length ){
+ Roo.bootstrap.MessageBox.alert('Error', 'Please select a type');
+ return;
+ }
+
+ Pman.Dialog.BAdminCoreEnum.show({
+ id : 0,
+ etype : sel.data.name
+ }, function(res) {
+ _this.option_grid.store.load({});
+ });
+
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ },
+ {
+ xtype : 'Button',
+ cls : 'roo-toolbar-button',
+ glyphicon : 'edit',
+ html : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
+ weight : 'default',
+ listeners : {
+ click : function (_self, e)
+ {
+ var sel = _this.option_grid.getSelectionModel().getSelected();
+
+ if(!sel || sel.data.id * 1 < 1){
+ Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
+ return;
+ }
+
+ Pman.Dialog.BAdminCoreEnum.show({
+ id : sel.data.id
+ }, function(res) {
+ _this.option_grid.store.load({});
+ });
+
+ },
+ render : function (_self)
+ {
+ _this.edit_btn = this;
+
+ this.hide();
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ },
+ {
+ xtype : 'Button',
+ cls : 'roo-toolbar-button',
+ glyphicon : 'trash',
+ html : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
+ weight : 'primary',
+ listeners : {
+ click : function (_self, e)
+ {
+ var sel = _this.option_grid.getSelectionModel().getSelected();
+
+ if(!sel || sel.data.id * 1 < 1){
+ Roo.bootstrap.MessageBox.alert('Error', 'Please select a option');
+ return;
+ }
+
+ new Pman.Request({
+ url: baseURL + '/Roo/Core_enum.php',
+ method : 'POST',
+ params : {
+ _delete : sel.data.id
+ },
+ success : function(res) {
+ _this.option_grid.store.load({});
+ }
+ });
+
+ },
+ render : function (_self)
+ {
+ _this.delete_btn = this;
+
+ this.hide();
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ }
+ ]
+ }
+ ]
+ }
+ ]
}
]
}
footerShow : false,
hover : true,
loadMask : true,
- responsive : true,
rowSelection : true,
striped : true,
listeners : {
rec.set('active', rec.data.active ? 0 : 1);
rec.commit();
+
+ /*if(rec.data.active * 1 != 1){
+ var el = _this.option_grid.getRowDom(rowIndex);
+
+ el.addClass('x-grid-row-fadeout');
+
+ el.on('transitionend',function(){
+ _this.option_grid.ds.remove(rec);
+ el.remove();
+ },this,{single:true});
+ }*/
},
render : function (_self)
{
store : {
xtype : 'Store',
remoteSort : true,
- sortinfo : { field : 'display_name', direction: 'ASC' },
+ sortInfo : { field : 'display_name', direction: 'ASC' },
listeners : {
beforeload : function (_self, o)
{
+ if (!Pman.buildCompleted) {
+ return false;
+ }
+
o.params = o.params || {};
var sel = _this.type_grid.getSelectionModel().getSelected();
listeners : {
selectionchange : function (_self)
{
-
+ _this.edit_btn.hide();
+ _this.delete_btn.hide();
+
+ if (!this.getSelected()) {
+ return;
+ }
+
+ _this.edit_btn.show();
+ _this.delete_btn.show();
+
}
},
xns : Roo.bootstrap.Table,
header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,
md : 2,
renderer : function(v,x,r) {
- var state = v > 0 ? '-checked' : '';
-
- return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
+
+ var state = v > 0 ? 'check-' : '';
+
+ //return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';
+ return '<i class="far fa-'+ state + 'square-o fa-2x" aria-hidden="true"></i>';
},
sm : 2,
sortable : false,