Commit 53caf8e5 authored by Clément Damiens's avatar Clément Damiens

add project mention + hotfix design
parent a0c007cd
......@@ -2598,40 +2598,43 @@ var mentionsInit = {
data = _.filter(data, function(item) { return item.name.toLowerCase().indexOf(query.toLowerCase()) > -1 });
callback.call(this, data);
mentionsInit.isSearching=true;
var search = {"search" : query};
var search = {"searchType" : ["citoyens","organizations","projects"]};
$.ajax({
type: "POST",
url: baseUrl+"/"+moduleId+"/search/searchmemberautocomplete",
url: baseUrl+"/"+moduleId+"/search/globalautocomplete",
data: search,
dataType: "json",
success: function(retdata){
if(!retdata){
toastr.error(retdata.content);
}else{
//mylog.log(retdata);
mylog.log(retdata);
data = [];
for(var key in retdata){
for (var id in retdata[key]){
//for(var key in retdata){
// for (var id in retdata[key]){
$.each(retdata, function (e, value){
avatar="";
console.log(retdata[key]);
if(retdata[key][id].profilThumbImageUrl!="")
avatar = baseUrl+retdata[key][id].profilThumbImageUrl;
//console.log(retdata[key]);
//aert(retdata[key][id].type);
if(typeof value.profilThumbImageUrl != "undefined" && value.profilThumbImageUrl!="")
avatar = baseUrl+value.profilThumbImageUrl;
object = new Object;
object.id = id;
object.name = retdata[key][id].name;
object.slug = retdata[key][id].slug;
object.id = e;
object.name = value.name;
object.slug = value.slug;
object.avatar = avatar;
object.type = key;
object.type = value.type;
var findInLocal = _.findWhere(mentionsContact, {
name: retdata[key][id].name,
type: key
name: value.name,
type: value.type
});
if(typeof(findInLocal) == "undefined")
mentionsContact.push(object);
}
}
// }
//}
});
data=mentionsContact;
//mylog.log(data);
mylog.log(data);
data = _.filter(data, function(item) { return item.name.toLowerCase().indexOf(query.toLowerCase()) > -1 });
callback.call(this, data);
mylog.log(callback);
......
......@@ -165,8 +165,8 @@
}
.mentions-input-box .mentions{
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
left: 5px !important;
top: 1px !important;
/*left: 5px !important;
top: 1px !important;*/
padding:0 !important;
}
.updateMention .mentions-input-box .mentions{
......
......@@ -73,7 +73,6 @@ HtmlHelper::registerCssAndScriptsFiles( $cssAnsScriptFilesModule ,Yii::app()->re
#get_url{
min-height:100px!important;
padding:0px;
margin: 5px;
}
.get_url_input {
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment