|
|
|
|
@ -418,6 +418,10 @@ if (EXPO.company){ |
|
|
|
|
if (data.success){ |
|
|
|
|
//todo: Назар должен возвращать json формат с url, именем каждого выбранного тега
|
|
|
|
|
// todo: сделать наполнение
|
|
|
|
|
for(var i=0; i < data.tags.length; i++){ |
|
|
|
|
this.$staticValue.html(''); |
|
|
|
|
this.$staticValue.append($("<a href='"+data.tags[i].url+"' target='_blank'>"+data.tags[i].text+"</a>")); |
|
|
|
|
} |
|
|
|
|
this.refreshState(); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
@ -425,12 +429,15 @@ if (EXPO.company){ |
|
|
|
|
this.ajaxPath = path; |
|
|
|
|
this.$input = $('#id_tag'); |
|
|
|
|
|
|
|
|
|
this.$initial = $(".initial-position",this.$wrapper); |
|
|
|
|
|
|
|
|
|
this.refreshState = function () { |
|
|
|
|
this.$label = $('.label', this.$editable); |
|
|
|
|
this.$initial = $(".initial-position",this.$wrapper); |
|
|
|
|
this.formId = this.$form.attr("id"); |
|
|
|
|
if( $.trim(this.$input.val()) == ''){ |
|
|
|
|
|
|
|
|
|
this.$form.detach().appendTo(this.$initial); |
|
|
|
|
this.$label.detach().appendTo(this.$initial); |
|
|
|
|
|
|
|
|
|
this.$initial.removeClass("hidden"); |
|
|
|
|
this.$description.addClass("hidden"); |
|
|
|
|
@ -438,6 +445,7 @@ if (EXPO.company){ |
|
|
|
|
}else{ |
|
|
|
|
if($('#'+this.formId, this.$editable).length < 0){ |
|
|
|
|
this.$form.detach().appendTo(this.$editable); |
|
|
|
|
this.$label.detach().appendTo(this.$editable); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
this.$editable.addClass("hidden"); |
|
|
|
|
|