1
<?php defined('_JEXEC') or die('Restricted access'); ?>
4
JHTML::_('behavior.tooltip');
5
JHTML::_('behavior.modal');
7
JHTML::script('scripts.js', 'administrator/components/com_jce/js/');
8
JHTML::script('sortables.js', 'administrator/components/com_jce/js/');
10
JHTML::stylesheet('styles.css', 'administrator/components/com_jce/css/');
11
JHTML::stylesheet('icons.css', 'administrator/components/com_jce/css/');
12
JHTML::stylesheet('layout.css', 'administrator/components/com_jce/css/');
14
JToolBarHelper::title( JText::_( 'JCE Group' ) .': <small><small>[' .JText::_('Edit'). ']</small></small>', 'user.png' );
15
JToolBarHelper::save();
16
JToolBarHelper::apply();
17
JToolBarHelper::cancel( 'cancelEdit', 'Close' );
18
jceToolbarHelper::help( 'groups' );
23
JFilterOutput::objectHTMLSafe( $this->group, ENT_QUOTES, '' );
25
<script type="text/javascript">
26
window.addEvent('domready', function(){
27
new Sortables('.sortableList', {revert: true, onComplete : function(el){
28
var state = el.getParent().id == 'groupLayout';
29
el.getChildren().each(function(c){
30
setParams(c.id, state);
33
new Sortables('.sortableRow', {revert: true, onComplete : function(el){
34
var state = el.getParent().getParent().id == 'groupLayout';
35
setParams(el.id, state);
37
$ES('div[id^=plugin_params_]', $('plugin_params')).each(function(p){
38
if(p.style.display == 'none'){
39
setParams(p.id, false);
43
function setParams(id, state){
44
id = id.replace(/[^0-9]/gi, '');
45
var params = $('plugin_params_' + id) || false;
47
var disabled = state ? '' : 'disabled';
49
params.style.display = state ? 'block' : 'none';
50
$ES('input', params).each(function(input){
51
input.disabled = disabled;
53
$ES('select', params).each(function(input){
54
input.disabled = disabled;
56
$ES('textarea', params).each(function(input){
57
input.disabled = disabled;
61
function submitbutton(pressbutton) {
62
var form = document.adminForm, items = [];
63
// Serialize group layout
64
$('groupLayout').getChildren().each(function(el){
65
items.include(el.getChildren().map(function(o, i){
66
return o.id.replace(/[^0-9]/gi, '');
69
form.rows.value = items.join(';') || '';
71
for (var i=0; i<form.users.options.length; i++) {
72
form.users.options[i].selected = true;
75
if (pressbutton == "cancelEdit") {
76
submitform(pressbutton);
80
if (form.name.value == "") {
81
alert( "<?php echo JText::_( 'Group must have a name', true ); ?>" );
83
submitform(pressbutton);
87
<form action="index.php" method="post" name="adminForm">
88
<div class="col width-60">
89
<fieldset class="adminform">
90
<legend><?php echo JText::_( 'Details' ); ?></legend>
91
<table class="admintable">
93
<td width="100" class="key">
95
<?php echo JText::_( 'Name' ); ?>:
99
<?php if( $this->group->name == 'Default' ){
100
echo $this->group->name;
102
<input class="text_area" type="text" name="name" id="name" size="35" value="<?php echo $this->group->name; ?>" />
107
<td width="100" class="key">
109
<?php echo JText::_( 'Description' ); ?>:
113
<input class="text_area" type="text" name="description" id="description" size="80" value="<?php echo $this->group->description; ?>" />
117
<td valign="top" class="key">
118
<?php echo JText::_( 'Published' ); ?>:
121
<?php if( $this->group->name == 'Default' ){
122
echo JText::_('Enabled');
124
echo $this->lists['published'];
129
<td valign="top" class="key">
130
<?php echo JText::_( 'Priority' ); ?>:
133
<?php echo $this->lists['ordering']; ?>
137
<td valign="top" class="key">
138
<?php echo JText::_( 'Components' ); ?>:
141
<?php echo $this->lists['components']; ?>
142
<p><a onclick="javascript: jce.selectAll(document, 'components');" href="#"><span class="icon-add"><span class="icon-text"><?php echo JText::_('Add All');?></span></span></a>
143
<a onclick="javascript: jce.selectNone(document, 'components');" href="#"><span class="icon-remove"><span class="icon-text"><?php echo JText::_('Remove All');?></span></span></a></p>
147
<td valign="top" class="key">
148
<?php echo JText::_( 'Types' ); ?>:
151
<?php echo $this->lists['types']; ?>
152
<p><a onclick="javascript: jce.selectAll(document, 'types');" href="#"><span class="icon-add"><span class="icon-text"><?php echo JText::_('Add All');?></span></span></a>
153
<a onclick="javascript: jce.selectNone(document, 'types');" href="#"><span class="icon-remove"><span class="icon-text"><?php echo JText::_('Remove All');?></span></span></a></p>
157
<td valign="top" class="key">
158
<?php echo JText::_( 'Users' ); ?>:
161
<?php echo $this->lists['users']; ?>
162
<p><a class="modal" rel="{handler: 'iframe', size: {x: 750, y: 600}}" href="index.php?option=com_jce&tmpl=component&type=group&task=addusers"><span class="icon-add"><span class="icon-text"><?php echo JText::_('Add User');?></span></span></a>
163
<a onclick="javascript: jce.removeSelect(document, 'users');" href="#"><span class="icon-remove"><span class="icon-text"><?php echo JText::_('Remove User');?></span></span></a></p>
168
<fieldset class="adminform">
169
<legend><?php echo JText::_( 'GROUPS LAYOUT' ); ?></legend>
170
<table class="admintable">
171
<tr><td><?php echo JText::_( 'GROUPS LAYOUT DESC' ); ?></td></tr>
172
<tr><td><a class="modal" rel="{handler: 'iframe', size: {x: 750, y: 600}}" href="index.php?option=com_jce&tmpl=component&type=group&task=legend"><span class="icon-legend"><span class="icon-text"><?php echo JText::_('Icon Legend');?></span></span></a></td></tr>
176
<legend><?php echo JText::_( 'GROUP DEFAULT LAYOUT' ); ?></legend>
177
<div class="sortableList">
179
$rows = JCEGroupsHelper::getRowArray( $this->group->rows );
180
$width = $this->layout['width'] + 50;
181
for( $i=1; $i<=$this->layout['rows']; $i++ ){
183
<ul class="sortableRow" style="width:<?php echo $width;?>px">
185
foreach( $this->plugins as $icon ){
186
if( !in_array( $icon->id, explode( ',', implode( ',', $rows ) ) ) ){
187
if( $icon->layout && $icon->row == $i ){
188
$n = "row_li_" .$icon->id;
189
$path = $icon->type == 'command' ? '../plugins/editors/jce/tiny_mce/themes/advanced/img/'. $icon->layout .'.gif' : '../plugins/editors/jce/tiny_mce/plugins/'. $icon->name .'/img/'. $icon->layout .'.gif';
191
<li class="sortableItem" id="<?php echo $n;?>"><img src="<?php echo $path;?>" alt="<?php echo $icon->title;?>" title="<?php echo $icon->title;?>" /></li>
201
<legend><?php echo JText::_( 'EDITOR LAYOUT' ); ?></legend>
202
<div class="sortableList" id="groupLayout">
203
<?php $width = $this->layout['width'] + 50;
204
for( $i=1; $i<=count( $rows )+1; $i++ ){?>
205
<ul class="sortableRow" style="width:<?php echo $width;?>px">
207
for( $x=1; $x<=count( $rows ); $x++ ){
209
$icons = explode( ',', $rows[$x] );
210
foreach( $icons as $icon ){
211
foreach( $this->plugins as $button ){
212
if( $button->layout && $button->id == $icon ){
213
$n = "group_li_". $button->id;
214
$path = $button->type == 'command' ? '../plugins/editors/jce/tiny_mce/themes/advanced/img/'. $button->layout .'.gif' : '../plugins/editors/jce/tiny_mce/plugins/'. $button->name .'/img/'. $button->layout .'.gif';
216
<li class="sortableItem" id="<?php echo $n;?>"><img src="<?php echo $path;?>" alt="<?php echo $button->title;?>" title="<?php echo $button->title;?>" /></li>
231
<fieldset class="adminform">
232
<legend><?php echo JText::_( 'GROUPS OTHER PLUGINS' ); ?></legend>
233
<table class="admintable">
234
<tr><td colspan="2"><?php echo JText::_('GROUPS OTHER PLUGINS DESC');?></td></tr>
238
foreach( $this->plugins as $plugin ){
239
if( $plugin->layout == '' ){
240
if( $plugin->editable ){?>
242
<td><input type="checkbox" id="cb<?php echo $i;?>" name="pid[]" value="<?php echo $plugin->id;?>" onclick="isChecked(this.checked);setParams(this.value, this.checked);" <?php echo in_array( $plugin->id, explode( ',', $this->group->plugins ) ) ? 'checked="checked"' : '';?>/></td>
243
<td><?php echo $plugin->title;?></td>
247
<td><input type="checkbox" id="cb<?php echo $i;?>" name="pid[]" value="<?php echo $plugin->id;?>" onclick="isChecked(this.checked);" <?php echo in_array( $plugin->id, explode( ',', $this->group->plugins ) ) ? 'checked="checked"' : '';?>/></td>
248
<td><?php echo $plugin->title;?></td>
258
<div class="col width-40">
259
<div id="editor_params">
260
<fieldset class="adminform">
261
<legend><?php echo JText::_( 'Editor Parameters' ); ?></legend>
263
jimport('joomla.html.pane');
264
$pane =& JPane::getInstance('sliders');
265
echo $pane->startPane("group-pane-editor");
267
echo $pane->startPanel(JText :: _('Editor Setup'), "param-page");
268
if($output = $this->params->render('params', 'groups-editor')) :
271
echo "<div style=\"text-align: center; padding: 5px; \">".JText::_('There are no parameters for this item')."</div>";
273
echo $pane->endPanel();
274
echo $pane->startPanel(JText :: _('Editor Options'), "param-page");
275
if($output = $this->params->render('params', 'groups-options')) :
278
echo "<div style=\"text-align: center; padding: 5px; \">".JText::_('There are no parameters for this item')."</div>";
280
echo $pane->endPanel();
281
echo $pane->startPanel(JText :: _('Plugin Options'), "param-page");
282
if($output = $this->params->render('params', 'groups-plugins')) :
285
echo "<div style=\"text-align: center; padding: 5px; \">".JText::_('There are no parameters for this item')."</div>";
287
echo $pane->endPanel();
288
echo $pane->endPane();
292
<div id="plugin_params">
293
<fieldset class="adminform">
294
<legend><?php echo JText::_( 'Plugin Parameters' ); ?></legend>
296
foreach( $this->plugins as $plugin ){
297
if( $plugin->editable ){
298
jimport('joomla.filesystem.folder');
299
jimport('joomla.filesystem.file');
301
$path = JPATH_PLUGINS .DS. 'editors' .DS. 'jce' .DS. 'tiny_mce' .DS. 'plugins' .DS. $plugin->name;
302
$xmlPath = $path . DS . $plugin->name .'.xml';
303
$name = trim( $plugin->name );
304
$params = new JParameter( $this->group->params, $xmlPath );
306
// Load Language for plugin
307
$lang =& JFactory::getLanguage();
308
$lang->load( 'com_jce_' . trim( $name ), JPATH_SITE );
310
$display = in_array( $plugin->id, explode( ',', $this->group->plugins ) ) ? 'block' : 'none';
312
if( $params->getNumParams('standard') || $params->getNumParams('defaults')|| $params->getNumParams('access') || $params->getNumParams('advanced') ) {
314
<div id="plugin_params_<?php echo $plugin->id;?>" style="display:<?php echo $display;?>">
315
<fieldset class="adminform">
316
<legend><?php echo JText::_( $plugin->title ); ?></legend>
318
$pane =& JPane::getInstance('sliders');
319
echo $pane->startPane("group-pane-".$name);
320
if($params->getNumParams('standard')) {
321
if($output = $params->render('params', 'standard')){
322
echo $pane->startPanel(JText :: _('STANDARD'), $name."-standard-page");
324
echo $pane->endPanel();
327
if($params->getNumParams('defaults')) {
328
if($output = $params->render('params', 'defaults')){
329
echo $pane->startPanel(JText :: _('DEFAULTS'), $name."-defaults-page");
331
echo $pane->endPanel();
334
if($params->getNumParams('access')) {
335
if($output = $params->render('params', 'access')){
336
echo $pane->startPanel(JText :: _('PERMISSIONS'), $name."-access-page");
338
echo $pane->endPanel();
341
if($params->getNumParams('advanced')) {
342
if($output = $params->render('params', 'advanced')){
343
echo $pane->startPanel(JText :: _('ADVANCED'), $name."-advanced-page");
345
echo $pane->endPanel();
348
if( JFolder::exists( $path .DS. 'extensions' ) ){
349
$db =& JFactory::getDBO();
351
. ' FROM #__jce_extensions'
352
. ' WHERE published = 1'
353
. ' AND pid = '.(int) $plugin->id;
356
$db->setQuery( $query );
357
$extensions = $db->loadObjectList();
359
foreach( $extensions as $extension ){
360
// Load extension xml file
361
$file = $path .DS. 'extensions' .DS. $extension->folder .DS. $extension->extension . '.xml';
362
// Load extension language file
363
$lang =& JFactory::getLanguage();
364
$lang->load( 'com_jce_' . trim( $name ) . '_' . trim( $extension->extension ), JPATH_SITE );
366
if( JFile::exists( $file ) ){
367
$params = new JParameter( $this->group->params, $file );
368
if($params->getNumParams()) {
369
if($output = $params->render('params')){
370
echo $pane->startPanel(JText :: _( $extension->name ), $extension->extension."-extension-page");
372
echo $pane->endPanel();
378
echo $pane->endPane();
390
<div class="clr"></div>
391
<input type="hidden" name="option" value="com_jce" />
392
<input type="hidden" name="id" value="<?php echo $this->group->id; ?>" />
393
<input type="hidden" name="cid[]" value="<?php echo $this->group->id; ?>" />
394
<input type="hidden" name="boxchecked" value="0" />
395
<input type="hidden" name="rows" value="" />
396
<input type="hidden" name="type" value="group" />
397
<input type="hidden" name="task" value="" />
398
<?php echo JHTML::_( 'form.token' ); ?>
b'\\ No newline at end of file'