|
|
|
|
@ -123,12 +123,12 @@ |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div id="portfolio-modal" class="modal fade"> |
|
|
|
|
<div class="modal-dialog"> |
|
|
|
|
<div class="modal-dialog" style="width:900px;"> |
|
|
|
|
<div class="modal-content"> |
|
|
|
|
<div class="modal-header"> |
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">× |
|
|
|
|
</button> |
|
|
|
|
<h4 class="modal-title" >Добавить портфолио</h4> |
|
|
|
|
<h4 class="modal-title">Добавить портфолио</h4> |
|
|
|
|
</div> |
|
|
|
|
{% include 'portfolio_create_form.html' %} |
|
|
|
|
</div> |
|
|
|
|
@ -149,9 +149,9 @@ |
|
|
|
|
<p>{{ p.name }}</p> |
|
|
|
|
<div class="buttonsImg" disTab> |
|
|
|
|
<a href="{% url 'projects:contractor-portfolio-edit' p.pk %}"> |
|
|
|
|
<div class="insetBI insetBI1"> |
|
|
|
|
<i class="fa fa-pencil"></i> |
|
|
|
|
</div> |
|
|
|
|
<div class="insetBI insetBI1"> |
|
|
|
|
<i class="fa fa-pencil"></i> |
|
|
|
|
</div> |
|
|
|
|
</a> |
|
|
|
|
<div class="insetBI insetBI2"> |
|
|
|
|
<i class="fa fa-times"></i> |
|
|
|
|
@ -177,7 +177,7 @@ |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
<div id="worksell-modal" class="modal fade"> |
|
|
|
|
<div class="modal-dialog"> |
|
|
|
|
<div class="modal-dialog" style="width: 900px;"> |
|
|
|
|
<div class="modal-content"> |
|
|
|
|
<div class="modal-header"> |
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">× |
|
|
|
|
@ -249,10 +249,11 @@ |
|
|
|
|
<div class="top-summary"> |
|
|
|
|
<p class="name-summ">{{ user.get_full_name }}</p> |
|
|
|
|
{% if contractor.contractor_resume.resume_file.url %} |
|
|
|
|
<a href="{{ contractor.contractor_resume.resume_file.url }}" class="download-summ">скачать резюме</a> |
|
|
|
|
<a href="{{ contractor.contractor_resume.resume_file.url }}" |
|
|
|
|
class="download-summ">скачать резюме</a> |
|
|
|
|
{% endif %} |
|
|
|
|
<p class="who-summ"> |
|
|
|
|
{# Мужчина, 24 года, {{ user.date_of_birth }}#} |
|
|
|
|
{# Мужчина, 24 года, {{ user.date_of_birth }}#} |
|
|
|
|
</p> |
|
|
|
|
<div class="list-summ-block"> |
|
|
|
|
<div class="col-lg-4"> |
|
|
|
|
@ -294,27 +295,28 @@ |
|
|
|
|
</div> |
|
|
|
|
<div class="galleryWork2 gal-iss disTab"> |
|
|
|
|
|
|
|
|
|
{% for diplom in resume_diploms %} |
|
|
|
|
<div class="col-lg-4"> |
|
|
|
|
<div class="insetCol box-sizing disTab"> |
|
|
|
|
{% thumbnail diplom.img "210x334" crop="center" as im %} |
|
|
|
|
<div class="imgGal" style="background: url('{{ im.url }}') no-repeat center;"> |
|
|
|
|
<div class="imgFigure"></div> |
|
|
|
|
{% for diplom in resume_diploms %} |
|
|
|
|
<div class="col-lg-4"> |
|
|
|
|
<div class="insetCol box-sizing disTab"> |
|
|
|
|
{% thumbnail diplom.img "210x334" crop="center" as im %} |
|
|
|
|
<div class="imgGal" |
|
|
|
|
style="background: url('{{ im.url }}') no-repeat center;"> |
|
|
|
|
<div class="imgFigure"></div> |
|
|
|
|
</div> |
|
|
|
|
{% endthumbnail %} |
|
|
|
|
</div> |
|
|
|
|
{% endthumbnail %} |
|
|
|
|
</div> |
|
|
|
|
<div class="insetCol2 box-sizing disTab"> |
|
|
|
|
<p> |
|
|
|
|
{{ diplom.title }} |
|
|
|
|
</p> |
|
|
|
|
<div class="buttonsImg" distab=""> |
|
|
|
|
<div class="insetBI insetBI2"> |
|
|
|
|
<i class="fa fa-times"></i> |
|
|
|
|
<div class="insetCol2 box-sizing disTab"> |
|
|
|
|
<p> |
|
|
|
|
{{ diplom.title }} |
|
|
|
|
</p> |
|
|
|
|
<div class="buttonsImg" distab=""> |
|
|
|
|
<div class="insetBI insetBI2"> |
|
|
|
|
<i class="fa fa-times"></i> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{% endfor %} |
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
@ -327,27 +329,28 @@ |
|
|
|
|
</div> |
|
|
|
|
<div class="galleryWork2 gal-iss disTab"> |
|
|
|
|
|
|
|
|
|
{% for cro in resume_cro %} |
|
|
|
|
<div class="col-lg-4"> |
|
|
|
|
<div class="insetCol box-sizing disTab"> |
|
|
|
|
{% thumbnail cro.img "210x334" crop="center" as im %} |
|
|
|
|
<div class="imgGal" style="background: url('{{ im.url }}') no-repeat center;"> |
|
|
|
|
<div class="imgFigure"></div> |
|
|
|
|
{% for cro in resume_cro %} |
|
|
|
|
<div class="col-lg-4"> |
|
|
|
|
<div class="insetCol box-sizing disTab"> |
|
|
|
|
{% thumbnail cro.img "210x334" crop="center" as im %} |
|
|
|
|
<div class="imgGal" |
|
|
|
|
style="background: url('{{ im.url }}') no-repeat center;"> |
|
|
|
|
<div class="imgFigure"></div> |
|
|
|
|
</div> |
|
|
|
|
{% endthumbnail %} |
|
|
|
|
</div> |
|
|
|
|
{% endthumbnail %} |
|
|
|
|
</div> |
|
|
|
|
<div class="insetCol2 box-sizing disTab"> |
|
|
|
|
<p> |
|
|
|
|
<div class="insetCol2 box-sizing disTab"> |
|
|
|
|
<p> |
|
|
|
|
{{ cro.title }} |
|
|
|
|
</p> |
|
|
|
|
<div class="buttonsImg" distab=""> |
|
|
|
|
<div class="insetBI insetBI2"> |
|
|
|
|
<i class="fa fa-times"></i> |
|
|
|
|
</p> |
|
|
|
|
<div class="buttonsImg" distab=""> |
|
|
|
|
<div class="insetBI insetBI2"> |
|
|
|
|
<i class="fa fa-times"></i> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{% endfor %} |
|
|
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
@ -394,66 +397,101 @@ |
|
|
|
|
|
|
|
|
|
{% block js_block %} |
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
|
|
|
|
|
var SocketHandler = function () { |
|
|
|
|
var url = 'ws://127.0.0.1:8888/chat'; |
|
|
|
|
var sock = new WebSocket(url); |
|
|
|
|
var intervalId; |
|
|
|
|
sock.onopen = function () { |
|
|
|
|
console.log("Start connect"); |
|
|
|
|
intervalId = setInterval(function () { |
|
|
|
|
sock.send('{"dummy": 1}'); |
|
|
|
|
}, 150000); |
|
|
|
|
}; |
|
|
|
|
sock.onmessage = function (event) { |
|
|
|
|
var notificationData =JSON.parse(event.data); |
|
|
|
|
$.jGrowl("Вам пришло новое сообщение!" + notificationData.msg, { sticky: true }); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
$(function(){ |
|
|
|
|
var socket = new SocketHandler(); |
|
|
|
|
$('#worksell-add-form').on('submit', function(e){ |
|
|
|
|
e.preventDefault(); |
|
|
|
|
var dataSerializer = $(this).serialize(); |
|
|
|
|
$.ajax({ |
|
|
|
|
url: '/work_sell/test/', |
|
|
|
|
method: 'POST', |
|
|
|
|
data: dataSerializer, |
|
|
|
|
dataType: 'json', |
|
|
|
|
success: function(data){ |
|
|
|
|
if (data.status == 'ok') { |
|
|
|
|
location.reload(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
error: function(jqXHR, exception){ |
|
|
|
|
console.log(jqXHR.statusCode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#portfolio-add-form').on('submit', function(e) { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
var dataSerializer = $(this).serialize(); |
|
|
|
|
$.ajax({ |
|
|
|
|
url: '/projects/portfolio/create/', |
|
|
|
|
method: 'POST', |
|
|
|
|
data: dataSerializer, |
|
|
|
|
dataType: 'json', |
|
|
|
|
success: function (data) { |
|
|
|
|
if (data.status == 'ok') { |
|
|
|
|
location.reload(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
error: function (jqXHR, exception) { |
|
|
|
|
console.log(jqXHR.statusCode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
var userId = '{{ contractor.pk }}'; |
|
|
|
|
var SocketHandler = function () { |
|
|
|
|
var url = 'ws://127.0.0.1:8888/chat/' + userId + '/'; |
|
|
|
|
var sock = new WebSocket(url); |
|
|
|
|
var intervalId; |
|
|
|
|
sock.onopen = function () { |
|
|
|
|
console.log("Start connect"); |
|
|
|
|
intervalId = setInterval(function () { |
|
|
|
|
sock.send('{"dummy": 1}'); |
|
|
|
|
}, 150000); |
|
|
|
|
}; |
|
|
|
|
sock.onmessage = function (event) { |
|
|
|
|
var notificationData = JSON.parse(event.data); |
|
|
|
|
$.jGrowl("Вам пришло новое сообщение!" + notificationData.msg, {sticky: true}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
$(function () { |
|
|
|
|
var socket = new SocketHandler(); |
|
|
|
|
$('#worksell-add-form').on('submit', function (e) { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
var dataSerializer = $(this).serialize(); |
|
|
|
|
$.ajax({ |
|
|
|
|
url: '/work_sell/test/', |
|
|
|
|
method: 'POST', |
|
|
|
|
data: dataSerializer, |
|
|
|
|
dataType: 'json', |
|
|
|
|
success: function (data) { |
|
|
|
|
if (data.status == 'ok') { |
|
|
|
|
location.reload(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
error: function (jqXHR, exception) { |
|
|
|
|
console.log(jqXHR.statusCode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#portfolio-add-form').on('submit', function (e) { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
var dataSerializer = $(this).serialize(); |
|
|
|
|
$.ajax({ |
|
|
|
|
url: '/projects/portfolio/create/', |
|
|
|
|
method: 'POST', |
|
|
|
|
data: dataSerializer, |
|
|
|
|
dataType: 'json', |
|
|
|
|
success: function (data) { |
|
|
|
|
if (data.status == 'ok') { |
|
|
|
|
location.reload(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
error: function (jqXHR, exception) { |
|
|
|
|
console.log(jqXHR.statusCode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var url = '/work_sell/basic/'; |
|
|
|
|
var csrftoken = $.cookie('csrftoken'); |
|
|
|
|
$('#fileupload').fileupload({ |
|
|
|
|
url: url, |
|
|
|
|
crossDomain: false, |
|
|
|
|
beforeSend: function (xhr, settings) { |
|
|
|
|
if (!csrfSafeMethod(settings.type)) { |
|
|
|
|
xhr.setRequestHeader("X-CSRFToken", csrftoken); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
dataType: 'json', |
|
|
|
|
done: function (e, data) { |
|
|
|
|
console.log(data); |
|
|
|
|
$.each(data.result.files, function (index, file) { |
|
|
|
|
var img = $('<img style="width:200px;height:200px;">').attr('src', file.url).appendTo("#files"); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
progressall: function (e, data) { |
|
|
|
|
var progress = parseInt(data.loaded / data.total * 100, 10); |
|
|
|
|
console.log(progress); |
|
|
|
|
$('#progress .progress-bar').css( |
|
|
|
|
'width', |
|
|
|
|
progress + '%' |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
}).prop('disabled', !$.support.fileInput) |
|
|
|
|
.parent().addClass($.support.fileInput ? undefined : 'disabled'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function csrfSafeMethod(method) { |
|
|
|
|
// these HTTP methods do not require CSRF protection |
|
|
|
|
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
{% endblock %} |
|
|
|
|
|