1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

GUI fixes for the list-new plugin.

This commit is contained in:
Cameron 2012-11-27 23:04:52 -08:00
parent 597c8c1a1b
commit e2c2c48511
6 changed files with 36 additions and 23 deletions

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: plugin.xml,v 1.27 2009-10-22 04:14:45 e107coders Exp $ -->
<e107Plugin name="Forum" version="2.0" date="2012-08-01" compatibility="2.0" installRequired="true">
<author name="e107 Inc." url="http://e107.org" />
<description>This plugin is a fully featured Forum system</description>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: plugin.xml,v 1.7 2009-10-20 03:49:22 e107coders Exp $ -->
<e107Plugin name="LWLANINS_1" version="1.1" date="2012-08-01" compatibility="2.0" installRequired="true" >
<e107Plugin name="Linkwords" lang="LWLANINS_1" version="1.1" date="2012-08-01" compatibility="2.0" installRequired="true" >
<author name="e107 Inc." url="http://e107.org" />
<description>This plugin will link specified words with a defined link and/or tooltip</description>
<category>content</category>
<languageFiles>
<file type='log' path='languages/--LAN--_admin_linkwords.php' />
</languageFiles>

View File

@ -32,14 +32,14 @@ if(!getperms("1") || !plugInstalled('list_new'))
require_once(e_ADMIN."auth.php");
require_once(e_HANDLER."form_handler.php");
$rs = new form;
require_once(e_HANDLER."file_class.php");
$fl = new e_file;
$fl = e107::getFile();
require_once(e_PLUGIN."list_new/list_class.php");
$rc = new listclass('admin');
//get all sections to use (and reload if new e_list.php files are added)
$rc->getSections();
$mes = e107::getMessage();
//update preferences in database
if(isset($_POST['update_menu']))
@ -55,13 +55,14 @@ if(isset($message))
{
$MESSAGE = $message;
$t = preg_replace("/\{(.*?)\}/e", '$\1', $rc->template['ADMIN_MESSAGE']);
$rc->e107->ns->tablerender('', $t);
$mes->addInfo($message);
//$rc->e107->ns->tablerender('', $t);
}
//display admin page
$text = $rc->admin->display();
$rc->e107->ns->tablerender(LIST_ADMIN_1, $text);
$rc->e107->ns->tablerender(LIST_ADMIN_1, $mes->render(). $text);
/**
* Display admin menu

View File

@ -169,19 +169,30 @@ class list_admin
$this->row['CONTID'] = "list-new-{$type}-expandable-icon";
$this->row['FIELD'] = $this->parseTemplate('FIELD_TABLE_START');
$iconlist = $fl->get_files($this->parent->plugin_dir."images/");
$frm = e107::getForm();
for($i=0;$i<count($this->parent->sections);$i++)
{
$name = $this->parent->sections[$i]."_".$type."_icon";
$curVal = $this->parent->list_pref[$this->parent->sections[$i]."_".$type."_icon"];
$this->row['FIELD_TITLE'] = $this->parent->titles[$i];
$this->row['FIELD_ITEM'] = $rs->form_text($this->parent->sections[$i]."_".$type."_icon", 15, $this->parent->list_pref[$this->parent->sections[$i]."_".$type."_icon"], 100)."
<input class='button' type='button' style='cursor:pointer' size='30' value='".LIST_ADMIN_12."' onclick=\"e107Helper.toggle('div_".$this->parent->sections[$i]."_".$type."_icon'); return false;\" />
<div id='div_".$this->parent->sections[$i]."_".$type."_icon' style='display:none;'>";
foreach($iconlist as $icon)
{
$this->row['FIELD_ITEM'] .= "<a href=\"javascript:insertext('".$icon['fname']."','".$this->parent->sections[$i]."_".$type."_icon','div_".$this->parent->sections[$i]."_".$type."_icon')\"><img src='".$icon['path'].$icon['fname']."' alt='' /></a> ";
}
$this->row['FIELD_ITEM'] .= "</div>";
$this->row['FIELD_ITEM'] = $frm->iconpicker($name,$curVal);
// $this->row['FIELD_ITEM'] = $frm->iconpicker($this->parent->sections[$i]."_".$type."_icon",$this->parent->list_pref[$this->parent->sections[$i]."_".$type."_icon"]).
// $this->row['FIELD_ITEM'] = $rs->form_text($this->parent->sections[$i]."_".$type."_icon", 15, $this->parent->list_pref[$this->parent->sections[$i]."_".$type."_icon"], 100)."
// <input class='button' type='button' style='cursor:pointer' size='30' value='".LIST_ADMIN_12."' onclick=\"e107Helper.toggle('div_".$this->parent->sections[$i]."_".$type."_icon'); return false;\" />
// $this->row['FIELD_ITEM'] .= div id='div_".$this->parent->sections[$i]."_".$type."_icon' style='display:none;'>";
// foreach($iconlist as $icon)
// {
// $this->row['FIELD_ITEM'] .= "<a href=\"javascript:insertext('".$icon['fname']."','".$this->parent->sections[$i]."_".$type."_icon','div_".$this->parent->sections[$i]."_".$type."_icon')\"><img src='".$icon['path'].$icon['fname']."' alt='' /></a> ";
// }
// $this->row['FIELD_ITEM'] .= "</div>";
$this->row['FIELD'] .= $this->parseTemplate('FIELD_TABLE');
}
$this->row['FIELD'] .= $this->parseTemplate('FIELD_TABLE_END');
$text .= $this->parseTemplate('TOPIC_ROW');
@ -528,9 +539,11 @@ class list_admin
function pref_submit()
{
global $rs;
$frm = e107::getForm();
$this->row['TOPIC'] = LIST_ADMIN_11;
$this->row['FIELD'] = $rs->form_button("submit", 'update_menu', LIST_ADMIN_2);
$this->row['FIELD'] = $frm->admin_button('update_menu',LIST_ADMIN_2,'update'); // $rs->form_button("submit", 'update_menu', LIST_ADMIN_2);
return "<tr><td class='buttons-bar center' colspan='2'>".$frm->admin_button('update_menu',LIST_ADMIN_2,'update')."</td></tr>";
return $this->parseTemplate('TOPIC_ROW_NOEXPAND');
}
}

View File

@ -144,12 +144,12 @@ $TEMPLATE_LIST_NEW['TOPIC_ROW'] = "
</tr>";
//field containing a table
$TEMPLATE_LIST_NEW['FIELD_TABLE_START'] = "<table style='width:90%; border:1px solid #444; border-collapse:collapse;' cellpadding='0' cellspacing='0'>";
$TEMPLATE_LIST_NEW['FIELD_TABLE_START'] = "<table class='table adminlist'>";
$TEMPLATE_LIST_NEW['FIELD_TABLE'] = "
<tr>
<td class='forumheader3' style='width:10%; white-space:nowrap; vertical-align:top;'>{FIELD_TITLE}</td>
<td class='forumheader3'>{FIELD_ITEM}</td>
<td style='width:10%; white-space:nowrap; vertical-align:top;'>{FIELD_TITLE}</td>
<td>{FIELD_ITEM}</td>
</tr>";
$TEMPLATE_LIST_NEW['FIELD_TABLE_END'] = "</table>";
@ -157,7 +157,7 @@ $TEMPLATE_LIST_NEW['FIELD_TABLE_END'] = "</table>";
//header for options page
$TEMPLATE_LIST_NEW['OPTIONS_HEADER'] = "
<div id='{ID}' class='e-hideme center'>
<table style='".ADMIN_WIDTH."' class='fborder'>
<table class='table adminlist'>
<tr><td colspan='4' class='forumheader'>{TITLE}</td></tr>";
//template for spacer row
@ -166,7 +166,7 @@ $TEMPLATE_LIST_NEW['TOPIC_ROW_SPACER'] = "<tr><td style='border:0; height:20px;'
$TEMPLATE_LIST_NEW['TOPIC_TABLE_START'] = "
<div style='text-align:center;'>
<form method='post' action='".e_SELF."' name='menu_conf_form' id='menu_conf_form' enctype='multipart/form-data'>
<table style='".ADMIN_WIDTH."' class='fborder'>";
<table class='table adminlist'>";
$TEMPLATE_LIST_NEW['TOPIC_TABLE_END'] = "{SUBMIT}</table></div>";

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: plugin.xml,v 1.10 2009-10-22 04:14:45 e107coders Exp $ -->
<e107Plugin name="List Latest" lang="LIST_PLUGIN_1" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
<author name="e107 Inc." url="http://e107.org" />
<description lang="LIST_PLUGIN_2">This plugin allows you to view a list of recent additions in all e107 categories. You can either view the list with data since your last visit, or view a general latest additions list. Besides the page a menu is also present. Every section is configurable in the admin area.</description>
<category>content</category>
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
<languageFiles>
<file type='log' path='languages/--LAN--_admin_list_new.php' />