mirror of
https://github.com/e107inc/e107.git
synced 2025-03-13 17:09:46 +01:00
Tag styling and admin-ui type='tags' added.
This commit is contained in:
parent
3096bd2b6c
commit
196aed907e
@ -166,7 +166,8 @@ class e_form
|
||||
function tags($name, $value, $maxlength = 200, $options = array())
|
||||
{
|
||||
if(is_string($options)) parse_str($options, $options);
|
||||
$options['class'] = 'tbox input-text e-tags';
|
||||
$options['class'] = 'tbox span1 e-tags';
|
||||
$options['size'] = 7;
|
||||
return $this->text($name, $value, $maxlength, $options);
|
||||
}
|
||||
|
||||
@ -2337,6 +2338,7 @@ class e_form
|
||||
$value = vartrue($attributes['writeParms']['__options']['pre']).vartrue($attributes['writeParms'][$value]).vartrue($attributes['writeParms']['__options']['post']);
|
||||
break;
|
||||
|
||||
case 'tags':
|
||||
case 'text':
|
||||
|
||||
if(vartrue($parms['truncate']))
|
||||
@ -2773,6 +2775,10 @@ class e_form
|
||||
unset($parms['maxlength']);
|
||||
$ret = vartrue($parms['pre']).$this->text($key, $value, $maxlength, $parms).vartrue($parms['post']); // vartrue($parms['__options']) is limited. See 'required'=>true
|
||||
break;
|
||||
|
||||
case 'tags':
|
||||
$ret = vartrue($parms['pre']).$this->tags($key, $value, $maxlength, $parms).vartrue($parms['post']); // vartrue($parms['__options']) is limited. See 'required'=>true
|
||||
break;
|
||||
|
||||
case 'textarea':
|
||||
$text = "";
|
||||
|
@ -182,11 +182,11 @@ class faq_main_ui extends e_admin_ui
|
||||
protected $fields = array(
|
||||
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||
'faq_id' => array('title'=> LAN_ID, 'tab' => 0, 'type' => 'int', 'width' =>'5%', 'forced'=> TRUE),
|
||||
'faq_question' => array('title'=> LANA_FAQ_QUESTION, 'tab' => 0, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first', 'required'=>TRUE, 'readParms'=>'editable=1'),
|
||||
'faq_question' => array('title'=> LANA_FAQ_QUESTION, 'tab' => 0, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first', 'required'=>TRUE, 'readParms'=>'editable=1', 'writeParms'=>'size=xxlarge'),
|
||||
'faq_answer' => array('title'=> LANA_FAQ_ANSWER, 'tab' => 0, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=1&truncate=50&bb=1'),
|
||||
'faq_parent' => array('title'=> LAN_CATEGORY, 'tab' => 0, 'type' => 'dropdown', 'data'=> 'int', 'inline'=>true,'width' => '10%', 'filter'=>TRUE, 'batch'=>TRUE),
|
||||
|
||||
'faq_tags' => array('title'=> LANA_FAQ_TAGS, 'tab' => 1, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'inline'=> true, 'help' => LANA_FAQ_TAGS_HELP), // User id
|
||||
'faq_tags' => array('title'=> LANA_FAQ_TAGS, 'tab' => 1, 'type' => 'tags', 'data' => 'str', 'width' => 'auto', 'inline'=> true, 'help' => LANA_FAQ_TAGS_HELP), // User id
|
||||
'faq_comment' => array('title'=> LANA_FAQ_COMMENT, 'tab' => 1, 'type' => 'userclass', 'data' => 'int', 'width' => 'auto', 'inline'=> true), // User id
|
||||
|
||||
'faq_datestamp' => array('title'=> LAN_DATE, 'tab' => 1, 'type' => 'datestamp', 'data'=> 'int','width' => 'auto', 'noedit' => false,'writeParms'=>'auto=1'),
|
||||
|
@ -761,6 +761,13 @@ ul#e-latest li a:hover { text-decoration: none; }
|
||||
/* Bootstrap tags */
|
||||
.tags {
|
||||
display: inline-block;
|
||||
margin-bottom:0px;
|
||||
max-width:640px;
|
||||
}
|
||||
|
||||
.tags input {
|
||||
margin-bottom: 0px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.tag {
|
||||
@ -770,7 +777,7 @@ ul#e-latest li a:hover { text-decoration: none; }
|
||||
margin-left: 0;
|
||||
vertical-align:top;
|
||||
margin-top:3px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
span.tag button.close {
|
||||
|
2
e107_web/js/bootstrap-tag/bootstrap-tag.js
vendored
2
e107_web/js/bootstrap-tag/bootstrap-tag.js
vendored
@ -38,7 +38,7 @@
|
||||
|
||||
that.element.parent().prepend(that.element.detach().attr('type', 'hidden'))
|
||||
that.element
|
||||
.wrap($('<div class="tags">'))
|
||||
.wrap($('<div class="tags well well-small">'))
|
||||
.parent()
|
||||
.on('click', function () {
|
||||
that.input.focus()
|
||||
|
Loading…
x
Reference in New Issue
Block a user