mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 11:20:25 +02:00
Some more menu-manager refinements
This commit is contained in:
@@ -140,7 +140,8 @@ if(strpos(e_QUERY, 'configure') !== FALSE || vartrue($_GET['enc']))
|
||||
|
||||
|
||||
e107::css('inline'," .column { width:100%; padding-bottom: 100px; }
|
||||
.regularMenu { border:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px }
|
||||
|
||||
.regularMenu { border-bottom:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px }
|
||||
|
||||
.portlet { margin: 0 1em 1em 0; }
|
||||
.portlet-header { margin: 0.3em; padding-bottom: 4px; padding-left: 0.2em; cursor:move }
|
||||
|
@@ -901,18 +901,13 @@ class e_form
|
||||
|
||||
$text = "";
|
||||
|
||||
if(vartrue($options['label'])) // Bootstrap compatible markup
|
||||
{
|
||||
$text .= "<label class='checkbox'>";
|
||||
}
|
||||
$pre = (vartrue($options['label'])) ? "<label class='checkbox'>" : ""; // Bootstrap compatible markup
|
||||
$post = (vartrue($options['label'])) ? $options['label']."</label>" : "";
|
||||
unset($options['label']); // not to be used as attribute;
|
||||
|
||||
$text .= "<input type='checkbox' name='{$name}' value='{$value}'".$this->get_attributes($options, $name, $value)." />";
|
||||
|
||||
if(vartrue($options['label']))
|
||||
{
|
||||
$text .= $options['label']."</label>";
|
||||
}
|
||||
return $text;
|
||||
return $pre.$text.$post;
|
||||
}
|
||||
|
||||
function checkbox_label($label_title, $name, $value, $checked = false, $options = array())
|
||||
@@ -981,8 +976,23 @@ class e_form
|
||||
return $this->_uc->uc_get_classname($classnum);
|
||||
}
|
||||
|
||||
/**
|
||||
* A Radio Button Form Element
|
||||
* @param $name
|
||||
* @param @value array pair-values|string - auto-detected.
|
||||
* @param $checked boolean
|
||||
* @param $options
|
||||
*/
|
||||
function radio($name, $value, $checked = false, $options = array())
|
||||
{
|
||||
|
||||
if(!is_array($options)) parse_str($options, $options);
|
||||
|
||||
if(is_array($value))
|
||||
{
|
||||
return $this->radio_multi($name, $value, $checked, $options);
|
||||
}
|
||||
|
||||
$options = $this->format_options('radio', $name, $options);
|
||||
$options['checked'] = $checked; //comes as separate argument just for convenience
|
||||
// $options['class'] = 'inline';
|
||||
@@ -1042,6 +1052,7 @@ class e_form
|
||||
|
||||
|
||||
/**
|
||||
* XXX INTERNAL ONLY - Use radio() with the 'multiple=1' option instead of using this directly.
|
||||
* @param string $name
|
||||
* @param array $elements = arrays value => label
|
||||
* @param string/integer $checked = current value
|
||||
@@ -1050,6 +1061,9 @@ class e_form
|
||||
*/
|
||||
function radio_multi($name, $elements, $checked, $multi_line = false, $help = null)
|
||||
{
|
||||
|
||||
|
||||
|
||||
/* // Bootstrap Test.
|
||||
return' <label class="checkbox">
|
||||
<input type="checkbox" value="">
|
||||
@@ -1087,7 +1101,7 @@ class e_form
|
||||
return implode(" ", $text);
|
||||
|
||||
// return implode("\n", $text);
|
||||
return "<div class='field-spacer haa'>".implode("</div><div class='field-spacer'>", $text)."</div>";
|
||||
return "<div class='field-spacer'>".implode("</div><div class='field-spacer'>", $text)."</div>";
|
||||
|
||||
}
|
||||
|
||||
|
@@ -1229,6 +1229,7 @@ class e_menuManager {
|
||||
|
||||
function menuRenderMenu($row,$menu_count,$rep = FALSE)
|
||||
{
|
||||
|
||||
global $rs,$menu,$menu_info,$menu_act, $style;
|
||||
$ns = e107::getRender();
|
||||
|
||||
@@ -1335,7 +1336,7 @@ class e_menuManager {
|
||||
$text .= '<a title="'.LAN_DELETE.'" id="remove-'.$menu_id.'-'.$menu_location.'" class="e-tip delete e-menumanager-delete menu-btn" href="'.e_SELF.'?configure='.$this->curLayout.'&mode=deac&id='.$menu_id.'">'.ADMIN_DELETE_ICON.'</a>
|
||||
|
||||
<span id="status-'.$menu_id.'" style="display:none">'.($rep == true ? "" : "insert").'</span>
|
||||
<span></div>';
|
||||
</span></div>';
|
||||
|
||||
$text .= ($rep == true) ? "</div>" : "";
|
||||
|
||||
|
Reference in New Issue
Block a user