menu admin

This commit is contained in:
Paul Schneider 2017-04-01 03:48:08 +02:00
commit 2cbf44d4a0
10 changed files with 51 additions and 44 deletions

1
Yavsc/wwwroot/js/google-geoloc.min.js vendored Normal file
View file

@ -0,0 +1 @@
+function(t,e){t.widget("psc.googlegeocode",{options:{mapId:"map",longId:"Longitude",latId:"Latitude",addrValidationId:"AddressError",formValidId:"ValidationSummary",locComboId:"LocationCombo"},marker:null,gmap:null,_create:function(){this.element.addClass("googlegeocode"),this.gmap=new e.Map(document.getElementById(this.options.mapId),{zoom:16,center:{lat:48.862854,lng:2.2056466}});var o=this;this.element.rules("add",{remote:{url:"https://maps.googleapis.com/maps/api/geocode/json",type:"get",data:{sensor:!1,address:function(){return o.element.val()}},dataType:"json",dataFilter:function(e){t("#"+o.options.locComboId).html("");var a=JSON.parse(e);return a.results.forEach(function(e){e.formatted_address!==o.element.val()&&t("<li>"+e.formatted_address+"</li>").data("geoloc",e).click(function(){o.chooseLoc("user",e)}).css("cursor","pointer").appendTo(t("#"+o.options.locComboId))}),"OK"===a.status&&1==a.results.length?!0:!1},error:function(){return!1}}})},chooseLoc:function(o,a){"user"===o&&this.element.val(a.formatted_address);var n=a.geometry.location,s=new Number(n.lat),i=new Number(n.lng);return t(document.getElementById(this.options.latId)).val(s.toLocaleString("en")),t(document.getElementById(this.options.longId)).val(i.toLocaleString("en")),this.gmap.setCenter(n),this.marker&&this.marker.setMap(null),this.marker=new e.Marker({map:this.gmap,draggable:!0,animation:e.Animation.DROP,position:n}),e.event.addListener(this.marker,"dragend",function(){var e=this.marker.getPosition();t("#"+this.options.latId).val(e.lat),t("#"+this.options.longId).val(e.lng)}),this.element.valid(),t("#"+this.options.addrValidationId).empty(),t("#"+this.options.formValidId).empty(),t("#"+this.options.locComboId).empty(),this}})}(jQuery,google.maps);

1
Yavsc/wwwroot/js/parallax.min.js vendored Normal file
View file

@ -0,0 +1 @@
$(document).ready(function(t){var r=t(window),o=t(window).width(),a=t(window).height(),e=function(t,e,n){var g=t.data("speed"),s=(r.scrollLeft()+e-o/2)/g,i=(r.scrollTop()+n-a/2)/g,p=t.attr("orgbgpx")-Math.round(s),u=t.attr("orgbgpy")-Math.round(i),b=""+p+t.attr("orgbgpxu")+u+t.attr("orgbgpyu");t.css({backgroundPosition:b})},n=0,g=0;t('[data-type="background"]').each(function(){var r=t(this),s=r.css("backgroundPosition"),i=s.split(" "),p=i[0],u=i[1];/%$/.test(p)?(p=p.substr(0,p.length-1),r.attr("orgbgpxu","% ")):/em$/.test(p)?(p=p.substr(0,p.length-2),r.attr("orgbgpxu","em ")):/px$/.test(p)?(p=p.substr(0,p.length-2),r.attr("orgbgpxu","px ")):r.attr("orgbgpxu","px "),/%$/.test(u)?(u=u.substr(0,u.length-1),r.attr("orgbgpyu","% ")):/em$/.test(u)?(u=u.substr(0,u.length-2),r.attr("orgbgpyu","em ")):/px$/.test(u)?(u=u.substr(0,u.length-2),r.attr("orgbgpyu","px ")):r.attr("orgbgpyu","px "),r.attr("orgbgpx",parseInt(p)),r.attr("orgbgpy",parseInt(u)),t(window).scroll(function(){e(r,n,g)}),window.DeviceOrientationEvent&&(o>320&&a>320&&window.addEventListener("deviceorientation",function(t){n=o*Math.sin(t.gamma*Math.PI/180),g=a*Math.sin(t.beta*Math.PI/90),e(r,n,g)},!1),t(window).mousemove(function(t){n=t.pageX,g=t.pageY,e(r,t.pageX,t.pageY)}))})}(jQuery));