| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819 |
- var oldImageData = null;
- var step = 0;
- var temps = null;
- function forgotpass() {
- $('#forgotFRM').show();
- }
- function setOrderState(id,state) {
- if (id!=='' && state!=='') {
- $.post('/admin/orders/set/',{id: id, state: state},function(resp) {});
- }
- else {
- return false;
- }
- }
- function validateForm(frm,cropper,cropper2) {
- var inputError = false;
- var selector = frm+' input[data-validate]';
-
- $(selector).each(function() {
- if ($(this).val()=='') {
- inputError = true;
- $(this).addClass('field-error');
- }
- else {
- $(this).removeClass('field-error');
- }
- });
- if ($('#user_pass1').val()!='') {
- if ($('#user_pass1').val()!='' && $('#user_pass2').val()=='') {
- $('#user_pass1').addClass('field-error');
- $('#user_pass2').addClass('field-error');
- inputError = true;
- }
- else {
- $('#user_pass1').removeClass('field-error');
- $('#user_pass2').removeClass('field-error');
- }
- }
-
- if (!inputError) {
- /*if (cropper!=='' && cropper!==null) {
- var imageData = $(cropper).cropit('export');
- if (imageData) $('#tempContainer').val(imageData);
- }
- if (cropper2!=='' && cropper2!==null) {
- var imageData2 = $(cropper2).cropit('export');
- if (imageData2) $('#tempContainer2').val(imageData2);
- }*/
-
- $(frm).submit();
- }
- }
- function setModuleRoleStatus(roleID,moduleID) {
- if (roleID!=='' && moduleID!=='') {
- var request = {
- roleID: roleID,
- moduleID: moduleID
- };
- $.post('/admin/roles/set',request,function(data) {
- return true;
- });
- }
- else {
- return false;
- }
- }
- function setUserState(userid) {
- if (userid!='') {
- var request = {
- user_id: userid
- };
-
- $.post('/admin/users/set',request,function(data) {
- return true;
- });
- }
- else {
- return false;
- }
- }
- function setUserDefaultMailer(userid) {
- if (userid!='') {
- var request = {
- user_id: userid
- };
-
- $.post('/admin/users/setdefaultmailer',request,function(data) {
- return true;
- });
- }
- else {
- return false;
- }
- }
- function updateTranslate(obj) {
- var code = obj.attr('data-lang-code');
- var key = obj.attr('data-lang-key');
- var text = obj.val();
- var hash = '#'+key;
-
- var request = {
- code: code,
- key: key,
- text: text
- };
-
- $.post('/admin/translator/set/',request,function(data) {
- obj.next('span').removeClass('hideme');
- setTimeout(function() {
- obj.next('span').addClass('hideme');
- },1000);
- });
- }
- function deleteGaleryItem(designID,galeryID) {
- var request = {
- id: designID,
- galery_id: galeryID
- };
-
- $.post('/admin/galery/delete/',request,function(data) {
- $('#galery').html(data);
- });
- }
- function changeMainDesign(designID,galeryID,obj) {
- var request = {
- id: designID,
- galery_id: galeryID
- };
-
- $.post('/admin/galery/set/',request,function(data) {
- $('#galery').html(data);
- });
- }
- function changePriceMode(obj) {
- var objValue = $(obj).attr('id');
-
- if (objValue!='') {
- if (objValue==='normal_price_selector') {
- $('#product_offer_price').attr('disabled','true');
- $('#product_price').removeAttr('disabled');
- }
- else {
- $('#product_offer_price').removeAttr('disabled');
- $('#product_price').attr('disabled','true');
- }
- }
- }
- function add_product_option(obj) {
- var pid = $(obj).attr('data-pid');
- $.get('/admin/products/newoption/?pid='+pid,function(data) {
- //$('#product_options_list').append(data);
- document.location.reload();
- });
- }
- function save_product_option(oid,tags) {
- var option_name_hash = '#option_name_'+oid;
- //var option_values_hash = '#option_options_'+oid;
- $.post('/admin/products/saveoption',{oid: oid, option_name: $(option_name_hash).val(), option_values: tags},function(data) {
- $('#variants_list').html(data);
- $('input[type="checkbox"]').iCheck({
- checkboxClass: 'icheckbox_flat-blue',
- radioClass: 'iradio_flat-blue'
- });
- });
- }
- function save_variation(obj) {
- if (obj) {
- var variation_id = $(obj).attr('data-id');
- var variation_data_type = $(obj).attr('name');
- var variation_data = $(obj).val();
-
- $.post('/admin/products/savevariation',{variation_id: variation_id, variation_data_type: variation_data_type, variation_data: variation_data},function(data) {
-
- });
- }
- else {
- return false;
- }
- }
- function set_variation_status(obj,state) {
- if (obj) {
- var variation_id = $(obj).attr('data-id');
- var variation_data_type = $(obj).attr('name');
- var variation_data = state;
-
- $.post('/admin/products/savevariation',{variation_id: variation_id, variation_data_type: variation_data_type, variation_data: variation_data},function(data) {
- });
- }
- }
- function delete_product_option(obj) {
- if (obj) {
- var option_id = $(obj).attr('data-oid');
- $.post('/admin/products/deleteoption',{option_id: option_id},function(data) {
- //alert(data);
- $(obj).parent('div').parent('div').remove('.row');
- $('#variants_list').html(data);
- $('input[type="checkbox"]').iCheck({
- checkboxClass: 'icheckbox_flat-blue',
- radioClass: 'iradio_flat-blue'
- });
- });
- }
- }
- function add_new_product_meta(obj) {
- var key = $('#new_meta_key').val();
- var value = $('#new_meta_value').val();
- var pid = $(obj).attr('data-pid');
-
- $.post('/admin/products/addmeta',{meta_key: key, meta_value: value, meta_pid: pid},function(data) {
- $('#product_meta_list').html(data);
- $('#new_meta_key').val('');
- $('#new_meta_value').val('');
- });
- }
- function delete_product_meta(obj) {
- var mid = $(obj).attr('data-mid');
- var pid = $(obj).attr('data-pid');
-
- $.post('/admin/products/deletemeta',{meta_id: mid, meta_pid: pid},function(data) {
- $('#product_meta_list').html(data);
- });
- }
- function save_product_meta_data(obj) {
- var mid = $(obj).attr('data-mid');
- var tipus = $(obj).attr('name');
- var data = $(obj).val();
-
- $.post('/admin/products/savemeta',{meta_id: mid, meta_field: tipus, meta_data: data},function(data) {
- });
- }
- function saveBannerImage() {
- validateForm('#bannerEditor',null,null);
- }
- function setLendingStatus(status) {
- $('#lending_status').val(status);
- return true;
- }
- function save_todo(param_type,param_value,todo_id) {
- var datum = $('#todo_date').val();
- var szoveg = $('#todo_text').val();
-
- if (szoveg!='') {
- if (param_type==='user') {
- $.post('/admin/todo/add',{todo_date: datum, todo_text: szoveg, todo_user_id: param_value, todo_id: todo_id},function(result) {
- window.location.reload();
- });
- }
- else {
- $.post('/admin/todo/add',{todo_date: datum, todo_text: szoveg, todo_lending_id: param_value, todo_id: todo_id},function(result) {
- window.location.reload();
- });
- }
- }
- }
- function delete_todo(todo_id) {
- $.post('/admin/todo/delete',{todo_id: todo_id},function(result) {
- window.location.reload();
- });
- }
- function update_input(obj,destination) {
- var objVal = $(obj).val();
- var objFilter = $(obj).attr('data-filter');
-
- if (objFilter!='') {
- objVal = Math.round(eval(objFilter));
- }
- $(destination).val(objVal);
- return true;
- }
- function finish_todo(obj) {
- var objID = $(obj).attr('data-id');
- var objState = $(obj).is(':checked');
- $.post('/admin/todo/finish',{todo_id: objID, state: objState},function(result) {});
- }
- function next_block() {
- var probe = step+1;
- var last = step;
- var next_hash = '#step_'+probe;
- var last_hash = '#step_'+last;
- var obj = $(next_hash);
- if (obj.length) {
- step++;
- $(obj).removeClass('inactive-list').addClass('active-list');
- $(last_hash).removeClass('active-list').addClass('inactive-list');
- $('.nextBtn').removeAttr('disabled');
- $('.prevBtn').removeAttr('disabled');
- check_for_prev_next();
- }
- else {
- $('.nextBtn').attr('disabled','true');
- }
- }
- function prev_block() {
- var probe = step-1;
- var last = step;
- var next_hash = '#step_'+probe;
- var last_hash = '#step_'+last;
- var obj = $(next_hash);
-
- if (obj.length) {
- step--;
- $(obj).removeClass('inactive-list').addClass('active-list');
- $(last_hash).removeClass('active-list').addClass('inactive-list');
- $('.nextBtn').removeAttr('disabled');
- $('.prevBtn').removeAttr('disabled');
- check_for_prev_next();
- }
- else {
- $('.prevBtn').attr('disabled','true');
- }
- }
- function check_for_prev_next() {
- var probe = step+1;
- var last = step;
- var next_hash = '#step_'+probe;
- var last_hash = '#step_'+last;
- var obj = $(next_hash);
- if (obj.length) {
- $('.nextBtn').removeAttr('disabled');
- }
- else {
- $('.nextBtn').attr('disabled','true');
- }
- probe = step-1;
- last = step;
- next_hash = '#step_'+probe;
- last_hash = '#step_'+last;
- obj = $(next_hash);
-
- if (obj.length) {
- $('.prevBtn').removeAttr('disabled');
- }
- else {
- $('.prevBtn').attr('disabled','true');
- }
- }
- function show_works_add() {
- $('#workEditor').slideDown('fast');
- }
- function update_field(obj,table,field,id,key,currency) {
- var new_value = $(obj).val();
- $.post('/admin/updater/save',{
- table: table,
- field: field,
- id: id,
- value: new_value,
- key: key,
- currency: currency
- },function(result){
- $(obj).parent('td').removeClass('in-edit');
- $(obj).parent('td').html(result);
- });
- }
- function simple_update_field(obj,table,field,id,key,category) {
- var new_value = $(obj).val();
- $.post('/admin/factors/save',{
- table: table,
- field: field,
- id: id,
- value: new_value,
- key: key,
- category: category
- },function(result){});
- }
- function update_multiple_field(obj,table,field,id,key,currency) {
- var new_value = $(obj).val();
- $.post('/admin/multiupdater/save',{
- table: table,
- field: field,
- id: id,
- value: new_value,
- key: key,
- currency: currency
- },function(result){
- $(obj).parent('td').removeClass('in-edit');
- $(obj).parent('td').html(result);
- });
- }
- function update_field_by_object(obj,recolor,reload) {
- var new_value = $(obj).val();
- var id = $(obj).attr('data-id');
- var key = $(obj).attr('data-key');
- var table = $(obj).attr('data-table');
- var field = $(obj).attr('name');
- var is_radio = $(obj).attr('type');
-
- if ($(obj).parent('button').hasClass('radiobtn')) {
- if ($(obj).parent('button').children('i').hasClass('fa-dot-circle-o')) {
- new_value = '1';
- if (recolor==='true') {
- $(obj).parent('button').parent('td').parent('tr').removeClass('uj-elem');
- }
- }
- else {
- new_value = '2';
- if (recolor==='true') {
- $(obj).parent('button').parent('td').parent('tr').addClass('uj-elem');
- }
- }
- }
-
- $.post('/admin/updater/save/',{
- table: table,
- field: field,
- id: id,
- value: new_value,
- key: key
- },function(result) {
- if (reload==='true') {
- window.location.reload();
- }
- });
- }
- function update_bill_image(id,obj) {
- var filename = $('.uploadedFile').val();
- $.post('/admin/bills/updatefile/',{
- id: id,
- filename: filename
- },function(response){
- window.location.reload();
- });
- }
- function update_bill(id,obj) {
- var filename = $('.uploadedFile').val();
- $.post('/admin/costlist/updatebill/',{
- id: id,
- filename: filename
- },function(response){
- window.location.reload();
- });
- }
- function update_rajz_image(id,obj) {
- var filename = $('.uploadedFile').val();
-
- if (filename!=='') {
- $.post('/admin/rajzok/updatefile/',{
- id: id,
- filename: filename
- },function(response){
- window.location.reload();
- });
- }
- }
- function update_document(id,obj) {
- var filename = $('.uploadedFile').val();
- $.post('/admin/beszerzes/updatedoc/',{
- id: id,
- filename: filename
- },function(response){
- window.location.reload();
- });
- }
- function show_partner_add() {
- $('#partnerEditor').toggle('fast');
- }
- function show_client_add() {
- $('#clientEditor').toggle('fast');
- }
- function show_bill_add() {
- $('#editor_form').slideDown('fast');
- }
- function show_rajz_add() {
- $('#editor_form').toggle('fast');
- }
- function show_beszerzes_add() {
- $('#editor_form').toggle();
- $('#beszerzesEditor').slideDown('fast');
- $('#beszer_uploader').slideDown('fast');
- }
- function show_group_add(group) {
- if (group!=='') {
- $('#'+group).toggle('fast');
- }
- else {
- return false;
- }
- }
- function export_xlsx() {
- $.post('/admin/costlist/export',function(response) {
- window.location=response;
- });
- }
- function export_gyartas_xlsx() {
- $.post('/admin/gyartas/export',function(response) {
- window.location=response;
- });
- }
- function remove_filter() {
- window.location='/admin/costlist/clear';
- }
- function assign_partner(obj) {
- var base_id = $(obj).attr('data-base-id');
- var dest_id = $(obj).val();
-
- if (window.confirm('Figyelem! Valóban egyesíteni kívánja a két partnert?')) {
- $.post('/admin/partners/assign/',{
- base_id: base_id,
- dest_id: dest_id
- },function(response) {
- window.location.reload();
- });
- }
- }
- function assign_client(obj) {
- var base_id = $(obj).attr('data-base-id');
- var dest_id = $(obj).val();
-
- if (window.confirm('Figyelem! Valóban egyesíteni kívánja a két ügyfelet?')) {
- $.post('/admin/clients/assign/',{
- base_id: base_id,
- dest_id: dest_id
- },function(response) {
- window.location.reload();
- });
- }
- }
- function change_currency(obj) {
- var actual_currency = $(obj).val();
-
- $.post('/admin/costlist/setcurrency/',{
- currency: actual_currency
- },function(response){
- $('.currency').html(actual_currency);
- if (actual_currency!=='HUF') {
- $('#arfolyam').show();
- $('#egyseg_arfolyam').show();
- }
- else {
- $('#arfolyam').hide();
- $('#egyseg_arfolyam').hide();
- }
- });
- }
- function set_currency_field(obj) {
- var new_value = $(obj).val();
- var id = $(obj).attr('data-id');
- var key = $(obj).attr('data-key');
- var table = $(obj).attr('data-table');
- var field = $(obj).attr('name');
- $.post('/admin/updater/save',{
- table: table,
- field: field,
- id: id,
- value: new_value,
- key: key
- },function(result){});
- }
- function radiobtn_set_state(obj) {
- var state = $(obj).val();
- var on_state = $(obj).attr('data-on-value');
- var off_state = $(obj).attr('data-off-value');
- var default_state = $(obj).attr('data-default-value');
-
- var on_icon = $(obj).attr('data-on-icon');
- var off_icon = $(obj).attr('data-off-icon');
- var default_icon = $(obj).attr('data-default-icon');
-
- if (state===default_state) {
- $(obj).val(default_state);
- $(obj).children('span').html(default_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(default_icon);
- $(obj).children('input[type=hidden]').val(default_state);
- }
- else if (state===on_state) {
- $(obj).val(on_state);
- $(obj).children('span').html(on_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(on_icon);
- $(obj).children('input[type=hidden]').val(on_state);
- }
- else if (state===off_state) {
- $(obj).val(off_state);
- $(obj).children('span').html(off_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(off_icon);
- $(obj).children('input[type=hidden]').val(off_state);
- }
- }
- function checkbtn_set_state(obj) {
- var state = $(obj).val();
-
- var on_state = $(obj).attr('data-on-value');
- var off_state = $(obj).attr('data-off-value');
- var default_state = $(obj).attr('data-default-value');
-
- var on_icon = $(obj).attr('data-on-icon');
- var off_icon = $(obj).attr('data-off-icon');
- var default_icon = $(obj).attr('data-default-icon');
- if (state===default_state) {
- $(obj).val(default_state);
- $(obj).children('span').html(default_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(default_icon);
- }
- else if (state===on_state) {
- $(obj).val(on_state);
- $(obj).children('span').html(on_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(on_icon);
- }
- else if (state===off_state) {
- $(obj).val(off_state);
- $(obj).children('span').html(off_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(off_icon);
- }
- else {
- $(obj).val(default_state);
- $(obj).children('span').html(default_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(default_icon);
- }
- }
- function checkbtn_change_state(obj) {
- var active_state = $(obj).attr('value');
-
- var on_state = $(obj).attr('data-on-value');
- var off_state = $(obj).attr('data-off-value');
- var default_state = $(obj).attr('data-default-value');
-
- var on_icon = $(obj).attr('data-on-icon');
- var off_icon = $(obj).attr('data-off-icon');
- var default_icon = $(obj).attr('data-default-icon');
- if (active_state===default_state || active_state==='') {
- $(obj).val(on_state);
- $(obj).children('span').html(on_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(on_icon);
- $(obj).children('input[type=hidden]').val(on_state);
- }
- else if (active_state===on_state) {
- $(obj).val(off_state);
- $(obj).children('span').html(off_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(off_icon);
- $(obj).children('input[type=hidden]').val(off_state);
- }
- else if (active_state===off_state) {
- $(obj).val(default_state);
- $(obj).children('span').html(default_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(default_icon);
- $(obj).children('input[type=hidden]').val(default_state);
- }
- }
- function radiobtn_change_state(obj,event_trigger,reloader) {
- var active_state = $(obj).val();
-
- var on_state = $(obj).attr('data-on-value');
- var off_state = $(obj).attr('data-off-value');
- var default_state = $(obj).attr('data-default-value');
-
- var on_icon = $(obj).attr('data-on-icon');
- var off_icon = $(obj).attr('data-off-icon');
- var default_icon = $(obj).attr('data-default-icon');
-
- if (active_state===on_state) {
- $(obj).val(off_state);
- $(obj).children('span').html(off_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(off_icon);
- $(obj).children('input[type=hidden]').val(off_state);
- $(obj).removeClass('btn-success');
- $(obj).addClass('btn-info');
- }
- else if (active_state===off_state) {
- $(obj).val(on_state);
- $(obj).children('span').html(on_state);
- $(obj).children('i').attr('class','fa');
- $(obj).children('i').addClass(on_icon);
- $(obj).children('input[type=hidden]').val(on_state);
- $(obj).removeClass('btn-info');
- $(obj).addClass('btn-success');
- }
-
- if (event_trigger===true) {
- $(obj).children('input[type=hidden]').trigger('change');
-
- }
- }
- function set_currency_field(obj) {
-
- }
- function show_partner_details(partner_details,obj) {
- if ($(partner_details).css('display')==='block') {
- $('.partner-details').hide();
- }
- else {
- $('.partner-details').hide();
- $(partner_details).show();
- }
- }
- function show_client_details(client_details,obj) {
- if ($(client_details).css('display')==='block') {
- $('.client-details').hide();
- }
- else {
- $('.client-details').hide();
- $(client_details).show();
- }
- }
- function editable(obj,update_parts) {
- if (!$(obj).hasClass('in-edit')) {
- $(obj).addClass('in-edit');
- var actual_value = $(obj).html();
- console.log(actual_value);
- var currency = $(obj).attr('data-currency');
- if (currency==='true') {
- actual_value = actual_value.replace(",- Ft","");
- actual_value = actual_value.replace(" ","");
- }
- var field_name = $(obj).attr('data-field');
- var table_name = $(obj).attr('data-table');
- var row_id = $(obj).attr('data-id');
- var key = $(obj).attr('data-key');
- if (update_parts==true) {
- $(obj).html('<input style="width: 100%;" type="text" name="'+field_name+'" id="'+field_name+'" value="'+actual_value+'" class="form-control edit" onblur="javascript: update_field($(this),\''+table_name+'\',\''+field_name+'\',\''+row_id+'\',\''+key+'\',\''+currency+'\'); window.location=\'/admin/rendelesek/\';">');
- }
- else {
- $(obj).html('<input style="width: 100%;" type="text" name="'+field_name+'" id="'+field_name+'" value="'+actual_value+'" class="form-control edit" onblur="javascript: update_field($(this),\''+table_name+'\',\''+field_name+'\',\''+row_id+'\',\''+key+'\',\''+currency+'\');">');
- }
- $('#'+field_name).focus();
- }
- }
- function multiple_editable(obj) {
- if (!$(obj).hasClass('in-edit')) {
- $(obj).addClass('in-edit');
- var actual_value = $(obj).html();
- console.log(actual_value);
- var currency = $(obj).attr('data-currency');
- if (currency==='true') {
- actual_value = actual_value.replace(",- Ft","");
- actual_value = actual_value.replace(" ","");
- }
- var field_name = $(obj).attr('data-field');
- var table_name = $(obj).attr('data-table');
- var row_id = $(obj).attr('data-id');
- var key = $(obj).attr('data-key');
- $(obj).html('<input type="text" name="'+field_name+'" id="'+field_name+'" value="'+actual_value+'" class="form-control edit" onblur="update_multiple_field($(this),\''+table_name+'\',\''+field_name+'\',\''+row_id+'\',\''+key+'\',\''+currency+'\')">');
- $('#'+field_name).focus();
- }
- }
- function open_upload(obj) {
- $(obj).parent('div').children('.myuploader').click();
- }
- function start_upload(obj) {
- var input = obj;
- var files = input.files;
- var data = new FormData();
- var id = $(obj).attr('data-id');
-
- $.each(files, function(key, value) {
- data.append(key, value);
- });
-
- data.append('id',id);
-
- var old = $(obj).parent('div').children('.uploder').html();
- $(obj).parent('div').children('.uploder').html('<i class="fa fa-circle-o-notch fa-spin"></i>');
-
- $.ajax({
- url: '/admin/bills/updatefile/',
- type: 'POST',
- data: data,
- cache: false,
- processData: false,
- contentType: false,
- success: function(resp) {
- $(obj).parent('div').children('.uploder').html('<i class="fa fa-check"></i>');
- $(obj).parent('div').children('.bill-image').attr('href',resp);
- $(obj).parent('div').children('.bill-image').children('button').children('i').attr('class','fa fa-eye');
- var clearIcon = setInterval(function() {
- $(obj).parent('div').children('.uploder').html(old);
- clearInterval(clearIcon);
- },3000);
- }
- });
- }
- function start_upload_rajz(obj) {
- var input = obj;
- var files = input.files;
- var data = new FormData();
- var id = $(obj).attr('data-id');
-
- $.each(files, function(key, value) {
- data.append(key, value);
- });
-
- data.append('id',id);
-
- var old = $(obj).parent('div').children('.uploder').html();
- $(obj).parent('div').children('.uploder').html('<i class="fa fa-circle-o-notch fa-spin"></i>');
-
- $.ajax({
- url: '/admin/rajzok/updatefile/',
- type: 'POST',
- data: data,
- cache: false,
- processData: false,
- contentType: false,
- success: function(resp) {
- $(obj).parent('div').children('.uploder').html('<i class="fa fa-check"></i>');
- $(obj).parent('div').children('.bill-image').attr('href',resp);
- var clearIcon = setInterval(function() {
- $(obj).parent('div').children('.uploder').html(old);
- clearInterval(clearIcon);
- },3000);
- }
- });
- }
- function start_upload_document(obj) {
- var input = obj;
- var files = input.files;
- var data = new FormData();
- var id = $(obj).attr('data-id');
-
- $.each(files, function(key, value) {
- data.append(key, value);
- });
-
- data.append('id',id);
- data.append('MAX_FILE_SIZE','90000000');
-
- var old = $(obj).parent('div').children('.uploder').html();
- $(obj).parent('div').children('.uploder').html('<i class="fa fa-circle-o-notch fa-spin"></i>');
-
- $.ajax({
- url: '/admin/sales/updatefile/',
- type: 'POST',
- data: data,
- cache: false,
- processData: false,
- contentType: false,
- success: function(resp) {
- $(obj).parent('div').children('.uploder').html('<i class="fa fa-check"></i>');
- $(obj).parent('div').children('.bill-image').attr('href',resp);
- var clearIcon = setInterval(function() {
- $(obj).parent('div').children('.uploder').html(old);
- clearInterval(clearIcon);
- },3000);
- }
- });
- }
- function start_upload_techno(obj) {
- var input = obj;
- var files = input.files;
- var data = new FormData();
- var id = $(obj).attr('data-id');
-
- $.each(files, function(key, value) {
- data.append(key, value);
- });
-
- data.append('id',id);
-
- var old = $(obj).parent('div').children('.uploder').html();
- $(obj).parent('div').children('.uploder').html('<i class="fa fa-circle-o-notch fa-spin"></i>');
-
- $.ajax({
- url: '/admin/techno/updatefile/',
- type: 'POST',
- data: data,
- cache: false,
- processData: false,
- contentType: false,
- success: function(resp) {
- $(obj).parent('div').children('.uploder').html('<i class="fa fa-check"></i>');
- $(obj).parent('div').children('.bill-image').attr('href',resp);
- var clearIcon = setInterval(function() {
- $(obj).parent('div').children('.uploder').html(old);
- clearInterval(clearIcon);
- },3000);
- }
- });
- }
- function start_upload_beszer(obj) {
- var input = obj;
- var files = input.files;
- var data = new FormData();
- var id = $(obj).attr('data-id');
-
- $.each(files, function(key, value) {
- data.append(key, value);
- });
-
- data.append('id',id);
-
- var old = $(obj).parent('div').children('.uploder').html();
- $(obj).parent('div').children('.uploder').html('<i class="fa fa-circle-o-notch fa-spin"></i>');
-
- $.ajax({
- url: '/admin/beszerzes/updatedoc/',
- type: 'POST',
- data: data,
- cache: false,
- processData: false,
- contentType: false,
- success: function(resp) {
- $(obj).parent('div').children('.uploder').html('<i class="fa fa-check"></i>');
- $(obj).parent('div').children('.bill-image').attr('href',resp);
- var clearIcon = setInterval(function() {
- $(obj).parent('div').children('.uploder').html(old);
- clearInterval(clearIcon);
- },3000);
- }
- });
- }
- function show_bill(e,obj) {
- e.preventDefault();
- $(obj).orangeBox('create');
- }
- function scroll_left(obj) {
- $('#scroller').scrollLeft($('#scroller').scrollLeft()-100);
- }
- function scroll_right() {
- $('#scroller').scrollLeft($('#scroller').scrollLeft()+100);
- }
- function set_kategoria_state() {
- var act = $('#cost_type_id').val();
- if (act==='9' || act==='11') {
- $('#cost_category_id').val('');
- $('#cost_category_id').attr('disabled','true');
- }
- else {
- $('#cost_category_id').removeAttr('disabled');
- }
- }
- function set_filters_partner(obj) {
- var values = $(obj).val();
- if (values!==null) {
- $('#clients_filter').hide();
- temps = $('#filter_forras').children('optgroup[label="bevétel"]');
- $('#filter_forras').children('optgroup[label="bevétel"]').remove();
- $(".mypayment").select2({placeholder: 'Válasszon fizetési módot!'});
- }
- else {
- $('#clients_filter').show();
- $('#filter_forras').prepend(temps);
- $(".mypayment").select2({placeholder: 'Válasszon fizetési módot!'});
- }
- }
- function set_filters_client(obj) {
- var values = $(obj).val();
- if (values!==null) {
- $('#partners_filter').hide();
- temps = $('#filter_forras').children('optgroup[label="kiadás"]');
- $('#filter_forras').children('optgroup[label="kiadás"]').remove();
- $(".mypayment").select2({placeholder: 'Válasszon fizetési módot!'});
- }
- else {
- $('#partners_filter').show();
- $('#filter_forras').append(temps);
- $(".mypayment").select2({placeholder: 'Válasszon fizetési módot!'});
- }
- }
- function client_text(obj) {
- var value = $(obj).val();
- if (value!=='' && value!=='undefined' && value!==null) {
- $('#cost_partner').attr('disabled','true');
- $('#cost_type_id').children('option[value=7]').hide();
- $('#cost_type_id').children('option[value="12"]').hide();
- $('#cost_type_id').children('option[value="44"]').hide();
- $('#cost_category_id').attr('disabled','true');
- }
- else {
- $('#cost_partner').removeAttr('disabled');
- $('#cost_type_id').children('option[value=7]').show();
- $('#cost_type_id').children('option[value="12"]').show();
- $('#cost_type_id').children('option[value="44"]').show();
- $('#cost_category_id').removeAttr('disabled');
- }
- }
- function partner_text(obj) {
- var value = $(obj).val();
- if (value!=='' && value!=='undefined' && value!==null) {
- $('#cost_client').attr('disabled','true');
- $('#cost_type_id').children('option[value="9"]').hide();
- $('#cost_type_id').children('option[value="11"]').hide();
- }
- else {
- $('#cost_client').removeAttr('disabled');
- $('#cost_type_id').children('option[value="9"]').show();
- $('#cost_type_id').children('option[value="11"]').show();
- }
- }
- function set_egyseg_forall() {
- var egyseg = $('#rajz_egyseg :selected').html();
- $('#rajz_min_rendeles').next('span').html(egyseg);
- $('#rajz_alert').next('span').html(egyseg);
- }
- function add_alkatresz(obj,reszegyseg,altipus) {
- $.post('/admin/gyartas/addalkatresz/',{
- reszegyseg: reszegyseg,
- altipus: altipus
- },function(resp) {
- window.location.reload();
- });
- }
- function add_altipus(obj,reszegyseg) {
- $.post('/admin/gyartas/addaltipus/',{
- reszegyseg: reszegyseg
- },function(resp) {
- window.location.reload();
- });
- }
- function add_reszegyseg(obj) {
- $.post('/admin/gyartas/addreszegyseg/',{},function(resp) {
- window.location.reload();
- });
- }
- function allocate_parts(id) {
- window.location='/admin/rendelesek/allocate/?id='+id;
- // $.post('/admin/rendelesek/allocate/',{
- // id: id
- // },function(response) {
- // window.location.reload();
- // });
- }
- function get_gep_data(gep) {
- $.post('/admin/gyartas/gepinfo/',{gep: gep},function(response) {
- $('#dialog').html(response);
- $('.wrapper').addClass('blur');
- $('#dialog').modal({
- escapeClose: true,
- clickClose: true,
- showClose: true
- });
- });
- }
- function get_cikknev_data(obj,target) {
- $.post('/admin/autocomplete/getcikknev/',{value: $(obj).val()},function(resp) {
- if (resp=='') {
- $(target).removeAttr('disabled');
- }
- else {
- $(target).val(resp);
- $(target).attr('disabled','true');
- }
- });
- }
- function get_cikkszam_data(obj,target) {
- $.post('/admin/autocomplete/getcikkszam/',{value: $(obj).val()},function(resp) {
- if (resp=='') {
- $(target).removeAttr('disabled');
- }
- else {
- $(target).val(resp);
- $(target).attr('disabled','true');
- }
- });
- }
- function set_admin_email_notifications(obj,id) {
- $.post('/admin/admins/notifications/',{id: id},function(resp) {});
- }
- function add_new_referens() {
- $.get('/admin/ertekeles/referenskereses',function(resp) {
- $('#dialog').html(resp);
- $('.wrapper').addClass('blur');
- $('#dialog').modal({
- escapeClose: true,
- clickClose: true,
- showClose: true
- });
- $(".select2").select2({
- dropdownParent: $('#dialog')
- });
- });
- }
- function add_new_iroda() {
- $.get('/admin/irodak/irodakereses',function(resp) {
- $('#dialog').html(resp);
- $('.wrapper').addClass('blur');
- $('#dialog').modal({
- escapeClose: true,
- clickClose: true,
- showClose: true
- });
- $(".select2").select2({
- dropdownParent: $('#dialog')
- });
- });
- }
- function setIrodaState(id) {
- $.get('/admin/irodak/setstate/?id='+id,function(resp) {
- });
- }
- function add_agent_to_db(id) {
- $.get('/admin/ertekeles/addreferens/?id='+id,function(resp) {
- window.location='/admin/ertekeles/edit/?id='+resp;
- });
- }
- function add_iroda_to_db(id) {
- $.get('/admin/irodak/addiroda/?id='+id,function(resp) {
- window.location='/admin/irodak/edit/?id='+resp;
- });
- }
- function isNumber(evt) {
- evt = (evt) ? evt : window.event;
- var charCode = (evt.which) ? evt.which : evt.keyCode;
- if (charCode==46) {
- return true;
- }
- else {
- if (charCode > 31 && (charCode < 48 || charCode > 57)) {
- return false;
- }
- return true;
- }
- }
- function loadEvents(groupID) {
- if (groupID!=='') {
- $.get('/api/loadevents/?groupid=' + groupID,function(resp) {
- $('#parent_event').html(resp);
- });
- }
- }
- function loadMenu(eventID) {
- if (eventID!=='') {
- $.get('/api/loadmenus/?eventid=' + eventID,function(resp) {
- $('#parent_menu').html(resp);
- });
- }
- }
- function loadProds(groupID) {
- if (groupID!=='') {
- $.get('/api/loadprods/?groupid=' + groupID,function(resp) {
- $('#parent_prods').html(resp);
- });
- }
- }
- function loadMenuDetails(obj) {
- var label = $(obj).find(':selected').data('label');
- var description = $(obj).find(':selected').data('description');
- var price = $(obj).find(':selected').data('price');
- console.log(label, description, price);
- $('#box_title').val(label);
- $('#box_subtitle').val(description);
- $('#box_price').val(price);
- }
- $(document).ready(function() {
- $('.checkbtn').each(function() {
- //checkbtn_set_state($(this));
- });
-
- if (active_page.indexOf('beszerzes')==-1) {
- $('.radiobtn').each(function() {
- radiobtn_set_state($(this));
- });
- }
- $('#page_content').trumbowyg({
- btnsDef: {
- image: {
- dropdown: ['insertImage', 'upload'],
- ico: 'insertImage'
- }
- },
- btns: [
- ['viewHTML'],
- ['formatting'],
- ['foreColor', 'backColor'],
- ['strong', 'em', 'del'],
- ['superscript', 'subscript'],
- ['link'],
- ['image'],
- ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
- ['unorderedList', 'orderedList'],
- ['horizontalRule'],
- ['removeformat'],
- ['fullscreen']
- ],
- plugins: {
- upload: {
- serverPath: '/upload.php',
- fileFieldName: 'image',
- urlPropertyName: 'data.link'
- }
- }
- });
-
- $('#page_content_en').trumbowyg({
- btnsDef: {
- image: {
- dropdown: ['insertImage', 'upload'],
- ico: 'insertImage'
- }
- },
- btns: [
- ['viewHTML'],
- ['formatting'],
- ['foreColor', 'backColor'],
- ['strong', 'em', 'del'],
- ['superscript', 'subscript'],
- ['link'],
- ['image'],
- ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
- ['unorderedList', 'orderedList'],
- ['horizontalRule'],
- ['removeformat'],
- ['fullscreen']
- ],
- plugins: {
- upload: {
- serverPath: '/upload.php',
- fileFieldName: 'image',
- urlPropertyName: 'data.link'
- }
- }
- });
-
- $('#battle_start').datetimepicker();
- $('#battle_end').datetimepicker();
- check_for_prev_next();
-
- $('#dialog').on($.modal.BEFORE_CLOSE,function(event,modal) {
- $('.wrapper').removeClass('blur');
- });
-
- $('.roles').on('click',function(event) {
- var roleID = $(this).attr('data-role-id');
- var moduleID = $(this).attr('data-module-id');
- setModuleRoleStatus(roleID,moduleID);
- });
-
- $('.states').on('ifChecked',function(event) {
- var userID = $(this).val();
- setUserState(userID);
- });
-
- $('.states').on('ifUnchecked',function(event) {
- var userID = $(this).val();
- setUserState(userID);
- });
-
- $('.galery-image-item').on('mouseover',function() {
- $(this).children('.minimal').show();
- $(this).children('.deleter').show();
- });
-
- $('.galery-image-item').on('mouseout',function() {
- $(this).children('.minimal').hide();
- $(this).children('.deleter').hide();
- });
-
- $('.variation_status').on('ifChecked',function(event) {
- set_variation_status($(this),true);
- });
-
- $('.variation_status').on('ifUnchecked',function(event) {
- set_variation_status($(this),false);
- });
- $('.szuro').on('click',function() {
- var filter = '.'+$(this).val();
- $('.all').hide();
- $(filter).show();
- });
-
-
- $('.editable').on("click",function() {
- if (!$(this).hasClass('in-edit')) {
- $(this).addClass('in-edit');
- var actual_value = $(this).html();
- var currency = $(this).attr('data-currency');
-
- if (currency==='true') {
- actual_value = actual_value.replace(",- Ft","");
- actual_value = actual_value.replace(" ","");
- }
-
- var field_name = $(this).attr('data-field');
- var table_name = $(this).attr('data-table');
- var row_id = $(this).attr('data-id');
- var key = $(this).attr('data-key');
- $(this).html('<input type="text" name="'+field_name+'" id="'+field_name+'" value="'+actual_value+'" class="form-control edit" onblur="update_field($(this),\''+table_name+'\',\''+field_name+'\',\''+row_id+'\',\''+key+'\',\''+currency+'\')">');
- $('#'+field_name).focus();
- }
- });
-
-
- $(".select2").select2();
- $(".mypartner").select2({placeholder: 'Válasszon partnert!'});
-
- $(".fmachines").select2({placeholder: 'Válasszon gépet!'});
- $(".fparts").select2({placeholder: 'Válasszon részegységet!'});
-
- $(".myclient").select2({placeholder: 'Válasszon ügyfelet!'});
- $(".mypayment").select2({placeholder: 'Válasszon fizetési módot!'});
- $(".mycategory").select2({placeholder: 'Válasszon kategóriát!'});
-
-
- $('.datepicker').datepicker({
- autoclose: true
- });
-
- $('#cost_partner').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autocomplete/search/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
-
- $('#cost_client').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autocomplete/search_client/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
- $('.rendeles_ugyfel').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autocomplete/search_client/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
- $('#filter_bill_number').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autobill/search/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
- $('#cost_bill_number').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autobill/search/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
- $('#beszer_beepites_cikkszam').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autocikkszam/search/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
- $('#filter_comment').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autocomment/search/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
-
-
- $('#cost_egyseg_cikkszam').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autocomplete/cikkszam/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
-
- $('#cost_egyseg_nev').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autocomplete/cikknev/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
-
- $('#beszer_termek').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autotermek/search/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
- $('#beszer_anyagminoseg').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autominoseg/search/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
- $('#beszer_egyseg').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autoegyseg/search/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
- $('#beszer_kategoria').autocomplete({
- source: function(request,response) {
- $.ajax({
- url: '/admin/autokategoria/search/',
- dataType: "jsonp",
- data: {
- term: request.term
- },
- success: function(data) {
- response(data);
- }
- });
- },
- minLength: 1
- });
- $('.uploadMe').on('click',function() {
- //$.post('/admin/bills/updatefile',{id: },function(response) {});
- });
-
-
- var msg_timer = setTimeout(function() {
- $('.callout-success').hide();
- },3000);
-
-
- $('#mytable').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytable2').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytable3').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytable_tech').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytable_rendelesek').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- //$('#mytable4').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- //$('#mytable5').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytable6').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytable7').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytablex').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytablex').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytable_s1').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytable_s2').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytable_s3').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
- $('#mytable_s4').wrap('<div style="overflow-x: scroll;" id="scroller"></div>');
-
- $('.main-header').swipe({
- swipe: function(event, direction, distance, duration, fingerCount, fingerData) {
- if ($('.skin-black').hasClass('sidebar-collapse')) {
- $('.skin-black').removeClass('sidebar-collapse');
- $('#fogantyu').css('left','0px');
- }
- else {
- $('.skin-black').addClass('sidebar-collapse');
- $('#fogantyu').css('left','230px');
- }
- if ($('.skin-black').hasClass('sidebar-open')) {
- $('.skin-black').removeClass('sidebar-open');
- }
- else {
- $('.skin-black').addClass('sidebar-open');
- }
- }
- });
-
-
- $('.main-sidebar').swipe({
- swipe: function(event, direction, distance, duration, fingerCount, fingerData) {
- if ($('.skin-black').hasClass('sidebar-collapse')) {
- $('.skin-black').removeClass('sidebar-collapse');
- $('#fogantyu').css('left','0px');
- }
- else {
- $('.skin-black').addClass('sidebar-collapse');
- $('#fogantyu').css('left','230px');
- }
- if ($('.skin-black').hasClass('sidebar-open')) {
- $('.skin-black').removeClass('sidebar-open');
- }
- else {
- $('.skin-black').addClass('sidebar-open');
- }
- }
- });
- $('#fogantyu').swipe({
- swipe: function(event, direction, distance, duration, fingerCount, fingerData) {
- if ($('.skin-black').hasClass('sidebar-collapse')) {
- $('.skin-black').removeClass('sidebar-collapse');
- $('#fogantyu').css('left','0px');
- }
- else {
- $('.skin-black').addClass('sidebar-collapse');
- $('#fogantyu').css('left','230px');
- }
- if ($('.skin-black').hasClass('sidebar-open')) {
- $('.skin-black').removeClass('sidebar-open');
- }
- else {
- $('.skin-black').addClass('sidebar-open');
- }
- }
- });
-
-
- if (screen.width<767) {
- $('#coll-hack').addClass('collapsed-box');
- $('#coll-sign').removeClass('fa-minus');
- $('#coll-sign').addClass('fa-plus');
- }
-
- });
- $(window).resize(function() {
- if (screen.width<767) {
- $('#coll-hack').addClass('collapsed-box');
- $('#coll-sign').removeClass('fa-minus');
- $('#coll-sign').addClass('fa-plus');
- }
- else {
- $('#coll-hack').removeClass('collapsed-box');
- $('#coll-sign').removeClass('fa-plus');
- $('#coll-sign').addClass('fa-minus');
- }
- });
|