Very basic list of skins
This commit is contained in:
@@ -30,15 +30,23 @@ function updatePageSize(){
|
|||||||
echo '{success: true}';
|
echo '{success: true}';
|
||||||
}
|
}
|
||||||
function skinList(){
|
function skinList(){
|
||||||
|
//Get Skin Config files
|
||||||
$skinListArray=array();
|
$skinListArray=array();
|
||||||
$customSkins=glob(PATH_CUSTOM_SKINS."*");
|
$customSkins=glob(PATH_CUSTOM_SKINS."*/config.xml");
|
||||||
foreach($customSkins as $skin){
|
$configurationFile = G::ExpandPath( "skinEngine" ).'base'.PATH_SEP.'config.xml';
|
||||||
if(is_dir($skin)){
|
array_unshift($customSkins,$configurationFile);
|
||||||
$res['CALENDAR_UID']=$skin;
|
|
||||||
$res['CALENDAR_NAME']=basename($skin);
|
//Read and parse each Configuration File
|
||||||
|
foreach($customSkins as $key => $configInformation){
|
||||||
$skinListArray['cals'][]=$res;
|
$xmlConfiguration = file_get_contents ( $configInformation );
|
||||||
}
|
$xmlConfigurationObj=G::xmlParser($xmlConfiguration);
|
||||||
|
$skinInformationArray=$skinFilesArray=$xmlConfigurationObj->result['skinConfiguration']['__CONTENT__']['information']['__CONTENT__'];
|
||||||
|
|
||||||
|
$res=array();
|
||||||
|
foreach($skinInformationArray as $keyInfo => $infoValue){
|
||||||
|
$res['SKIN_'.strtoupper($keyInfo)]=$infoValue['__VALUE__'];
|
||||||
|
}
|
||||||
|
$skinListArray['skins'][]=$res;
|
||||||
}
|
}
|
||||||
print_r(G::json_encode($skinListArray));
|
print_r(G::json_encode($skinListArray));
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<skinConfiguration>
|
<skinConfiguration>
|
||||||
<information>
|
<information>
|
||||||
<id></id>
|
<id>00000000000000000000000000000001</id>
|
||||||
<name>Classic</name>
|
<name>Classic</name>
|
||||||
|
<description>Classic/default skin</description>
|
||||||
<author>ProcessMaker Team</author>
|
<author>ProcessMaker Team</author>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<createDate>2011-02-27</createDate>
|
<createDate>2011-02-27</createDate>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ var searchText;
|
|||||||
var contextMenu;
|
var contextMenu;
|
||||||
var pageSize;
|
var pageSize;
|
||||||
|
|
||||||
var cal_default = '00000000000000000000000000000001';
|
var classicSkin = '00000000000000000000000000000001';
|
||||||
|
|
||||||
Ext.onReady(function(){
|
Ext.onReady(function(){
|
||||||
Ext.QuickTips.init();
|
Ext.QuickTips.init();
|
||||||
@@ -70,6 +70,7 @@ Ext.onReady(function(){
|
|||||||
newButton = new Ext.Action({
|
newButton = new Ext.Action({
|
||||||
text: _('ID_NEW'),
|
text: _('ID_NEW'),
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||||
|
disabled: true,
|
||||||
handler: NewCalendarAction
|
handler: NewCalendarAction
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -77,6 +78,7 @@ Ext.onReady(function(){
|
|||||||
text: _('ID_EDIT'),
|
text: _('ID_EDIT'),
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
||||||
handler: EditCalendarAction,
|
handler: EditCalendarAction,
|
||||||
|
hidden: true,
|
||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -84,6 +86,7 @@ Ext.onReady(function(){
|
|||||||
text: _('ID_DELETE'),
|
text: _('ID_DELETE'),
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_delete',
|
iconCls: 'button_menu_ext ss_sprite ss_delete',
|
||||||
handler: DeleteButtonAction,
|
handler: DeleteButtonAction,
|
||||||
|
hidden: true,
|
||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -91,6 +94,7 @@ Ext.onReady(function(){
|
|||||||
text: _('ID_COPY'),
|
text: _('ID_COPY'),
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_calendar_add',
|
iconCls: 'button_menu_ext ss_sprite ss_calendar_add',
|
||||||
handler: CopyButtonAction,
|
handler: CopyButtonAction,
|
||||||
|
hidden: true,
|
||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -112,7 +116,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
contextMenu = new Ext.menu.Menu({
|
contextMenu = new Ext.menu.Menu({
|
||||||
items: [editButton, deleteButton,'-',exportButton]
|
items: [exportButton]
|
||||||
});
|
});
|
||||||
|
|
||||||
searchText = new Ext.form.TextField ({
|
searchText = new Ext.form.TextField ({
|
||||||
@@ -145,15 +149,12 @@ Ext.onReady(function(){
|
|||||||
singleSelect: true,
|
singleSelect: true,
|
||||||
listeners:{
|
listeners:{
|
||||||
rowselect: function(sm){
|
rowselect: function(sm){
|
||||||
editButton.enable();
|
//exportButton.enable();
|
||||||
rowSelected = infoGrid.getSelectionModel().getSelected();
|
exportButton.disable();
|
||||||
(rowSelected.data.CALENDAR_UID == cal_default) ? deleteButton.disable() : deleteButton.enable();
|
rowSelected = infoGrid.getSelectionModel().getSelected();
|
||||||
copyButton.enable();
|
|
||||||
},
|
},
|
||||||
rowdeselect: function(sm){
|
rowdeselect: function(sm){
|
||||||
editButton.disable();
|
exportButton.disable();
|
||||||
deleteButton.disable();
|
|
||||||
copyButton.disable();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -163,16 +164,16 @@ Ext.onReady(function(){
|
|||||||
url: 'skin_Ajax?action=skinList'
|
url: 'skin_Ajax?action=skinList'
|
||||||
}),
|
}),
|
||||||
reader : new Ext.data.JsonReader( {
|
reader : new Ext.data.JsonReader( {
|
||||||
root: 'cals',
|
root: 'skins',
|
||||||
totalProperty: 'total_cals',
|
totalProperty: 'total_skins',
|
||||||
fields : [
|
fields : [
|
||||||
{name : 'CALENDAR_UID'},
|
{name : 'SKIN_ID'},
|
||||||
{name : 'CALENDAR_NAME'},
|
{name : 'SKIN_NAME'},
|
||||||
{name : 'CALENDAR_DESCRIPTION'},
|
{name : 'SKIN_DESCRIPTION'},
|
||||||
{name : 'CALENDAR_STATUS'},
|
{name : 'SKIN_AUTHOR'},
|
||||||
{name : 'TOTAL_USERS', type: 'int'},
|
{name : 'SKIN_CREATEDATE', type: 'date'},
|
||||||
{name : 'TOTAL_PROCESS', type: 'int'},
|
{name : 'SKIN_MODIFIEDDATE', type: 'date'},
|
||||||
{name : 'TOTAL_TASKS', type: 'int'}
|
{name : 'SKIN_STATUS'}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -183,13 +184,13 @@ Ext.onReady(function(){
|
|||||||
sortable: true
|
sortable: true
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{id:'CALENDAR_UID', dataIndex: 'CALENDAR_UID', hidden:true, hideable:false},
|
{id:'SKIN_UID', dataIndex: 'SKIN_UID', hidden:true, hideable:false},
|
||||||
{header: _('ID_NAME'), dataIndex: 'CALENDAR_NAME', width: 200, align:'left'},
|
{header: _('ID_NAME'), dataIndex: 'SKIN_NAME', width: 100, align:'left'},
|
||||||
{header: _('ID_DESCRIPTION'), dataIndex: 'CALENDAR_DESCRIPTION', width: 200, align:'left'},
|
{header: _('ID_DESCRIPTION'), dataIndex: 'SKIN_DESCRIPTION', width: 200, align:'left'},
|
||||||
{header: _('ID_STATUS'), dataIndex: 'CALENDAR_STATUS', width: 130, align:'center', renderer: render_status},
|
{header: _('ID_OWNER'), dataIndex: 'SKIN_AUTHOR', width: 69, align:'center'},
|
||||||
{header: _('ID_USERS'), dataIndex: 'TOTAL_USERS', width: 69, align:'center'},
|
{header: _('ID_CREATE'), dataIndex: 'SKIN_CREATEDATE', width: 69, align:'center'},
|
||||||
{header: _('ID_PROCESSES'), dataIndex: 'TOTAL_PROCESS', width: 69, align:'center'},
|
{header: _('ID_UPDATE_DATE'), dataIndex: 'SKIN_MODIFIEDDATE', width: 69, align:'center'},
|
||||||
{header: _('ID_TASKS'), dataIndex: 'TOTAL_TASKS', width: 69, align:'center'}
|
//{header: _('ID_STATUS'), dataIndex: 'SKIN_STATUS', width: 130, align:'center', renderer: render_status},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -224,8 +225,8 @@ Ext.onReady(function(){
|
|||||||
store: store,
|
store: store,
|
||||||
displayInfo: true,
|
displayInfo: true,
|
||||||
displayMsg: _('ID_GRID_PAGE_DISPLAYING_CALENDAR_MESSAGE') + ' ',
|
displayMsg: _('ID_GRID_PAGE_DISPLAYING_CALENDAR_MESSAGE') + ' ',
|
||||||
emptyMsg: _('ID_GRID_PAGE_NO_CALENDAR_MESSAGE'),
|
emptyMsg: _('ID_GRID_PAGE_NO_CALENDAR_MESSAGE')//,
|
||||||
items: ['-',_('ID_PAGE_SIZE')+':',comboPageSize]
|
//items: ['-',_('ID_PAGE_SIZE')+':',comboPageSize]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -249,7 +250,7 @@ Ext.onReady(function(){
|
|||||||
store: store,
|
store: store,
|
||||||
cm: cmodel,
|
cm: cmodel,
|
||||||
sm: smodel,
|
sm: smodel,
|
||||||
tbar: [newButton, '-', editButton, deleteButton,'-',copyButton,importButton,exportButton, {xtype: 'tbfill'}, searchText,clearTextButton,searchButton],
|
tbar: [newButton, '-', importButton,exportButton, {xtype: 'tbfill'}, searchText,clearTextButton,searchButton],
|
||||||
bbar: bbarpaging,
|
bbar: bbarpaging,
|
||||||
listeners: {
|
listeners: {
|
||||||
rowdblclick: EditCalendarAction
|
rowdblclick: EditCalendarAction
|
||||||
|
|||||||
Reference in New Issue
Block a user