|
|
|
@ -15,8 +15,9 @@ if (EXPO.profile){ |
|
|
|
//language object
|
|
|
|
//language object
|
|
|
|
that.lang ={}; |
|
|
|
that.lang ={}; |
|
|
|
//dependences
|
|
|
|
//dependences
|
|
|
|
|
|
|
|
var com = EXPO.common; |
|
|
|
|
|
|
|
|
|
|
|
//private
|
|
|
|
//private
|
|
|
|
// factory for on page form objects
|
|
|
|
// factory for on page form objects
|
|
|
|
function Forms(){}; |
|
|
|
function Forms(){}; |
|
|
|
// methods to perform ajax responses to send and receive data from the server
|
|
|
|
// methods to perform ajax responses to send and receive data from the server
|
|
|
|
@ -116,6 +117,10 @@ if (EXPO.profile){ |
|
|
|
|
|
|
|
|
|
|
|
Forms.home_form = function (path) { |
|
|
|
Forms.home_form = function (path) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* callback after successful request to the server |
|
|
|
|
|
|
|
* @param data -data object recieved from server |
|
|
|
|
|
|
|
*/ |
|
|
|
this.pullHandler = function (data) { |
|
|
|
this.pullHandler = function (data) { |
|
|
|
if (data.success){ |
|
|
|
if (data.success){ |
|
|
|
var country = $('#s2id_id_country').find('.select2-chosen').text(), |
|
|
|
var country = $('#s2id_id_country').find('.select2-chosen').text(), |
|
|
|
@ -130,6 +135,10 @@ if (EXPO.profile){ |
|
|
|
}; |
|
|
|
}; |
|
|
|
Forms.name_form = function (path) { |
|
|
|
Forms.name_form = function (path) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* callback after successful request to the server |
|
|
|
|
|
|
|
* @param data -data object recieved from server |
|
|
|
|
|
|
|
*/ |
|
|
|
this.pullHandler = function (data) { |
|
|
|
this.pullHandler = function (data) { |
|
|
|
if (data.success){ |
|
|
|
if (data.success){ |
|
|
|
$('#static-name-value').text($('#id_last_name').val()+' '+$('#id_first_name').val()); |
|
|
|
$('#static-name-value').text($('#id_last_name').val()+' '+$('#id_first_name').val()); |
|
|
|
@ -141,6 +150,10 @@ if (EXPO.profile){ |
|
|
|
}; |
|
|
|
}; |
|
|
|
Forms.work_form = function (path) { |
|
|
|
Forms.work_form = function (path) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* callback after successful request to the server |
|
|
|
|
|
|
|
* @param data -data object recieved from server |
|
|
|
|
|
|
|
*/ |
|
|
|
this.pullHandler = function (data) { |
|
|
|
this.pullHandler = function (data) { |
|
|
|
if (data.success){ |
|
|
|
if (data.success){ |
|
|
|
$('#static-work-value').text($('#id_position').val()); |
|
|
|
$('#static-work-value').text($('#id_position').val()); |
|
|
|
@ -152,6 +165,10 @@ if (EXPO.profile){ |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
Forms.about_company_form = function (path) { |
|
|
|
Forms.about_company_form = function (path) { |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* callback after successful request to the server |
|
|
|
|
|
|
|
* @param data -data object recieved from server |
|
|
|
|
|
|
|
*/ |
|
|
|
this.pullHandler = function (data) { |
|
|
|
this.pullHandler = function (data) { |
|
|
|
if (data.success){ |
|
|
|
if (data.success){ |
|
|
|
window.location.reload(); |
|
|
|
window.location.reload(); |
|
|
|
@ -162,6 +179,10 @@ if (EXPO.profile){ |
|
|
|
}; |
|
|
|
}; |
|
|
|
Forms.phone_form = function (path) { |
|
|
|
Forms.phone_form = function (path) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* callback after successful request to the server |
|
|
|
|
|
|
|
* @param data -data object recieved from server |
|
|
|
|
|
|
|
*/ |
|
|
|
this.pullHandler = function (data) { |
|
|
|
this.pullHandler = function (data) { |
|
|
|
if (data.success){ |
|
|
|
if (data.success){ |
|
|
|
$('#static-phone-value').text($('#id_phone')[0].value); |
|
|
|
$('#static-phone-value').text($('#id_phone')[0].value); |
|
|
|
@ -175,6 +196,10 @@ if (EXPO.profile){ |
|
|
|
}; |
|
|
|
}; |
|
|
|
Forms.web_page_form = function (path) { |
|
|
|
Forms.web_page_form = function (path) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* callback after successful request to the server |
|
|
|
|
|
|
|
* @param data -data object recieved from server |
|
|
|
|
|
|
|
*/ |
|
|
|
this.pullHandler = function (data) { |
|
|
|
this.pullHandler = function (data) { |
|
|
|
if (data.success){ |
|
|
|
if (data.success){ |
|
|
|
var userLink = $('#id_web_page').val(); |
|
|
|
var userLink = $('#id_web_page').val(); |
|
|
|
@ -188,6 +213,10 @@ if (EXPO.profile){ |
|
|
|
}; |
|
|
|
}; |
|
|
|
Forms.about_form = function (path) { |
|
|
|
Forms.about_form = function (path) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* callback after successful request to the server |
|
|
|
|
|
|
|
* @param data -data object recieved from server |
|
|
|
|
|
|
|
*/ |
|
|
|
this.pullHandler = function (data) { |
|
|
|
this.pullHandler = function (data) { |
|
|
|
if (data.success){ |
|
|
|
if (data.success){ |
|
|
|
$('#static-about-value').text($('#id_about').val()); |
|
|
|
$('#static-about-value').text($('#id_about').val()); |
|
|
|
@ -207,6 +236,10 @@ if (EXPO.profile){ |
|
|
|
Forms.social_form = function (path) { |
|
|
|
Forms.social_form = function (path) { |
|
|
|
var self = this, |
|
|
|
var self = this, |
|
|
|
$img, imgSrc, $input, inputValue; |
|
|
|
$img, imgSrc, $input, inputValue; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* callback after successful request to the server |
|
|
|
|
|
|
|
* @param data -data object recieved from server |
|
|
|
|
|
|
|
*/ |
|
|
|
this.pullHandler = function (data) { |
|
|
|
this.pullHandler = function (data) { |
|
|
|
if (data.success){ |
|
|
|
if (data.success){ |
|
|
|
|
|
|
|
|
|
|
|
@ -261,6 +294,10 @@ if (EXPO.profile){ |
|
|
|
$pickBlock = $('#pick-block'), |
|
|
|
$pickBlock = $('#pick-block'), |
|
|
|
$form, |
|
|
|
$form, |
|
|
|
$avatar = $('img',$pickBlock); |
|
|
|
$avatar = $('img',$pickBlock); |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* callback after successful request to the server |
|
|
|
|
|
|
|
* @param data -data object recieved from server |
|
|
|
|
|
|
|
*/ |
|
|
|
this.pullHandler = function (data) { |
|
|
|
this.pullHandler = function (data) { |
|
|
|
if (data.success){ |
|
|
|
if (data.success){ |
|
|
|
|
|
|
|
|
|
|
|
@ -286,6 +323,26 @@ if (EXPO.profile){ |
|
|
|
|
|
|
|
|
|
|
|
this.ajaxPath = path; |
|
|
|
this.ajaxPath = path; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* add new company form init |
|
|
|
|
|
|
|
* @param path |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
Forms.create_company_form = function (path) { |
|
|
|
|
|
|
|
var self = this; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* callback after successful request to the server |
|
|
|
|
|
|
|
* @param data -data object recieved from server |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
this.pullHandler = function (data) { |
|
|
|
|
|
|
|
if (data.success){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.ajaxPath = path; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// methods
|
|
|
|
// methods
|
|
|
|
@ -326,9 +383,9 @@ if (EXPO.profile){ |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.forms = {}; |
|
|
|
this.forms = {}; |
|
|
|
$(function () { |
|
|
|
$(function () { |
|
|
|
//start of document.ready
|
|
|
|
/** |
|
|
|
|
|
|
|
* <selectbox> styling with 3-rd party libs |
|
|
|
// <selectbox> styling with 3-rd party libs
|
|
|
|
*/ |
|
|
|
$('#'+self.opt.selectBox[0].id).select2({ |
|
|
|
$('#'+self.opt.selectBox[0].id).select2({ |
|
|
|
width: 'element' |
|
|
|
width: 'element' |
|
|
|
}); |
|
|
|
}); |
|
|
|
@ -468,6 +525,15 @@ if (EXPO.profile){ |
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* add new company modal window trigger |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
$('#'+self.opt.addCompanyButtonId).on('click', function (event) { |
|
|
|
|
|
|
|
event.preventDefault(); |
|
|
|
|
|
|
|
$.fancybox.open('#'+ self.opt.addCompany.modalId); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|