1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Corrects wrapping buttons issue in admin and some LAN issues.

This commit is contained in:
Cameron
2013-02-27 00:44:58 -08:00
parent b1bc9c6a11
commit 4259b435f3
7 changed files with 39 additions and 17 deletions

View File

@@ -611,7 +611,7 @@ class media_admin_ui extends e_admin_ui
// protected $defaultOrder = 'desc';
protected $listOrder = 'm.media_id desc'; // show newest images first.
public $deleteConfirmScreen = true;
public $deleteConfirmMessage = 'You are about to delete %d records and <strong>ALL CORRESPONDING FILES</strong>! Please confirm to continue!';
public $deleteConfirmMessage = 'You are about to delete [x] records and <strong>ALL CORRESPONDING FILES</strong>! Please confirm to continue!';
//TODO - finish 'user' type, set 'data' to all editable fields, set 'noedit' for all non-editable fields
/*

View File

@@ -175,6 +175,8 @@ class news_cat_form_ui extends e_admin_form_ui
// Submitted News Area.

View File

@@ -4931,9 +4931,13 @@ class e_admin_form_ui extends e_form
$delcount = count($id_array);
if(!empty($controller->deleteConfirmMessage))
e107::getMessage()->addWarning(sprintf($controller->deleteConfirmMessage, $delcount));
{
e107::getMessage()->addWarning(str_replace("[x]","<b>".$delcount."</b>", $controller->deleteConfirmMessage));
}
else
e107::getMessage()->addWarning(sprintf(LAN_UI_DELETE_WARNING, $delcount));
{
e107::getMessage()->addWarning(str_replace("[x]","<b>".$delcount."</b>",LAN_UI_DELETE_WARNING));
}
$fieldsets['confirm'] = array(
'fieldset_pre' => '', // markup to be added before opening fieldset element
@@ -4946,7 +4950,7 @@ class e_admin_form_ui extends e_form
'table_rows' => '', // rows array (<td> tags)
'table_body' => '', // string body - used only if rows empty
'pre_triggers' => '',
'triggers' => array('hidden' => $this->hidden('etrigger_delete['.$ids.']', $ids), 'delete_confirm' => array(LAN_CONFDELETE, 'submit', $ids), 'cancel' => array(LAN_CANCEL, 'cancel')),
'triggers' => array('hidden' => $this->hidden('etrigger_delete['.$ids.']', $ids), 'delete_confirm' => array(LAN_CONFDELETE, 'confirm', $ids), 'cancel' => array(LAN_CANCEL, 'cancel')),
);
if($delcount > 1)
{

View File

@@ -1365,6 +1365,7 @@ class e_form
break;
case 'warning':
case 'confirm':
$options['class'] .= 'btn-warning';
break;
@@ -1880,6 +1881,7 @@ class e_form
$trclass = vartrue($fieldvalues['__trclass']) ? ' class="'.$trclass.'"' : '';
unset($fieldvalues['__trclass']);
foreach ($fieldarray as $field => $data)
{
// shouldn't happen...
@@ -1889,6 +1891,9 @@ class e_form
$field = $data['alias'];
}
//Not found
if((!varset($data['forced']) && !in_array($field, $currentlist)) || varset($data['nolist']))
{
@@ -1906,7 +1911,13 @@ class e_form
}
$tdclass = vartrue($data['class']);
if($field == 'checkboxes') $tdclass = $tdclass ? $tdclass.' autocheck e-pointer' : 'autocheck e-pointer';
if($field == 'options') $tdclass = $tdclass ? $tdclass.' options' : 'options';
// there is no other way for now - prepare user data
if('user' == vartrue($data['type']) /* && isset($data['readParms']['idField'])*/)
{
@@ -3480,9 +3491,11 @@ class e_form
}
// JUST A DRAFT - generic renderForm solution
/*
/**
* Generic renderForm solution
* @param @forms
* @param @nocontainer
*/
function renderForm($forms, $nocontainer = false)
{
$text = '';
@@ -3518,9 +3531,10 @@ class e_form
}
return $text;
}
/**
* Generic renderFieldset solution, will be split to renderTable, renderCol/Row/Box etc - Still in use.
*/
// JUST A DRAFT - generic renderFieldset solution, will be split to renderTable, renderCol/Row/Box etc
/*
function renderFieldset($id, $fdata)
{
$colgroup = '';
@@ -3618,7 +3632,7 @@ class e_form
";
return $text;
}
*/
// The 2 functions below are for demonstration purposes only, and may be moved/modified before release.
/*
function filterType($fieldarray)

View File

@@ -174,8 +174,8 @@ class news {
$data['data']['news_id'] = $news['news_id'];
e107::getEvent()->trigger('newsupd', $data['data']);
$message = LAN_NEWS_21;
$emessage->add(LAN_NEWS_21, E_MESSAGE_SUCCESS, $smessages);
$message = LAN_UPDATED;
$emessage->add(LAN_UPDATED, E_MESSAGE_SUCCESS, $smessages);
e107::getCache()->clear('news.php');

View File

@@ -374,7 +374,7 @@ define("LAN_UI_EDIT_LABEL", "Update record #%1$s");
define("LAN_UI_CREATE_LABEL", "Create new record");
define("LAN_UI_PREF_LABEL", "Settings");
define("LAN_UI_DELETE_LABEL", "Confirm Delete");
define("LAN_UI_DELETE_WARNING", "You are about to delete <strong>%1$d</strong> records. Please confirm to continue.");
define("LAN_UI_DELETE_WARNING", "You are about to delete [x] records. Please confirm to continue.");
define("LAN_UI_BATCH_CREATELINK", "Create Link");
define("LAN_USER_MANAGEALL", "Manage all User, Userclass and Extended User-Field settings");

View File

@@ -734,6 +734,8 @@ i.searchquery {
.tab-pane table.adminform td { border-top:0px}
.tab-pane table.adminform tr { border-bottom:1px solid #DDDDDD}
.table .options { white-space:nowrap }
/****************************************************************/