Update jquery.fcbkcomplete.js

ofaj
jmontoyaa 10 years ago
parent bca586efc3
commit 60caa45049
  1. 5
      main/inc/ajax/extra_field.ajax.php
  2. 4
      main/inc/ajax/skill.ajax.php
  3. 2
      main/inc/lib/extra_field.lib.php
  4. 8
      main/inc/lib/extra_field_value.lib.php
  5. 1286
      main/inc/lib/javascript/tag/jquery.fcbkcomplete.js
  6. 54
      main/inc/lib/javascript/tag/jquery.fcbkcomplete.min.js
  7. 240
      main/inc/lib/javascript/tag/style.css
  8. 9
      main/inc/lib/usermanager.lib.php

@ -1,6 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\Tag;
require_once '../global.inc.php';
$action = isset($_GET['a']) ? $_GET['a'] : '';
@ -37,9 +39,10 @@ switch ($action) {
->getQuery()
->getResult();
/** @var Tag $tag */
foreach ($tags as $tag) {
$result[] = [
'caption' => $tag->getTag(),
'key' => $tag->getTag(),
'value' => $tag->getTag()
];
}

@ -40,7 +40,7 @@ switch ($action) {
$skills = $skill->find('all', array('where' => array('name LIKE %?% '=>$_REQUEST['tag'])));
$return_skills = array();
foreach ($skills as $skill) {
$skill['caption'] = $skill['name'];
$skill['key'] = $skill['name'];
$skill['value'] = $skill['id'];
$return_skills[] = $skill;
}
@ -68,7 +68,7 @@ switch ($action) {
$gradebooks = $gradebook->find('all', array('where' => array('name LIKE %?% ' => $_REQUEST['tag'])));
$return = array();
foreach ($gradebooks as $item) {
$item['caption'] = $item['name'];
$item['key'] = $item['name'];
$item['value'] = $item['id'];
$return[] = $item;
}

@ -1275,7 +1275,7 @@ EOF;
filter_hide: true,
complete_text:"$complete_text",
firstselected: false,
filter_selected: true,
filter_selected: true,
newel: true
});
EOF;

@ -2,6 +2,7 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\ExtraField as EntityExtraField;
use Chamilo\CoreBundle\Entity\Tag;
/**
* Class ExtraFieldValue
@ -156,15 +157,14 @@ class ExtraFieldValue extends Model
$tags = [];
foreach ($tagValues as $tagValue) {
$tagsResult = $em
->getRepository('ChamiloCoreBundle:Tag')
$tagsResult = $em->getRepository('ChamiloCoreBundle:Tag')
->findBy([
'tag' => $tagValue,
'fieldId' => $extraFieldInfo['id']
]);
if (empty($tagsResult)) {
$tag = new \Chamilo\CoreBundle\Entity\Tag();
$tag = new Tag();
$tag->setFieldId($extraFieldInfo['id']);
$tag->setTag($tagValue);
@ -173,7 +173,7 @@ class ExtraFieldValue extends Model
$tags = array_merge($tags, $tagsResult);
}
}
foreach ($tags as $tag) {
$tagUses = $em
->getRepository('ChamiloCoreBundle:ExtraFieldRelTag')

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -1,41 +1,53 @@
/* Copyright: Guillermo Rauch <http://devthought.com/> - Distributed under MIT - Keep this message! */
/* TextboxList sample CSS */
ul.holder {
overflow: hidden;
height: auto !important;
height: 1%;
}
ul.holder { margin: 0; border: 1px solid #999; overflow: hidden; height: auto !important; height: 1%; padding: 4px 5px 0; }
*:first-child+html ul.holder { padding-bottom: 2px; } * html ul.holder { padding-bottom: 2px; } /* ie7 and below */
ul.holder_simple li {
float: left;
list-style-type: none;
margin: 0 5px 4px 0;
white-space:nowrap;
}
ul.holder li { float: left; list-style-type: none; margin: 0 5px 4px 0; white-space:nowrap;}
ul.holder li.bit-box, ul.holder li.bit-input input { font: 11px "Lucida Grande", "Verdana"; }
ul.holder li.bit-box { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; border: 1px solid #CAD8F3; background: #DEE7F8; padding: 1px 5px 2px; }
ul.holder li.bit-box-focus { border-color: #598BEC; background: #598BEC; color: #fff; }
ul.holder li.bit-input input { width: auto; overflow:visible; margin: 0; border: 0px; outline: 0; padding: 3px 0px 2px; } /* no left/right padding here please */
ul.holder li.bit-input input.smallinput { width: 20px; }
/* Facebook demo CSS */
ul.holder { margin: 0 !important }
ul.holder li.bit-box, #apple-list ul.holder li.bit-box { padding-right: 15px; position: relative; z-index:1000;}
#apple-list ul.holder li.bit-input { margin: 0; }
#apple-list ul.holder li.bit-input input.smallinput { width: 5px; }
ul.holder li.bit-hover { background: #BBCEF1; border: 1px solid #6D95E0; }
ul.holder li.bit-box-focus { border-color: #598BEC; background: #598BEC; color: #fff; }
ul.holder li.bit-box a.closebutton { position: absolute; right: 4px; top: 5px; display: block; width: 7px; height: 7px; font-size: 1px; background: url('close.gif'); }
ul.holder li.bit-box a.closebutton:hover { background-position: 7px; }
ul.holder li.bit-box-focus a.closebutton, ul.holder li.bit-box-focus a.closebutton:hover { background-position: bottom; }
/* Autocompleter */
.facebook-auto { display: none; position: absolute; background: #eee; z-index:1001;}
.facebook-auto .select_all_items {display: block; float: right;}
.facebook-auto .default { padding: 5px 7px; border: 1px solid #ccc; border-width: 0 1px 1px;font-family:"Lucida Grande","Verdana"; font-size:11px; }
.facebook-auto ul { display: none; margin: 0; padding: 0; overflow: auto; position:absolute; z-index:9999}
.facebook-auto ul li { padding: 5px 12px; z-index: 1000; cursor: pointer; margin: 0; list-style-type: none; border: 1px solid #ccc; border-width: 0 1px 1px; font: 11px "Lucida Grande", "Verdana"; background-color: #eee }
.facebook-auto ul li em { font-weight: bold; font-style: normal; background: #ccc; }
.facebook-auto ul li.auto-focus { background: #4173CC; color: #fff; }
.facebook-auto ul li.auto-focus em { background: none; }
.deleted { background-color:#4173CC !important; color:#ffffff !important;}
.hidden { display:none;}
#demo ul.holder li.bit-input input { padding: 2px 0 1px; border: 1px solid #999; }
.ie6fix {height:1px;width:1px; position:absolute;top:0px;left:0px;z-index:1;}
/* change chamilo */
ul.holder li.bit-box,ul.holder li.bit-input input {
box-shadow:none
}
ul.holder_simple li.bit-box {
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
border:1px solid #C09853;
background:#FCF8E3;
padding:1px 5px 2px;
color:#333;
}
ul.holder_simple li.bit-box-focus {
border-color:#FCF8E3;
background:#FCF8E3;
}
ul.holder li.bit-input input {
width:auto;
overflow:visible;
margin:0;
border:1px solid #CCC;
border:1px solid #fff !important;
outline:0;
padding:3px 0 2px
}
@ -44,179 +56,13 @@ ul.holder li.bit-input input.smallinput {
width:20px
}
#add {
border:1px solid #999;
width:550px;
margin:50px;
padding:20px 30px 10px
}
form ol li {
list-style-type:none
}
form ol {
font:11px "Lucida Grande",Verdana;
margin:0;
padding:0
}
form ol li.input-text {
margin-bottom:10px;
list-style-type:none;
padding-bottom:10px
}
form ol li.input-text label {
font-weight:700;
cursor:pointer;
display:block;
font-size:13px;
margin-bottom:10px
}
form ol li.input-text input {
background-image:none;
width:500px;
padding:5px 5px 6px;
font:11px "Lucida Grande",Verdana;
border:1px solid #999
}
ul.holder input[type="text"]:focus,ul.holder input-text input[type="password"]:focus {
background-image:none;
}
form ul {
margin-left:0 !important;
margin-bottom: 0 !important;
}
ul.holder li.bit-box,#apple-list ul.holder li.bit-box {
padding-right:15px;
position:relative;
z-index:1000
}
#apple-list ul.holder li.bit-input {
margin:0
}
#apple-list ul.holder li.bit-input input.smallinput {
width:5px
}
ul.holder li.bit-hover {
background:#BBCEF1;
border:1px solid #6D95E0
}
ul.holder li.bit-box-focus {
border-color:#598BEC;
background:#598BEC;
color:#fff;
}
ul.holder li.bit-box a.closebutton {
position:absolute;
right:4px;
top:5px;
display:block;
width:7px;
height:7px;
font-size:1px;
background:url(close.gif)
}
ul.holder li.bit-box a.closebutton:hover {
background-position:7px
}
ul.holder li.bit-box-focus a.closebutton,ul.holder li.bit-box-focus a.closebutton:hover {
background-position:bottom
}
.facebook-auto {
z-index:2000;
display:none;
position:absolute;
background:#FCF8E3;
border: 1px solid #FBEED5;
margin-right: 1em;
}
.facebook-auto .default {
z-index:2000;
padding:5px 7px;
color:#C09853;
font-size:13px;
}
.facebook-auto ul {
display:none;
margin:0;
padding:0;
overflow:auto;
position:absolute;
z-index:9999 !important;
}
.facebook-auto ul li {
padding:5px 10px;
z-index:1000;
cursor:pointer;
margin:0;
list-style-type:none;
background:#FCF8E3;
border: 1px solid #FBEED5;
color: #666;
}
.facebook-auto ul li em {
color:#C09853;
font-weight: bold;
}
.facebook-auto ul li.auto-focus {
background:#F0F0F0;
color:#333;
}
.facebook-auto ul li.auto-focus em {
background:none
}
.deleted {
background-color:#4173CC!important;
color:#fff!important
}
.hidden {
display:none
}
#demo ul.holder li.bit-input input {
padding:2px 0 1px;
border:1px solid #999
}
.ie6fix {
height:1px;
width:1px;
position:absolute;
top:0;
left:0;
z-index:1
}
ul.holder_simple{
list-style: none;
margin:0;
height: auto !important;
width: 93%;
}
ul.border {
border: 1px dashed #cccccc;
padding: .5em 1em;
margin-top: 1em;
display: inline-block;
ul.holder li.bit-box {
width: 100% !important;
padding: 5px !important;
}

@ -3416,9 +3416,10 @@ class UserManager
/**
* Process the tag list comes from the UserManager::update_extra_field_value() function
* @param array the tag list that will be added
* @param int user id
* @param int field id
* @param array $tags the tag list that will be added
* @param int $user_id
* @param int $field_id
*
* @return bool
*/
public static function process_tags($tags, $user_id, $field_id)
@ -5247,5 +5248,5 @@ SQL;
return Display::tabsOnlyLink($headers, $optionSelected);
}
}
}

Loading…
Cancel
Save