mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Admin-UI: Improved styling options for inline editing on boolean elements.
This commit is contained in:
@@ -2745,7 +2745,7 @@ class e_form
|
|||||||
|
|
||||||
$text = "<a class='e-tip e-editable editable-click' data-name='".$dbField."' ";
|
$text = "<a class='e-tip e-editable editable-click' data-name='".$dbField."' ";
|
||||||
$text .= (is_array($array)) ? "data-source=\"".$source."\" " : "";
|
$text .= (is_array($array)) ? "data-source=\"".$source."\" " : "";
|
||||||
$text .= " title=\"".LAN_EDIT." ".$fieldName."\" data-type='".$type."' data-value=\"{$curVal}\" data-pk='".$pid."' data-url='".e_SELF."?mode={$mode}&action=inline&id={$pid}&ajax_used=1' href='#'>".$linkText."</a>";
|
$text .= " title=\"".LAN_EDIT." ".$fieldName."\" data-type='".$type."' data-inputclass='x-editable-".$this->name2id($dbField)."' data-value=\"{$curVal}\" data-pk='".$pid."' data-url='".e_SELF."?mode={$mode}&action=inline&id={$pid}&ajax_used=1' href='#'>".$linkText."</a>";
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
@@ -3297,12 +3297,21 @@ class e_form
|
|||||||
|
|
||||||
if(!vartrue($attributes['noedit']) && vartrue($parms['editable']) && !vartrue($parms['link'])) // avoid bad markup, better solution coming up
|
if(!vartrue($attributes['noedit']) && vartrue($parms['editable']) && !vartrue($parms['link'])) // avoid bad markup, better solution coming up
|
||||||
{
|
{
|
||||||
|
if(isset($parms['false'])) // custom representation for 'false'. (supports font-awesome when set by css)
|
||||||
|
{
|
||||||
|
$false = $parms['false'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$false = ($value === '') ? "□" : "✗";
|
||||||
|
}
|
||||||
|
|
||||||
|
$true = varset($parms['true'],'✓'); // custom representation for 'true'. (supports font-awesome when set by css)
|
||||||
|
|
||||||
$false = ($value === '') ? "□" : "✗";
|
|
||||||
|
|
||||||
$value = intval($value);
|
$value = intval($value);
|
||||||
|
|
||||||
$wparms = (vartrue($parms['reverse'])) ? array(0=>'✓', 1=>$false) : array(0=>$false, 1=>'✓'); //TODO LAN
|
$wparms = (vartrue($parms['reverse'])) ? array(0=>$true, 1=>$false) : array(0=>$false, 1=>$true);
|
||||||
$dispValue = $wparms[$value];
|
$dispValue = $wparms[$value];
|
||||||
|
|
||||||
return $this->renderInline($field, $id, $attributes['title'], $value, $dispValue, 'select', $wparms);
|
return $this->renderInline($field, $id, $attributes['title'], $value, $dispValue, 'select', $wparms);
|
||||||
|
@@ -499,6 +499,15 @@ class e_session
|
|||||||
{
|
{
|
||||||
return session_id();
|
return session_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve current session save method.
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getSaveMethod()
|
||||||
|
{
|
||||||
|
return $this->_sessionSaveMethod;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set new session name
|
* Set new session name
|
||||||
|
Reference in New Issue
Block a user