From 250bf57e1e69670b956c1365dcb9ffa90800c05c Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 4 May 2012 17:43:04 -0400 Subject: [PATCH 01/57] Merge branch 'master', remote-tracking branch 'remotes/upstream/master' * remotes/upstream/master: * master: From f29775143763606a725565db941e5bfd1acbaaba Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sat, 5 May 2012 20:01:38 +0200 Subject: [PATCH 02/57] diabook-theme: can now set the twitter search term in theme-settings & small fixes --- view/theme/diabook/communityhome.tpl | 29 +- view/theme/diabook/config.php | 11 +- view/theme/diabook/js/OpenLayers.js | 2885 +++++++++++++++++ view/theme/diabook/js/jquery.mapquery.core.js | 1028 ++++++ .../theme/diabook/js/jquery.twitter.search.js | 2 +- view/theme/diabook/oembed_video.tpl | 2 +- view/theme/diabook/theme.php | 87 +- view/theme/diabook/theme_settings.tpl | 2 + 8 files changed, 4013 insertions(+), 33 deletions(-) create mode 100644 view/theme/diabook/js/OpenLayers.js create mode 100644 view/theme/diabook/js/jquery.mapquery.core.js diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl index 0386d63d3..9bd4ad8bc 100755 --- a/view/theme/diabook/communityhome.tpl +++ b/view/theme/diabook/communityhome.tpl @@ -8,10 +8,9 @@
$page
{{ endif }} -
{{ if $comunity_profilest_title }} -

$comunity_profilest_title

+

$comunity_profilest_title

{{ for $comunity_profiles_items as $i }} $i @@ -22,7 +21,7 @@
{{ if $helpers }} -

$helpers.title.1

+

$helpers.title.1

NewHere
Friendica Support
Let's talk
@@ -32,7 +31,7 @@
{{ if $con_services }} -

$con_services.title.1

+

$con_services.title.1

Facebook StatusNet @@ -48,7 +47,7 @@
{{ if $nv }} -

$nv.title.1

+

$nv.title.1

$nv.directory.1
$nv.global_directory.1
$nv.match.1
@@ -60,7 +59,7 @@ $nv.search
{{ if $lastusers_title }} -

$lastusers_title

+

$lastusers_title

{{ for $lastusers_items as $i }} $i @@ -80,7 +79,7 @@ $nv.search
{{ if $photos_title }} -

$photos_title

+

$photos_title

{{ for $photos_items as $i }} $i @@ -91,7 +90,7 @@ $nv.search
{{ if $like_title }} -

$like_title

+

$like_title

    {{ for $like_items as $i }}
  • $i
  • @@ -102,4 +101,18 @@ $nv.search
    + +
    +{{ if $mapquery }} +

    $mapquery.title.1

    +
    +
    +
    Data CC-By-SA by OpenStreetMap
    + +{{ endif }} +
\ No newline at end of file diff --git a/view/theme/diabook/config.php b/view/theme/diabook/config.php index 2477bb3d3..e6c2681e3 100644 --- a/view/theme/diabook/config.php +++ b/view/theme/diabook/config.php @@ -13,8 +13,9 @@ function theme_content(&$a){ $line_height = get_pconfig(local_user(), 'diabook', 'line_height' ); $resolution = get_pconfig(local_user(), 'diabook', 'resolution' ); $color = get_pconfig(local_user(), 'diabook', 'color' ); + $TSearchTerm = get_pconfig(local_user(), 'diabook', 'TSearchTerm' ); - return diabook_form($a,$font_size, $line_height, $resolution, $color); + return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm); } function theme_post(&$a){ @@ -26,6 +27,7 @@ function theme_post(&$a){ set_pconfig(local_user(), 'diabook', 'line_height', $_POST['diabook_line_height']); set_pconfig(local_user(), 'diabook', 'resolution', $_POST['diabook_resolution']); set_pconfig(local_user(), 'diabook', 'color', $_POST['diabook_color']); + set_pconfig(local_user(), 'diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']); } } @@ -35,8 +37,9 @@ function theme_admin(&$a){ $line_height = get_config('diabook', 'line_height' ); $resolution = get_config('diabook', 'resolution' ); $color = get_config('diabook', 'color' ); + $TSearchTerm = get_config('diabook', 'TSearchTerm' ); - return diabook_form($a,$font_size, $line_height, $resolution, $color); + return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm); } function theme_admin_post(&$a){ @@ -45,11 +48,12 @@ function theme_admin_post(&$a){ set_config('diabook', 'line_height', $_POST['diabook_line_height']); set_config('diabook', 'resolution', $_POST['diabook_resolution']); set_config('diabook', 'color', $_POST['diabook_color']); + set_config('diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']); } } -function diabook_form(&$a, $font_size, $line_height, $resolution, $color){ +function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSearchTerm){ $line_heights = array( "1.3"=>"1.3", "---"=>"---", @@ -95,6 +99,7 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color){ '$line_height' => array('diabook_line_height', t('Set line-height for posts and comments'), $line_height, '', $line_heights), '$resolution' => array('diabook_resolution', t('Set resolution for middle column'), $resolution, '', $resolutions), '$color' => array('diabook_color', t('Set color scheme'), $color, '', $colors), + '$TSearchTerm' => array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm), )); return $o; } diff --git a/view/theme/diabook/js/OpenLayers.js b/view/theme/diabook/js/OpenLayers.js new file mode 100644 index 000000000..d17745389 --- /dev/null +++ b/view/theme/diabook/js/OpenLayers.js @@ -0,0 +1,2885 @@ +/* + + OpenLayers.js -- OpenLayers Map Viewer Library + + Copyright 2005-2011 OpenLayers Contributors, released under the FreeBSD + license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt + for the full text of the license. + + Includes compressed code under the following licenses: + + (For uncompressed versions of the code used please see the + OpenLayers SVN repository: ) + +*/ + +/* Contains portions of Prototype.js: + * + * Prototype JavaScript framework, version 1.4.0 + * (c) 2005 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://prototype.conio.net/ + * + *--------------------------------------------------------------------------*/ + +/** +* +* Contains portions of Rico +* +* Copyright 2005 Sabre Airline Solutions +* +* Licensed under the Apache License, Version 2.0 (the "License"); you +* may not use this file except in compliance with the License. You +* may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +* implied. See the License for the specific language governing +* permissions and limitations under the License. +* +**/ + +/** + * Contains XMLHttpRequest.js + * Copyright 2007 Sergey Ilinsky (http://www.ilinsky.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +/** + * Contains portions of Gears + * + * Copyright 2007, Google Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of Google Inc. nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Sets up google.gears.*, which is *the only* supported way to access Gears. + * + * Circumvent this file at your own risk! + * + * In the future, Gears may automatically define google.gears.* without this + * file. Gears may use these objects to transparently fix bugs and compatibility + * issues. Applications that use the code below will continue to work seamlessly + * when that happens. + */ + +/** + * OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is + * Copyright (c) 2006, Yahoo! Inc. + * All rights reserved. + * + * Redistribution and use of this software in source and binary forms, with or + * without modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of Yahoo! Inc. nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission of Yahoo! Inc. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */(function(){if(window.google&&google.gears){return;} +var factory=null;if(typeof GearsFactory!='undefined'){factory=new GearsFactory();}else{try{factory=new ActiveXObject('Gears.Factory');if(factory.getBuildInfo().indexOf('ie_mobile')!=-1){factory.privateSetGlobalObject(this);}}catch(e){if((typeof navigator.mimeTypes!='undefined')&&navigator.mimeTypes["application/x-googlegears"]){factory=document.createElement("object");factory.style.display="none";factory.width=0;factory.height=0;factory.type="application/x-googlegears";document.documentElement.appendChild(factory);}}} +if(!factory){return;} +if(!window.google){google={};} +if(!google.gears){google.gears={factory:factory};}})();var OpenLayers={VERSION_NUMBER:"Release 2.11",singleFile:true,_getScriptLocation:(function(){var r=new RegExp("(^|(.*?\\/))(OpenLayers\.js)(\\?|$)"),s=document.getElementsByTagName('script'),src,m,l="";for(var i=0,len=s.length;i1){var newArgs=[C,P].concat(Array.prototype.slice.call(arguments).slice(1,len-1),F);OpenLayers.inherit.apply(null,newArgs);}else{C.prototype=F;} +return C;};OpenLayers.Class.isPrototype=function(){};OpenLayers.Class.create=function(){return function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments);}};};OpenLayers.Class.inherit=function(P){var C=function(){P.call(this);};var newArgs=[C].concat(Array.prototype.slice.call(arguments));OpenLayers.inherit.apply(null,newArgs);return C.prototype;};OpenLayers.inherit=function(C,P){var F=function(){};F.prototype=P.prototype;C.prototype=new F;var i,l,o;for(i=2,l=arguments.length;i0;},CLASS_NAME:"OpenLayers.Protocol.Response"});OpenLayers.Protocol.Response.SUCCESS=1;OpenLayers.Protocol.Response.FAILURE=0;OpenLayers.Protocol.SQL=OpenLayers.Class(OpenLayers.Protocol,{databaseName:'ol',tableName:"ol_vector_features",postReadFiltering:true,initialize:function(options){OpenLayers.Protocol.prototype.initialize.apply(this,[options]);},destroy:function(){OpenLayers.Protocol.prototype.destroy.apply(this);},supported:function(){return false;},evaluateFilter:function(feature,filter){return filter&&this.postReadFiltering?filter.evaluate(feature):true;},CLASS_NAME:"OpenLayers.Protocol.SQL"});OpenLayers.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},userError:function(error){alert(error);},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){},CLASS_NAME:"OpenLayers.Console"};(function(){var scripts=document.getElementsByTagName("script");for(var i=0,len=scripts.length;i0){fig=parseFloat(num.toPrecision(sig));} +return fig;},format:function(num,dec,tsep,dsep){dec=(typeof dec!="undefined")?dec:0;tsep=(typeof tsep!="undefined")?tsep:OpenLayers.Number.thousandsSeparator;dsep=(typeof dsep!="undefined")?dsep:OpenLayers.Number.decimalSeparator;if(dec!=null){num=parseFloat(num.toFixed(dec));} +var parts=num.toString().split(".");if(parts.length==1&&dec==null){dec=0;} +var integer=parts[0];if(tsep){var thousands=/(-?[0-9]+)([0-9]{3})/;while(thousands.test(integer)){integer=integer.replace(thousands,"$1"+tsep+"$2");}} +var str;if(dec==0){str=integer;}else{var rem=parts.length>1?parts[1]:"0";if(dec!=null){rem=rem+new Array(dec-rem.length+1).join("0");} +str=integer+dsep+rem;} +return str;}};if(!Number.prototype.limitSigDigs){Number.prototype.limitSigDigs=function(sig){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.Number.limitSigDigs'}));return OpenLayers.Number.limitSigDigs(this,sig);};} +OpenLayers.Function={bind:function(func,object){var args=Array.prototype.slice.apply(arguments,[2]);return function(){var newArgs=args.concat(Array.prototype.slice.apply(arguments,[0]));return func.apply(object,newArgs);};},bindAsEventListener:function(func,object){return function(event){return func.call(object,event||window.event);};},False:function(){return false;},True:function(){return true;},Void:function(){}};if(!Function.prototype.bind){Function.prototype.bind=function(){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.Function.bind'}));Array.prototype.unshift.apply(arguments,[this]);return OpenLayers.Function.bind.apply(null,arguments);};} +if(!Function.prototype.bindAsEventListener){Function.prototype.bindAsEventListener=function(object){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'OpenLayers.Function.bindAsEventListener'}));return OpenLayers.Function.bindAsEventListener(this,object);};} +OpenLayers.Array={filter:function(array,callback,caller){var selected=[];if(Array.prototype.filter){selected=array.filter(callback,caller);}else{var len=array.length;if(typeof callback!="function"){throw new TypeError();} +for(var i=0;ithis.right)){this.right=bounds.right;} +if((this.top==null)||(bounds.top>this.top)){this.top=bounds.top;}}}},containsLonLat:function(ll,inclusive){return this.contains(ll.lon,ll.lat,inclusive);},containsPixel:function(px,inclusive){return this.contains(px.x,px.y,inclusive);},contains:function(x,y,inclusive){if(inclusive==null){inclusive=true;} +if(x==null||y==null){return false;} +x=OpenLayers.Util.toFloat(x);y=OpenLayers.Util.toFloat(y);var contains=false;if(inclusive){contains=((x>=this.left)&&(x<=this.right)&&(y>=this.bottom)&&(y<=this.top));}else{contains=((x>this.left)&&(xthis.bottom)&&(y=this.bottom)&&(bounds.bottom<=this.top))||((this.bottom>=bounds.bottom)&&(this.bottom<=bounds.top)));var inTop=(((bounds.top>=this.bottom)&&(bounds.top<=this.top))||((this.top>bounds.bottom)&&(this.top=this.left)&&(bounds.left<=this.right))||((this.left>=bounds.left)&&(this.left<=bounds.right)));var inRight=(((bounds.right>=this.left)&&(bounds.right<=this.right))||((this.right>=bounds.left)&&(this.right<=bounds.right)));intersects=((inBottom||inTop)&&(inLeft||inRight));} +return intersects;},containsBounds:function(bounds,partial,inclusive){if(partial==null){partial=false;} +if(inclusive==null){inclusive=true;} +var bottomLeft=this.contains(bounds.left,bounds.bottom,inclusive);var bottomRight=this.contains(bounds.right,bounds.bottom,inclusive);var topLeft=this.contains(bounds.left,bounds.top,inclusive);var topRight=this.contains(bounds.right,bounds.top,inclusive);return(partial)?(bottomLeft||bottomRight||topLeft||topRight):(bottomLeft&&bottomRight&&topLeft&&topRight);},determineQuadrant:function(lonlat){var quadrant="";var center=this.getCenterLonLat();quadrant+=(lonlat.lat=maxExtent.right&&newBounds.right>maxExtent.right){newBounds=newBounds.add(-maxExtent.getWidth(),0);}} +return newBounds;},CLASS_NAME:"OpenLayers.Bounds"});OpenLayers.Bounds.fromString=function(str,reverseAxisOrder){var bounds=str.split(",");return OpenLayers.Bounds.fromArray(bounds,reverseAxisOrder);};OpenLayers.Bounds.fromArray=function(bbox,reverseAxisOrder){return reverseAxisOrder===true?new OpenLayers.Bounds(parseFloat(bbox[1]),parseFloat(bbox[0]),parseFloat(bbox[3]),parseFloat(bbox[2])):new OpenLayers.Bounds(parseFloat(bbox[0]),parseFloat(bbox[1]),parseFloat(bbox[2]),parseFloat(bbox[3]));};OpenLayers.Bounds.fromSize=function(size){return new OpenLayers.Bounds(0,size.h,size.w,0);};OpenLayers.Bounds.oppositeQuadrant=function(quadrant){var opp="";opp+=(quadrant.charAt(0)=='t')?'b':'t';opp+=(quadrant.charAt(1)=='l')?'r':'l';return opp;};OpenLayers.Element={visible:function(element){return OpenLayers.Util.getElement(element).style.display!='none';},toggle:function(){for(var i=0,len=arguments.length;imaxExtent.right){newLonLat.lon-=maxExtent.getWidth();}} +return newLonLat;},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(str){var pair=str.split(",");return new OpenLayers.LonLat(pair[0],pair[1]);};OpenLayers.LonLat.fromArray=function(arr){var gotArr=OpenLayers.Util.isArray(arr),lon=gotArr&&arr[0],lat=gotArr&&arr[1];return new OpenLayers.LonLat(lon,lat);};OpenLayers.Pixel=OpenLayers.Class({x:0.0,y:0.0,initialize:function(x,y){this.x=parseFloat(x);this.y=parseFloat(y);},toString:function(){return("x="+this.x+",y="+this.y);},clone:function(){return new OpenLayers.Pixel(this.x,this.y);},equals:function(px){var equals=false;if(px!=null){equals=((this.x==px.x&&this.y==px.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(px.x)&&isNaN(px.y)));} +return equals;},distanceTo:function(px){return Math.sqrt(Math.pow(this.x-px.x,2)+ +Math.pow(this.y-px.y,2));},add:function(x,y){if((x==null)||(y==null)){var msg=OpenLayers.i18n("pixelAddError");OpenLayers.Console.error(msg);return null;} +return new OpenLayers.Pixel(this.x+x,this.y+y);},offset:function(px){var newPx=this.clone();if(px){newPx=this.add(px.x,px.y);} +return newPx;},CLASS_NAME:"OpenLayers.Pixel"});OpenLayers.Size=OpenLayers.Class({w:0.0,h:0.0,initialize:function(w,h){this.w=parseFloat(w);this.h=parseFloat(h);},toString:function(){return("w="+this.w+",h="+this.h);},clone:function(){return new OpenLayers.Size(this.w,this.h);},equals:function(sz){var equals=false;if(sz!=null){equals=((this.w==sz.w&&this.h==sz.h)||(isNaN(this.w)&&isNaN(this.h)&&isNaN(sz.w)&&isNaN(sz.h)));} +return equals;},CLASS_NAME:"OpenLayers.Size"});OpenLayers.Util=OpenLayers.Util||{};OpenLayers.Util.getElement=function(){var elements=[];for(var i=0,len=arguments.length;i=0;i--){if(array[i]==item){array.splice(i,1);}} +return array;};OpenLayers.Util.clearArray=function(array){OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",{'newMethod':'array = []'}));array.length=0;};OpenLayers.Util.indexOf=function(array,obj){if(typeof array.indexOf=="function"){return array.indexOf(obj);}else{for(var i=0,len=array.length;i=0.0&&parseFloat(opacity)<1.0){element.style.filter='alpha(opacity='+(opacity*100)+')';element.style.opacity=opacity;}else if(parseFloat(opacity)==1.0){element.style.filter='';element.style.opacity='';}};OpenLayers.Util.createDiv=function(id,px,sz,imgURL,position,border,overflow,opacity){var dom=document.createElement('div');if(imgURL){dom.style.backgroundImage='url('+imgURL+')';} +if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");} +if(!position){position="absolute";} +OpenLayers.Util.modifyDOMElement(dom,id,px,sz,position,border,overflow,opacity);return dom;};OpenLayers.Util.createImage=function(id,px,sz,imgURL,position,border,opacity,delayDisplay){var image=document.createElement("img");if(!id){id=OpenLayers.Util.createUniqueID("OpenLayersDiv");} +if(!position){position="relative";} +OpenLayers.Util.modifyDOMElement(image,id,px,sz,position,border,null,opacity);if(delayDisplay){image.style.display="none";OpenLayers.Event.observe(image,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,image));OpenLayers.Event.observe(image,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,image));} +image.style.alt=id;image.galleryImg="no";if(imgURL){image.src=imgURL;} +return image;};OpenLayers.Util.setOpacity=function(element,opacity){OpenLayers.Util.modifyDOMElement(element,null,null,null,null,null,null,opacity);};OpenLayers.Util.onImageLoad=function(){if(!this.viewRequestID||(this.map&&this.viewRequestID==this.map.viewRequestID)){this.style.display="";} +OpenLayers.Element.removeClass(this,"olImageLoadError");};OpenLayers.IMAGE_RELOAD_ATTEMPTS=0;OpenLayers.Util.onImageLoadError=function(){this._attempts=(this._attempts)?(this._attempts+1):1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){var urls=this.urls;if(urls&&OpenLayers.Util.isArray(urls)&&urls.length>1){var src=this.src.toString();var current_url,k;for(k=0;current_url=urls[k];k++){if(src.indexOf(current_url)!=-1){break;}} +var guess=Math.floor(urls.length*Math.random());var new_url=urls[guess];k=0;while(new_url==current_url&&k++<4){guess=Math.floor(urls.length*Math.random());new_url=urls[guess];} +this.src=src.replace(current_url,new_url);}else{this.src=this.src;}}else{OpenLayers.Element.addClass(this,"olImageLoadError");} +this.style.display="";};OpenLayers.Util.alphaHackNeeded=null;OpenLayers.Util.alphaHack=function(){if(OpenLayers.Util.alphaHackNeeded==null){var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);var filter=false;try{filter=!!(document.body.filters);}catch(e){} +OpenLayers.Util.alphaHackNeeded=(filter&&(version>=5.5)&&(version<7));} +return OpenLayers.Util.alphaHackNeeded;};OpenLayers.Util.modifyAlphaImageDiv=function(div,id,px,sz,imgURL,position,border,sizing,opacity){OpenLayers.Util.modifyDOMElement(div,id,px,sz,position,null,null,opacity);var img=div.childNodes[0];if(imgURL){img.src=imgURL;} +OpenLayers.Util.modifyDOMElement(img,div.id+"_innerImage",null,sz,"relative",border);if(OpenLayers.Util.alphaHack()){if(div.style.display!="none"){div.style.display="inline-block";} +if(sizing==null){sizing="scale";} +div.style.filter="progid:DXImageTransform.Microsoft"+".AlphaImageLoader(src='"+img.src+"', "+"sizingMethod='"+sizing+"')";if(parseFloat(div.style.opacity)>=0.0&&parseFloat(div.style.opacity)<1.0){div.style.filter+=" alpha(opacity="+div.style.opacity*100+")";} +img.style.filter="alpha(opacity=0)";}};OpenLayers.Util.createAlphaImageDiv=function(id,px,sz,imgURL,position,border,sizing,opacity,delayDisplay){var div=OpenLayers.Util.createDiv();var img=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);div.appendChild(img);if(delayDisplay){img.style.display="none";OpenLayers.Event.observe(img,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,div));OpenLayers.Event.observe(img,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,div));} +OpenLayers.Util.modifyAlphaImageDiv(div,id,px,sz,imgURL,position,border,sizing,opacity);return div;};OpenLayers.Util.upperCaseObject=function(object){var uObject={};for(var key in object){uObject[key.toUpperCase()]=object[key];} +return uObject;};OpenLayers.Util.applyDefaults=function(to,from){to=to||{};var fromIsEvt=typeof window.Event=="function"&&from instanceof window.Event;for(var key in from){if(to[key]===undefined||(!fromIsEvt&&from.hasOwnProperty&&from.hasOwnProperty(key)&&!to.hasOwnProperty(key))){to[key]=from[key];}} +if(!fromIsEvt&&from&&from.hasOwnProperty&&from.hasOwnProperty('toString')&&!to.hasOwnProperty('toString')){to.toString=from.toString;} +return to;};OpenLayers.Util.getParameterString=function(params){var paramsArray=[];for(var key in params){var value=params[key];if((value!=null)&&(typeof value!='function')){var encodedValue;if(typeof value=='object'&&value.constructor==Array){var encodedItemArray=[];var item;for(var itemIndex=0,len=value.length;itemIndex1e-12&&--iterLimit>0){var sinLambda=Math.sin(lambda),cosLambda=Math.cos(lambda);var sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+ +(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma==0){return 0;} +var cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;var sigma=Math.atan2(sinSigma,cosSigma);var alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);var cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);var cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));} +if(iterLimit==0){return NaN;} +var uSq=cosSqAlpha*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)- +B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));var s=b*A*(sigma-deltaSigma);var d=s.toFixed(3)/1000;return d;};OpenLayers.Util.destinationVincenty=function(lonlat,brng,dist){var u=OpenLayers.Util;var ct=u.VincentyConstants;var a=ct.a,b=ct.b,f=ct.f;var lon1=lonlat.lon;var lat1=lonlat.lat;var s=dist;var alpha1=u.rad(brng);var sinAlpha1=Math.sin(alpha1);var cosAlpha1=Math.cos(alpha1);var tanU1=(1-f)*Math.tan(u.rad(lat1));var cosU1=1/Math.sqrt((1+tanU1*tanU1)),sinU1=tanU1*cosU1;var sigma1=Math.atan2(tanU1,cosAlpha1);var sinAlpha=cosU1*sinAlpha1;var cosSqAlpha=1-sinAlpha*sinAlpha;var uSq=cosSqAlpha*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var sigma=s/(b*A),sigmaP=2*Math.PI;while(Math.abs(sigma-sigmaP)>1e-12){var cos2SigmaM=Math.cos(2*sigma1+sigma);var sinSigma=Math.sin(sigma);var cosSigma=Math.cos(sigma);var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)- +B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));sigmaP=sigma;sigma=s/(b*A)+deltaSigma;} +var tmp=sinU1*sinSigma-cosU1*cosSigma*cosAlpha1;var lat2=Math.atan2(sinU1*cosSigma+cosU1*sinSigma*cosAlpha1,(1-f)*Math.sqrt(sinAlpha*sinAlpha+tmp*tmp));var lambda=Math.atan2(sinSigma*sinAlpha1,cosU1*cosSigma-sinU1*sinSigma*cosAlpha1);var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));var L=lambda-(1-C)*f*sinAlpha*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));var revAz=Math.atan2(sinAlpha,-tmp);return new OpenLayers.LonLat(lon1+u.deg(L),u.deg(lat2));};OpenLayers.Util.getParameters=function(url){url=(url===null||url===undefined)?window.location.href:url;var paramsString="";if(OpenLayers.String.contains(url,'?')){var start=url.indexOf('?')+1;var end=OpenLayers.String.contains(url,"#")?url.indexOf('#'):url.length;paramsString=url.substring(start,end);} +var parameters={};var pairs=paramsString.split(/[&;]/);for(var i=0,len=pairs.length;i1.0)?(1.0/scale):scale;return normScale;};OpenLayers.Util.getResolutionFromScale=function(scale,units){var resolution;if(scale){if(units==null){units="degrees";} +var normScale=OpenLayers.Util.normalizeScale(scale);resolution=1/(normScale*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH);} +return resolution;};OpenLayers.Util.getScaleFromResolution=function(resolution,units){if(units==null){units="degrees";} +var scale=resolution*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH;return scale;};OpenLayers.Util.safeStopPropagation=function(evt){OpenLayers.Event.stop(evt,true);};OpenLayers.Util.pagePosition=function(forElement){var pos=[0,0];var viewportElement=OpenLayers.Util.getViewportElement();if(!forElement||forElement==window||forElement==viewportElement){return pos;} +var BUGGY_GECKO_BOX_OBJECT=OpenLayers.IS_GECKO&&document.getBoxObjectFor&&OpenLayers.Element.getStyle(forElement,'position')=='absolute'&&(forElement.style.top==''||forElement.style.left=='');var parent=null;var box;if(forElement.getBoundingClientRect){box=forElement.getBoundingClientRect();var scrollTop=viewportElement.scrollTop;var scrollLeft=viewportElement.scrollLeft;pos[0]=box.left+scrollLeft;pos[1]=box.top+scrollTop;}else if(document.getBoxObjectFor&&!BUGGY_GECKO_BOX_OBJECT){box=document.getBoxObjectFor(forElement);var vpBox=document.getBoxObjectFor(viewportElement);pos[0]=box.screenX-vpBox.screenX;pos[1]=box.screenY-vpBox.screenY;}else{pos[0]=forElement.offsetLeft;pos[1]=forElement.offsetTop;parent=forElement.offsetParent;if(parent!=forElement){while(parent){pos[0]+=parent.offsetLeft;pos[1]+=parent.offsetTop;parent=parent.offsetParent;}} +var browser=OpenLayers.BROWSER_NAME;if(browser=="opera"||(browser=="safari"&&OpenLayers.Element.getStyle(forElement,'position')=='absolute')){pos[1]-=document.body.offsetTop;} +parent=forElement.offsetParent;while(parent&&parent!=document.body){pos[0]-=parent.scrollLeft;if(browser!="opera"||parent.tagName!='TR'){pos[1]-=parent.scrollTop;} +parent=parent.offsetParent;}} +return pos;};OpenLayers.Util.getViewportElement=function(){var viewportElement=arguments.callee.viewportElement;if(viewportElement==undefined){viewportElement=(OpenLayers.BROWSER_NAME=="msie"&&document.compatMode!='CSS1Compat')?document.body:document.documentElement;arguments.callee.viewportElement=viewportElement;} +return viewportElement;};OpenLayers.Util.isEquivalentUrl=function(url1,url2,options){options=options||{};OpenLayers.Util.applyDefaults(options,{ignoreCase:true,ignorePort80:true,ignoreHash:true});var urlObj1=OpenLayers.Util.createUrlObject(url1,options);var urlObj2=OpenLayers.Util.createUrlObject(url2,options);for(var key in urlObj1){if(key!=="args"){if(urlObj1[key]!=urlObj2[key]){return false;}}} +for(var key in urlObj1.args){if(urlObj1.args[key]!=urlObj2.args[key]){return false;} +delete urlObj2.args[key];} +for(var key in urlObj2.args){return false;} +return true;};OpenLayers.Util.createUrlObject=function(url,options){options=options||{};if(!(/^\w+:\/\//).test(url)){var loc=window.location;var port=loc.port?":"+loc.port:"";var fullUrl=loc.protocol+"//"+loc.host.split(":").shift()+port;if(url.indexOf("/")===0){url=fullUrl+url;}else{var parts=loc.pathname.split("/");parts.pop();url=fullUrl+parts.join("/")+"/"+url;}} +if(options.ignoreCase){url=url.toLowerCase();} +var a=document.createElement('a');a.href=url;var urlObject={};urlObject.host=a.host.split(":").shift();urlObject.protocol=a.protocol;if(options.ignorePort80){urlObject.port=(a.port=="80"||a.port=="0")?"":a.port;}else{urlObject.port=(a.port==""||a.port=="0")?"80":a.port;} +urlObject.hash=(options.ignoreHash||a.hash==="#")?"":a.hash;var queryString=a.search;if(!queryString){var qMark=url.indexOf("?");queryString=(qMark!=-1)?url.substr(qMark):"";} +urlObject.args=OpenLayers.Util.getParameters(queryString);urlObject.pathname=(a.pathname.charAt(0)=="/")?a.pathname:"/"+a.pathname;return urlObject;};OpenLayers.Util.removeTail=function(url){var head=null;var qMark=url.indexOf("?");var hashMark=url.indexOf("#");if(qMark==-1){head=(hashMark!=-1)?url.substr(0,hashMark):url;}else{head=(hashMark!=-1)?url.substr(0,Math.min(qMark,hashMark)):url.substr(0,qMark);} +return head;};OpenLayers.IS_GECKO=(function(){var ua=navigator.userAgent.toLowerCase();return ua.indexOf("webkit")==-1&&ua.indexOf("gecko")!=-1;})();OpenLayers.BROWSER_NAME=(function(){var name="";var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("opera")!=-1){name="opera";}else if(ua.indexOf("msie")!=-1){name="msie";}else if(ua.indexOf("safari")!=-1){name="safari";}else if(ua.indexOf("mozilla")!=-1){if(ua.indexOf("firefox")!=-1){name="firefox";}else{name="mozilla";}} +return name;})();OpenLayers.Util.getBrowserName=function(){return OpenLayers.BROWSER_NAME;};OpenLayers.Util.getRenderedDimensions=function(contentHTML,size,options){var w,h;var container=document.createElement("div");container.style.visibility="hidden";var containerElement=(options&&options.containerElement)?options.containerElement:document.body;if(size){if(size.w){w=size.w;container.style.width=w+"px";}else if(size.h){h=size.h;container.style.height=h+"px";}} +if(options&&options.displayClass){container.className=options.displayClass;} +var content=document.createElement("div");content.innerHTML=contentHTML;content.style.overflow="visible";if(content.childNodes){for(var i=0,l=content.childNodes.length;i=60){coordinateseconds-=60;coordinateminutes+=1;if(coordinateminutes>=60){coordinateminutes-=60;coordinatedegrees+=1;}} +if(coordinatedegrees<10){coordinatedegrees="0"+coordinatedegrees;} +var str=coordinatedegrees+"\u00B0";if(dmsOption.indexOf('dm')>=0){if(coordinateminutes<10){coordinateminutes="0"+coordinateminutes;} +str+=coordinateminutes+"'";if(dmsOption.indexOf('dms')>=0){if(coordinateseconds<10){coordinateseconds="0"+coordinateseconds;} +str+=coordinateseconds+'"';}} +if(axis=="lon"){str+=coordinate<0?OpenLayers.i18n("W"):OpenLayers.i18n("E");}else{str+=coordinate<0?OpenLayers.i18n("S"):OpenLayers.i18n("N");} +return str;};OpenLayers.Format=OpenLayers.Class({options:null,externalProjection:null,internalProjection:null,data:null,keepData:false,initialize:function(options){OpenLayers.Util.extend(this,options);this.options=options;},destroy:function(){},read:function(data){OpenLayers.Console.userError(OpenLayers.i18n("readNotImplemented"));},write:function(object){OpenLayers.Console.userError(OpenLayers.i18n("writeNotImplemented"));},CLASS_NAME:"OpenLayers.Format"});OpenLayers.Format.JSON=OpenLayers.Class(OpenLayers.Format,{indent:" ",space:" ",newline:"\n",level:0,pretty:false,nativeJSON:(function(){return!!(window.JSON&&typeof JSON.parse=="function"&&typeof JSON.stringify=="function");})(),read:function(json,filter){var object;if(this.nativeJSON){object=JSON.parse(json,filter);}else try{if(/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){object=eval('('+json+')');if(typeof filter==='function'){function walk(k,v){if(v&&typeof v==='object'){for(var i in v){if(v.hasOwnProperty(i)){v[i]=walk(i,v[i]);}}} +return filter(k,v);} +object=walk('',object);}}}catch(e){} +if(this.keepData){this.data=object;} +return object;},write:function(value,pretty){this.pretty=!!pretty;var json=null;var type=typeof value;if(this.serialize[type]){try{json=(!this.pretty&&this.nativeJSON)?JSON.stringify(value):this.serialize[type].apply(this,[value]);}catch(err){OpenLayers.Console.error("Trouble serializing: "+err);}} +return json;},writeIndent:function(){var pieces=[];if(this.pretty){for(var i=0;i0){pieces.push(',');} +pieces.push(this.writeNewline(),this.writeIndent(),json);}} +this.level-=1;pieces.push(this.writeNewline(),this.writeIndent(),']');return pieces.join('');},'string':function(string){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};if(/["\\\x00-\x1f]/.test(string)){return'"'+string.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;} +c=b.charCodeAt();return'\\u00'+ +Math.floor(c/16).toString(16)+ +(c%16).toString(16);})+'"';} +return'"'+string+'"';},'number':function(number){return isFinite(number)?String(number):"null";},'boolean':function(bool){return String(bool);},'date':function(date){function format(number){return(number<10)?'0'+number:number;} +return'"'+date.getFullYear()+'-'+ +format(date.getMonth()+1)+'-'+ +format(date.getDate())+'T'+ +format(date.getHours())+':'+ +format(date.getMinutes())+':'+ +format(date.getSeconds())+'"';}},CLASS_NAME:"OpenLayers.Format.JSON"});OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:null,popup:null,initialize:function(layer,lonlat,data){this.layer=layer;this.lonlat=lonlat;this.data=(data!=null)?data:{};this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){if((this.layer!=null)&&(this.layer.map!=null)){if(this.popup!=null){this.layer.map.removePopup(this.popup);}} +if(this.layer!=null&&this.marker!=null){this.layer.removeMarker(this.marker);} +this.layer=null;this.id=null;this.lonlat=null;this.data=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null;} +if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null;}},onScreen:function(){var onScreen=false;if((this.layer!=null)&&(this.layer.map!=null)){var screenBounds=this.layer.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);} +return onScreen;},createMarker:function(){if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);} +return this.marker;},destroyMarker:function(){this.marker.destroy();},createPopup:function(closeBox){if(this.lonlat!=null){if(!this.popup){var anchor=(this.marker)?this.marker.icon:null;var popupClass=this.popupClass?this.popupClass:OpenLayers.Popup.AnchoredBubble;this.popup=new popupClass(this.id+"_popup",this.lonlat,this.data.popupSize,this.data.popupContentHTML,anchor,closeBox);} +if(this.data.overflow!=null){this.popup.contentDiv.style.overflow=this.data.overflow;} +this.popup.feature=this;} +return this.popup;},destroyPopup:function(){if(this.popup){this.popup.feature=null;this.popup.destroy();this.popup=null;}},CLASS_NAME:"OpenLayers.Feature"});OpenLayers.State={UNKNOWN:'Unknown',INSERT:'Insert',UPDATE:'Update',DELETE:'Delete'};OpenLayers.Feature.Vector=OpenLayers.Class(OpenLayers.Feature,{fid:null,geometry:null,attributes:null,bounds:null,state:null,style:null,url:null,renderIntent:"default",modified:null,initialize:function(geometry,attributes,style){OpenLayers.Feature.prototype.initialize.apply(this,[null,null,attributes]);this.lonlat=null;this.geometry=geometry?geometry:null;this.state=null;this.attributes={};if(attributes){this.attributes=OpenLayers.Util.extend(this.attributes,attributes);} +this.style=style?style:null;},destroy:function(){if(this.layer){this.layer.removeFeatures(this);this.layer=null;} +this.geometry=null;this.modified=null;OpenLayers.Feature.prototype.destroy.apply(this,arguments);},clone:function(){return new OpenLayers.Feature.Vector(this.geometry?this.geometry.clone():null,this.attributes,this.style);},onScreen:function(boundsOnly){var onScreen=false;if(this.layer&&this.layer.map){var screenBounds=this.layer.map.getExtent();if(boundsOnly){var featureBounds=this.geometry.getBounds();onScreen=screenBounds.intersectsBounds(featureBounds);}else{var screenPoly=screenBounds.toGeometry();onScreen=screenPoly.intersects(this.geometry);}} +return onScreen;},getVisibility:function(){return!(this.style&&this.style.display=='none'||!this.layer||this.layer&&this.layer.styleMap&&this.layer.styleMap.createSymbolizer(this,this.renderIntent).display=='none'||this.layer&&!this.layer.getVisibility());},createMarker:function(){return null;},destroyMarker:function(){},createPopup:function(){return null;},atPoint:function(lonlat,toleranceLon,toleranceLat){var atPoint=false;if(this.geometry){atPoint=this.geometry.atPoint(lonlat,toleranceLon,toleranceLat);} +return atPoint;},destroyPopup:function(){},move:function(location){if(!this.layer||!this.geometry.move){return undefined;} +var pixel;if(location.CLASS_NAME=="OpenLayers.LonLat"){pixel=this.layer.getViewPortPxFromLonLat(location);}else{pixel=location;} +var lastPixel=this.layer.getViewPortPxFromLonLat(this.geometry.getBounds().getCenterLonLat());var res=this.layer.map.getResolution();this.geometry.move(res*(pixel.x-lastPixel.x),res*(lastPixel.y-pixel.y));this.layer.drawFeature(this);return lastPixel;},toState:function(state){if(state==OpenLayers.State.UPDATE){switch(this.state){case OpenLayers.State.UNKNOWN:case OpenLayers.State.DELETE:this.state=state;break;case OpenLayers.State.UPDATE:case OpenLayers.State.INSERT:break;}}else if(state==OpenLayers.State.INSERT){switch(this.state){case OpenLayers.State.UNKNOWN:break;default:this.state=state;break;}}else if(state==OpenLayers.State.DELETE){switch(this.state){case OpenLayers.State.INSERT:break;case OpenLayers.State.DELETE:break;case OpenLayers.State.UNKNOWN:case OpenLayers.State.UPDATE:this.state=state;break;}}else if(state==OpenLayers.State.UNKNOWN){this.state=state;}},CLASS_NAME:"OpenLayers.Feature.Vector"});OpenLayers.Feature.Vector.style={'default':{fillColor:"#ee9900",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#ee9900",strokeOpacity:1,strokeWidth:1,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},'select':{fillColor:"blue",fillOpacity:0.4,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"blue",strokeOpacity:1,strokeWidth:2,strokeLinecap:"round",strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"pointer"},'temporary':{fillColor:"#66cccc",fillOpacity:0.2,hoverFillColor:"white",hoverFillOpacity:0.8,strokeColor:"#66cccc",strokeOpacity:1,strokeLinecap:"round",strokeWidth:2,strokeDashstyle:"solid",hoverStrokeColor:"red",hoverStrokeOpacity:1,hoverStrokeWidth:0.2,pointRadius:6,hoverPointRadius:1,hoverPointUnit:"%",pointerEvents:"visiblePainted",cursor:"inherit"},'delete':{display:"none"}};OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(options){this.regExes={'typeStr':/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,'spaces':/\s+/,'parenComma':/\)\s*,\s*\(/,'doubleParenComma':/\)\s*\)\s*,\s*\(\s*\(/,'trimParens':/^\s*\(?(.*?)\)?\s*$/};OpenLayers.Format.prototype.initialize.apply(this,[options]);},read:function(wkt){var features,type,str;wkt=wkt.replace(/[\n\r]/g," ");var matches=this.regExes.typeStr.exec(wkt);if(matches){type=matches[1].toLowerCase();str=matches[2];if(this.parse[type]){features=this.parse[type].apply(this,[str]);} +if(this.internalProjection&&this.externalProjection){if(features&&features.CLASS_NAME=="OpenLayers.Feature.Vector"){features.geometry.transform(this.externalProjection,this.internalProjection);}else if(features&&type!="geometrycollection"&&typeof features=="object"){for(var i=0,len=features.length;i0){pieces.push(',');} +geometry=collection[i].geometry;pieces.push(this.extractGeometry(geometry));} +if(isCollection){pieces.push(')');} +return pieces.join('');},extractGeometry:function(geometry){var type=geometry.CLASS_NAME.split('.')[2].toLowerCase();if(!this.extract[type]){return null;} +if(this.internalProjection&&this.externalProjection){geometry=geometry.clone();geometry.transform(this.internalProjection,this.externalProjection);} +var wktType=type=='collection'?'GEOMETRYCOLLECTION':type.toUpperCase();var data=wktType+'('+this.extract[type].apply(this,[geometry])+')';return data;},extract:{'point':function(point){return point.x+' '+point.y;},'multipoint':function(multipoint){var array=[];for(var i=0,len=multipoint.components.length;i=0;i--){feature=features[i];switch(feature.state){case OpenLayers.State.INSERT:toCreate.push(feature);break;case OpenLayers.State.UPDATE:toUpdate.push(feature);break;case OpenLayers.State.DELETE:toDelete.push(feature);break;}} +if(toCreate.length>0){nRequests++;opt=OpenLayers.Util.applyDefaults({"callback":callback,"scope":this},options.create);resp.push(this.create(toCreate,opt));} +if(toUpdate.length>0){nRequests++;opt=OpenLayers.Util.applyDefaults({"callback":callback,"scope":this},options.update);resp.push(this.update(toUpdate,opt));} +if(toDelete.length>0){nRequests++;opt=OpenLayers.Util.applyDefaults({"callback":callback,"scope":this},options["delete"]);resp.push(this["delete"](toDelete,opt));} +return resp;},clear:function(){this.db.execute("DELETE FROM "+this.tableName);},callUserCallback:function(options,resp){var opt=options[resp.requestType];if(opt&&opt.callback){opt.callback.call(opt.scope,resp);} +if(resp.last&&options.callback){options.callback.call(options.scope);}},CLASS_NAME:"OpenLayers.Protocol.SQL.Gears"});OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(event){return event.target||event.srcElement;},isSingleTouch:function(event){return event.touches&&event.touches.length==1;},isMultiTouch:function(event){return event.touches&&event.touches.length>1;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},isRightClick:function(event){return(((event.which)&&(event.which==3))||((event.button)&&(event.button==2)));},stop:function(event,allowDefault){if(!allowDefault){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}} +if(event.stopPropagation){event.stopPropagation();}else{event.cancelBubble=true;}},findElement:function(event,tagName){var element=OpenLayers.Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase()))){element=element.parentNode;} +return element;},observe:function(elementParam,name,observer,useCapture){var element=OpenLayers.Util.getElement(elementParam);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent)){name='keydown';} +if(!this.observers){this.observers={};} +if(!element._eventCacheID){var idPrefix="eventCacheID_";if(element.id){idPrefix=element.id+"_"+idPrefix;} +element._eventCacheID=OpenLayers.Util.createUniqueID(idPrefix);} +var cacheID=element._eventCacheID;if(!this.observers[cacheID]){this.observers[cacheID]=[];} +this.observers[cacheID].push({'element':element,'name':name,'observer':observer,'useCapture':useCapture});if(element.addEventListener){element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){element.attachEvent('on'+name,observer);}},stopObservingElement:function(elementParam){var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[cacheID]);},_removeElementObservers:function(elementObservers){if(elementObservers){for(var i=elementObservers.length-1;i>=0;i--){var entry=elementObservers[i];var args=new Array(entry.element,entry.name,entry.observer,entry.useCapture);var removed=OpenLayers.Event.stopObserving.apply(this,args);}}},stopObserving:function(elementParam,name,observer,useCapture){useCapture=useCapture||false;var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;if(name=='keypress'){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent){name='keydown';}} +var foundEntry=false;var elementObservers=OpenLayers.Event.observers[cacheID];if(elementObservers){var i=0;while(!foundEntry&&ithis.duration){this.stop();}},CLASS_NAME:"OpenLayers.Tween"});OpenLayers.Easing={CLASS_NAME:"OpenLayers.Easing"};OpenLayers.Easing.Linear={easeIn:function(t,b,c,d){return c*t/d+b;},easeOut:function(t,b,c,d){return c*t/d+b;},easeInOut:function(t,b,c,d){return c*t/d+b;},CLASS_NAME:"OpenLayers.Easing.Linear"};OpenLayers.Easing.Expo={easeIn:function(t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOut:function(t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOut:function(t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},CLASS_NAME:"OpenLayers.Easing.Expo"};OpenLayers.Easing.Quad={easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOut:function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},CLASS_NAME:"OpenLayers.Easing.Quad"};OpenLayers.Map=OpenLayers.Class({Z_INDEX_BASE:{BaseLayer:100,Overlay:325,Feature:725,Popup:750,Control:1000},EVENT_TYPES:["preaddlayer","addlayer","preremovelayer","removelayer","changelayer","movestart","move","moveend","zoomend","popupopen","popupclose","addmarker","removemarker","clearmarkers","mouseover","mouseout","mousemove","dragstart","drag","dragend","changebaselayer"],id:null,fractionalZoom:false,events:null,allOverlays:false,div:null,dragging:false,size:null,viewPortDiv:null,layerContainerOrigin:null,layerContainerDiv:null,layers:null,controls:null,popups:null,baseLayer:null,center:null,resolution:null,zoom:0,panRatio:1.5,viewRequestID:0,tileSize:null,projection:"EPSG:4326",units:'degrees',resolutions:null,maxResolution:1.40625,minResolution:null,maxScale:null,minScale:null,maxExtent:null,minExtent:null,restrictedExtent:null,numZoomLevels:16,theme:null,displayProjection:null,fallThrough:true,panTween:null,eventListeners:null,panMethod:OpenLayers.Easing.Expo.easeOut,panDuration:50,paddingForPopups:null,minPx:null,maxPx:null,initialize:function(div,options){if(arguments.length===1&&typeof div==="object"){options=div;div=options&&options.div;} +this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);this.paddingForPopups=new OpenLayers.Bounds(15,15,15,15);this.theme=OpenLayers._getScriptLocation()+'theme/default/style.css';OpenLayers.Util.extend(this,options);this.layers=[];this.id=OpenLayers.Util.createUniqueID("OpenLayers.Map_");this.div=OpenLayers.Util.getElement(div);if(!this.div){this.div=document.createElement("div");this.div.style.height="1px";this.div.style.width="1px";} +OpenLayers.Element.addClass(this.div,'olMap');var id=this.id+"_OpenLayers_ViewPort";this.viewPortDiv=OpenLayers.Util.createDiv(id,null,null,null,"relative",null,"hidden");this.viewPortDiv.style.width="100%";this.viewPortDiv.style.height="100%";this.viewPortDiv.className="olMapViewport";this.div.appendChild(this.viewPortDiv);var eventsDiv=document.createElement("div");eventsDiv.id=this.id+"_events";eventsDiv.style.position="absolute";eventsDiv.style.width="100%";eventsDiv.style.height="100%";eventsDiv.style.zIndex=this.Z_INDEX_BASE.Control-1;this.viewPortDiv.appendChild(eventsDiv);this.eventsDiv=eventsDiv;this.events=new OpenLayers.Events(this,this.eventsDiv,this.EVENT_TYPES,this.fallThrough,{includeXY:true});id=this.id+"_OpenLayers_Container";this.layerContainerDiv=OpenLayers.Util.createDiv(id);this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1;this.eventsDiv.appendChild(this.layerContainerDiv);this.updateSize();if(this.eventListeners instanceof Object){this.events.on(this.eventListeners);} +this.events.register("movestart",this,this.updateSize);if(OpenLayers.String.contains(navigator.appName,"Microsoft")){this.events.register("resize",this,this.updateSize);}else{this.updateSizeDestroy=OpenLayers.Function.bind(this.updateSize,this);OpenLayers.Event.observe(window,'resize',this.updateSizeDestroy);} +if(this.theme){var addNode=true;var nodes=document.getElementsByTagName('link');for(var i=0,len=nodes.length;i=0;--i){this.controls[i].destroy();} +this.controls=null;} +if(this.layers!=null){for(var i=this.layers.length-1;i>=0;--i){this.layers[i].destroy(false);} +this.layers=null;} +if(this.viewPortDiv){this.div.removeChild(this.viewPortDiv);} +this.viewPortDiv=null;if(this.eventListeners){this.events.un(this.eventListeners);this.eventListeners=null;} +this.events.destroy();this.events=null;},setOptions:function(options){var updatePxExtent=this.minPx&&options.restrictedExtent!=this.restrictedExtent;OpenLayers.Util.extend(this,options);updatePxExtent&&this.moveTo(this.getCachedCenter(),this.zoom,{forceZoomChange:true});},getTileSize:function(){return this.tileSize;},getBy:function(array,property,match){var test=(typeof match.test=="function");var found=OpenLayers.Array.filter(this[array],function(item){return item[property]==match||(test&&match.test(item[property]));});return found;},getLayersBy:function(property,match){return this.getBy("layers",property,match);},getLayersByName:function(match){return this.getLayersBy("name",match);},getLayersByClass:function(match){return this.getLayersBy("CLASS_NAME",match);},getControlsBy:function(property,match){return this.getBy("controls",property,match);},getControlsByClass:function(match){return this.getControlsBy("CLASS_NAME",match);},getLayer:function(id){var foundLayer=null;for(var i=0,len=this.layers.length;ithis.layers.length){idx=this.layers.length;} +if(base!=idx){this.layers.splice(base,1);this.layers.splice(idx,0,layer);for(var i=0,len=this.layers.length;i=0;--i){this.removePopup(this.popups[i]);}} +popup.map=this;this.popups.push(popup);var popupDiv=popup.draw();if(popupDiv){popupDiv.style.zIndex=this.Z_INDEX_BASE['Popup']+ +this.popups.length;this.layerContainerDiv.appendChild(popupDiv);}},removePopup:function(popup){OpenLayers.Util.removeItem(this.popups,popup);if(popup.div){try{this.layerContainerDiv.removeChild(popup.div);} +catch(e){}} +popup.map=null;},getSize:function(){var size=null;if(this.size!=null){size=this.size.clone();} +return size;},updateSize:function(){var newSize=this.getCurrentSize();if(newSize&&!isNaN(newSize.h)&&!isNaN(newSize.w)){this.events.clearMouseCache();var oldSize=this.getSize();if(oldSize==null){this.size=oldSize=newSize;} +if(!newSize.equals(oldSize)){this.size=newSize;for(var i=0,len=this.layers.length;i=this.minPx.x+xRestriction?Math.round(dx):0;dy=y<=this.maxPx.y-yRestriction&&y>=this.minPx.y+yRestriction?Math.round(dy):0;var minX=this.minPx.x,maxX=this.maxPx.x;if(dx||dy){if(!this.dragging){this.dragging=true;this.events.triggerEvent("movestart");} +this.center=null;if(dx){this.layerContainerDiv.style.left=parseInt(this.layerContainerDiv.style.left)-dx+"px";this.minPx.x-=dx;this.maxPx.x-=dx;if(wrapDateLine){if(this.maxPx.x>maxX){this.maxPx.x-=(maxX-minX);} +if(this.minPx.xthis.restrictedExtent.getWidth()){lonlat=new OpenLayers.LonLat(maxCenter.lon,lonlat.lat);}else if(extent.leftthis.restrictedExtent.right){lonlat=lonlat.add(this.restrictedExtent.right- +extent.right,0);} +if(extent.getHeight()>this.restrictedExtent.getHeight()){lonlat=new OpenLayers.LonLat(lonlat.lon,maxCenter.lat);}else if(extent.bottomthis.restrictedExtent.top){lonlat=lonlat.add(0,this.restrictedExtent.top- +extent.top);}}} +var zoomChanged=forceZoomChange||((this.isValidZoomLevel(zoom))&&(zoom!=this.getZoom()));var centerChanged=(this.isValidLonLat(lonlat))&&(!lonlat.equals(this.center));if(zoomChanged||centerChanged||dragging){dragging||this.events.triggerEvent("movestart");if(centerChanged){if(!zoomChanged&&this.center){this.centerLayerContainer(lonlat);} +this.center=lonlat.clone();} +var res=zoomChanged?this.getResolutionForZoom(zoom):this.getResolution();if(zoomChanged||this.layerContainerOrigin==null){this.layerContainerOrigin=this.getCachedCenter();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px";var maxExtent=this.getMaxExtent({restricted:true});var maxExtentCenter=maxExtent.getCenterLonLat();var lonDelta=this.center.lon-maxExtentCenter.lon;var latDelta=maxExtentCenter.lat-this.center.lat;var extentWidth=Math.round(maxExtent.getWidth()/res);var extentHeight=Math.round(maxExtent.getHeight()/res);var left=(this.size.w-extentWidth)/2-lonDelta/res;var top=(this.size.h-extentHeight)/2-latDelta/res;this.minPx=new OpenLayers.Pixel(left,top);this.maxPx=new OpenLayers.Pixel(left+extentWidth,top+extentHeight);} +if(zoomChanged){this.zoom=zoom;this.resolution=res;this.viewRequestID++;} +var bounds=this.getExtent();if(this.baseLayer.visibility){this.baseLayer.moveTo(bounds,zoomChanged,options.dragging);options.dragging||this.baseLayer.events.triggerEvent("moveend",{zoomChanged:zoomChanged});} +bounds=this.baseLayer.getExtent();for(var i=this.layers.length-1;i>=0;--i){var layer=this.layers[i];if(layer!==this.baseLayer&&!layer.isBaseLayer){var inRange=layer.calculateInRange();if(layer.inRange!=inRange){layer.inRange=inRange;if(!inRange){layer.display(false);} +this.events.triggerEvent("changelayer",{layer:layer,property:"visibility"});} +if(inRange&&layer.visibility){layer.moveTo(bounds,zoomChanged,options.dragging);options.dragging||layer.events.triggerEvent("moveend",{zoomChanged:zoomChanged});}}} +this.events.triggerEvent("move");dragging||this.events.triggerEvent("moveend");if(zoomChanged){for(var i=0,len=this.popups.length;i=0)&&(zoomLevel0){resolution=this.layers[0].getResolution();} +return resolution;},getUnits:function(){var units=null;if(this.baseLayer!=null){units=this.baseLayer.units;} +return units;},getScale:function(){var scale=null;if(this.baseLayer!=null){var res=this.getResolution();var units=this.baseLayer.units;scale=OpenLayers.Util.getScaleFromResolution(res,units);} +return scale;},getZoomForExtent:function(bounds,closest){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForExtent(bounds,closest);} +return zoom;},getResolutionForZoom:function(zoom){var resolution=null;if(this.baseLayer){resolution=this.baseLayer.getResolutionForZoom(zoom);} +return resolution;},getZoomForResolution:function(resolution,closest){var zoom=null;if(this.baseLayer!=null){zoom=this.baseLayer.getZoomForResolution(resolution,closest);} +return zoom;},zoomTo:function(zoom){if(this.isValidZoomLevel(zoom)){this.setCenter(null,zoom);}},zoomIn:function(){this.zoomTo(this.getZoom()+1);},zoomOut:function(){this.zoomTo(this.getZoom()-1);},zoomToExtent:function(bounds,closest){var center=bounds.getCenterLonLat();if(this.baseLayer.wrapDateLine){var maxExtent=this.getMaxExtent();bounds=bounds.clone();while(bounds.right=0){this.initResolutions();if(reinitialize&&this.map.baseLayer===this){this.map.setCenter(this.map.getCenter(),this.map.getZoomForResolution(resolution),false,true);this.map.events.triggerEvent("changebaselayer",{layer:this});} +break;}}}},onMapResize:function(){},redraw:function(){var redrawn=false;if(this.map){this.inRange=this.calculateInRange();var extent=this.getExtent();if(extent&&this.inRange&&this.visibility){var zoomChanged=true;this.moveTo(extent,zoomChanged,false);this.events.triggerEvent("moveend",{"zoomChanged":zoomChanged});redrawn=true;}} +return redrawn;},moveTo:function(bounds,zoomChanged,dragging){var display=this.visibility;if(!this.isBaseLayer){display=display&&this.inRange;} +this.display(display);},moveByPx:function(dx,dy){},setMap:function(map){if(this.map==null){this.map=map;this.maxExtent=this.maxExtent||this.map.maxExtent;this.minExtent=this.minExtent||this.map.minExtent;this.projection=this.projection||this.map.projection;if(typeof this.projection=="string"){this.projection=new OpenLayers.Projection(this.projection);} +this.units=this.projection.getUnits()||this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var show=((this.visibility)&&(this.inRange));this.div.style.display=show?"":"none";} +this.setTileSize();}},afterAdd:function(){},removeMap:function(map){},getImageSize:function(bounds){return(this.imageSize||this.tileSize);},setTileSize:function(size){var tileSize=(size)?size:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=tileSize;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(tileSize.w+(2*this.gutter),tileSize.h+(2*this.gutter));}},getVisibility:function(){return this.visibility;},setVisibility:function(visibility){if(visibility!=this.visibility){this.visibility=visibility;this.display(visibility);this.redraw();if(this.map!=null){this.map.events.triggerEvent("changelayer",{layer:this,property:"visibility"});} +this.events.triggerEvent("visibilitychanged");}},display:function(display){if(display!=(this.div.style.display!="none")){this.div.style.display=(display&&this.calculateInRange())?"block":"none";}},calculateInRange:function(){var inRange=false;if(this.alwaysInRange){inRange=true;}else{if(this.map){var resolution=this.map.getResolution();inRange=((resolution>=this.minResolution)&&(resolution<=this.maxResolution));}} +return inRange;},setIsBaseLayer:function(isBaseLayer){if(isBaseLayer!=this.isBaseLayer){this.isBaseLayer=isBaseLayer;if(this.map!=null){this.map.events.triggerEvent("changebaselayer",{layer:this});}}},initResolutions:function(){var i,len,p;var props={},alwaysInRange=true;for(i=0,len=this.RESOLUTION_PROPERTIES.length;i=resolution){highRes=res;lowZoom=i;} +if(res<=resolution){lowRes=res;highZoom=i;break;}} +var dRes=highRes-lowRes;if(dRes>0){zoom=lowZoom+((highRes-resolution)/dRes);}else{zoom=lowZoom;}}else{var diff;var minDiff=Number.POSITIVE_INFINITY;for(i=0,len=this.resolutions.length;iminDiff){break;} +minDiff=diff;}else{if(this.resolutions[i]0)){if(this.map.baseLayer){var layer=this.map.baseLayer.clone();this.layers=[layer];}else{this.map.events.register("changebaselayer",this,this.baseLayerDraw);return this.div;}} +this.element=document.createElement('div');this.element.className=this.displayClass+'Element';this.element.style.display='none';this.mapDiv=document.createElement('div');this.mapDiv.style.width=this.size.w+'px';this.mapDiv.style.height=this.size.h+'px';this.mapDiv.style.position='relative';this.mapDiv.style.overflow='hidden';this.mapDiv.id=OpenLayers.Util.createUniqueID('overviewMap');this.extentRectangle=document.createElement('div');this.extentRectangle.style.position='absolute';this.extentRectangle.style.zIndex=1000;this.extentRectangle.className=this.displayClass+'ExtentRectangle';this.element.appendChild(this.mapDiv);this.div.appendChild(this.element);if(!this.outsideViewport){this.div.className+=" "+this.displayClass+'Container';var imgLocation=OpenLayers.Util.getImagesLocation();var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv(this.displayClass+'MaximizeButton',null,new OpenLayers.Size(18,18),img,'absolute');this.maximizeDiv.style.display='none';this.maximizeDiv.className=this.displayClass+'MaximizeButton';OpenLayers.Event.observe(this.maximizeDiv,'click',OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv('OpenLayers_Control_minimizeDiv',null,new OpenLayers.Size(18,18),img,'absolute');this.minimizeDiv.style.display='none';this.minimizeDiv.className=this.displayClass+'MinimizeButton';OpenLayers.Event.observe(this.minimizeDiv,'click',OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv);var eventsToStop=['dblclick','mousedown'];for(var i=0,len=eventsToStop.length;ithis.minRatio)&&(resRatio<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(testExtent)));},updateOverview:function(){var mapRes=this.map.getResolution();var targetRes=this.ovmap.getResolution();var resRatio=targetRes/mapRes;if(resRatio>this.maxRatio){targetRes=this.minRatio*mapRes;}else if(resRatio<=this.minRatio){targetRes=this.maxRatio*mapRes;} +var center;if(this.ovmap.getProjection()!=this.map.getProjection()){center=this.map.center.clone();center.transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject());}else{center=this.map.center;} +this.ovmap.setCenter(center,this.ovmap.getZoomForResolution(targetRes*this.resolutionFactor));this.updateRectToMap();},createMap:function(){var options=OpenLayers.Util.extend({controls:[],maxResolution:'auto',fallThrough:false},this.mapOptions);this.ovmap=new OpenLayers.Map(this.mapDiv,options);this.ovmap.eventsDiv.appendChild(this.extentRectangle);OpenLayers.Event.stopObserving(window,'unload',this.ovmap.unloadDestroy);this.ovmap.addLayers(this.layers);this.ovmap.zoomToMaxExtent();this.wComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-left-width'))+ +parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-right-width'));this.wComp=(this.wComp)?this.wComp:2;this.hComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-top-width'))+ +parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-bottom-width'));this.hComp=(this.hComp)?this.hComp:2;this.handlers.drag=new OpenLayers.Handler.Drag(this,{move:this.rectDrag,done:this.updateMapToRect},{map:this.ovmap});this.handlers.click=new OpenLayers.Handler.Click(this,{"click":this.mapDivClick},{"single":true,"double":false,"stopSingle":true,"stopDouble":true,"pixelTolerance":1,map:this.ovmap});this.handlers.click.activate();this.rectEvents=new OpenLayers.Events(this,this.extentRectangle,null,true);this.rectEvents.register("mouseover",this,function(e){if(!this.handlers.drag.active&&!this.map.dragging){this.handlers.drag.activate();}});this.rectEvents.register("mouseout",this,function(e){if(!this.handlers.drag.dragging){this.handlers.drag.deactivate();}});if(this.ovmap.getProjection()!=this.map.getProjection()){var sourceUnits=this.map.getProjectionObject().getUnits()||this.map.units||this.map.baseLayer.units;var targetUnits=this.ovmap.getProjectionObject().getUnits()||this.ovmap.units||this.ovmap.baseLayer.units;this.resolutionFactor=sourceUnits&&targetUnits?OpenLayers.INCHES_PER_UNIT[sourceUnits]/OpenLayers.INCHES_PER_UNIT[targetUnits]:1;}},updateRectToMap:function(){var bounds;if(this.ovmap.getProjection()!=this.map.getProjection()){bounds=this.map.getExtent().transform(this.map.getProjectionObject(),this.ovmap.getProjectionObject());}else{bounds=this.map.getExtent();} +var pxBounds=this.getRectBoundsFromMapBounds(bounds);if(pxBounds){this.setRectPxBounds(pxBounds);}},updateMapToRect:function(){var lonLatBounds=this.getMapBoundsFromRectBounds(this.rectPxBounds);if(this.ovmap.getProjection()!=this.map.getProjection()){lonLatBounds=lonLatBounds.transform(this.ovmap.getProjectionObject(),this.map.getProjectionObject());} +this.map.panTo(lonLatBounds.getCenterLonLat());},setRectPxBounds:function(pxBounds){var top=Math.max(pxBounds.top,0);var left=Math.max(pxBounds.left,0);var bottom=Math.min(pxBounds.top+Math.abs(pxBounds.getHeight()),this.ovmap.size.h-this.hComp);var right=Math.min(pxBounds.left+pxBounds.getWidth(),this.ovmap.size.w-this.wComp);var width=Math.max(right-left,0);var height=Math.max(bottom-top,0);if(width0){text=text.substring(index);} +var node=OpenLayers.Util.Try(OpenLayers.Function.bind((function(){var xmldom;if(window.ActiveXObject&&!this.xmldom){xmldom=new ActiveXObject("Microsoft.XMLDOM");}else{xmldom=this.xmldom;} +xmldom.loadXML(text);return xmldom;}),this),function(){return new DOMParser().parseFromString(text,'text/xml');},function(){var req=new XMLHttpRequest();req.open("GET","data:"+"text/xml"+";charset=utf-8,"+encodeURIComponent(text),false);if(req.overrideMimeType){req.overrideMimeType("text/xml");} +req.send(null);return req.responseXML;});if(this.keepData){this.data=node;} +return node;},write:function(node){var data;if(this.xmldom){data=node.xml;}else{var serializer=new XMLSerializer();if(node.nodeType==1){var doc=document.implementation.createDocument("","",null);if(doc.importNode){node=doc.importNode(node,true);} +doc.appendChild(node);data=serializer.serializeToString(doc);}else{data=serializer.serializeToString(node);}} +return data;},createElementNS:function(uri,name){var element;if(this.xmldom){if(typeof uri=="string"){element=this.xmldom.createNode(1,name,uri);}else{element=this.xmldom.createNode(1,name,"");}}else{element=document.createElementNS(uri,name);} +return element;},createTextNode:function(text){var node;if(typeof text!=="string"){text=String(text);} +if(this.xmldom){node=this.xmldom.createTextNode(text);}else{node=document.createTextNode(text);} +return node;},getElementsByTagNameNS:function(node,uri,name){var elements=[];if(node.getElementsByTagNameNS){elements=node.getElementsByTagNameNS(uri,name);}else{var allNodes=node.getElementsByTagName("*");var potentialNode,fullName;for(var i=0,len=allNodes.length;i0){prefix=name.substring(0,split);local=name.substring(split+1);}else{if(parent){prefix=this.namespaceAlias[parent.namespaceURI];}else{prefix=this.defaultPrefix;} +local=name;} +var child=this.writers[prefix][local].apply(this,[obj]);if(parent){parent.appendChild(child);} +return child;},getChildEl:function(node,name,uri){return node&&this.getThisOrNextEl(node.firstChild,name,uri);},getNextEl:function(node,name,uri){return node&&this.getThisOrNextEl(node.nextSibling,name,uri);},getThisOrNextEl:function(node,name,uri){outer:for(var sibling=node;sibling;sibling=sibling.nextSibling){switch(sibling.nodeType){case 1:if((!name||name===(sibling.localName||sibling.nodeName.split(":").pop()))&&(!uri||uri===sibling.namespaceURI)){break outer;} +sibling=null;break outer;case 3:if(/^\s*$/.test(sibling.nodeValue)){break;} +case 4:case 6:case 12:case 10:case 11:sibling=null;break outer;}} +return sibling||null;},lookupNamespaceURI:function(node,prefix){var uri=null;if(node){if(node.lookupNamespaceURI){uri=node.lookupNamespaceURI(prefix);}else{outer:switch(node.nodeType){case 1:if(node.namespaceURI!==null&&node.prefix===prefix){uri=node.namespaceURI;break outer;} +var len=node.attributes.length;if(len){var attr;for(var i=0;i0){appliedRules=true;for(var i=0,len=elseRules.length;i0&&appliedRules==false){style.display="none";} +if(style.label&&typeof style.label!=="string"){style.label=String(style.label);} +return style;},applySymbolizer:function(rule,style,feature){var symbolizerPrefix=feature.geometry?this.getSymbolizerPrefix(feature.geometry):OpenLayers.Style.SYMBOLIZER_PREFIXES[0];var symbolizer=rule.symbolizer[symbolizerPrefix]||rule.symbolizer;if(this.defaultsPerSymbolizer===true){var defaults=this.defaultStyle;OpenLayers.Util.applyDefaults(symbolizer,{pointRadius:defaults.pointRadius});if(symbolizer.stroke===true||symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{strokeWidth:defaults.strokeWidth,strokeColor:defaults.strokeColor,strokeOpacity:defaults.strokeOpacity,strokeDashstyle:defaults.strokeDashstyle,strokeLinecap:defaults.strokeLinecap});} +if(symbolizer.fill===true||symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{fillColor:defaults.fillColor,fillOpacity:defaults.fillOpacity});} +if(symbolizer.graphic===true){OpenLayers.Util.applyDefaults(symbolizer,{pointRadius:this.defaultStyle.pointRadius,externalGraphic:this.defaultStyle.externalGraphic,graphicName:this.defaultStyle.graphicName,graphicOpacity:this.defaultStyle.graphicOpacity,graphicWidth:this.defaultStyle.graphicWidth,graphicHeight:this.defaultStyle.graphicHeight,graphicXOffset:this.defaultStyle.graphicXOffset,graphicYOffset:this.defaultStyle.graphicYOffset});}} +return this.createLiterals(OpenLayers.Util.extend(style,symbolizer),feature);},createLiterals:function(style,feature){var context=OpenLayers.Util.extend({},feature.attributes||feature.data);OpenLayers.Util.extend(context,this.context);for(var i in this.propertyStyles){style[i]=OpenLayers.Style.createLiteral(style[i],context,feature,i);} +return style;},findPropertyStyles:function(){var propertyStyles={};var style=this.defaultStyle;this.addPropertyStyles(propertyStyles,style);var rules=this.rules;var symbolizer,value;for(var i=0,len=rules.length;ithis.value;break;case OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO:result=got<=this.value;break;case OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO:result=got>=this.value;break;case OpenLayers.Filter.Comparison.BETWEEN:result=(got>=this.lowerBoundary)&&(got<=this.upperBoundary);break;case OpenLayers.Filter.Comparison.LIKE:var regexp=new RegExp(this.value,"gi");result=regexp.test(got);break;} +return result;},value2regex:function(wildCard,singleChar,escapeChar){if(wildCard=="."){var msg="'.' is an unsupported wildCard character for "+"OpenLayers.Filter.Comparison";OpenLayers.Console.error(msg);return null;} +wildCard=wildCard?wildCard:"*";singleChar=singleChar?singleChar:".";escapeChar=escapeChar?escapeChar:"!";this.value=this.value.replace(new RegExp("\\"+escapeChar+"(.|$)","g"),"\\$1");this.value=this.value.replace(new RegExp("\\"+singleChar,"g"),".");this.value=this.value.replace(new RegExp("\\"+wildCard,"g"),".*");this.value=this.value.replace(new RegExp("\\\\.\\*","g"),"\\"+wildCard);this.value=this.value.replace(new RegExp("\\\\\\.","g"),"\\"+singleChar);return this.value;},regex2value:function(){var value=this.value;value=value.replace(/!/g,"!!");value=value.replace(/(\\)?\\\./g,function($0,$1){return $1?$0:"!.";});value=value.replace(/(\\)?\\\*/g,function($0,$1){return $1?$0:"!*";});value=value.replace(/\\\\/g,"\\");value=value.replace(/\.\*/g,"*");return value;},clone:function(){return OpenLayers.Util.extend(new OpenLayers.Filter.Comparison(),this);},CLASS_NAME:"OpenLayers.Filter.Comparison"});OpenLayers.Filter.Comparison.EQUAL_TO="==";OpenLayers.Filter.Comparison.NOT_EQUAL_TO="!=";OpenLayers.Filter.Comparison.LESS_THAN="<";OpenLayers.Filter.Comparison.GREATER_THAN=">";OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO="<=";OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO=">=";OpenLayers.Filter.Comparison.BETWEEN="..";OpenLayers.Filter.Comparison.LIKE="~";OpenLayers.Format.Filter=OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC,{defaultVersion:"1.0.0",CLASS_NAME:"OpenLayers.Format.Filter"});OpenLayers.Filter.Function=OpenLayers.Class(OpenLayers.Filter,{name:null,params:null,initialize:function(options){OpenLayers.Filter.prototype.initialize.apply(this,[options]);},CLASS_NAME:"OpenLayers.Filter.Function"});OpenLayers.Format.Filter.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"ogc",schemaLocation:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){var obj={};this.readers.ogc["Filter"].apply(this,[data,obj]);return obj.filter;},readers:{"ogc":{"Filter":function(node,parent){var obj={fids:[],filters:[]};this.readChildNodes(node,obj);if(obj.fids.length>0){parent.filter=new OpenLayers.Filter.FeatureId({fids:obj.fids});}else if(obj.filters.length>0){parent.filter=obj.filters[0];}},"FeatureId":function(node,obj){var fid=node.getAttribute("fid");if(fid){obj.fids.push(fid);}},"And":function(node,obj){var filter=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND});this.readChildNodes(node,filter);obj.filters.push(filter);},"Or":function(node,obj){var filter=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.OR});this.readChildNodes(node,filter);obj.filters.push(filter);},"Not":function(node,obj){var filter=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.NOT});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsLessThan":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsGreaterThan":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsLessThanOrEqualTo":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsGreaterThanOrEqualTo":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO});this.readChildNodes(node,filter);obj.filters.push(filter);},"PropertyIsBetween":function(node,obj){var filter=new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.BETWEEN});this.readChildNodes(node,filter);obj.filters.push(filter);},"Literal":function(node,obj){obj.value=OpenLayers.String.numericIf(this.getChildValue(node));},"PropertyName":function(node,filter){filter.property=this.getChildValue(node);},"LowerBoundary":function(node,filter){filter.lowerBoundary=OpenLayers.String.numericIf(this.readOgcExpression(node));},"UpperBoundary":function(node,filter){filter.upperBoundary=OpenLayers.String.numericIf(this.readOgcExpression(node));},"Intersects":function(node,obj){this.readSpatial(node,obj,OpenLayers.Filter.Spatial.INTERSECTS);},"Within":function(node,obj){this.readSpatial(node,obj,OpenLayers.Filter.Spatial.WITHIN);},"Contains":function(node,obj){this.readSpatial(node,obj,OpenLayers.Filter.Spatial.CONTAINS);},"DWithin":function(node,obj){this.readSpatial(node,obj,OpenLayers.Filter.Spatial.DWITHIN);},"Distance":function(node,obj){obj.distance=parseInt(this.getChildValue(node));obj.distanceUnits=node.getAttribute("units");},"Function":function(node,obj){return;}}},readSpatial:function(node,obj,type){var filter=new OpenLayers.Filter.Spatial({type:type});this.readChildNodes(node,filter);filter.value=filter.components[0];delete filter.components;obj.filters.push(filter);},readOgcExpression:function(node){var obj={};this.readChildNodes(node,obj);var value=obj.value;if(value===undefined){value=this.getChildValue(node);} +return value;},writeOgcExpression:function(value,node){if(value instanceof OpenLayers.Filter.Function){var child=this.writeNode("Function",value,node);node.appendChild(child);}else{this.writeNode("Literal",value,node);} +return node;},write:function(filter){return this.writers.ogc["Filter"].apply(this,[filter]);},writeFeatureIdNodes:function(filter,node){for(var i=0,ii=filter.fids.length;i":"PropertyIsGreaterThan","<=":"PropertyIsLessThanOrEqualTo",">=":"PropertyIsGreaterThanOrEqualTo","..":"PropertyIsBetween","~":"PropertyIsLike","BBOX":"BBOX","DWITHIN":"DWITHIN","WITHIN":"WITHIN","CONTAINS":"CONTAINS","INTERSECTS":"INTERSECTS","FID":"FeatureId"},CLASS_NAME:"OpenLayers.Format.Filter.v1"});OpenLayers.Geometry=OpenLayers.Class({id:null,parent:null,bounds:null,initialize:function(){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){this.id=null;this.bounds=null;},clone:function(){return new OpenLayers.Geometry();},setBounds:function(bounds){if(bounds){this.bounds=bounds.clone();}},clearBounds:function(){this.bounds=null;if(this.parent){this.parent.clearBounds();}},extendBounds:function(newBounds){var bounds=this.getBounds();if(!bounds){this.setBounds(newBounds);}else{this.bounds.extend(newBounds);}},getBounds:function(){if(this.bounds==null){this.calculateBounds();} +return this.bounds;},calculateBounds:function(){},distanceTo:function(geometry,options){},getVertices:function(nodes){},atPoint:function(lonlat,toleranceLon,toleranceLat){var atPoint=false;var bounds=this.getBounds();if((bounds!=null)&&(lonlat!=null)){var dX=(toleranceLon!=null)?toleranceLon:0;var dY=(toleranceLat!=null)?toleranceLat:0;var toleranceBounds=new OpenLayers.Bounds(this.bounds.left-dX,this.bounds.bottom-dY,this.bounds.right+dX,this.bounds.top+dY);atPoint=toleranceBounds.containsLonLat(lonlat);} +return atPoint;},getLength:function(){return 0.0;},getArea:function(){return 0.0;},getCentroid:function(){return null;},toString:function(){return OpenLayers.Format.WKT.prototype.write(new OpenLayers.Feature.Vector(this));},CLASS_NAME:"OpenLayers.Geometry"});OpenLayers.Geometry.fromWKT=function(wkt){var format=arguments.callee.format;if(!format){format=new OpenLayers.Format.WKT();arguments.callee.format=format;} +var geom;var result=format.read(wkt);if(result instanceof OpenLayers.Feature.Vector){geom=result.geometry;}else if(OpenLayers.Util.isArray(result)){var len=result.length;var components=new Array(len);for(var i=0;i=0&&along1<=1&&along2>=0&&along2<=1){if(!point){intersection=true;}else{var x=seg1.x1+(along1*x12_11);var y=seg1.y1+(along1*y12_11);intersection=new OpenLayers.Geometry.Point(x,y);}}} +if(tolerance){var dist;if(intersection){if(point){var segs=[seg1,seg2];var seg,x,y;outer:for(var i=0;i<2;++i){seg=segs[i];for(var j=1;j<3;++j){x=seg["x"+j];y=seg["y"+j];dist=Math.sqrt(Math.pow(x-intersection.x,2)+ +Math.pow(y-intersection.y,2));if(dist=1.0){x=x2;y=y2;}else{x=x1+along*dx;y=y1+along*dy;} +return{distance:Math.sqrt(Math.pow(x-x0,2)+Math.pow(y-y0,2)),x:x,y:y};};OpenLayers.Geometry.Point=OpenLayers.Class(OpenLayers.Geometry,{x:null,y:null,initialize:function(x,y){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.x=parseFloat(x);this.y=parseFloat(y);},clone:function(obj){if(obj==null){obj=new OpenLayers.Geometry.Point(this.x,this.y);} +OpenLayers.Util.applyDefaults(obj,this);return obj;},calculateBounds:function(){this.bounds=new OpenLayers.Bounds(this.x,this.y,this.x,this.y);},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var distance,x0,y0,x1,y1,result;if(geometry instanceof OpenLayers.Geometry.Point){x0=this.x;y0=this.y;x1=geometry.x;y1=geometry.y;distance=Math.sqrt(Math.pow(x0-x1,2)+Math.pow(y0-y1,2));result=!details?distance:{x0:x0,y0:y0,x1:x1,y1:y1,distance:distance};}else{result=geometry.distanceTo(this,options);if(details){result={x0:result.x1,y0:result.y1,x1:result.x0,y1:result.y0,distance:result.distance};}} +return result;},equals:function(geom){var equals=false;if(geom!=null){equals=((this.x==geom.x&&this.y==geom.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(geom.x)&&isNaN(geom.y)));} +return equals;},toShortString:function(){return(this.x+", "+this.y);},move:function(x,y){this.x=this.x+x;this.y=this.y+y;this.clearBounds();},rotate:function(angle,origin){angle*=Math.PI/180;var radius=this.distanceTo(origin);var theta=angle+Math.atan2(this.y-origin.y,this.x-origin.x);this.x=origin.x+(radius*Math.cos(theta));this.y=origin.y+(radius*Math.sin(theta));this.clearBounds();},getCentroid:function(){return new OpenLayers.Geometry.Point(this.x,this.y);},resize:function(scale,origin,ratio){ratio=(ratio==undefined)?1:ratio;this.x=origin.x+(scale*ratio*(this.x-origin.x));this.y=origin.y+(scale*(this.y-origin.y));this.clearBounds();return this;},intersects:function(geometry){var intersect=false;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.equals(geometry);}else{intersect=geometry.intersects(this);} +return intersect;},transform:function(source,dest){if((source&&dest)){OpenLayers.Projection.transform(this,source,dest);this.bounds=null;} +return this;},getVertices:function(nodes){return[this];},CLASS_NAME:"OpenLayers.Geometry.Point"});OpenLayers.Geometry.Collection=OpenLayers.Class(OpenLayers.Geometry,{components:null,componentTypes:null,initialize:function(components){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);this.components=[];if(components!=null){this.addComponents(components);}},destroy:function(){this.components.length=0;this.components=null;OpenLayers.Geometry.prototype.destroy.apply(this,arguments);},clone:function(){var geometry=eval("new "+this.CLASS_NAME+"()");for(var i=0,len=this.components.length;i-1)){if(index!=null&&(index=0;--i){removed=this.removeComponent(components[i])||removed;} +return removed;},removeComponent:function(component){OpenLayers.Util.removeItem(this.components,component);this.clearBounds();return true;},getLength:function(){var length=0.0;for(var i=0,len=this.components.length;i0)?area:minArea;centroids.push(centroid);} +len=areas.length;if(areaSum===0){for(var i=0;i1)){for(var i=1,len=this.components.length;i1)){var p1,p2;for(var i=1,len=geom.components.length;i2);if(removed){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);} +return removed;},intersects:function(geometry){var intersect=false;var type=geometry.CLASS_NAME;if(type=="OpenLayers.Geometry.LineString"||type=="OpenLayers.Geometry.LinearRing"||type=="OpenLayers.Geometry.Point"){var segs1=this.getSortedSegments();var segs2;if(type=="OpenLayers.Geometry.Point"){segs2=[{x1:geometry.x,y1:geometry.y,x2:geometry.x,y2:geometry.y}];}else{segs2=geometry.getSortedSegments();} +var seg1,seg1x1,seg1x2,seg1y1,seg1y2,seg2,seg2y1,seg2y2;outer:for(var i=0,len=segs1.length;iseg1x2){break;} +if(seg2.x2Math.max(seg1y1,seg1y2)){continue;} +if(Math.max(seg2y1,seg2y2)0){var xDir=seg.x10){lines.unshift(j,1);Array.prototype.splice.apply(targetParts,lines);j+=lines.length-2;} +if(mutual){for(var k=0,len=splits.points.length;k0&&points.length>0){points.push(vert2.clone());sourceParts.push(new OpenLayers.Geometry.LineString(points));}}else{results=target.splitWith(this,options);} +if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];} +if(sourceParts&&sourceParts.length>1){sourceSplit=true;}else{sourceParts=[];} +if(targetSplit||sourceSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}} +return results;},splitWith:function(geometry,options){return geometry.split(this,options);},getVertices:function(nodes){var vertices;if(nodes===true){vertices=[this.components[0],this.components[this.components.length-1]];}else if(nodes===false){vertices=this.components.slice(1,this.components.length-1);}else{vertices=this.components.slice();} +return vertices;},distanceTo:function(geometry,options){var edge=!(options&&options.edge===false);var details=edge&&options&&options.details;var result,best={};var min=Number.POSITIVE_INFINITY;if(geometry instanceof OpenLayers.Geometry.Point){var segs=this.getSortedSegments();var x=geometry.x;var y=geometry.y;var seg;for(var i=0,len=segs.length;ix&&((y>seg.y1&&yseg.y2))){break;}}} +if(details){best={distance:best.distance,x0:best.x,y0:best.y,x1:x,y1:y};}else{best=best.distance;}}else if(geometry instanceof OpenLayers.Geometry.LineString){var segs0=this.getSortedSegments();var segs1=geometry.getSortedSegments();var seg0,seg1,intersection,x0,y0;var len1=segs1.length;var interOptions={point:true};outer:for(var i=0,len=segs0.length;imaxDistance){maxDistance=distance;indexFarthest=index;}} +if(maxDistance>tolerance&&indexFarthest!=firstPoint){pointIndexsToKeep.push(indexFarthest);douglasPeuckerReduction(points,firstPoint,indexFarthest,tolerance);douglasPeuckerReduction(points,indexFarthest,lastPoint,tolerance);}};var perpendicularDistance=function(point1,point2,point){var area=Math.abs(0.5*(point1.x*point2.y+point2.x*point.y+point.x*point1.y-point2.x*point1.y-point.x*point2.y-point1.x*point.y));var bottom=Math.sqrt(Math.pow(point1.x-point2.x,2)+Math.pow(point1.y-point2.y,2));var height=area/bottom*2;return height;};var firstPoint=0;var lastPoint=points.length-1;var pointIndexsToKeep=[];pointIndexsToKeep.push(firstPoint);pointIndexsToKeep.push(lastPoint);while(points[firstPoint].equals(points[lastPoint])){lastPoint--;pointIndexsToKeep.push(lastPoint);} +douglasPeuckerReduction(points,firstPoint,lastPoint,tolerance);var returnPoints=[];pointIndexsToKeep.sort(compareNumbers);for(var index=0;index1){sourceSplit=true;}else{sourceParts=[];} +if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];} +if(sourceSplit||targetSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}} +return results;},splitWith:function(geometry,options){var results=null;var mutual=options&&options.mutual;var splits,targetLine,sourceLines,sourceSplit,targetSplit,sourceParts,targetParts;if(geometry instanceof OpenLayers.Geometry.LineString){targetParts=[];sourceParts=[geometry];for(var i=0,len=this.components.length;i1){sourceSplit=true;}else{sourceParts=[];} +if(targetParts&&targetParts.length>1){targetSplit=true;}else{targetParts=[];} +if(sourceSplit||targetSplit){if(mutual){results=[sourceParts,targetParts];}else{results=targetParts;}} +return results;},CLASS_NAME:"OpenLayers.Geometry.MultiLineString"});OpenLayers.Geometry.LinearRing=OpenLayers.Class(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(points){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments);},addComponent:function(point,index){var added=false;var lastPoint=this.components.pop();if(index!=null||!point.equals(lastPoint)){added=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments);} +var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);return added;},removeComponent:function(point){var removed=this.components&&(this.components.length>3);if(removed){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);} +return removed;},move:function(x,y){for(var i=0,len=this.components.length;i2)){var sumX=0.0;var sumY=0.0;for(var i=0;i2)){var sum=0.0;for(var i=0,len=this.components.length;i2){var p1,p2;for(var i=0;i=x1&&px<=x2)||x1>=x2&&(px<=x1&&px>=x2)){crosses=-1;break;}} +continue;} +cx=approx(getX(py,x1,y1,x2,y2),digs);if(cx==px){if(y1=y1&&py<=y2)||y1>y2&&(py<=y1&&py>=y2)){crosses=-1;break;}} +if(cx<=px){continue;} +if(x1!=x2&&(cxMath.max(x1,x2))){continue;} +if(y1=y1&&pyy2&&(py=y2)){++crosses;}} +var contained=(crosses==-1)?1:!!(crosses&1);return contained;},intersects:function(geometry){var intersect=false;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){intersect=this.containsPoint(geometry);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LineString"){intersect=geometry.intersects(this);}else if(geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){intersect=OpenLayers.Geometry.LineString.prototype.intersects.apply(this,[geometry]);}else{for(var i=0,len=geometry.components.length;i0)){area+=Math.abs(this.components[0].getArea());for(var i=1,len=this.components.length;i0)){area+=Math.abs(this.components[0].getGeodesicArea(projection));for(var i=1,len=this.components.length;i0){contained=this.components[0].containsPoint(point);if(contained!==1){if(contained&&numRings>1){var hole;for(var i=1;i0){parser=this.parseGeometry[type.toLowerCase()];if(parser){geometry=parser.apply(this,[nodeList[0]]);if(this.internalProjection&&this.externalProjection){geometry.transform(this.externalProjection,this.internalProjection);}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{'geomType':type}));} +break;}} +var bounds;var boxNodes=this.getElementsByTagNameNS(node,this.gmlns,"Box");for(i=0;i0){coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);} +if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.removeSpace,"");coords=coordString.split(",");}} +if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coord");if(nodeList.length>0){var xList=this.getElementsByTagNameNS(nodeList[0],this.gmlns,"X");var yList=this.getElementsByTagNameNS(nodeList[0],this.gmlns,"Y");if(xList.length>0&&yList.length>0){coords=[xList[0].firstChild.nodeValue,yList[0].firstChild.nodeValue];}}} +if(coords.length==2){coords[2]=null;} +if(this.xy){return new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);} +else{return new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}},multipoint:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"Point");var components=[];if(nodeList.length>0){var point;for(var i=0;i0){coordString=this.getChildValue(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);var dim=parseInt(nodeList[0].getAttribute("dimension"));var j,x,y,z;for(var i=0;i0){coordString=this.getChildValue(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coordString=coordString.replace(this.regExes.trimComma,",");var pointList=coordString.split(this.regExes.splitSpace);for(var i=0;i0){var line;for(var i=0;i0){var ring;for(var i=0;i0){var polygon;for(var i=0;i0){var coords=[];if(lpoint.length>0){coordString=lpoint[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);} +if(coords.length==2){coords[2]=null;} +if(this.xy){var lowerPoint=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{var lowerPoint=new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}} +var upoint=this.getElementsByTagNameNS(node,this.gmlns,"upperCorner");if(upoint.length>0){var coords=[];if(upoint.length>0){coordString=upoint[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);} +if(coords.length==2){coords[2]=null;} +if(this.xy){var upperPoint=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{var upperPoint=new OpenLayers.Geometry.Point(coords[1],coords[0],coords[2]);}} +if(lowerPoint&&upperPoint){components.push(new OpenLayers.Geometry.Point(lowerPoint.x,lowerPoint.y));components.push(new OpenLayers.Geometry.Point(upperPoint.x,lowerPoint.y));components.push(new OpenLayers.Geometry.Point(upperPoint.x,upperPoint.y));components.push(new OpenLayers.Geometry.Point(lowerPoint.x,upperPoint.y));components.push(new OpenLayers.Geometry.Point(lowerPoint.x,lowerPoint.y));var ring=new OpenLayers.Geometry.LinearRing(components);envelope=new OpenLayers.Geometry.Polygon([ring]);} +return envelope;},box:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");var coordString;var coords,beginPoint=null,endPoint=null;if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coords=coordString.split(" ");if(coords.length==2){beginPoint=coords[0].split(",");endPoint=coords[1].split(",");}} +if(beginPoint!==null&&endPoint!==null){return new OpenLayers.Bounds(parseFloat(beginPoint[0]),parseFloat(beginPoint[1]),parseFloat(endPoint[0]),parseFloat(endPoint[1]));}}},parseAttributes:function(node){var attributes={};var childNode=node.firstChild;var children,i,child,grandchildren,grandchild,name,value;while(childNode){if(childNode.nodeType==1){children=childNode.childNodes;for(i=0;i0){obj.bounds=container.components[0];}},"Point":function(node,container){var obj={points:[]};this.readChildNodes(node,obj);if(!container.components){container.components=[];} +container.components.push(obj.points[0]);},"coordinates":function(node,obj){var str=this.getChildValue(node).replace(this.regExes.trimSpace,"");str=str.replace(this.regExes.trimComma,",");var pointList=str.split(this.regExes.splitSpace);var coords;var numPoints=pointList.length;var points=new Array(numPoints);for(var i=0;i0){container.components=[new OpenLayers.Geometry.MultiLineString(obj.components)];}},"curveMember":function(node,obj){this.readChildNodes(node,obj);},"MultiSurface":function(node,container){var obj={components:[]};this.readChildNodes(node,obj);if(obj.components.length>0){container.components=[new OpenLayers.Geometry.MultiPolygon(obj.components)];}},"surfaceMember":function(node,obj){this.readChildNodes(node,obj);},"surfaceMembers":function(node,obj){this.readChildNodes(node,obj);},"pointMembers":function(node,obj){this.readChildNodes(node,obj);},"lineStringMembers":function(node,obj){this.readChildNodes(node,obj);},"polygonMembers":function(node,obj){this.readChildNodes(node,obj);},"geometryMembers":function(node,obj){this.readChildNodes(node,obj);},"Envelope":function(node,container){var obj={points:new Array(2)};this.readChildNodes(node,obj);if(!container.components){container.components=[];} +var min=obj.points[0];var max=obj.points[1];container.components.push(new OpenLayers.Bounds(min.x,min.y,max.x,max.y));},"lowerCorner":function(node,container){var obj={};this.readers.gml.pos.apply(this,[node,obj]);container.points[0]=obj.points[0];},"upperCorner":function(node,container){var obj={};this.readers.gml.pos.apply(this,[node,obj]);container.points[1]=obj.points[0];}},OpenLayers.Format.GML.Base.prototype.readers["gml"]),"feature":OpenLayers.Format.GML.Base.prototype.readers["feature"],"wfs":OpenLayers.Format.GML.Base.prototype.readers["wfs"]},write:function(features){var name;if(OpenLayers.Util.isArray(features)){name="featureMembers";}else{name="featureMember";} +var root=this.writeNode("gml:"+name,features);this.setAttributeNS(root,this.namespaces["xsi"],"xsi:schemaLocation",this.schemaLocation);return OpenLayers.Format.XML.prototype.write.apply(this,[root]);},writers:{"gml":OpenLayers.Util.applyDefaults({"featureMembers":function(features){var node=this.createElementNSPlus("gml:featureMembers");for(var i=0,len=features.length;i=0;i--){ctl=this.controls[i];if(ctl.events){ctl.events.un({activate:this.iconOn,deactivate:this.iconOff});} +OpenLayers.Event.stopObservingElement(ctl.panel_div);ctl.panel_div=null;} +this.activeState=null;},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){var control;for(var i=0,len=this.controls.length;i=0;i--){this.div.removeChild(this.div.childNodes[i]);} +this.div.innerHTML="";if(this.active){for(var i=0,len=this.controls.length;i=bounds.bottom-tilelat*this.buffer)||rowidx=0)&&(testCell=0)){tile=this.grid[testRow][testCell];} +if((tile!=null)&&(!tile.queued)){tileQueue.unshift(tile);tile.queued=true;directionsTried=0;iRow=testRow;iCell=testCell;}else{direction=(direction+1)%4;directionsTried++;}} +for(var i=0,len=tileQueue.length;i-this.tileSize.w*(buffer-1)){this.shiftColumn(true);}else if(tlViewPort.x<-this.tileSize.w*buffer){this.shiftColumn(false);}else if(tlViewPort.y>-this.tileSize.h*(buffer-1)){this.shiftRow(true);}else if(tlViewPort.y<-this.tileSize.h*buffer){this.shiftRow(false);}else{shifted=false;} +if(shifted){this.timerId=window.setTimeout(this._moveGriddedTiles,0);}},shiftRow:function(prepend){var modelRowIndex=(prepend)?0:(this.grid.length-1);var grid=this.grid;var modelRow=grid[modelRowIndex];var resolution=this.map.getResolution();var deltaY=(prepend)?-this.tileSize.h:this.tileSize.h;var deltaLat=resolution*-deltaY;var row=(prepend)?grid.pop():grid.shift();for(var i=0,len=modelRow.length;irows){var row=this.grid.pop();for(var i=0,l=row.length;icolumns){for(var i=0,l=this.grid.length;ibottomRight.lon){if(topLeft.lon<0){topLeft.lon=-180-(topLeft.lon+180);}else{bottomRight.lon=180+bottomRight.lon+180;}} +var bounds=new OpenLayers.Bounds(topLeft.lon,bottomRight.lat,bottomRight.lon,topLeft.lat);return bounds;},showTile:function(){if(this.shouldDraw){this.show();}},show:function(){},hide:function(){},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Tile.Image=OpenLayers.Class(OpenLayers.Tile,{url:null,imgDiv:null,frame:null,layerAlphaHack:null,isBackBuffer:false,isFirstDraw:true,backBufferTile:null,maxGetUrlLength:null,initialize:function(layer,position,bounds,url,size,options){OpenLayers.Tile.prototype.initialize.apply(this,arguments);if(this.maxGetUrlLength!=null){OpenLayers.Util.extend(this,OpenLayers.Tile.Image.IFrame);} +this.url=url;this.frame=document.createElement('div');this.frame.style.overflow='hidden';this.frame.style.position='absolute';this.layerAlphaHack=this.layer.alpha&&OpenLayers.Util.alphaHack();},destroy:function(){if(this.imgDiv!=null){this.removeImgDiv();} +this.imgDiv=null;if((this.frame!=null)&&(this.frame.parentNode==this.layer.div)){this.layer.div.removeChild(this.frame);} +this.frame=null;if(this.backBufferTile){this.backBufferTile.destroy();this.backBufferTile=null;} +this.layer.events.unregister("loadend",this,this.resetBackBuffer);OpenLayers.Tile.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Tile.Image(this.layer,this.position,this.bounds,this.url,this.size);} +obj=OpenLayers.Tile.prototype.clone.apply(this,[obj]);obj.imgDiv=null;return obj;},draw:function(){if(this.layer!=this.layer.map.baseLayer&&this.layer.reproject){this.bounds=this.getBoundsFromBaseLayer(this.position);} +var drawTile=OpenLayers.Tile.prototype.draw.apply(this,arguments);if((OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1)||this.layer.singleTile){if(drawTile){if(!this.backBufferTile){this.backBufferTile=this.clone();this.backBufferTile.hide();this.backBufferTile.isBackBuffer=true;this.events.register('loadend',this,this.resetBackBuffer);this.layer.events.register("loadend",this,this.resetBackBuffer);} +this.startTransition();}else{if(this.backBufferTile){this.backBufferTile.clear();}}}else{if(drawTile&&this.isFirstDraw){this.events.register('loadend',this,this.showTile);this.isFirstDraw=false;}} +if(!drawTile){return false;} +if(this.isLoading){this.events.triggerEvent("reload");}else{this.isLoading=true;this.events.triggerEvent("loadstart");} +return this.renderTile();},resetBackBuffer:function(){this.showTile();if(this.backBufferTile&&(this.isFirstDraw||!this.layer.numLoadingTiles)){this.isFirstDraw=false;var maxExtent=this.layer.maxExtent;var withinMaxExtent=(maxExtent&&this.bounds.intersectsBounds(maxExtent,false));if(withinMaxExtent){this.backBufferTile.position=this.position;this.backBufferTile.bounds=this.bounds;this.backBufferTile.size=this.size;this.backBufferTile.imageSize=this.layer.getImageSize(this.bounds)||this.size;this.backBufferTile.imageOffset=this.layer.imageOffset;this.backBufferTile.resolution=this.layer.getResolution();this.backBufferTile.renderTile();} +this.backBufferTile.hide();}},renderTile:function(){if(this.layer.async){this.initImgDiv();this.layer.getURLasync(this.bounds,this,"url",this.positionImage);}else{this.url=this.layer.getURL(this.bounds);this.initImgDiv();this.positionImage();} +return true;},positionImage:function(){if(this.layer===null){return;} +OpenLayers.Util.modifyDOMElement(this.frame,null,this.position,this.size);var imageSize=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,null,null,imageSize,this.url);}else{OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,imageSize);this.imgDiv.src=this.url;}},clear:function(){if(this.imgDiv){this.hide();if(OpenLayers.Tile.Image.useBlankTile){this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif";}}},initImgDiv:function(){if(this.imgDiv==null){var offset=this.layer.imageOffset;var size=this.layer.getImageSize(this.bounds);if(this.layerAlphaHack){this.imgDiv=OpenLayers.Util.createAlphaImageDiv(null,offset,size,null,"relative",null,null,null,true);}else{this.imgDiv=OpenLayers.Util.createImage(null,offset,size,null,"relative",null,null,true);} +if(OpenLayers.Util.isArray(this.layer.url)){this.imgDiv.urls=this.layer.url.slice();} +this.imgDiv.className='olTileImage';this.frame.style.zIndex=this.isBackBuffer?0:1;this.frame.appendChild(this.imgDiv);this.layer.div.appendChild(this.frame);if(this.layer.opacity!=null){OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity);} +this.imgDiv.map=this.layer.map;var onload=function(){if(this.isLoading){this.isLoading=false;this.events.triggerEvent("loadend");}};if(this.layerAlphaHack){OpenLayers.Event.observe(this.imgDiv.childNodes[0],'load',OpenLayers.Function.bind(onload,this));}else{OpenLayers.Event.observe(this.imgDiv,'load',OpenLayers.Function.bind(onload,this));} +var onerror=function(){if(this.imgDiv._attempts>OpenLayers.IMAGE_RELOAD_ATTEMPTS){onload.call(this);}};OpenLayers.Event.observe(this.imgDiv,"error",OpenLayers.Function.bind(onerror,this));} +this.imgDiv.viewRequestID=this.layer.map.viewRequestID;},removeImgDiv:function(){OpenLayers.Event.stopObservingElement(this.imgDiv);if(this.imgDiv.parentNode==this.frame){this.frame.removeChild(this.imgDiv);this.imgDiv.map=null;} +this.imgDiv.urls=null;var child=this.imgDiv.firstChild;if(child){OpenLayers.Event.stopObservingElement(child);this.imgDiv.removeChild(child);delete child;}else{this.imgDiv.src=OpenLayers.Util.getImagesLocation()+"blank.gif";}},checkImgURL:function(){if(this.layer){var loaded=this.layerAlphaHack?this.imgDiv.firstChild.src:this.imgDiv.src;if(!OpenLayers.Util.isEquivalentUrl(loaded,this.url)){this.hide();}}},startTransition:function(){if(!this.backBufferTile||!this.backBufferTile.imgDiv){return;} +var ratio=1;if(this.backBufferTile.resolution){ratio=this.backBufferTile.resolution/this.layer.getResolution();} +if(ratio!=1){if(this.layer.transitionEffect=='resize'){var upperLeft=new OpenLayers.LonLat(this.backBufferTile.bounds.left,this.backBufferTile.bounds.top);var size=new OpenLayers.Size(this.backBufferTile.size.w*ratio,this.backBufferTile.size.h*ratio);var px=this.layer.map.getLayerPxFromLonLat(upperLeft);OpenLayers.Util.modifyDOMElement(this.backBufferTile.frame,null,px,size);var imageSize=this.backBufferTile.imageSize;imageSize=new OpenLayers.Size(imageSize.w*ratio,imageSize.h*ratio);var imageOffset=this.backBufferTile.imageOffset;if(imageOffset){imageOffset=new OpenLayers.Pixel(imageOffset.x*ratio,imageOffset.y*ratio);} +OpenLayers.Util.modifyDOMElement(this.backBufferTile.imgDiv,null,imageOffset,imageSize);this.backBufferTile.show();}}else{if(this.layer.singleTile){this.backBufferTile.show();}else{this.backBufferTile.hide();}}},show:function(){this.frame.style.display='';if(OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,this.layer.transitionEffect)!=-1){if(OpenLayers.IS_GECKO===true){this.frame.scrollLeft=this.frame.scrollLeft;}}},hide:function(){this.frame.style.display='none';},CLASS_NAME:"OpenLayers.Tile.Image"});OpenLayers.Tile.Image.useBlankTile=(OpenLayers.BROWSER_NAME=="safari"||OpenLayers.BROWSER_NAME=="opera");OpenLayers.Format.ArcXML=OpenLayers.Class(OpenLayers.Format.XML,{fontStyleKeys:['antialiasing','blockout','font','fontcolor','fontsize','fontstyle','glowing','interval','outline','printmode','shadow','transparency'],request:null,response:null,initialize:function(options){this.request=new OpenLayers.Format.ArcXML.Request();this.response=new OpenLayers.Format.ArcXML.Response();if(options){if(options.requesttype=="feature"){this.request.get_image=null;var qry=this.request.get_feature.query;this.addCoordSys(qry.featurecoordsys,options.featureCoordSys);this.addCoordSys(qry.filtercoordsys,options.filterCoordSys);if(options.polygon){qry.isspatial=true;qry.spatialfilter.polygon=options.polygon;}else if(options.envelope){qry.isspatial=true;qry.spatialfilter.envelope={minx:0,miny:0,maxx:0,maxy:0};this.parseEnvelope(qry.spatialfilter.envelope,options.envelope);}}else if(options.requesttype=="image"){this.request.get_feature=null;var props=this.request.get_image.properties;this.parseEnvelope(props.envelope,options.envelope);this.addLayers(props.layerlist,options.layers);this.addImageSize(props.imagesize,options.tileSize);this.addCoordSys(props.featurecoordsys,options.featureCoordSys);this.addCoordSys(props.filtercoordsys,options.filterCoordSys);}else{this.request=null;}} +OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},parseEnvelope:function(env,arr){if(arr&&arr.length==4){env.minx=arr[0];env.miny=arr[1];env.maxx=arr[2];env.maxy=arr[3];}},addLayers:function(ll,lyrs){for(var lind=0,len=lyrs.length;lind0);} +return ret;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);} +var arcNode=null;if(data&&data.documentElement){if(data.documentElement.nodeName=="ARCXML"){arcNode=data.documentElement;}else{arcNode=data.documentElement.getElementsByTagName("ARCXML")[0];}} +if(!arcNode||arcNode.firstChild.nodeName==='parsererror'){var error,source;try{error=data.firstChild.nodeValue;source=data.firstChild.childNodes[1].firstChild.nodeValue;}catch(err){} +throw{message:"Error parsing the ArcXML request",error:error,source:source};} +var response=this.parseResponse(arcNode);return response;},write:function(request){if(!request){request=this.request;} +var root=this.createElementNS("","ARCXML");root.setAttribute("version","1.1");var reqElem=this.createElementNS("","REQUEST");if(request.get_image!=null){var getElem=this.createElementNS("","GET_IMAGE");reqElem.appendChild(getElem);var propElem=this.createElementNS("","PROPERTIES");getElem.appendChild(propElem);var props=request.get_image.properties;if(props.featurecoordsys!=null){var feat=this.createElementNS("","FEATURECOORDSYS");propElem.appendChild(feat);if(props.featurecoordsys.id===0){feat.setAttribute("string",props.featurecoordsys['string']);} +else{feat.setAttribute("id",props.featurecoordsys.id);}} +if(props.filtercoordsys!=null){var filt=this.createElementNS("","FILTERCOORDSYS");propElem.appendChild(filt);if(props.filtercoordsys.id===0){filt.setAttribute("string",props.filtercoordsys.string);} +else{filt.setAttribute("id",props.filtercoordsys.id);}} +if(props.envelope!=null){var env=this.createElementNS("","ENVELOPE");propElem.appendChild(env);env.setAttribute("minx",props.envelope.minx);env.setAttribute("miny",props.envelope.miny);env.setAttribute("maxx",props.envelope.maxx);env.setAttribute("maxy",props.envelope.maxy);} +var imagesz=this.createElementNS("","IMAGESIZE");propElem.appendChild(imagesz);imagesz.setAttribute("height",props.imagesize.height);imagesz.setAttribute("width",props.imagesize.width);if(props.imagesize.height!=props.imagesize.printheight||props.imagesize.width!=props.imagesize.printwidth){imagesz.setAttribute("printheight",props.imagesize.printheight);imagesz.setArrtibute("printwidth",props.imagesize.printwidth);} +if(props.background!=null){var backgrnd=this.createElementNS("","BACKGROUND");propElem.appendChild(backgrnd);backgrnd.setAttribute("color",props.background.color.r+","+ +props.background.color.g+","+ +props.background.color.b);if(props.background.transcolor!==null){backgrnd.setAttribute("transcolor",props.background.transcolor.r+","+ +props.background.transcolor.g+","+ +props.background.transcolor.b);}} +if(props.layerlist!=null&&props.layerlist.length>0){var layerlst=this.createElementNS("","LAYERLIST");propElem.appendChild(layerlst);for(var ld=0;ld0){queryElem.setAttribute("accuracy",query.accuracy);} +if(typeof query.featurelimit=="number"&&query.featurelimit<2000){queryElem.setAttribute("featurelimit",query.featurelimit);} +if(typeof query.subfields=="string"&&query.subfields!="#ALL#"){queryElem.setAttribute("subfields",query.subfields);} +if(typeof query.joinexpression=="string"&&query.joinexpression.length>0){queryElem.setAttribute("joinexpression",query.joinexpression);} +if(typeof query.jointables=="string"&&query.jointables.length>0){queryElem.setAttribute("jointables",query.jointables);} +ldef.appendChild(queryElem);} +if(typeof props.layerlist[ld].renderer=="object"){this.addRenderer(ldef,props.layerlist[ld].renderer);}}}}else if(request.get_feature!=null){var getElem=this.createElementNS("","GET_FEATURES");getElem.setAttribute("outputmode","newxml");getElem.setAttribute("checkesc","true");if(request.get_feature.geometry){getElem.setAttribute("geometry",request.get_feature.geometry);} +else{getElem.setAttribute("geometry","false");} +if(request.get_feature.compact){getElem.setAttribute("compact",request.get_feature.compact);} +if(request.get_feature.featurelimit=="number"){getElem.setAttribute("featurelimit",request.get_feature.featurelimit);} +getElem.setAttribute("globalenvelope","true");reqElem.appendChild(getElem);if(request.get_feature.layer!=null&&request.get_feature.layer.length>0){var lyrElem=this.createElementNS("","LAYER");lyrElem.setAttribute("id",request.get_feature.layer);getElem.appendChild(lyrElem);} +var fquery=request.get_feature.query;if(fquery!=null){var qElem=null;if(fquery.isspatial){qElem=this.createElementNS("","SPATIALQUERY");}else{qElem=this.createElementNS("","QUERY");} +getElem.appendChild(qElem);if(typeof fquery.accuracy=="number"){qElem.setAttribute("accuracy",fquery.accuracy);} +if(fquery.featurecoordsys!=null){var fcsElem1=this.createElementNS("","FEATURECOORDSYS");if(fquery.featurecoordsys.id==0){fcsElem1.setAttribute("string",fquery.featurecoordsys.string);}else{fcsElem1.setAttribute("id",fquery.featurecoordsys.id);} +qElem.appendChild(fcsElem1);} +if(fquery.filtercoordsys!=null){var fcsElem2=this.createElementNS("","FILTERCOORDSYS");if(fquery.filtercoordsys.id===0){fcsElem2.setAttribute("string",fquery.filtercoordsys.string);}else{fcsElem2.setAttribute("id",fquery.filtercoordsys.id);} +qElem.appendChild(fcsElem2);} +if(fquery.buffer>0){var bufElem=this.createElementNS("","BUFFER");bufElem.setAttribute("distance",fquery.buffer);qElem.appendChild(bufElem);} +if(fquery.isspatial){var spfElem=this.createElementNS("","SPATIALFILTER");spfElem.setAttribute("relation",fquery.spatialfilter.relation);qElem.appendChild(spfElem);if(fquery.spatialfilter.envelope){var envElem=this.createElementNS("","ENVELOPE");envElem.setAttribute("minx",fquery.spatialfilter.envelope.minx);envElem.setAttribute("miny",fquery.spatialfilter.envelope.miny);envElem.setAttribute("maxx",fquery.spatialfilter.envelope.maxx);envElem.setAttribute("maxy",fquery.spatialfilter.envelope.maxy);spfElem.appendChild(envElem);}else if(typeof fquery.spatialfilter.polygon=="object"){spfElem.appendChild(this.writePolygonGeometry(fquery.spatialfilter.polygon));}} +if(fquery.where!=null&&fquery.where.length>0){qElem.setAttribute("where",fquery.where);}}} +root.appendChild(reqElem);return OpenLayers.Format.XML.prototype.write.apply(this,[root]);},addGroupRenderer:function(ldef,toprenderer){var topRelem=this.createElementNS("","GROUPRENDERER");ldef.appendChild(topRelem);for(var rind=0;rind0){response.error=this.getChildValue(errorNode,"Unknown error.");}else{var responseNode=data.getElementsByTagName("RESPONSE");if(responseNode==null||responseNode.length==0){response.error="No RESPONSE tag found in ArcXML response.";return response;} +var rtype=responseNode[0].firstChild.nodeName;if(rtype=="#text"){rtype=responseNode[0].firstChild.nextSibling.nodeName;} +if(rtype=="IMAGE"){var envelopeNode=data.getElementsByTagName("ENVELOPE");var outputNode=data.getElementsByTagName("OUTPUT");if(envelopeNode==null||envelopeNode.length==0){response.error="No ENVELOPE tag found in ArcXML response.";}else if(outputNode==null||outputNode.length==0){response.error="No OUTPUT tag found in ArcXML response.";}else{var envAttr=this.parseAttributes(envelopeNode[0]);var outputAttr=this.parseAttributes(outputNode[0]);if(typeof outputAttr.type=="string"){response.image={envelope:envAttr,output:{type:outputAttr.type,data:this.getChildValue(outputNode[0])}};}else{response.image={envelope:envAttr,output:outputAttr};}}}else if(rtype=="FEATURES"){var features=responseNode[0].getElementsByTagName("FEATURES");var featureCount=features[0].getElementsByTagName("FEATURECOUNT");response.features.featurecount=featureCount[0].getAttribute("count");if(response.features.featurecount>0){var envelope=features[0].getElementsByTagName("ENVELOPE");response.features.envelope=this.parseAttributes(envelope[0],typeof(0));var featureList=features[0].getElementsByTagName("FEATURE");for(var fn=0;fn0){var ring=geom[0].getElementsByTagName("RING");var polys=[];for(var rn=0;rn0){var coordArr=this.getChildValue(coords[0]);coordArr=coordArr.split(/;/);for(var cn=0;cn0){for(var pn=0;pn=200&&request.status<300)){this.events.triggerEvent("success",options);if(success){success(request);}} +if(request.status&&(request.status<200||request.status>=300)){this.events.triggerEvent("failure",options);if(failure){failure(request);}}},GET:function(config){config=OpenLayers.Util.extend(config,{method:"GET"});return OpenLayers.Request.issue(config);},POST:function(config){config=OpenLayers.Util.extend(config,{method:"POST"});config.headers=config.headers?config.headers:{};if(!("CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(config.headers))){config.headers["Content-Type"]="application/xml";} +return OpenLayers.Request.issue(config);},PUT:function(config){config=OpenLayers.Util.extend(config,{method:"PUT"});config.headers=config.headers?config.headers:{};if(!("CONTENT-TYPE"in OpenLayers.Util.upperCaseObject(config.headers))){config.headers["Content-Type"]="application/xml";} +return OpenLayers.Request.issue(config);},DELETE:function(config){config=OpenLayers.Util.extend(config,{method:"DELETE"});return OpenLayers.Request.issue(config);},HEAD:function(config){config=OpenLayers.Util.extend(config,{method:"HEAD"});return OpenLayers.Request.issue(config);},OPTIONS:function(config){config=OpenLayers.Util.extend(config,{method:"OPTIONS"});return OpenLayers.Request.issue(config);}};OpenLayers.Layer.ArcIMS=OpenLayers.Class(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{ClientVersion:"9.2",ServiceName:''},tileSize:null,featureCoordSys:"4326",filterCoordSys:"4326",layers:null,async:true,name:"ArcIMS",isBaseLayer:true,DEFAULT_OPTIONS:{tileSize:new OpenLayers.Size(512,512),featureCoordSys:"4326",filterCoordSys:"4326",layers:null,isBaseLayer:true,async:true,name:"ArcIMS"},initialize:function(name,url,options){this.tileSize=new OpenLayers.Size(512,512);this.params=OpenLayers.Util.applyDefaults({ServiceName:options.serviceName},this.DEFAULT_PARAMS);this.options=OpenLayers.Util.applyDefaults(options,this.DEFAULT_OPTIONS);OpenLayers.Layer.Grid.prototype.initialize.apply(this,[name,url,this.params,options]);if(this.transparent){if(!this.isBaseLayer){this.isBaseLayer=false;} +if(this.format=="image/jpeg"){this.format=OpenLayers.Util.alphaHack()?"image/gif":"image/png";}} +if(this.options.layers===null){this.options.layers=[];}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},getURL:function(bounds){var url="";bounds=this.adjustBounds(bounds);var axlReq=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",envelope:bounds.toArray(),tileSize:this.tileSize}));var req=new OpenLayers.Request.POST({url:this.getFullRequestString(),data:axlReq.write(),async:false});if(req!=null){var doc=req.responseXML;if(!doc||!doc.documentElement){doc=req.responseText;} +var axlResp=new OpenLayers.Format.ArcXML();var arcxml=axlResp.read(doc);url=this.getUrlOrImage(arcxml.image.output);} +return url;},getURLasync:function(bounds,scope,prop,callback){bounds=this.adjustBounds(bounds);var axlReq=new OpenLayers.Format.ArcXML(OpenLayers.Util.extend(this.options,{requesttype:"image",envelope:bounds.toArray(),tileSize:this.tileSize}));OpenLayers.Request.POST({url:this.getFullRequestString(),async:true,data:axlReq.write(),callback:function(req){var doc=req.responseXML;if(!doc||!doc.documentElement){doc=req.responseText;} +var axlResp=new OpenLayers.Format.ArcXML();var arcxml=axlResp.read(doc);scope[prop]=this.getUrlOrImage(arcxml.image.output);callback.apply(scope);},scope:this});},getUrlOrImage:function(output){var ret="";if(output.url){ret=output.url;}else if(output.data){ret="data:image/"+output.type+";base64,"+output.data;} +return ret;},setLayerQuery:function(id,querydef){for(var lyr=0;lyr=0;--i){this._removeButton(this.buttons[i]);}},doubleClick:function(evt){OpenLayers.Event.stop(evt);return false;},buttonDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;} +switch(this.action){case"panup":this.map.pan(0,-this.getSlideFactor("h"));break;case"pandown":this.map.pan(0,this.getSlideFactor("h"));break;case"panleft":this.map.pan(-this.getSlideFactor("w"),0);break;case"panright":this.map.pan(this.getSlideFactor("w"),0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break;case"zoomworld":this.map.zoomToMaxExtent();break;} +OpenLayers.Event.stop(evt);},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoombarDiv:null,divEvents:null,zoomWorldIcon:false,panIcons:true,forceFixedZoomLevel:false,mouseDragStart:null,deltaY:null,zoomStart:null,destroy:function(){this._removeZoomBar();this.map.events.un({"changebaselayer":this.redraw,scope:this});OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments);delete this.mouseDragStart;delete this.zoomStart;},setMap:function(map){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw);},redraw:function(){if(this.div!=null){this.removeButtons();this._removeZoomBar();} +this.draw();},draw:function(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position.clone();this.buttons=[];var sz=new OpenLayers.Size(18,18);if(this.panIcons){var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);var wposition=sz.w;if(this.zoomWorldIcon){centered=new OpenLayers.Pixel(px.x+sz.w,px.y);} +this._addButton("panup","north-mini.png",centered,sz);px.y=centered.y+sz.h;this._addButton("panleft","west-mini.png",px,sz);if(this.zoomWorldIcon){this._addButton("zoomworld","zoom-world-mini.png",px.add(sz.w,0),sz);wposition*=2;} +this._addButton("panright","east-mini.png",px.add(wposition,0),sz);this._addButton("pandown","south-mini.png",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);centered=this._addZoomBar(centered.add(0,sz.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",centered,sz);} +else{this._addButton("zoomin","zoom-plus-mini.png",px,sz);centered=this._addZoomBar(px.add(0,sz.h));this._addButton("zoomout","zoom-minus-mini.png",centered,sz);if(this.zoomWorldIcon){centered=centered.add(0,sz.h+3);this._addButton("zoomworld","zoom-world-mini.png",centered,sz);}} +return this.div;},_addZoomBar:function(centered){var imgLocation=OpenLayers.Util.getImagesLocation();var id=this.id+"_"+this.map.id;var zoomsToEnd=this.map.getNumZoomLevels()-1-this.map.getZoom();var slider=OpenLayers.Util.createAlphaImageDiv(id,centered.add(-1,zoomsToEnd*this.zoomStopHeight),new OpenLayers.Size(20,9),imgLocation+"slider.png","absolute");slider.style.cursor="move";this.slider=slider;this.sliderEvents=new OpenLayers.Events(this,slider,null,true,{includeXY:true});this.sliderEvents.on({"touchstart":this.zoomBarDown,"touchmove":this.zoomBarDrag,"touchend":this.zoomBarUp,"mousedown":this.zoomBarDown,"mousemove":this.zoomBarDrag,"mouseup":this.zoomBarUp,"dblclick":this.doubleClick,"click":this.doubleClick});var sz=new OpenLayers.Size();sz.h=this.zoomStopHeight*this.map.getNumZoomLevels();sz.w=this.zoomStopWidth;var div=null;if(OpenLayers.Util.alphaHack()){var id=this.id+"_"+this.map.id;div=OpenLayers.Util.createAlphaImageDiv(id,centered,new OpenLayers.Size(sz.w,this.zoomStopHeight),imgLocation+"zoombar.png","absolute",null,"crop");div.style.height=sz.h+"px";}else{div=OpenLayers.Util.createDiv('OpenLayers_Control_PanZoomBar_Zoombar'+this.map.id,centered,sz,imgLocation+"zoombar.png");} +div.style.cursor="pointer";this.zoombarDiv=div;this.divEvents=new OpenLayers.Events(this,div,null,true,{includeXY:true});this.divEvents.on({"touchmove":this.passEventToSlider,"mousedown":this.divClick,"mousemove":this.passEventToSlider,"dblclick":this.doubleClick,"click":this.doubleClick});this.div.appendChild(div);this.startTop=parseInt(div.style.top);this.div.appendChild(slider);this.map.events.register("zoomend",this,this.moveZoomBar);centered=centered.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return centered;},_removeZoomBar:function(){this.sliderEvents.un({"touchmove":this.zoomBarDrag,"mousedown":this.zoomBarDown,"mousemove":this.zoomBarDrag,"mouseup":this.zoomBarUp,"dblclick":this.doubleClick,"click":this.doubleClick});this.sliderEvents.destroy();this.divEvents.un({"touchmove":this.passEventToSlider,"mousedown":this.divClick,"mousemove":this.passEventToSlider,"dblclick":this.doubleClick,"click":this.doubleClick});this.divEvents.destroy();this.div.removeChild(this.zoombarDiv);this.zoombarDiv=null;this.div.removeChild(this.slider);this.slider=null;this.map.events.unregister("zoomend",this,this.moveZoomBar);},passEventToSlider:function(evt){this.sliderEvents.handleBrowserEvent(evt);},divClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt)){return;} +var levels=evt.xy.y/this.zoomStopHeight;if(this.forceFixedZoomLevel||!this.map.fractionalZoom){levels=Math.floor(levels);} +var zoom=(this.map.getNumZoomLevels()-1)-levels;zoom=Math.min(Math.max(zoom,0),this.map.getNumZoomLevels()-1);this.map.zoomTo(zoom);OpenLayers.Event.stop(evt);},zoomBarDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt)&&!OpenLayers.Event.isSingleTouch(evt)){return;} +this.map.events.on({"touchmove":this.passEventToSlider,"mousemove":this.passEventToSlider,"mouseup":this.passEventToSlider,scope:this});this.mouseDragStart=evt.xy.clone();this.zoomStart=evt.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(evt);},zoomBarDrag:function(evt){if(this.mouseDragStart!=null){var deltaY=this.mouseDragStart.y-evt.xy.y;var offsets=OpenLayers.Util.pagePosition(this.zoombarDiv);if((evt.clientY-offsets[1])>0&&(evt.clientY-offsets[1])0){this.layer.destroyFeatures(destroys);} +this.events.triggerEvent("success",evt);}else{this.events.triggerEvent("fail",evt);}},CLASS_NAME:"OpenLayers.Strategy.Save"});OpenLayers.Format.GPX=OpenLayers.Class(OpenLayers.Format.XML,{extractWaypoints:true,extractTracks:true,extractRoutes:true,extractAttributes:true,initialize:function(options){this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(doc){if(typeof doc=="string"){doc=OpenLayers.Format.XML.prototype.read.apply(this,[doc]);} +var features=[];if(this.extractTracks){var tracks=doc.getElementsByTagName("trk");for(var i=0,len=tracks.length;i0){typeName=query[0].getAttribute('typeName');if(!typeName){typeName=query[0].getAttribute('typename');}} +describelayer.push({layerName:layerName,owsType:owsType,owsURL:owsURL,typeName:typeName});}} +return describelayer;},CLASS_NAME:"OpenLayers.Format.WMSDescribeLayer.v1_1"});OpenLayers.Format.XLS=OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC,{defaultVersion:"1.1.0",stringifyOutput:true,CLASS_NAME:"OpenLayers.Format.XLS"});OpenLayers.Format.XLS.v1=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{xls:"http://www.opengis.net/xls",gml:"http://www.opengis.net/gml",xsi:"http://www.w3.org/2001/XMLSchema-instance"},regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},xy:true,defaultPrefix:"xls",schemaLocation:null,initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data,options){options=OpenLayers.Util.applyDefaults(options,this.options);var xls={};this.readChildNodes(data,xls);return xls;},readers:{"xls":{"XLS":function(node,xls){xls.version=node.getAttribute("version");this.readChildNodes(node,xls);},"Response":function(node,xls){this.readChildNodes(node,xls);},"GeocodeResponse":function(node,xls){xls.responseLists=[];this.readChildNodes(node,xls);},"GeocodeResponseList":function(node,xls){var responseList={features:[],numberOfGeocodedAddresses:parseInt(node.getAttribute("numberOfGeocodedAddresses"))};xls.responseLists.push(responseList);this.readChildNodes(node,responseList);},"GeocodedAddress":function(node,responseList){var feature=new OpenLayers.Feature.Vector();responseList.features.push(feature);this.readChildNodes(node,feature);feature.geometry=feature.components[0];},"GeocodeMatchCode":function(node,feature){feature.attributes.matchCode={accuracy:parseFloat(node.getAttribute("accuracy")),matchType:node.getAttribute("matchType")};},"Address":function(node,feature){var address={countryCode:node.getAttribute("countryCode"),addressee:node.getAttribute("addressee"),street:[],place:[]};feature.attributes.address=address;this.readChildNodes(node,address);},"freeFormAddress":function(node,address){address.freeFormAddress=this.getChildValue(node);},"StreetAddress":function(node,address){this.readChildNodes(node,address);},"Building":function(node,address){address.building={'number':node.getAttribute("number"),subdivision:node.getAttribute("subdivision"),buildingName:node.getAttribute("buildingName")};},"Street":function(node,address){address.street.push(this.getChildValue(node));},"Place":function(node,address){address.place[node.getAttribute("type")]=this.getChildValue(node);},"PostalCode":function(node,address){address.postalCode=this.getChildValue(node);}},"gml":OpenLayers.Format.GML.v3.prototype.readers.gml},write:function(request){return this.writers.xls.XLS.apply(this,[request]);},writers:{"xls":{"XLS":function(request){var root=this.createElementNSPlus("xls:XLS",{attributes:{"version":this.VERSION,"xsi:schemaLocation":this.schemaLocation}});this.writeNode("RequestHeader",request.header,root);this.writeNode("Request",request,root);return root;},"RequestHeader":function(header){return this.createElementNSPlus("xls:RequestHeader");},"Request":function(request){var node=this.createElementNSPlus("xls:Request",{attributes:{methodName:"GeocodeRequest",requestID:request.requestID||"",version:this.VERSION}});this.writeNode("GeocodeRequest",request.addresses,node);return node;},"GeocodeRequest":function(addresses){var node=this.createElementNSPlus("xls:GeocodeRequest");for(var i=0,len=addresses.length;i=16777216){this.hitOverflow=id-16777215;id=id%16777216+1;} +var hex="000000"+id.toString(16);var len=hex.length;hex="#"+hex.substring(len-6,len);return hex;},setHitContextStyle:function(type,featureId,symbolizer){var hex=this.featureIdToHex(featureId);if(type=="fill"){this.hitContext.globalAlpha=1.0;this.hitContext.fillStyle=hex;}else if(type=="stroke"){this.hitContext.globalAlpha=1.0;this.hitContext.strokeStyle=hex;this.hitContext.lineWidth=symbolizer.strokeWidth+2;}else{this.hitContext.globalAlpha=0;this.hitContext.lineWidth=1;}},drawPoint:function(geometry,style,featureId){if(style.graphic!==false){if(style.externalGraphic){this.drawExternalGraphic(geometry,style,featureId);}else{var pt=this.getLocalXY(geometry);var p0=pt[0];var p1=pt[1];if(!isNaN(p0)&&!isNaN(p1)){var twoPi=Math.PI*2;var radius=style.pointRadius;if(style.fill!==false){this.setCanvasStyle("fill",style);this.canvas.beginPath();this.canvas.arc(p0,p1,radius,0,twoPi,true);this.canvas.fill();if(this.hitDetection){this.setHitContextStyle("fill",featureId,style);this.hitContext.beginPath();this.hitContext.arc(p0,p1,radius,0,twoPi,true);this.hitContext.fill();}} +if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.canvas.beginPath();this.canvas.arc(p0,p1,radius,0,twoPi,true);this.canvas.stroke();if(this.hitDetection){this.setHitContextStyle("stroke",featureId,style);this.hitContext.beginPath();this.hitContext.arc(p0,p1,radius,0,twoPi,true);this.hitContext.stroke();} +this.setCanvasStyle("reset");}}}}},drawLineString:function(geometry,style,featureId){style=OpenLayers.Util.applyDefaults({fill:false},style);this.drawLinearRing(geometry,style,featureId);},drawLinearRing:function(geometry,style,featureId){if(style.fill!==false){this.setCanvasStyle("fill",style);this.renderPath(this.canvas,geometry,style,featureId,"fill");if(this.hitDetection){this.setHitContextStyle("fill",featureId,style);this.renderPath(this.hitContext,geometry,style,featureId,"fill");}} +if(style.stroke!==false){this.setCanvasStyle("stroke",style);this.renderPath(this.canvas,geometry,style,featureId,"stroke");if(this.hitDetection){this.setHitContextStyle("stroke",featureId,style);this.renderPath(this.hitContext,geometry,style,featureId,"stroke");}} +this.setCanvasStyle("reset");},renderPath:function(context,geometry,style,featureId,type){var components=geometry.components;var len=components.length;context.beginPath();var start=this.getLocalXY(components[0]);var x=start[0];var y=start[1];if(!isNaN(x)&&!isNaN(y)){context.moveTo(start[0],start[1]);for(var i=1;i=0;i--){var nodes=this.createFeatureNodes(features[i]);for(var j=0;j0){this.timeoutId=setTimeout(OpenLayers.Function.bind(this.removeTimeout,this),this.interval);} +this.dragging=true;this.move(evt);this.callback("move",[evt.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=OpenLayers.Function.False;} +this.last=evt.xy;} +return true;},dragend:function(evt){if(this.started){if(this.documentDrag===true&&this.documentEvents){this.adjustXY(evt);this.removeDocumentEvents();} +var dragged=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.up(evt);this.callback("up",[evt.xy]);if(dragged){this.callback("done",[evt.xy]);} +document.onselectstart=this.oldOnselectstart;} +return true;},down:function(evt){},move:function(evt){},up:function(evt){},out:function(evt){},mousedown:function(evt){return this.dragstart(evt);},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,scope:this});} +return this.dragstart(evt);},mousemove:function(evt){return this.dragmove(evt);},touchmove:function(evt){return this.dragmove(evt);},removeTimeout:function(){this.timeoutId=null;if(this.dragging){this.mousemove(this.lastMoveEvt);}},mouseup:function(evt){return this.dragend(evt);},touchend:function(evt){evt.xy=this.last;return this.dragend(evt);},mouseout:function(evt){if(this.started&&OpenLayers.Util.mouseLeft(evt,this.map.eventsDiv)){if(this.documentDrag===true){this.addDocumentEvents();}else{var dragged=(this.start!=this.last);this.started=false;this.dragging=false;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");this.out(evt);this.callback("out",[]);if(dragged){this.callback("done",[evt.xy]);} +if(document.onselectstart){document.onselectstart=this.oldOnselectstart;}}} +return true;},click:function(evt){return(this.start==this.last);},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;activated=true;} +return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.touch=false;this.started=false;this.dragging=false;this.start=null;this.last=null;deactivated=true;OpenLayers.Element.removeClass(this.map.viewPortDiv,"olDragDown");} +return deactivated;},adjustXY:function(evt){var pos=OpenLayers.Util.pagePosition(this.map.viewPortDiv);evt.xy.x-=pos[0];evt.xy.y-=pos[1];},addDocumentEvents:function(){OpenLayers.Element.addClass(document.body,"olDragDown");this.documentEvents=true;OpenLayers.Event.observe(document,"mousemove",this._docMove);OpenLayers.Event.observe(document,"mouseup",this._docUp);},removeDocumentEvents:function(){OpenLayers.Element.removeClass(document.body,"olDragDown");this.documentEvents=false;OpenLayers.Event.stopObserving(document,"mousemove",this._docMove);OpenLayers.Event.stopObserving(document,"mouseup",this._docUp);},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{EVENTMAP:{'click':{'in':'click','out':'clickout'},'mousemove':{'in':'over','out':'out'},'dblclick':{'in':'dblclick','out':null},'mousedown':{'in':null,'out':null},'mouseup':{'in':null,'out':null},'touchstart':{'in':'click','out':'clickout'}},feature:null,lastFeature:null,down:null,up:null,touch:false,clickTolerance:4,geometryTypes:null,stopClick:true,stopDown:true,stopUp:false,initialize:function(control,layer,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.layer=layer;},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,dblclick:this.dblclick,scope:this});} +return OpenLayers.Event.isMultiTouch(evt)?true:this.mousedown(evt);},touchmove:function(evt){OpenLayers.Event.stop(evt);},mousedown:function(evt){this.down=evt.xy;return this.handle(evt)?!this.stopDown:true;},mouseup:function(evt){this.up=evt.xy;return this.handle(evt)?!this.stopUp:true;},click:function(evt){return this.handle(evt)?!this.stopClick:true;},mousemove:function(evt){if(!this.callbacks['over']&&!this.callbacks['out']){return true;} +this.handle(evt);return true;},dblclick:function(evt){return!this.handle(evt);},geometryTypeMatches:function(feature){return this.geometryTypes==null||OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)>-1;},handle:function(evt){if(this.feature&&!this.feature.layer){this.feature=null;} +var type=evt.type;var handled=false;var previouslyIn=!!(this.feature);var click=(type=="click"||type=="dblclick"||type=="touchstart");this.feature=this.layer.getFeatureFromEvent(evt);if(this.feature&&!this.feature.layer){this.feature=null;} +if(this.lastFeature&&!this.lastFeature.layer){this.lastFeature=null;} +if(this.feature){if(type==="touchstart"){OpenLayers.Event.stop(evt);} +var inNew=(this.feature!=this.lastFeature);if(this.geometryTypeMatches(this.feature)){if(previouslyIn&&inNew){if(this.lastFeature){this.triggerCallback(type,'out',[this.lastFeature]);} +this.triggerCallback(type,'in',[this.feature]);}else if(!previouslyIn||click){this.triggerCallback(type,'in',[this.feature]);} +this.lastFeature=this.feature;handled=true;}else{if(this.lastFeature&&(previouslyIn&&inNew||click)){this.triggerCallback(type,'out',[this.lastFeature]);} +this.feature=null;}}else{if(this.lastFeature&&(previouslyIn||click)){this.triggerCallback(type,'out',[this.lastFeature]);}} +return handled;},triggerCallback:function(type,mode,args){var key=this.EVENTMAP[type][mode];if(key){if(type=='click'&&this.up&&this.down){var dpx=Math.sqrt(Math.pow(this.up.x-this.down.x,2)+ +Math.pow(this.up.y-this.down.y,2));if(dpx<=this.clickTolerance){this.callback(key,args);}}else{this.callback(key,args);}}},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.moveLayerToTop();this.map.events.on({"removelayer":this.handleMapEvents,"changelayer":this.handleMapEvents,scope:this});activated=true;} +return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.moveLayerBack();this.feature=null;this.lastFeature=null;this.down=null;this.up=null;this.touch=false;this.map.events.un({"removelayer":this.handleMapEvents,"changelayer":this.handleMapEvents,scope:this});deactivated=true;} +return deactivated;},handleMapEvents:function(evt){if(evt.type=="removelayer"||evt.property=="order"){this.moveLayerToTop();}},moveLayerToTop:function(){var index=Math.max(this.map.Z_INDEX_BASE['Feature']-1,this.layer.getZIndex())+1;this.layer.setZIndex(index);},moveLayerBack:function(){var index=this.layer.getZIndex()-1;if(index>=this.map.Z_INDEX_BASE['Feature']){this.layer.setZIndex(index);}else{this.map.setLayerZIndex(this.layer,this.map.getLayerIndex(this.layer));}},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.Control.DragFeature=OpenLayers.Class(OpenLayers.Control,{geometryTypes:null,onStart:function(feature,pixel){},onDrag:function(feature,pixel){},onComplete:function(feature,pixel){},onEnter:function(feature){},onLeave:function(feature){},documentDrag:false,layer:null,feature:null,dragCallbacks:{},featureCallbacks:{},lastPixel:null,initialize:function(layer,options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.layer=layer;this.handlers={drag:new OpenLayers.Handler.Drag(this,OpenLayers.Util.extend({down:this.downFeature,move:this.moveFeature,up:this.upFeature,out:this.cancel,done:this.doneDragging},this.dragCallbacks),{documentDrag:this.documentDrag}),feature:new OpenLayers.Handler.Feature(this,this.layer,OpenLayers.Util.extend({click:this.clickFeature,clickout:this.clickoutFeature,over:this.overFeature,out:this.outFeature},this.featureCallbacks),{geometryTypes:this.geometryTypes})};},clickFeature:function(feature){if(this.handlers.feature.touch&&!this.over&&this.overFeature(feature)){this.handlers.drag.dragstart(this.handlers.feature.evt);this.handlers.drag.stopDown=false;}},clickoutFeature:function(feature){if(this.handlers.feature.touch&&this.over){this.outFeature(feature);this.handlers.drag.stopDown=true;}},destroy:function(){this.layer=null;OpenLayers.Control.prototype.destroy.apply(this,[]);},activate:function(){return(this.handlers.feature.activate()&&OpenLayers.Control.prototype.activate.apply(this,arguments));},deactivate:function(){this.handlers.drag.deactivate();this.handlers.feature.deactivate();this.feature=null;this.dragging=false;this.lastPixel=null;OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},overFeature:function(feature){var activated=false;if(!this.handlers.drag.dragging){this.feature=feature;this.handlers.drag.activate();activated=true;this.over=true;OpenLayers.Element.addClass(this.map.viewPortDiv,this.displayClass+"Over");this.onEnter(feature);}else{if(this.feature.id==feature.id){this.over=true;}else{this.over=false;}} +return activated;},downFeature:function(pixel){this.lastPixel=pixel;this.onStart(this.feature,pixel);},moveFeature:function(pixel){var res=this.map.getResolution();this.feature.geometry.move(res*(pixel.x-this.lastPixel.x),res*(this.lastPixel.y-pixel.y));this.layer.drawFeature(this.feature);this.lastPixel=pixel;this.onDrag(this.feature,pixel);},upFeature:function(pixel){if(!this.over){this.handlers.drag.deactivate();}},doneDragging:function(pixel){this.onComplete(this.feature,pixel);},outFeature:function(feature){if(!this.handlers.drag.dragging){this.over=false;this.handlers.drag.deactivate();OpenLayers.Element.removeClass(this.map.viewPortDiv,this.displayClass+"Over");this.onLeave(feature);this.feature=null;}else{if(this.feature.id==feature.id){this.over=false;}}},cancel:function(){this.handlers.drag.deactivate();this.over=false;},setMap:function(map){this.handlers.drag.setMap(map);this.handlers.feature.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.DragFeature"});OpenLayers.StyleMap=OpenLayers.Class({styles:null,extendDefault:true,initialize:function(style,options){this.styles={"default":new OpenLayers.Style(OpenLayers.Feature.Vector.style["default"]),"select":new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"]),"temporary":new OpenLayers.Style(OpenLayers.Feature.Vector.style["temporary"]),"delete":new OpenLayers.Style(OpenLayers.Feature.Vector.style["delete"])};if(style instanceof OpenLayers.Style){this.styles["default"]=style;this.styles["select"]=style;this.styles["temporary"]=style;this.styles["delete"]=style;}else if(typeof style=="object"){for(var key in style){if(style[key]instanceof OpenLayers.Style){this.styles[key]=style[key];}else if(typeof style[key]=="object"){this.styles[key]=new OpenLayers.Style(style[key]);}else{this.styles["default"]=new OpenLayers.Style(style);this.styles["select"]=new OpenLayers.Style(style);this.styles["temporary"]=new OpenLayers.Style(style);this.styles["delete"]=new OpenLayers.Style(style);break;}}} +OpenLayers.Util.extend(this,options);},destroy:function(){for(var key in this.styles){this.styles[key].destroy();} +this.styles=null;},createSymbolizer:function(feature,intent){if(!feature){feature=new OpenLayers.Feature.Vector();} +if(!this.styles[intent]){intent="default";} +feature.renderIntent=intent;var defaultSymbolizer={};if(this.extendDefault&&intent!="default"){defaultSymbolizer=this.styles["default"].createSymbolizer(feature);} +return OpenLayers.Util.extend(defaultSymbolizer,this.styles[intent].createSymbolizer(feature));},addUniqueValueRules:function(renderIntent,property,symbolizers,context){var rules=[];for(var value in symbolizers){rules.push(new OpenLayers.Rule({symbolizer:symbolizers[value],context:context,filter:new OpenLayers.Filter.Comparison({type:OpenLayers.Filter.Comparison.EQUAL_TO,property:property,value:value})}));} +this.styles[renderIntent].addRules(rules);},CLASS_NAME:"OpenLayers.StyleMap"});OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{EVENT_TYPES:["beforefeatureadded","beforefeaturesadded","featureadded","featuresadded","beforefeatureremoved","beforefeaturesremoved","featureremoved","featuresremoved","beforefeatureselected","featureselected","featureunselected","beforefeaturemodified","featuremodified","afterfeaturemodified","vertexmodified","vertexremoved","sketchstarted","sketchmodified","sketchcomplete","refresh"],isBaseLayer:false,isFixed:false,features:null,filter:null,selectedFeatures:null,unrenderedFeatures:null,reportError:true,style:null,styleMap:null,strategies:null,protocol:null,renderers:['SVG','VML','Canvas'],renderer:null,rendererOptions:null,geometryType:null,drawn:false,initialize:function(name,options){this.EVENT_TYPES=OpenLayers.Layer.Vector.prototype.EVENT_TYPES.concat(OpenLayers.Layer.prototype.EVENT_TYPES);OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(!this.renderer||!this.renderer.supported()){this.assignRenderer();} +if(!this.renderer||!this.renderer.supported()){this.renderer=null;this.displayError();} +if(!this.styleMap){this.styleMap=new OpenLayers.StyleMap();} +this.features=[];this.selectedFeatures=[];this.unrenderedFeatures={};if(this.strategies){for(var i=0,len=this.strategies.length;i=0;i--){if(i!=0&&features[i-1].geometry){this.renderer.locked=true;}else{this.renderer.locked=false;} +var feature=features[i];delete this.unrenderedFeatures[feature.id];if(notify){this.events.triggerEvent("beforefeatureremoved",{feature:feature});} +this.features=OpenLayers.Util.removeItem(this.features,feature);feature.layer=null;if(feature.geometry){this.renderer.eraseFeatures(feature);} +if(OpenLayers.Util.indexOf(this.selectedFeatures,feature)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,feature);} +if(notify){this.events.triggerEvent("featureremoved",{feature:feature});}} +if(notify){this.events.triggerEvent("featuresremoved",{features:features});}},removeAllFeatures:function(options){var notify=!options||!options.silent;var features=this.features;if(notify){this.events.triggerEvent("beforefeaturesremoved",{features:features});} +var feature;for(var i=features.length-1;i>=0;i--){feature=features[i];if(notify){this.events.triggerEvent("beforefeatureremoved",{feature:feature});} +feature.layer=null;if(notify){this.events.triggerEvent("featureremoved",{feature:feature});}} +this.renderer.clear();this.features=[];this.unrenderedFeatures={};this.selectedFeatures=[];if(notify){this.events.triggerEvent("featuresremoved",{features:features});}},destroyFeatures:function(features,options){var all=(features==undefined);if(all){features=this.features;} +if(features){this.removeFeatures(features,options);for(var i=features.length-1;i>=0;i--){features[i].destroy();}}},drawFeature:function(feature,style){if(!this.drawn){return;} +if(typeof style!="object"){if(!style&&feature.state===OpenLayers.State.DELETE){style="delete";} +var renderIntent=style||feature.renderIntent;style=feature.style||this.style;if(!style){style=this.styleMap.createSymbolizer(feature,renderIntent);}} +var drawn=this.renderer.drawFeature(feature,style);if(drawn===false||drawn===null){this.unrenderedFeatures[feature.id]=feature;}else{delete this.unrenderedFeatures[feature.id];}},eraseFeatures:function(features){this.renderer.eraseFeatures(features);},getFeatureFromEvent:function(evt){if(!this.renderer){OpenLayers.Console.error(OpenLayers.i18n("getFeatureError"));return null;} +var feature=null;var featureId=this.renderer.getFeatureIdFromEvent(evt);if(featureId){if(typeof featureId==="string"){feature=this.getFeatureById(featureId);}else{feature=featureId;}} +return feature;},getFeatureBy:function(property,value){var feature=null;for(var i=0,len=this.features.length;i0)){var geometry=null;for(var i=0,len=features.length;i=0;--i){feature=layer.selectedFeatures[i];if(!options||options.except!=feature){this.unselect(feature);}}}},clickFeature:function(feature){if(!this.hover){var selected=(OpenLayers.Util.indexOf(feature.layer.selectedFeatures,feature)>-1);if(selected){if(this.toggleSelect()){this.unselect(feature);}else if(!this.multipleSelect()){this.unselectAll({except:feature});}}else{if(!this.multipleSelect()){this.unselectAll({except:feature});} +this.select(feature);}}},multipleSelect:function(){return this.multiple||(this.handlers.feature.evt&&this.handlers.feature.evt[this.multipleKey]);},toggleSelect:function(){return this.toggle||(this.handlers.feature.evt&&this.handlers.feature.evt[this.toggleKey]);},clickoutFeature:function(feature){if(!this.hover&&this.clickout){this.unselectAll();}},overFeature:function(feature){var layer=feature.layer;if(this.hover){if(this.highlightOnly){this.highlight(feature);}else if(OpenLayers.Util.indexOf(layer.selectedFeatures,feature)==-1){this.select(feature);}}},outFeature:function(feature){if(this.hover){if(this.highlightOnly){if(feature._lastHighlighter==this.id){if(feature._prevHighlighter&&feature._prevHighlighter!=this.id){delete feature._lastHighlighter;var control=this.map.getControl(feature._prevHighlighter);if(control){control.highlight(feature);}}else{this.unhighlight(feature);}}}else{this.unselect(feature);}}},highlight:function(feature){var layer=feature.layer;var cont=this.events.triggerEvent("beforefeaturehighlighted",{feature:feature});if(cont!==false){feature._prevHighlighter=feature._lastHighlighter;feature._lastHighlighter=this.id;var style=this.selectStyle||this.renderIntent;layer.drawFeature(feature,style);this.events.triggerEvent("featurehighlighted",{feature:feature});}},unhighlight:function(feature){var layer=feature.layer;if(feature._prevHighlighter==undefined){delete feature._lastHighlighter;}else if(feature._prevHighlighter==this.id){delete feature._prevHighlighter;}else{feature._lastHighlighter=feature._prevHighlighter;delete feature._prevHighlighter;} +layer.drawFeature(feature,feature.style||feature.layer.style||"default");this.events.triggerEvent("featureunhighlighted",{feature:feature});},select:function(feature){var cont=this.onBeforeSelect.call(this.scope,feature);var layer=feature.layer;if(cont!==false){cont=layer.events.triggerEvent("beforefeatureselected",{feature:feature});if(cont!==false){layer.selectedFeatures.push(feature);this.highlight(feature);if(!this.handlers.feature.lastFeature){this.handlers.feature.lastFeature=layer.selectedFeatures[0];} +layer.events.triggerEvent("featureselected",{feature:feature});this.onSelect.call(this.scope,feature);}}},unselect:function(feature){var layer=feature.layer;this.unhighlight(feature);OpenLayers.Util.removeItem(layer.selectedFeatures,feature);layer.events.triggerEvent("featureunselected",{feature:feature});this.onUnselect.call(this.scope,feature);},selectBox:function(position){if(position instanceof OpenLayers.Bounds){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.top));var bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);if(!this.multipleSelect()){this.unselectAll();} +var prevMultiple=this.multiple;this.multiple=true;var layers=this.layers||[this.layer];var layer;for(var l=0;l-1){if(bounds.toGeometry().intersects(feature.geometry)){if(OpenLayers.Util.indexOf(layer.selectedFeatures,feature)==-1){this.select(feature);}}}}} +this.multiple=prevMultiple;}},setMap:function(map){this.handlers.feature.setMap(map);if(this.box){this.handlers.box.setMap(map);} +OpenLayers.Control.prototype.setMap.apply(this,arguments);},setLayer:function(layers){var isActive=this.active;this.unselectAll();this.deactivate();if(this.layers){this.layer.destroy();this.layers=null;} +this.initLayer(layers);this.handlers.feature.layer=this.layer;if(isActive){this.activate();}},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Handler.Keyboard=OpenLayers.Class(OpenLayers.Handler,{KEY_EVENTS:["keydown","keyup"],eventListener:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.eventListener=OpenLayers.Function.bindAsEventListener(this.handleKeyEvent,this);},destroy:function(){this.deactivate();this.eventListener=null;OpenLayers.Handler.prototype.destroy.apply(this,arguments);},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){for(var i=0,len=this.KEY_EVENTS.length;i0){this.layer.destroyFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];} +this.layer.drawFeature(this.feature,this.standalone?undefined:this.selectControl.renderIntent);} +this.layer.drawFeature(vertex);},dragComplete:function(vertex){this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature});},setFeatureState:function(){if(this.feature.state!=OpenLayers.State.INSERT&&this.feature.state!=OpenLayers.State.DELETE){this.feature.state=OpenLayers.State.UPDATE;if(this.modified&&this._originalGeometry){var feature=this.feature;feature.modified=OpenLayers.Util.extend(feature.modified,{geometry:this._originalGeometry});delete this._originalGeometry;}}},resetVertices:function(){if(this.dragControl.feature){this.dragControl.outFeature(this.dragControl.feature);} +if(this.vertices.length>0){this.layer.removeFeatures(this.vertices,{silent:true});this.vertices=[];} +if(this.virtualVertices.length>0){this.layer.removeFeatures(this.virtualVertices,{silent:true});this.virtualVertices=[];} +if(this.dragHandle){this.layer.destroyFeatures([this.dragHandle],{silent:true});this.dragHandle=null;} +if(this.radiusHandle){this.layer.destroyFeatures([this.radiusHandle],{silent:true});this.radiusHandle=null;} +if(this.feature&&this.feature.geometry.CLASS_NAME!="OpenLayers.Geometry.Point"){if((this.mode&OpenLayers.Control.ModifyFeature.DRAG)){this.collectDragHandle();} +if((this.mode&(OpenLayers.Control.ModifyFeature.ROTATE|OpenLayers.Control.ModifyFeature.RESIZE))){this.collectRadiusHandle();} +if(this.mode&OpenLayers.Control.ModifyFeature.RESHAPE){if(!(this.mode&OpenLayers.Control.ModifyFeature.RESIZE)){this.collectVertices();}}}},handleKeypress:function(evt){var code=evt.keyCode;if(this.feature&&OpenLayers.Util.indexOf(this.deleteCodes,code)!=-1){var vertex=this.dragControl.feature;if(vertex&&OpenLayers.Util.indexOf(this.vertices,vertex)!=-1&&!this.dragControl.handlers.drag.dragging&&vertex.geometry.parent){vertex.geometry.parent.removeComponent(vertex.geometry);this.layer.events.triggerEvent("vertexremoved",{vertex:vertex.geometry,feature:this.feature,pixel:evt.xy});this.layer.drawFeature(this.feature,this.standalone?undefined:this.selectControl.renderIntent);this.modified=true;this.resetVertices();this.setFeatureState();this.onModification(this.feature);this.layer.events.triggerEvent("featuremodified",{feature:this.feature});}}},collectVertices:function(){this.vertices=[];this.virtualVertices=[];var control=this;function collectComponentVertices(geometry){var i,vertex,component,len;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){vertex=new OpenLayers.Feature.Vector(geometry);vertex._sketch=true;vertex.renderIntent=control.vertexRenderIntent;control.vertices.push(vertex);}else{var numVert=geometry.components.length;if(geometry.CLASS_NAME=="OpenLayers.Geometry.LinearRing"){numVert-=1;} +for(i=0;i'+'${copyrights}'+''+'Terms of Use',metadata:null,type:"Road",metadataParams:null,initialize:function(options){options=OpenLayers.Util.applyDefaults({sphericalMercator:true},options);var name=options.name||"Bing "+(options.type||this.type);var newArgs=[name,null,options];OpenLayers.Layer.XYZ.prototype.initialize.apply(this,newArgs);this.loadMetadata();},loadMetadata:function(){this._callbackId="_callback_"+this.id.replace(/\./g,"_");window[this._callbackId]=OpenLayers.Function.bind(OpenLayers.Layer.Bing.processMetadata,this);var params=OpenLayers.Util.applyDefaults({key:this.key,jsonp:this._callbackId,include:"ImageryProviders"},this.metadataParams);var url="http://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+ +this.type+"?"+OpenLayers.Util.getParameterString(params);var script=document.createElement("script");script.type="text/javascript";script.src=url;script.id=this._callbackId;document.getElementsByTagName("head")[0].appendChild(script);},initLayer:function(){var res=this.metadata.resourceSets[0].resources[0];var url=res.imageUrl.replace("{quadkey}","${quadkey}");this.url=[];for(var i=0;i0;--i){var digit='0';var mask=1<<(i-1);if((x&mask)!=0){digit++;} +if((y&mask)!=0){digit++;digit++;} +quadDigits.push(digit);} +var quadKey=quadDigits.join("");var url=this.selectUrl(''+x+y+z,this.url);return OpenLayers.String.format(url,{'quadkey':quadKey});},updateAttribution:function(){var metadata=this.metadata;if(!metadata||!this.map||!this.map.center){return;} +var res=metadata.resourceSets[0].resources[0];var extent=this.map.getExtent().transform(this.map.getProjectionObject(),new OpenLayers.Projection("EPSG:4326"));var providers=res.imageryProviders,zoom=this.map.getZoom()+1,copyrights="",provider,i,ii,j,jj,bbox,coverage;for(i=0,ii=providers.length;i=coverage.zoomMin){copyrights+=provider.attribution+" ";}}} +this.attribution=OpenLayers.String.format(this.attributionTemplate,{type:this.type.toLowerCase(),logo:metadata.brandLogoUri,copyrights:copyrights});this.map&&this.map.events.triggerEvent("changelayer",{layer:this,property:"attribution"});},setMap:function(){OpenLayers.Layer.XYZ.prototype.setMap.apply(this,arguments);this.updateAttribution();this.map.events.register("moveend",this,this.updateAttribution);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.Bing(this.options);} +obj=OpenLayers.Layer.XYZ.prototype.clone.apply(this,[obj]);return obj;},destroy:function(){this.map&&this.map.events.unregister("moveend",this,this.updateAttribution);OpenLayers.Layer.XYZ.prototype.destroy.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.Bing"});OpenLayers.Layer.Bing.processMetadata=function(metadata){this.metadata=metadata;this.initLayer();var script=document.getElementById(this._callbackId);script.parentNode.removeChild(script);window[this._callbackId]=undefined;delete this._callbackId;};OpenLayers.Layer.PointGrid=OpenLayers.Class(OpenLayers.Layer.Vector,{dx:null,dy:null,ratio:1.5,maxFeatures:250,rotation:0,origin:null,gridBounds:null,initialize:function(config){config=config||{};OpenLayers.Layer.Vector.prototype.initialize.apply(this,[config.name,config]);},setMap:function(map){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);map.events.register("moveend",this,this.onMoveEnd);},removeMap:function(map){map.events.unregister("moveend",this,this.onMoveEnd);OpenLayers.Layer.Vector.prototype.removeMap.apply(this,arguments);},setRatio:function(ratio){this.ratio=ratio;this.updateGrid(true);},setMaxFeatures:function(maxFeatures){this.maxFeatures=maxFeatures;this.updateGrid(true);},setSpacing:function(dx,dy){this.dx=dx;this.dy=dy||dx;this.updateGrid(true);},setOrigin:function(origin){this.origin=origin;this.updateGrid(true);},getOrigin:function(){if(!this.origin){this.origin=this.map.getExtent().getCenterLonLat();} +return this.origin;},setRotation:function(rotation){this.rotation=rotation;this.updateGrid(true);},onMoveEnd:function(){this.updateGrid();},getViewBounds:function(){var bounds=this.map.getExtent();if(this.rotation){var origin=this.getOrigin();var rotationOrigin=new OpenLayers.Geometry.Point(origin.lon,origin.lat);var rect=bounds.toGeometry();rect.rotate(-this.rotation,rotationOrigin);bounds=rect.getBounds();} +return bounds;},updateGrid:function(force){if(force||this.invalidBounds()){var viewBounds=this.getViewBounds();var origin=this.getOrigin();var rotationOrigin=new OpenLayers.Geometry.Point(origin.lon,origin.lat);var viewBoundsWidth=viewBounds.getWidth();var viewBoundsHeight=viewBounds.getHeight();var aspectRatio=viewBoundsWidth/viewBoundsHeight;var maxHeight=Math.sqrt(this.dx*this.dy*this.maxFeatures/aspectRatio);var maxWidth=maxHeight*aspectRatio;var gridWidth=Math.min(viewBoundsWidth*this.ratio,maxWidth);var gridHeight=Math.min(viewBoundsHeight*this.ratio,maxHeight);var center=viewBounds.getCenterLonLat();this.gridBounds=new OpenLayers.Bounds(center.lon-(gridWidth/2),center.lat-(gridHeight/2),center.lon+(gridWidth/2),center.lat+(gridHeight/2));var rows=Math.floor(gridHeight/this.dy);var cols=Math.floor(gridWidth/this.dx);var gridLeft=origin.lon+(this.dx*Math.ceil((this.gridBounds.left-origin.lon)/this.dx));var gridBottom=origin.lat+(this.dy*Math.ceil((this.gridBounds.bottom-origin.lat)/this.dy));var features=new Array(rows*cols);var x,y,point;for(var i=0;i=OpenLayers.Style.createLiteral(this.minScaleDenominator,context);} +if(applies&&this.maxScaleDenominator){applies=scale1){middle=parseInt((leftIndex+rightIndex)/2);var placement=this.compare(this,newNode,OpenLayers.Util.getElement(this.order[middle]));if(placement>0){leftIndex=middle;}else{rightIndex=middle;}} +this.order.splice(rightIndex,0,nodeId);this.indices[nodeId]=this.getZIndex(newNode);return this.getNextElement(rightIndex);},remove:function(node){var nodeId=node.id;var arrayIndex=OpenLayers.Util.indexOf(this.order,nodeId);if(arrayIndex>=0){this.order.splice(arrayIndex,1);delete this.indices[nodeId];if(this.order.length>0){var lastId=this.order[this.order.length-1];this.maxZIndex=this.indices[lastId];}else{this.maxZIndex=0;}}},clear:function(){this.order=[];this.indices={};this.maxZIndex=0;},exists:function(node){return(this.indices[node.id]!=null);},getZIndex:function(node){return node._style.graphicZIndex;},determineZIndex:function(node){var zIndex=node._style.graphicZIndex;if(zIndex==null){zIndex=this.maxZIndex;node._style.graphicZIndex=zIndex;}else if(zIndex>this.maxZIndex){this.maxZIndex=zIndex;}},getNextElement:function(index){var nextIndex=index+1;if(nextIndex0){url='?'+url.substring(index+1,url.length);OpenLayers.Util.extend(parameters,OpenLayers.Util.getParameters(url));} +return parameters;},setMap:function(map){OpenLayers.Control.prototype.setMap.apply(this,arguments);for(var i=0,len=this.map.controls.length;i0){if(!mapProjection.equals(layer.projection)){var geom;for(var i=0,len=features.length;i0){obj.featureNS=this.lookupNamespaceURI(node,parts[0]);}}},read_cap_Title:function(obj,node){var title=this.getChildValue(node);if(title){obj.title=title;}},read_cap_Abstract:function(obj,node){var abst=this.getChildValue(node);if(abst){obj["abstract"]=abst;}},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1"});OpenLayers.Format.WFSCapabilities.v1_1_0=OpenLayers.Class(OpenLayers.Format.WFSCapabilities.v1,{initialize:function(options){OpenLayers.Format.WFSCapabilities.v1.prototype.initialize.apply(this,[options]);},read_cap_DefaultSRS:function(obj,node){var defaultSRS=this.getChildValue(node);if(defaultSRS){obj.srs=defaultSRS;}},CLASS_NAME:"OpenLayers.Format.WFSCapabilities.v1_1_0"});OpenLayers.Layer.PointTrack=OpenLayers.Class(OpenLayers.Layer.Vector,{dataFrom:null,styleFrom:null,initialize:function(name,options){OpenLayers.Layer.Vector.prototype.initialize.apply(this,arguments);},addNodes:function(pointFeatures,options){if(pointFeatures.length<2){OpenLayers.Console.error("At least two point features have to be added to create"+"a line from");return;} +var lines=new Array(pointFeatures.length-1);var pointFeature,startPoint,endPoint;for(var i=0,len=pointFeatures.length;i0){var attributes=(this.dataFrom!=null)?(pointFeatures[i+this.dataFrom].data||pointFeatures[i+this.dataFrom].attributes):null;var style=(this.styleFrom!=null)?(pointFeatures[i+this.styleFrom].style):null;var line=new OpenLayers.Geometry.LineString([startPoint,endPoint]);lines[i-1]=new OpenLayers.Feature.Vector(line,attributes,style);} +startPoint=endPoint;} +this.addFeatures(lines,options);},CLASS_NAME:"OpenLayers.Layer.PointTrack"});OpenLayers.Layer.PointTrack.SOURCE_NODE=-1;OpenLayers.Layer.PointTrack.TARGET_NODE=0;OpenLayers.Layer.PointTrack.dataFrom={'SOURCE_NODE':-1,'TARGET_NODE':0};OpenLayers.Protocol.WFS=function(options){options=OpenLayers.Util.applyDefaults(options,OpenLayers.Protocol.WFS.DEFAULTS);var cls=OpenLayers.Protocol.WFS["v"+options.version.replace(/\./g,"_")];if(!cls){throw"Unsupported WFS version: "+options.version;} +return new cls(options);};OpenLayers.Protocol.WFS.fromWMSLayer=function(layer,options){var typeName,featurePrefix;var param=layer.params["LAYERS"];var parts=(OpenLayers.Util.isArray(param)?param[0]:param).split(":");if(parts.length>1){featurePrefix=parts[0];} +typeName=parts.pop();var protocolOptions={url:layer.url,featureType:typeName,featurePrefix:featurePrefix,srsName:layer.projection&&layer.projection.getCode()||layer.map&&layer.map.getProjectionObject().getCode(),version:"1.1.0"};return new OpenLayers.Protocol.WFS(OpenLayers.Util.applyDefaults(options,protocolOptions));};OpenLayers.Protocol.WFS.DEFAULTS={"version":"1.0.0"};OpenLayers.Layer.Markers=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:false,markers:null,drawn:false,initialize:function(name,options){OpenLayers.Layer.prototype.initialize.apply(this,arguments);this.markers=[];},destroy:function(){this.clearMarkers();this.markers=null;OpenLayers.Layer.prototype.destroy.apply(this,arguments);},setOpacity:function(opacity){if(opacity!=this.opacity){this.opacity=opacity;for(var i=0,len=this.markers.length;i0){this.removeMarker(this.markers[0]);}}},drawMarker:function(marker){var px=this.map.getLayerPxFromLonLat(marker.lonlat);if(px==null){marker.display(false);}else{if(!marker.isDrawn()){var markerImg=marker.draw(px);this.div.appendChild(markerImg);}else if(marker.icon){marker.icon.moveTo(px);}}},getDataExtent:function(){var maxExtent=null;if(this.markers&&(this.markers.length>0)){var maxExtent=new OpenLayers.Bounds();for(var i=0,len=this.markers.length;i=1.3&&!params.EXCEPTIONS){params.EXCEPTIONS="INIMAGE";} +newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));if(!this.noMagic&&this.params.TRANSPARENT&&this.params.TRANSPARENT.toString().toLowerCase()=="true"){if((options==null)||(!options.isBaseLayer)){this.isBaseLayer=false;} +if(this.params.FORMAT=="image/jpeg"){this.params.FORMAT=OpenLayers.Util.alphaHack()?"image/gif":"image/png";}}},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WMS(this.name,this.url,this.params,this.getOptions());} +obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},reverseAxisOrder:function(){return(parseFloat(this.params.VERSION)>=1.3&&!!this.yx[this.map.getProjectionObject().getCode()]);},getURL:function(bounds){bounds=this.adjustBounds(bounds);var imageSize=this.getImageSize();var newParams={};var reverseAxisOrder=this.reverseAxisOrder();newParams.BBOX=this.encodeBBOX?bounds.toBBOX(null,reverseAxisOrder):bounds.toArray(reverseAxisOrder);newParams.WIDTH=imageSize.w;newParams.HEIGHT=imageSize.h;var requestString=this.getFullRequestString(newParams);return requestString;},mergeNewParams:function(newParams){var upperParams=OpenLayers.Util.upperCaseObject(newParams);var newArguments=[upperParams];return OpenLayers.Layer.Grid.prototype.mergeNewParams.apply(this,newArguments);},getFullRequestString:function(newParams,altUrl){var mapProjection=this.map.getProjectionObject();var projectionCode=this.projection&&this.projection.equals(mapProjection)?this.projection.getCode():mapProjection.getCode();var value=(projectionCode=="none")?null:projectionCode;if(parseFloat(this.params.VERSION)>=1.3){this.params.CRS=value;}else{this.params.SRS=value;} +if(typeof this.params.TRANSPARENT=="boolean"){newParams.TRANSPARENT=this.params.TRANSPARENT?"TRUE":"FALSE";} +return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);},CLASS_NAME:"OpenLayers.Layer.WMS"});OpenLayers.Layer.WMS.Untiled=OpenLayers.Class(OpenLayers.Layer.WMS,{singleTile:true,initialize:function(name,url,params,options){OpenLayers.Layer.WMS.prototype.initialize.apply(this,arguments);var msg="The OpenLayers.Layer.WMS.Untiled class is deprecated and "+"will be removed in 3.0. Instead, you should use the "+"normal OpenLayers.Layer.WMS class, passing it the option "+"'singleTile' as true.";OpenLayers.Console.warn(msg);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.WMS.Untiled(this.name,this.url,this.params,this.getOptions());} +obj=OpenLayers.Layer.WMS.prototype.clone.apply(this,[obj]);return obj;},CLASS_NAME:"OpenLayers.Layer.WMS.Untiled"});OpenLayers.Geometry.Surface=OpenLayers.Class(OpenLayers.Geometry,{initialize:function(){OpenLayers.Geometry.prototype.initialize.apply(this,arguments);},CLASS_NAME:"OpenLayers.Geometry.Surface"});OpenLayers.Format.ArcXML.Features=OpenLayers.Class(OpenLayers.Format.XML,{initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){var axl=new OpenLayers.Format.ArcXML();var parsed=axl.read(data);return parsed.features.feature;}});OpenLayers.Control.Snapping=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:["beforesnap","snap","unsnap"],DEFAULTS:{tolerance:10,node:true,edge:true,vertex:true},greedy:true,precedence:["node","vertex","edge"],resolution:null,geoToleranceCache:null,layer:null,feature:null,point:null,initialize:function(options){Array.prototype.push.apply(this.EVENT_TYPES,OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);this.options=options||{};if(this.options.layer){this.setLayer(this.options.layer);} +var defaults=OpenLayers.Util.extend({},this.options.defaults);this.defaults=OpenLayers.Util.applyDefaults(defaults,this.DEFAULTS);this.setTargets(this.options.targets);if(this.targets.length===0&&this.layer){this.addTargetLayer(this.layer);} +this.geoToleranceCache={};},setLayer:function(layer){if(this.active){this.deactivate();this.layer=layer;this.activate();}else{this.layer=layer;}},setTargets:function(targets){this.targets=[];if(targets&&targets.length){var target;for(var i=0,len=targets.length;i=0;--i){target=this.targets[i];if(target.layer===layer){this.removeTarget(target);}}},removeTarget:function(target){return OpenLayers.Util.removeItem(this.targets,target);},activate:function(){var activated=OpenLayers.Control.prototype.activate.call(this);if(activated){if(this.layer&&this.layer.events){this.layer.events.on({sketchstarted:this.onSketchModified,sketchmodified:this.onSketchModified,vertexmodified:this.onVertexModified,scope:this});}} +return activated;},deactivate:function(){var deactivated=OpenLayers.Control.prototype.deactivate.call(this);if(deactivated){if(this.layer&&this.layer.events){this.layer.events.un({sketchstarted:this.onSketchModified,sketchmodified:this.onSketchModified,vertexmodified:this.onVertexModified,scope:this});}} +this.feature=null;this.point=null;return deactivated;},onSketchModified:function(event){this.feature=event.feature;this.considerSnapping(event.vertex,event.vertex);},onVertexModified:function(event){this.feature=event.feature;var loc=this.layer.map.getLonLatFromViewPortPx(event.pixel);this.considerSnapping(event.vertex,new OpenLayers.Geometry.Point(loc.lon,loc.lat));},considerSnapping:function(point,loc){var best={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY,x:null,y:null};var snapped=false;var result,target;for(var i=0,len=this.targets.length;i=target.maxResolution){return null;}} +var tolerance={node:this.getGeoTolerance(target.nodeTolerance,resolution),vertex:this.getGeoTolerance(target.vertexTolerance,resolution),edge:this.getGeoTolerance(target.edgeTolerance,resolution)};var maxTolerance=Math.max(tolerance.node,tolerance.vertex,tolerance.edge);var result={rank:Number.POSITIVE_INFINITY,dist:Number.POSITIVE_INFINITY};var eligible=false;var features=target.layer.features;var feature,type,vertices,vertex,closest,dist,found;var numTypes=this.precedence.length;var ll=new OpenLayers.LonLat(loc.x,loc.y);for(var i=0,len=features.length;i4) +this._object.open(sMethod,sUrl,bAsync,sUser,sPassword);else +if(arguments.length>3) +this._object.open(sMethod,sUrl,bAsync,sUser);else +this._object.open(sMethod,sUrl,bAsync);this.readyState=cXMLHttpRequest.OPENED;fReadyStateChange(this);this._object.onreadystatechange=function(){if(bGecko&&!bAsync) +return;oRequest.readyState=oRequest._object.readyState;fSynchronizeValues(oRequest);if(oRequest._aborted){oRequest.readyState=cXMLHttpRequest.UNSENT;return;} +if(oRequest.readyState==cXMLHttpRequest.DONE){delete oRequest._data;fCleanTransport(oRequest);if(bIE&&bAsync) +window.detachEvent("onunload",fOnUnload);} +if(nState!=oRequest.readyState) +fReadyStateChange(oRequest);nState=oRequest.readyState;}};function fXMLHttpRequest_send(oRequest){oRequest._object.send(oRequest._data);if(bGecko&&!oRequest._async){oRequest.readyState=cXMLHttpRequest.OPENED;fSynchronizeValues(oRequest);while(oRequest.readyStatecXMLHttpRequest.UNSENT) +this._aborted=true;this._object.abort();fCleanTransport(this);this.readyState=cXMLHttpRequest.UNSENT;delete this._data;};cXMLHttpRequest.prototype.getAllResponseHeaders=function(){return this._object.getAllResponseHeaders();};cXMLHttpRequest.prototype.getResponseHeader=function(sName){return this._object.getResponseHeader(sName);};cXMLHttpRequest.prototype.setRequestHeader=function(sName,sValue){if(!this._headers) +this._headers={};this._headers[sName]=sValue;return this._object.setRequestHeader(sName,sValue);};cXMLHttpRequest.prototype.addEventListener=function(sName,fHandler,bUseCapture){for(var nIndex=0,oListener;oListener=this._listeners[nIndex];nIndex++) +if(oListener[0]==sName&&oListener[1]==fHandler&&oListener[2]==bUseCapture) +return;this._listeners.push([sName,fHandler,bUseCapture]);};cXMLHttpRequest.prototype.removeEventListener=function(sName,fHandler,bUseCapture){for(var nIndex=0,oListener;oListener=this._listeners[nIndex];nIndex++) +if(oListener[0]==sName&&oListener[1]==fHandler&&oListener[2]==bUseCapture) +break;if(oListener) +this._listeners.splice(nIndex,1);};cXMLHttpRequest.prototype.dispatchEvent=function(oEvent){var oEventPseudo={'type':oEvent.type,'target':this,'currentTarget':this,'eventPhase':2,'bubbles':oEvent.bubbles,'cancelable':oEvent.cancelable,'timeStamp':oEvent.timeStamp,'stopPropagation':function(){},'preventDefault':function(){},'initEvent':function(){}};if(oEventPseudo.type=="readystatechange"&&this.onreadystatechange) +(this.onreadystatechange.handleEvent||this.onreadystatechange).apply(this,[oEventPseudo]);for(var nIndex=0,oListener;oListener=this._listeners[nIndex];nIndex++) +if(oListener[0]==oEventPseudo.type&&!oListener[2]) +(oListener[1].handleEvent||oListener[1]).apply(this,[oEventPseudo]);};cXMLHttpRequest.prototype.toString=function(){return'['+"object"+' '+"XMLHttpRequest"+']';};cXMLHttpRequest.toString=function(){return'['+"XMLHttpRequest"+']';};function fReadyStateChange(oRequest){if(cXMLHttpRequest.onreadystatechange) +cXMLHttpRequest.onreadystatechange.apply(oRequest);oRequest.dispatchEvent({'type':"readystatechange",'bubbles':false,'cancelable':false,'timeStamp':new Date+0});};function fGetDocument(oRequest){var oDocument=oRequest.responseXML,sResponse=oRequest.responseText;if(bIE&&sResponse&&oDocument&&!oDocument.documentElement&&oRequest.getResponseHeader("Content-Type").match(/[^\/]+\/[^\+]+\+xml/)){oDocument=new window.ActiveXObject("Microsoft.XMLDOM");oDocument.async=false;oDocument.validateOnParse=false;oDocument.loadXML(sResponse);} +if(oDocument) +if((bIE&&oDocument.parseError!=0)||!oDocument.documentElement||(oDocument.documentElement&&oDocument.documentElement.tagName=="parsererror")) +return null;return oDocument;};function fSynchronizeValues(oRequest){try{oRequest.responseText=oRequest._object.responseText;}catch(e){} +try{oRequest.responseXML=fGetDocument(oRequest._object);}catch(e){} +try{oRequest.status=oRequest._object.status;}catch(e){} +try{oRequest.statusText=oRequest._object.statusText;}catch(e){}};function fCleanTransport(oRequest){oRequest._object.onreadystatechange=new window.Function;};if(!window.Function.prototype.apply){window.Function.prototype.apply=function(oRequest,oArguments){if(!oArguments) +oArguments=[];oRequest.__func=this;oRequest.__func(oArguments[0],oArguments[1],oArguments[2],oArguments[3],oArguments[4]);delete oRequest.__func;};};OpenLayers.Request.XMLHttpRequest=cXMLHttpRequest;})();OpenLayers.Format.KML=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{kml:"http://www.opengis.net/kml/2.2",gx:"http://www.google.com/kml/ext/2.2"},kmlns:"http://earth.google.com/kml/2.0",placemarksDesc:"No description available",foldersName:"OpenLayers export",foldersDesc:"Exported on "+new Date(),extractAttributes:true,extractStyles:false,extractTracks:false,trackAttributes:null,internalns:null,features:null,styles:null,styleBaseUrl:"",fetched:null,maxDepth:0,initialize:function(options){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g),kmlColor:(/(\w{2})(\w{2})(\w{2})(\w{2})/),kmlIconPalette:(/root:\/\/icons\/palette-(\d+)(\.\w+)/),straightBracket:(/\$\[(.*?)\]/g)};this.externalProjection=new OpenLayers.Projection("EPSG:4326");OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){this.features=[];this.styles={};this.fetched={};var options={depth:0,styleBaseUrl:this.styleBaseUrl};return this.parseData(data,options);},parseData:function(data,options){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);} +var types=["Link","NetworkLink","Style","StyleMap","Placemark"];for(var i=0,len=types.length;i=this.maxDepth){return false;} +var newOptions=OpenLayers.Util.extend({},options);newOptions.depth++;for(var i=0,len=nodes.length;i0){var track=tracks[0];var container={features:[],feature:feature};this.readNode(track,container);if(container.features.length>0){features.push.apply(features,container.features);}}}else{features.push(feature);}}else{throw"Bad Placemark: "+i;}} +this.features=this.features.concat(features);},readers:{"kml":{"when":function(node,container){container.whens.push(OpenLayers.Date.parse(this.getChildValue(node)));},"_trackPointAttribute":function(node,container){var name=node.nodeName.split(":").pop();container.attributes[name].push(this.getChildValue(node));}},"gx":{"Track":function(node,container){var obj={whens:[],points:[],angles:[]};if(this.trackAttributes){var name;obj.attributes={};for(var i=0,ii=this.trackAttributes.length;i0;if(hasAngles&&obj.whens.length!==obj.angles.length){throw new Error("gx:Track with unequal number of when ("+obj.whens.length+") and gx:angles ("+obj.angles.length+") elements.");} +var feature,point,angles;for(var i=0,ii=obj.whens.length;i2){point.z=parseFloat(coords[2]);} +container.points.push(point);},"angles":function(node,container){var str=this.getChildValue(node);var parts=str.replace(this.regExes.trimSpace,"").split(/\s+/);container.angles.push(parts);}}},parseFeature:function(node){var order=["MultiGeometry","Polygon","LineString","Point"];var type,nodeList,geometry,parser;for(var i=0,len=order.length;i0){var parser=this.parseGeometry[type.toLowerCase()];if(parser){geometry=parser.apply(this,[nodeList[0]]);if(this.internalProjection&&this.externalProjection){geometry.transform(this.externalProjection,this.internalProjection);}}else{OpenLayers.Console.error(OpenLayers.i18n("unsupportedGeometryType",{'geomType':type}));} +break;}} +var attributes;if(this.extractAttributes){attributes=this.parseAttributes(node);} +var feature=new OpenLayers.Feature.Vector(geometry,attributes);var fid=node.getAttribute("id")||node.getAttribute("name");if(fid!=null){feature.fid=fid;} +return feature;},getStyle:function(styleUrl,options){var styleBaseUrl=OpenLayers.Util.removeTail(styleUrl);var newOptions=OpenLayers.Util.extend({},options);newOptions.depth++;newOptions.styleBaseUrl=styleBaseUrl;if(!this.styles[styleUrl]&&!OpenLayers.String.startsWith(styleUrl,"#")&&newOptions.depth<=this.maxDepth&&!this.fetched[styleBaseUrl]){var data=this.fetchLink(styleBaseUrl);if(data){this.parseData(data,newOptions);}} +var style=OpenLayers.Util.extend({},this.styles[styleUrl]);return style;},parseGeometry:{point:function(node){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"coordinates");var coords=[];if(nodeList.length>0){var coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.removeSpace,"");coords=coordString.split(",");} +var point=null;if(coords.length>1){if(coords.length==2){coords[2]=null;} +point=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{throw"Bad coordinate string: "+coordString;} +return point;},linestring:function(node,ring){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"coordinates");var line=null;if(nodeList.length>0){var coordString=this.getChildValue(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coordString=coordString.replace(this.regExes.trimComma,",");var pointList=coordString.split(this.regExes.splitSpace);var numPoints=pointList.length;var points=new Array(numPoints);var coords,numCoords;for(var i=0;i1){if(coords.length==2){coords[2]=null;} +points[i]=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{throw"Bad LineString point coordinates: "+ +pointList[i];}} +if(numPoints){if(ring){line=new OpenLayers.Geometry.LinearRing(points);}else{line=new OpenLayers.Geometry.LineString(points);}}else{throw"Bad LineString coordinates: "+coordString;}} +return line;},polygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"LinearRing");var numRings=nodeList.length;var components=new Array(numRings);if(numRings>0){var ring;for(var i=0,len=nodeList.length;i=1&&grandchildren.length<=3){var grandchild;switch(grandchildren.length){case 1:grandchild=grandchildren[0];break;case 2:var c1=grandchildren[0];var c2=grandchildren[1];grandchild=(c1.nodeType==3||c1.nodeType==4)?c1:c2;break;case 3:default:grandchild=grandchildren[1];break;} +if(grandchild.nodeType==3||grandchild.nodeType==4){var name=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;var value=OpenLayers.Util.getXmlNodeValue(grandchild);if(value){value=value.replace(this.regExes.trimSpace,"");attributes[name]=value;}}}}} +return attributes;},parseExtendedData:function(node){var attributes={};var i,len,data,key;var dataNodes=node.getElementsByTagName("Data");for(i=0,len=dataNodes.length;i"+ +this.contentDiv.innerHTML+"
";var containerElement=(this.map)?this.map.layerContainerDiv:document.body;var realSize=OpenLayers.Util.getRenderedDimensions(preparedHTML,null,{displayClass:this.displayClass,containerElement:containerElement});var safeSize=this.getSafeContentSize(realSize);var newSize=null;if(safeSize.equals(realSize)){newSize=realSize;}else{var fixedSize=new OpenLayers.Size();fixedSize.w=(safeSize.w(mapSize.w-this.map.paddingForPopups.right)){newTL.x=mapSize.w-this.map.paddingForPopups.right-this.size.w;} +if(origTL.y(mapSize.h-this.map.paddingForPopups.bottom)){newTL.y=mapSize.h-this.map.paddingForPopups.bottom-this.size.h;} +var dx=origTL.x-newTL.x;var dy=origTL.y-newTL.y;this.map.pan(dx,dy);},registerEvents:function(){this.events=new OpenLayers.Events(this,this.div,null,true);function onTouchstart(evt){OpenLayers.Event.stop(evt,true);} +this.events.on({"mousedown":this.onmousedown,"mousemove":this.onmousemove,"mouseup":this.onmouseup,"click":this.onclick,"mouseout":this.onmouseout,"dblclick":this.ondblclick,"touchstart":onTouchstart,scope:this});},onmousedown:function(evt){this.mousedown=true;OpenLayers.Event.stop(evt,true);},onmousemove:function(evt){if(this.mousedown){OpenLayers.Event.stop(evt,true);}},onmouseup:function(evt){if(this.mousedown){this.mousedown=false;OpenLayers.Event.stop(evt,true);}},onclick:function(evt){OpenLayers.Event.stop(evt,true);},onmouseout:function(evt){this.mousedown=false;},ondblclick:function(evt){OpenLayers.Event.stop(evt,true);},CLASS_NAME:"OpenLayers.Popup"});OpenLayers.Popup.WIDTH=200;OpenLayers.Popup.HEIGHT=200;OpenLayers.Popup.COLOR="white";OpenLayers.Popup.OPACITY=1;OpenLayers.Popup.BORDER="0px";OpenLayers.Popup.Anchored=OpenLayers.Class(OpenLayers.Popup,{relativePosition:null,keepInMap:true,anchor:null,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){var newArguments=[id,lonlat,contentSize,contentHTML,closeBox,closeBoxCallback];OpenLayers.Popup.prototype.initialize.apply(this,newArguments);this.anchor=(anchor!=null)?anchor:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)};},destroy:function(){this.anchor=null;this.relativePosition=null;OpenLayers.Popup.prototype.destroy.apply(this,arguments);},show:function(){this.updatePosition();OpenLayers.Popup.prototype.show.apply(this,arguments);},moveTo:function(px){var oldRelativePosition=this.relativePosition;this.relativePosition=this.calculateRelativePosition(px);var newPx=this.calculateNewPx(px);var newArguments=new Array(newPx);OpenLayers.Popup.prototype.moveTo.apply(this,newArguments);if(this.relativePosition!=oldRelativePosition){this.updateRelativePosition();}},setSize:function(contentSize){OpenLayers.Popup.prototype.setSize.apply(this,arguments);if((this.lonlat)&&(this.map)){var px=this.map.getLayerPxFromLonLat(this.lonlat);this.moveTo(px);}},calculateRelativePosition:function(px){var lonlat=this.map.getLonLatFromLayerPx(px);var extent=this.map.getExtent();var quadrant=extent.determineQuadrant(lonlat);return OpenLayers.Bounds.oppositeQuadrant(quadrant);},updateRelativePosition:function(){},calculateNewPx:function(px){var newPx=px.offset(this.anchor.offset);var size=this.size||this.contentSize;var top=(this.relativePosition.charAt(0)=='t');newPx.y+=(top)?-size.h:this.anchor.size.h;var left=(this.relativePosition.charAt(1)=='l');newPx.x+=(left)?-size.w:this.anchor.size.w;return newPx;},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.Rico=OpenLayers.Rico||{};OpenLayers.Rico.Color=OpenLayers.Class({initialize:function(red,green,blue){this.rgb={r:red,g:green,b:blue};},setRed:function(r){this.rgb.r=r;},setGreen:function(g){this.rgb.g=g;},setBlue:function(b){this.rgb.b=b;},setHue:function(h){var hsb=this.asHSB();hsb.h=h;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},setSaturation:function(s){var hsb=this.asHSB();hsb.s=s;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},setBrightness:function(b){var hsb=this.asHSB();hsb.b=b;this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,hsb.b);},darken:function(percent){var hsb=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,Math.max(hsb.b-percent,0));},brighten:function(percent){var hsb=this.asHSB();this.rgb=OpenLayers.Rico.Color.HSBtoRGB(hsb.h,hsb.s,Math.min(hsb.b+percent,1));},blend:function(other){this.rgb.r=Math.floor((this.rgb.r+other.rgb.r)/2);this.rgb.g=Math.floor((this.rgb.g+other.rgb.g)/2);this.rgb.b=Math.floor((this.rgb.b+other.rgb.b)/2);},isBright:function(){var hsb=this.asHSB();return this.asHSB().b>0.5;},isDark:function(){return!this.isBright();},asRGB:function(){return"rgb("+this.rgb.r+","+this.rgb.g+","+this.rgb.b+")";},asHex:function(){return"#"+this.rgb.r.toColorPart()+this.rgb.g.toColorPart()+this.rgb.b.toColorPart();},asHSB:function(){return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r,this.rgb.g,this.rgb.b);},toString:function(){return this.asHex();}});OpenLayers.Rico.Color.createFromHex=function(hexCode){if(hexCode.length==4){var shortHexCode=hexCode;var hexCode='#';for(var i=1;i<4;i++){hexCode+=(shortHexCode.charAt(i)+ +shortHexCode.charAt(i));}} +if(hexCode.indexOf('#')==0){hexCode=hexCode.substring(1);} +var red=hexCode.substring(0,2);var green=hexCode.substring(2,4);var blue=hexCode.substring(4,6);return new OpenLayers.Rico.Color(parseInt(red,16),parseInt(green,16),parseInt(blue,16));};OpenLayers.Rico.Color.createColorFromBackground=function(elem){var actualColor=OpenLayers.Element.getStyle(OpenLayers.Util.getElement(elem),"backgroundColor");if(actualColor=="transparent"&&elem.parentNode){return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);} +if(actualColor==null){return new OpenLayers.Rico.Color(255,255,255);} +if(actualColor.indexOf("rgb(")==0){var colors=actualColor.substring(4,actualColor.length-1);var colorArray=colors.split(",");return new OpenLayers.Rico.Color(parseInt(colorArray[0]),parseInt(colorArray[1]),parseInt(colorArray[2]));} +else if(actualColor.indexOf("#")==0){return OpenLayers.Rico.Color.createFromHex(actualColor);} +else{return new OpenLayers.Rico.Color(255,255,255);}};OpenLayers.Rico.Color.HSBtoRGB=function(hue,saturation,brightness){var red=0;var green=0;var blue=0;if(saturation==0){red=parseInt(brightness*255.0+0.5);green=red;blue=red;} +else{var h=(hue-Math.floor(hue))*6.0;var f=h-Math.floor(h);var p=brightness*(1.0-saturation);var q=brightness*(1.0-saturation*f);var t=brightness*(1.0-(saturation*(1.0-f)));switch(parseInt(h)){case 0:red=(brightness*255.0+0.5);green=(t*255.0+0.5);blue=(p*255.0+0.5);break;case 1:red=(q*255.0+0.5);green=(brightness*255.0+0.5);blue=(p*255.0+0.5);break;case 2:red=(p*255.0+0.5);green=(brightness*255.0+0.5);blue=(t*255.0+0.5);break;case 3:red=(p*255.0+0.5);green=(q*255.0+0.5);blue=(brightness*255.0+0.5);break;case 4:red=(t*255.0+0.5);green=(p*255.0+0.5);blue=(brightness*255.0+0.5);break;case 5:red=(brightness*255.0+0.5);green=(p*255.0+0.5);blue=(q*255.0+0.5);break;}} +return{r:parseInt(red),g:parseInt(green),b:parseInt(blue)};};OpenLayers.Rico.Color.RGBtoHSB=function(r,g,b){var hue;var saturation;var brightness;var cmax=(r>g)?r:g;if(b>cmax){cmax=b;} +var cmin=(r"+el.innerHTML+"
";},_roundTopCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=0;i=0;i--){corner.appendChild(this._createCornerSlice(color,bgColor,i,"bottom"));} +el.style.paddingBottom=0;el.appendChild(corner);},_createCorner:function(bgColor){var corner=document.createElement("div");corner.style.backgroundColor=(this._isTransparent()?"transparent":bgColor);return corner;},_createCornerSlice:function(color,bgColor,n,position){var slice=document.createElement("span");var inStyle=slice.style;inStyle.backgroundColor=color;inStyle.display="block";inStyle.height="1px";inStyle.overflow="hidden";inStyle.fontSize="1px";var borderColor=this._borderColor(color,bgColor);if(this.options.border&&n==0){inStyle.borderTopStyle="solid";inStyle.borderTopWidth="1px";inStyle.borderLeftWidth="0px";inStyle.borderRightWidth="0px";inStyle.borderBottomWidth="0px";inStyle.height="0px";inStyle.borderColor=borderColor;} +else if(borderColor){inStyle.borderColor=borderColor;inStyle.borderStyle="solid";inStyle.borderWidth="0px 1px";} +if(!this.options.compact&&(n==(this.options.numSlices-1))){inStyle.height="2px";} +this._setMargin(slice,n,position);this._setBorder(slice,n,position);return slice;},_setOptions:function(options){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false};OpenLayers.Util.extend(this.options,options||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent()){this.options.blend=false;}},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")){return"";} +if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0){return"";} +if(this.options.corners.indexOf("tl")>=0){return"left";}else if(this.options.corners.indexOf("tr")>=0){return"right";} +return"";},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")){return"";} +if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0){return"";} +if(this.options.corners.indexOf("bl")>=0){return"left";}else if(this.options.corners.indexOf("br")>=0){return"right";} +return"";},_borderColor:function(color,bgColor){if(color=="transparent"){return bgColor;}else if(this.options.border){return this.options.border;}else if(this.options.blend){return this._blend(bgColor,color);}else{return"";}},_setMargin:function(el,n,corners){var marginSize=this._marginSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.marginLeft=marginSize+"px";el.style.marginRight="0px";} +else if(whichSide=="right"){el.style.marginRight=marginSize+"px";el.style.marginLeft="0px";} +else{el.style.marginLeft=marginSize+"px";el.style.marginRight=marginSize+"px";}},_setBorder:function(el,n,corners){var borderSize=this._borderSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth="0px";} +else if(whichSide=="right"){el.style.borderRightWidth=borderSize+"px";el.style.borderLeftWidth="0px";} +else{el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";} +if(this.options.border!=false){el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";}},_marginSize:function(n){if(this._isTransparent()){return 0;} +var marginSizes=[5,3,2,1];var blendedMarginSizes=[3,2,1,0];var compactMarginSizes=[2,1];var smBlendedMarginSizes=[1,0];if(this.options.compact&&this.options.blend){return smBlendedMarginSizes[n];}else if(this.options.compact){return compactMarginSizes[n];}else if(this.options.blend){return blendedMarginSizes[n];}else{return marginSizes[n];}},_borderSize:function(n){var transparentBorderSizes=[5,3,2,1];var blendedBorderSizes=[2,1,1,1];var compactBorderSizes=[1,0];var actualBorderSizes=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent())){return 1;}else if(this.options.compact){return compactBorderSizes[n];}else if(this.options.blend){return blendedBorderSizes[n];}else if(this.options.border){return actualBorderSizes[n];}else if(this._isTransparent()){return transparentBorderSizes[n];} +return 0;},_hasString:function(str){for(var i=1;i=0){return true;}return false;},_blend:function(c1,c2){var cc1=OpenLayers.Rico.Color.createFromHex(c1);cc1.blend(OpenLayers.Rico.Color.createFromHex(c2));return cc1;},_background:function(el){try{return OpenLayers.Rico.Color.createColorFromBackground(el).asHex();}catch(err){return"#ffffff";}},_isTransparent:function(){return this.options.color=="transparent";},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr");},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br");},_hasSingleTextChild:function(el){return el.childNodes.length==1&&el.childNodes[0].nodeType==3;}};OpenLayers.Popup.AnchoredBubble=OpenLayers.Class(OpenLayers.Popup.Anchored,{rounded:false,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){this.padding=new OpenLayers.Bounds(0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE,0,OpenLayers.Popup.AnchoredBubble.CORNER_SIZE);OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);},draw:function(px){OpenLayers.Popup.Anchored.prototype.draw.apply(this,arguments);this.setContentHTML();this.setBackgroundColor();this.setOpacity();return this.div;},updateRelativePosition:function(){this.setRicoCorners();},setSize:function(contentSize){OpenLayers.Popup.Anchored.prototype.setSize.apply(this,arguments);this.setRicoCorners();},setBackgroundColor:function(color){if(color!=undefined){this.backgroundColor=color;} +if(this.div!=null){if(this.contentDiv!=null){this.div.style.background="transparent";OpenLayers.Rico.Corner.changeColor(this.groupDiv,this.backgroundColor);}}},setOpacity:function(opacity){OpenLayers.Popup.Anchored.prototype.setOpacity.call(this,opacity);if(this.div!=null){if(this.groupDiv!=null){OpenLayers.Rico.Corner.changeOpacity(this.groupDiv,this.opacity);}}},setBorder:function(border){this.border=0;},setRicoCorners:function(){var corners=this.getCornersToRound(this.relativePosition);var options={corners:corners,color:this.backgroundColor,bgColor:"transparent",blend:false};if(!this.rounded){OpenLayers.Rico.Corner.round(this.div,options);this.rounded=true;}else{OpenLayers.Rico.Corner.reRound(this.groupDiv,options);this.setBackgroundColor();this.setOpacity();}},getCornersToRound:function(){var corners=['tl','tr','bl','br'];var corner=OpenLayers.Bounds.oppositeQuadrant(this.relativePosition);OpenLayers.Util.removeItem(corners,corner);return corners.join(" ");},CLASS_NAME:"OpenLayers.Popup.AnchoredBubble"});OpenLayers.Popup.AnchoredBubble.CORNER_SIZE=5;OpenLayers.Protocol.WFS.v1=OpenLayers.Class(OpenLayers.Protocol,{version:null,srsName:"EPSG:4326",featureType:null,featureNS:null,geometryName:"the_geom",schema:null,featurePrefix:"feature",formatOptions:null,readFormat:null,readOptions:null,initialize:function(options){OpenLayers.Protocol.prototype.initialize.apply(this,[options]);if(!options.format){this.format=OpenLayers.Format.WFST(OpenLayers.Util.extend({version:this.version,featureType:this.featureType,featureNS:this.featureNS,featurePrefix:this.featurePrefix,geometryName:this.geometryName,srsName:this.srsName,schema:this.schema},this.formatOptions));} +if(!options.geometryName&&parseFloat(this.format.version)>1.0){this.setGeometryName(null);}},destroy:function(){if(this.options&&!this.options.format){this.format.destroy();} +this.format=null;OpenLayers.Protocol.prototype.destroy.apply(this);},read:function(options){OpenLayers.Protocol.prototype.read.apply(this,arguments);options=OpenLayers.Util.extend({},options);OpenLayers.Util.applyDefaults(options,this.options||{});var response=new OpenLayers.Protocol.Response({requestType:"read"});var data=OpenLayers.Format.XML.prototype.write.apply(this.format,[this.format.writeNode("wfs:GetFeature",options)]);response.priv=OpenLayers.Request.POST({url:options.url,callback:this.createCallback(this.handleRead,response,options),params:options.params,headers:options.headers,data:data});return response;},setFeatureType:function(featureType){this.featureType=featureType;this.format.featureType=featureType;},setGeometryName:function(geometryName){this.geometryName=geometryName;this.format.geometryName=geometryName;},handleRead:function(response,options){options=OpenLayers.Util.extend({},options);OpenLayers.Util.applyDefaults(options,this.options);if(options.callback){var request=response.priv;if(request.status>=200&&request.status<300){var result=this.parseResponse(request,options.readOptions);if(result&&result.success!==false){if(options.readOptions&&options.readOptions.output=="object"){OpenLayers.Util.extend(response,result);}else{response.features=result;} +response.code=OpenLayers.Protocol.Response.SUCCESS;}else{response.code=OpenLayers.Protocol.Response.FAILURE;response.error=result;}}else{response.code=OpenLayers.Protocol.Response.FAILURE;} +options.callback.call(options.scope,response);}},parseResponse:function(request,options){var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;} +if(!doc||doc.length<=0){return null;} +var result=(this.readFormat!==null)?this.readFormat.read(doc):this.format.read(doc,options);if(!this.featureNS){var format=this.readFormat||this.format;this.featureNS=format.featureNS;format.autoConfig=false;if(!this.geometryName){this.setGeometryName(format.geometryName);}} +return result;},commit:function(features,options){options=OpenLayers.Util.extend({},options);OpenLayers.Util.applyDefaults(options,this.options);var response=new OpenLayers.Protocol.Response({requestType:"commit",reqFeatures:features});response.priv=OpenLayers.Request.POST({url:options.url,headers:options.headers,data:this.format.write(features,options),callback:this.createCallback(this.handleCommit,response,options)});return response;},handleCommit:function(response,options){if(options.callback){var request=response.priv;var data=request.responseXML;if(!data||!data.documentElement){data=request.responseText;} +var obj=this.format.read(data)||{};response.insertIds=obj.insertIds||[];if(obj.success){response.code=OpenLayers.Protocol.Response.SUCCESS;}else{response.code=OpenLayers.Protocol.Response.FAILURE;response.error=obj;} +options.callback.call(options.scope,response);}},filterDelete:function(filter,options){options=OpenLayers.Util.extend({},options);OpenLayers.Util.applyDefaults(options,this.options);var response=new OpenLayers.Protocol.Response({requestType:"commit"});var root=this.format.createElementNSPlus("wfs:Transaction",{attributes:{service:"WFS",version:this.version}});var deleteNode=this.format.createElementNSPlus("wfs:Delete",{attributes:{typeName:(options.featureNS?this.featurePrefix+":":"")+ +options.featureType}});if(options.featureNS){deleteNode.setAttribute("xmlns:"+this.featurePrefix,options.featureNS);} +var filterNode=this.format.writeNode("ogc:Filter",filter);deleteNode.appendChild(filterNode);root.appendChild(deleteNode);var data=OpenLayers.Format.XML.prototype.write.apply(this.format,[root]);return OpenLayers.Request.POST({url:this.url,callback:options.callback||function(){},data:data});},abort:function(response){if(response){response.priv.abort();}},CLASS_NAME:"OpenLayers.Protocol.WFS.v1"});OpenLayers.Handler.Point=OpenLayers.Class(OpenLayers.Handler,{point:null,layer:null,multi:false,mouseDown:false,stoppedDown:null,lastDown:null,lastUp:null,persist:false,stopDown:false,stopUp:false,layerOptions:null,pixelTolerance:5,touch:false,lastTouchPx:null,initialize:function(control,callbacks,options){if(!(options&&options.layerOptions&&options.layerOptions.styleMap)){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'],{});} +OpenLayers.Handler.prototype.initialize.apply(this,arguments);},activate:function(){if(!OpenLayers.Handler.prototype.activate.apply(this,arguments)){return false;} +var options=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,options);this.map.addLayer(this.layer);return true;},createFeature:function(pixel){var lonlat=this.map.getLonLatFromPixel(pixel);var geometry=new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat);this.point=new OpenLayers.Feature.Vector(geometry);this.callback("create",[this.point.geometry,this.point]);this.point.geometry.clearBounds();this.layer.addFeatures([this.point],{silent:true});},deactivate:function(){if(!OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){return false;} +this.cancel();if(this.layer.map!=null){this.destroyFeature(true);this.layer.destroy(false);} +this.layer=null;this.touch=false;return true;},destroyFeature:function(force){if(this.layer&&(force||!this.persist)){this.layer.destroyFeatures();} +this.point=null;},destroyPersistedFeature:function(){var layer=this.layer;if(layer&&layer.features.length>1){this.layer.features[0].destroy();}},finalize:function(cancel){var key=cancel?"cancel":"done";this.mouseDown=false;this.lastDown=null;this.lastUp=null;this.lastTouchPx=null;this.callback(key,[this.geometryClone()]);this.destroyFeature(cancel);},cancel:function(){this.finalize(true);},click:function(evt){OpenLayers.Event.stop(evt);return false;},dblclick:function(evt){OpenLayers.Event.stop(evt);return false;},modifyFeature:function(pixel){if(!this.point){this.createFeature(pixel);} +var lonlat=this.map.getLonLatFromPixel(pixel);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.callback("modify",[this.point.geometry,this.point,false]);this.point.geometry.clearBounds();this.drawFeature();},drawFeature:function(){this.layer.drawFeature(this.point,this.style);},getGeometry:function(){var geometry=this.point&&this.point.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiPoint([geometry]);} +return geometry;},geometryClone:function(){var geom=this.getGeometry();return geom&&geom.clone();},mousedown:function(evt){return this.down(evt);},touchstart:function(evt){if(!this.touch){this.touch=true;this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,mousemove:this.mousemove,click:this.click,dblclick:this.dblclick,scope:this});} +this.lastTouchPx=evt.xy;return this.down(evt);},mousemove:function(evt){return this.move(evt);},touchmove:function(evt){this.lastTouchPx=evt.xy;return this.move(evt);},mouseup:function(evt){return this.up(evt);},touchend:function(evt){evt.xy=this.lastTouchPx;return this.up(evt);},down:function(evt){this.mouseDown=true;this.lastDown=evt.xy;if(!this.touch){this.modifyFeature(evt.xy);} +this.stoppedDown=this.stopDown;return!this.stopDown;},move:function(evt){if(!this.touch&&(!this.mouseDown||this.stoppedDown)){this.modifyFeature(evt.xy);} +return true;},up:function(evt){this.mouseDown=false;this.stoppedDown=this.stopDown;if(!this.checkModifiers(evt)){return true;} +if(this.lastUp&&this.lastUp.equals(evt.xy)){return true;} +if(this.lastDown&&this.passesTolerance(this.lastDown,evt.xy,this.pixelTolerance)){if(this.touch){this.modifyFeature(evt.xy);} +if(this.persist){this.destroyPersistedFeature();} +this.lastUp=evt.xy;this.finalize();return!this.stopUp;}else{return true;}},mouseout:function(evt){if(OpenLayers.Util.mouseLeft(evt,this.map.eventsDiv)){this.stoppedDown=this.stopDown;this.mouseDown=false;}},passesTolerance:function(pixel1,pixel2,tolerance){var passes=true;if(tolerance!=null&&pixel1&&pixel2){var dist=pixel1.distanceTo(pixel2);if(dist>tolerance){passes=false;}} +return passes;},CLASS_NAME:"OpenLayers.Handler.Point"});OpenLayers.Handler.Path=OpenLayers.Class(OpenLayers.Handler.Point,{line:null,maxVertices:null,doubleTouchTolerance:20,freehand:false,freehandToggle:'shiftKey',timerId:null,redoStack:null,initialize:function(control,callbacks,options){OpenLayers.Handler.Point.prototype.initialize.apply(this,arguments);},createFeature:function(pixel){var lonlat=this.map.getLonLatFromPixel(pixel);var geometry=new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat);this.point=new OpenLayers.Feature.Vector(geometry);this.line=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([this.point.geometry]));this.callback("create",[this.point.geometry,this.getSketch()]);this.point.geometry.clearBounds();this.layer.addFeatures([this.line,this.point],{silent:true});},destroyFeature:function(force){OpenLayers.Handler.Point.prototype.destroyFeature.call(this,force);this.line=null;},destroyPersistedFeature:function(){var layer=this.layer;if(layer&&layer.features.length>2){this.layer.features[0].destroy();}},removePoint:function(){if(this.point){this.layer.removeFeatures([this.point]);}},addPoint:function(pixel){this.layer.removeFeatures([this.point]);var lonlat=this.control.map.getLonLatFromPixel(pixel);this.point=new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon,lonlat.lat));this.line.geometry.addComponent(this.point.geometry,this.line.geometry.components.length);this.layer.addFeatures([this.point]);this.callback("point",[this.point.geometry,this.getGeometry()]);this.callback("modify",[this.point.geometry,this.getSketch()]);this.drawFeature();delete this.redoStack;},insertXY:function(x,y){this.line.geometry.addComponent(new OpenLayers.Geometry.Point(x,y),this.getCurrentPointIndex());this.drawFeature();delete this.redoStack;},insertDeltaXY:function(dx,dy){var previousIndex=this.getCurrentPointIndex()-1;var p0=this.line.geometry.components[previousIndex];if(p0&&!isNaN(p0.x)&&!isNaN(p0.y)){this.insertXY(p0.x+dx,p0.y+dy);}},insertDirectionLength:function(direction,length){direction*=Math.PI/180;var dx=length*Math.cos(direction);var dy=length*Math.sin(direction);this.insertDeltaXY(dx,dy);},insertDeflectionLength:function(deflection,length){var previousIndex=this.getCurrentPointIndex()-1;if(previousIndex>0){var p1=this.line.geometry.components[previousIndex];var p0=this.line.geometry.components[previousIndex-1];var theta=Math.atan2(p1.y-p0.y,p1.x-p0.x);this.insertDirectionLength((theta*180/Math.PI)+deflection,length);}},getCurrentPointIndex:function(){return this.line.geometry.components.length-1;},undo:function(){var geometry=this.line.geometry;var components=geometry.components;var index=this.getCurrentPointIndex()-1;var target=components[index];var undone=geometry.removeComponent(target);if(undone){if(!this.redoStack){this.redoStack=[];} +this.redoStack.push(target);this.drawFeature();} +return undone;},redo:function(){var target=this.redoStack&&this.redoStack.pop();if(target){this.line.geometry.addComponent(target,this.getCurrentPointIndex());this.drawFeature();} +return!!target;},freehandMode:function(evt){return(this.freehandToggle&&evt[this.freehandToggle])?!this.freehand:this.freehand;},modifyFeature:function(pixel,drawing){if(!this.line){this.createFeature(pixel);} +var lonlat=this.control.map.getLonLatFromPixel(pixel);this.point.geometry.x=lonlat.lon;this.point.geometry.y=lonlat.lat;this.callback("modify",[this.point.geometry,this.getSketch(),drawing]);this.point.geometry.clearBounds();this.drawFeature();},drawFeature:function(){this.layer.drawFeature(this.line,this.style);this.layer.drawFeature(this.point,this.style);},getSketch:function(){return this.line;},getGeometry:function(){var geometry=this.line&&this.line.geometry;if(geometry&&this.multi){geometry=new OpenLayers.Geometry.MultiLineString([geometry]);} +return geometry;},touchstart:function(evt){if(this.timerId&&this.passesTolerance(this.lastTouchPx,evt.xy,this.doubleTouchTolerance)){this.finishGeometry();window.clearTimeout(this.timerId);this.timerId=null;return false;}else{if(this.timerId){window.clearTimeout(this.timerId);this.timerId=null;} +this.timerId=window.setTimeout(OpenLayers.Function.bind(function(){this.timerId=null;},this),300);return OpenLayers.Handler.Point.prototype.touchstart.call(this,evt);}},down:function(evt){var stopDown=this.stopDown;if(this.freehandMode(evt)){stopDown=true;} +if(!this.touch&&(!this.lastDown||!this.passesTolerance(this.lastDown,evt.xy,this.pixelTolerance))){this.modifyFeature(evt.xy,!!this.lastUp);} +this.mouseDown=true;this.lastDown=evt.xy;this.stoppedDown=stopDown;return!stopDown;},move:function(evt){if(this.stoppedDown&&this.freehandMode(evt)){if(this.persist){this.destroyPersistedFeature();} +this.addPoint(evt.xy);return false;} +if(!this.touch&&(!this.mouseDown||this.stoppedDown)){this.modifyFeature(evt.xy,!!this.lastUp);} +return true;},up:function(evt){if(this.mouseDown&&(!this.lastUp||!this.lastUp.equals(evt.xy))){if(this.stoppedDown&&this.freehandMode(evt)){if(this.persist){this.destroyPersistedFeature();} +this.removePoint();this.finalize();}else{if(this.passesTolerance(this.lastDown,evt.xy,this.pixelTolerance)){if(this.touch){this.modifyFeature(evt.xy);} +if(this.lastUp==null&&this.persist){this.destroyPersistedFeature();} +this.addPoint(evt.xy);this.lastUp=evt.xy;if(this.line.geometry.components.length===this.maxVertices+1){this.finishGeometry();}}}} +this.stoppedDown=this.stopDown;this.mouseDown=false;return!this.stopUp;},finishGeometry:function(){var index=this.line.geometry.components.length-1;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.removePoint();this.finalize();},dblclick:function(evt){if(!this.freehandMode(evt)){this.finishGeometry();} +return false;},CLASS_NAME:"OpenLayers.Handler.Path"});OpenLayers.Layer.GML=OpenLayers.Class(OpenLayers.Layer.Vector,{loaded:false,format:null,formatOptions:null,initialize:function(name,url,options){var newArguments=[];newArguments.push(name,options);OpenLayers.Layer.Vector.prototype.initialize.apply(this,newArguments);this.url=url;},setVisibility:function(visibility,noEvent){OpenLayers.Layer.Vector.prototype.setVisibility.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML();}},moveTo:function(bounds,zoomChanged,minor){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadGML();}},loadGML:function(){if(!this.loaded){this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.url,success:this.requestSuccess,failure:this.requestFailure,scope:this});this.loaded=true;}},setUrl:function(url){this.url=url;this.destroyFeatures();this.loaded=false;this.loadGML();},requestSuccess:function(request){var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;} +var options={};OpenLayers.Util.extend(options,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){options.externalProjection=this.projection;options.internalProjection=this.map.getProjectionObject();} +var gml=this.format?new this.format(options):new OpenLayers.Format.GML(options);this.addFeatures(gml.read(doc));this.events.triggerEvent("loadend");},requestFailure:function(request){OpenLayers.Console.userError(OpenLayers.i18n("errorLoadingGML",{'url':this.url}));this.events.triggerEvent("loadend");},CLASS_NAME:"OpenLayers.Layer.GML"});OpenLayers.Format.Context=OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC,{layerOptions:null,layerParams:null,read:function(data,options){var context=OpenLayers.Format.XML.VersionedOGC.prototype.read.apply(this,arguments);var map;if(options&&options.map){this.context=context;if(options.map instanceof OpenLayers.Map){map=this.mergeContextToMap(context,options.map);}else{var mapOptions=options.map;if(OpenLayers.Util.isElement(mapOptions)||typeof mapOptions=="string"){mapOptions={div:mapOptions};} +map=this.contextToMap(context,mapOptions);}}else{map=context;} +return map;},getLayerFromContext:function(layerContext){var i,len;var options={queryable:layerContext.queryable,visibility:layerContext.visibility,maxExtent:layerContext.maxExtent,metadata:OpenLayers.Util.applyDefaults(layerContext.metadata,{styles:layerContext.styles,formats:layerContext.formats,"abstract":layerContext["abstract"],dataURL:layerContext.dataURL}),numZoomLevels:layerContext.numZoomLevels,units:layerContext.units,isBaseLayer:layerContext.isBaseLayer,opacity:layerContext.opacity,displayInLayerSwitcher:layerContext.displayInLayerSwitcher,singleTile:layerContext.singleTile,tileSize:(layerContext.tileSize)?new OpenLayers.Size(layerContext.tileSize.width,layerContext.tileSize.height):undefined,minScale:layerContext.minScale||layerContext.maxScaleDenominator,maxScale:layerContext.maxScale||layerContext.minScaleDenominator,srs:layerContext.srs,dimensions:layerContext.dimensions,metadataURL:layerContext.metadataURL};if(this.layerOptions){OpenLayers.Util.applyDefaults(options,this.layerOptions);} +var params={layers:layerContext.name,transparent:layerContext.transparent,version:layerContext.version};if(layerContext.formats&&layerContext.formats.length>0){params.format=layerContext.formats[0].value;for(i=0,len=layerContext.formats.length;i0){for(i=0,len=layerContext.styles.length;i0){for(var i=0,len=layer.metadata.formats.length;i0){for(var i=0,len=layer.metadata.styles.length;i0){this.read_wmc_OnlineResource(object,links[0]);} +return object.href;},CLASS_NAME:"OpenLayers.Format.WMC.v1"});OpenLayers.Control.PanPanel=OpenLayers.Class(OpenLayers.Control.Panel,{slideFactor:50,slideRatio:null,initialize:function(options){OpenLayers.Control.Panel.prototype.initialize.apply(this,[options]);var options={slideFactor:this.slideFactor,slideRatio:this.slideRatio};this.addControls([new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH,options),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH,options),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST,options),new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST,options)]);},CLASS_NAME:"OpenLayers.Control.PanPanel"});OpenLayers.Control.Attribution=OpenLayers.Class(OpenLayers.Control,{separator:", ",destroy:function(){this.map.events.un({"removelayer":this.updateAttribution,"addlayer":this.updateAttribution,"changelayer":this.updateAttribution,"changebaselayer":this.updateAttribution,scope:this});OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);this.map.events.on({'changebaselayer':this.updateAttribution,'changelayer':this.updateAttribution,'addlayer':this.updateAttribution,'removelayer':this.updateAttribution,scope:this});this.updateAttribution();return this.div;},updateAttribution:function(){var attributions=[];if(this.map&&this.map.layers){for(var i=0,len=this.map.layers.length;inumRows){text.removeChild(text.lastChild);} +for(var i=0;ithis.nbPoints){this.points.pop();}},end:function(xy){var last,now=new Date().getTime();for(var i=0,l=this.points.length,point;ithis.delay){break;} +last=point;} +if(!last){return;} +var time=new Date().getTime()-last.tick;var dist=Math.sqrt(Math.pow(xy.x-last.xy.x,2)+ +Math.pow(xy.y-last.xy.y,2));var speed=dist/time;if(speed==0||speed0){text=text.substring(index);} +var ajaxResponse=OpenLayers.Util.Try(function(){var xmldom=new ActiveXObject('Microsoft.XMLDOM');xmldom.loadXML(text);return xmldom;},function(){return new DOMParser().parseFromString(text,'text/xml');},function(){var req=new XMLHttpRequest();req.open("GET","data:"+"text/xml"+";charset=utf-8,"+encodeURIComponent(text),false);if(req.overrideMimeType){req.overrideMimeType("text/xml");} +req.send(null);return req.responseXML;});return ajaxResponse;};OpenLayers.Ajax={emptyFunction:function(){},getTransport:function(){return OpenLayers.Util.Try(function(){return new XMLHttpRequest();},function(){return new ActiveXObject('Msxml2.XMLHTTP');},function(){return new ActiveXObject('Microsoft.XMLHTTP');})||false;},activeRequestCount:0};OpenLayers.Ajax.Responders={responders:[],register:function(responderToAdd){for(var i=0;i-1)?'&':'?')+params;}else if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){params+='&_=';}} +try{var response=new OpenLayers.Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(response);} +OpenLayers.Ajax.Responders.dispatch('onCreate',this,response);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){window.setTimeout(OpenLayers.Function.bind(this.respondToReadyState,this,1),10);} +this.transport.onreadystatechange=OpenLayers.Function.bind(this.onStateChange,this);this.setRequestHeaders();this.body=this.method=='post'?(this.options.postBody||params):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange();}}catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete)){this.respondToReadyState(this.transport.readyState);}},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','Accept':'text/javascript, text/html, application/xml, text/xml, */*','OpenLayers':true};if(this.method=='post'){headers['Content-type']=this.options.contentType+ +(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){headers['Connection']='close';}} +if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(typeof extras.push=='function'){for(var i=0,length=extras.length;i=200&&status<300);},getStatus:function(){try{return this.transport.status||0;}catch(e){return 0;}},respondToReadyState:function(readyState){var state=OpenLayers.Ajax.Request.Events[readyState];var response=new OpenLayers.Ajax.Response(this);if(state=='Complete'){try{this._complete=true;(this.options['on'+response.status]||this.options['on'+(this.success()?'Success':'Failure')]||OpenLayers.Ajax.emptyFunction)(response);}catch(e){this.dispatchException(e);} +var contentType=response.getHeader('Content-type');} +try{(this.options['on'+state]||OpenLayers.Ajax.emptyFunction)(response);OpenLayers.Ajax.Responders.dispatch('on'+state,this,response);}catch(e){this.dispatchException(e);} +if(state=='Complete'){this.transport.onreadystatechange=OpenLayers.Ajax.emptyFunction;}},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){return null;}},dispatchException:function(exception){var handler=this.options.onException;if(handler){handler(this,exception);OpenLayers.Ajax.Responders.dispatch('onException',this,exception);}else{var listener=false;var responders=OpenLayers.Ajax.Responders.responders;for(var i=0;i2&&!(!!(window.attachEvent&&!window.opera)))||readyState==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=transport.responseText==null?'':String(transport.responseText);} +if(readyState==4){var xml=transport.responseXML;this.responseXML=xml===undefined?null:xml;}},getStatus:OpenLayers.Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||'';}catch(e){return'';}},getHeader:OpenLayers.Ajax.Request.prototype.getHeader,getResponseHeader:function(name){return this.transport.getResponseHeader(name);}});OpenLayers.Ajax.getElementsByTagNameNS=function(parentnode,nsuri,nsprefix,tagname){var elem=null;if(parentnode.getElementsByTagNameNS){elem=parentnode.getElementsByTagNameNS(nsuri,tagname);}else{elem=parentnode.getElementsByTagName(nsprefix+':'+tagname);} +return elem;};OpenLayers.Ajax.serializeXMLToString=function(xmldom){var serializer=new XMLSerializer();var data=serializer.serializeToString(xmldom);return data;};OpenLayers.Layer.GeoRSS=OpenLayers.Class(OpenLayers.Layer.Markers,{location:null,features:null,formatOptions:null,selectedFeature:null,icon:null,popupSize:null,useFeedTitle:true,initialize:function(name,location,options){OpenLayers.Layer.Markers.prototype.initialize.apply(this,[name,options]);this.location=location;this.features=[];},destroy:function(){OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);this.clearFeatures();this.features=null;},loadRSS:function(){if(!this.loaded){this.events.triggerEvent("loadstart");OpenLayers.Request.GET({url:this.location,success:this.parseData,scope:this});this.loaded=true;}},moveTo:function(bounds,zoomChanged,minor){OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);if(this.visibility&&!this.loaded){this.loadRSS();}},parseData:function(ajaxRequest){var doc=ajaxRequest.responseXML;if(!doc||!doc.documentElement){doc=OpenLayers.Format.XML.prototype.read(ajaxRequest.responseText);} +if(this.useFeedTitle){var name=null;try{name=doc.getElementsByTagNameNS('*','title')[0].firstChild.nodeValue;} +catch(e){name=doc.getElementsByTagName('title')[0].firstChild.nodeValue;} +if(name){this.setName(name);}} +var options={};OpenLayers.Util.extend(options,this.formatOptions);if(this.map&&!this.projection.equals(this.map.getProjectionObject())){options.externalProjection=this.projection;options.internalProjection=this.map.getProjectionObject();} +var format=new OpenLayers.Format.GeoRSS(options);var features=format.read(doc);for(var i=0,len=features.length;i';} +contentHTML+=title;if(link){contentHTML+='';} +contentHTML+='
';contentHTML+='
';contentHTML+=description;contentHTML+='
';data['popupContentHTML']=contentHTML;} +var feature=new OpenLayers.Feature(this,location,data);this.features.push(feature);var marker=feature.createMarker();marker.events.register('click',feature,this.markerClick);this.addMarker(marker);} +this.events.triggerEvent("loadend");},markerClick:function(evt){var sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0,len=this.layer.map.popups.length;i0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.GeoRSS"});OpenLayers.Format.SLD.v1=OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0,{namespaces:{sld:"http://www.opengis.net/sld",ogc:"http://www.opengis.net/ogc",gml:"http://www.opengis.net/gml",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"sld",schemaLocation:null,multipleSymbolizers:false,featureTypeCounter:null,defaultSymbolizer:{fillColor:"#808080",fillOpacity:1,strokeColor:"#000000",strokeOpacity:1,strokeWidth:1,strokeDashstyle:"solid",pointRadius:3,graphicName:"square"},initialize:function(options){OpenLayers.Format.Filter.v1_0_0.prototype.initialize.apply(this,[options]);},read:function(data,options){options=OpenLayers.Util.applyDefaults(options,this.options);var sld={namedLayers:options.namedLayersAsArray===true?[]:{}};this.readChildNodes(data,sld);return sld;},readers:OpenLayers.Util.applyDefaults({"sld":{"StyledLayerDescriptor":function(node,sld){sld.version=node.getAttribute("version");this.readChildNodes(node,sld);},"Name":function(node,obj){obj.name=this.getChildValue(node);},"Title":function(node,obj){obj.title=this.getChildValue(node);},"Abstract":function(node,obj){obj.description=this.getChildValue(node);},"NamedLayer":function(node,sld){var layer={userStyles:[],namedStyles:[]};this.readChildNodes(node,layer);for(var i=0,len=layer.userStyles.length;i0){clone=style.clone();clone.rules=rulesByZ[zValues[i]];this.writeNode("FeatureTypeStyle",clone,node);}}}else{this.writeNode("FeatureTypeStyle",style,node);} +return node;},"IsDefault":function(bool){return this.createElementNSPlus("sld:IsDefault",{value:(bool)?"1":"0"});},"FeatureTypeStyle":function(style){var node=this.createElementNSPlus("sld:FeatureTypeStyle");for(var i=0,len=style.rules.length;i0){this.writeNode("ogc:PropertyName",{property:item.substring(0,last)},node);node.appendChild(this.createTextNode(item.substring(++last)));}else{node.appendChild(this.createTextNode("${"+item));}} +return node;},"Halo":function(symbolizer){var node=this.createElementNSPlus("sld:Halo");if(symbolizer.haloRadius){this.writeNode("Radius",symbolizer.haloRadius,node);} +if(symbolizer.haloColor||symbolizer.haloOpacity){this.writeNode("Fill",{fillColor:symbolizer.haloColor,fillOpacity:symbolizer.haloOpacity},node);} +return node;},"Radius":function(value){return this.createElementNSPlus("sld:Radius",{value:value});},"RasterSymbolizer":function(symbolizer){var node=this.createElementNSPlus("sld:RasterSymbolizer");if(symbolizer.geometry){this.writeNode("Geometry",symbolizer.geometry,node);} +if(symbolizer.opacity){this.writeNode("Opacity",symbolizer.opacity,node);} +if(symbolizer.colorMap){this.writeNode("ColorMap",symbolizer.colorMap,node);} +return node;},"Geometry":function(geometry){var node=this.createElementNSPlus("sld:Geometry");if(geometry.property){this.writeNode("ogc:PropertyName",geometry,node);} +return node;},"ColorMap":function(colorMap){var node=this.createElementNSPlus("sld:ColorMap");for(var i=0,len=colorMap.length;i0){layerContext.maxScale=minScaleDenominator;}},read_sld_MaxScaleDenominator:function(layerContext,node){layerContext.minScale=parseFloat(this.getChildValue(node));},read_wmc_SRS:function(layerContext,node){if(!("srs"in layerContext)){layerContext.srs={};} +layerContext.srs[this.getChildValue(node)]=true;},write_wmc_Layer:function(context){var node=OpenLayers.Format.WMC.v1.prototype.write_wmc_Layer.apply(this,[context]);if(context.maxScale){var minSD=this.createElementNS(this.namespaces.sld,"sld:MinScaleDenominator");minSD.appendChild(this.createTextNode(context.maxScale.toPrecision(16)));node.appendChild(minSD);} +if(context.minScale){var maxSD=this.createElementNS(this.namespaces.sld,"sld:MaxScaleDenominator");maxSD.appendChild(this.createTextNode(context.minScale.toPrecision(16)));node.appendChild(maxSD);} +if(context.srs){for(var name in context.srs){node.appendChild(this.createElementDefaultNS("SRS",name));}} +node.appendChild(this.write_wmc_FormatList(context));node.appendChild(this.write_wmc_StyleList(context));if(context.dimensions){node.appendChild(this.write_wmc_DimensionList(context));} +node.appendChild(this.write_wmc_LayerExtension(context));return node;},CLASS_NAME:"OpenLayers.Format.WMC.v1_1_0"});OpenLayers.Format.XLS.v1_1_0=OpenLayers.Class(OpenLayers.Format.XLS.v1,{VERSION:"1.1",schemaLocation:"http://www.opengis.net/xls http://schemas.opengis.net/ols/1.1.0/LocationUtilityService.xsd",initialize:function(options){OpenLayers.Format.XLS.v1.prototype.initialize.apply(this,[options]);},CLASS_NAME:"OpenLayers.Format.XLS.v1_1_0"});OpenLayers.Format.XLS.v1_1=OpenLayers.Format.XLS.v1_1_0;OpenLayers.Renderer.SVG=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"http://www.w3.org/2000/svg",xlinkns:"http://www.w3.org/1999/xlink",MAX_PIXEL:15000,translationParameters:null,symbolMetrics:null,initialize:function(containerID){if(!this.supported()){return;} +OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);this.translationParameters={x:0,y:0};this.symbolMetrics={};},supported:function(){var svgFeature="http://www.w3.org/TR/SVG11/feature#";return(document.implementation&&(document.implementation.hasFeature("org.w3c.svg","1.0")||document.implementation.hasFeature(svgFeature+"SVG","1.1")||document.implementation.hasFeature(svgFeature+"BasicStructure","1.1")));},inValidRange:function(x,y,xyOnly){var left=x+(xyOnly?0:this.translationParameters.x);var top=y+(xyOnly?0:this.translationParameters.y);return(left>=-this.MAX_PIXEL&&left<=this.MAX_PIXEL&&top>=-this.MAX_PIXEL&&top<=this.MAX_PIXEL);},setExtent:function(extent,resolutionChanged){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();var left=-extent.left/resolution;var top=extent.top/resolution;if(resolutionChanged){this.left=left;this.top=top;var extentString="0 0 "+this.size.w+" "+this.size.h;this.rendererRoot.setAttributeNS(null,"viewBox",extentString);this.translate(0,0);return true;}else{var inRange=this.translate(left-this.left,top-this.top);if(!inRange){this.setExtent(extent,true);} +return inRange;}},translate:function(x,y){if(!this.inValidRange(x,y,true)){return false;}else{var transformString="";if(x||y){transformString="translate("+x+","+y+")";} +this.root.setAttributeNS(null,"transform",transformString);this.translationParameters={x:x,y:y};return true;}},setSize:function(size){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);this.rendererRoot.setAttributeNS(null,"width",this.size.w);this.rendererRoot.setAttributeNS(null,"height",this.size.h);},getNodeType:function(geometry,style){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":if(style.externalGraphic){nodeType="image";}else if(this.isComplexSymbol(style.graphicName)){nodeType="svg";}else{nodeType="circle";} +break;case"OpenLayers.Geometry.Rectangle":nodeType="rect";break;case"OpenLayers.Geometry.LineString":nodeType="polyline";break;case"OpenLayers.Geometry.LinearRing":nodeType="polygon";break;case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="path";break;default:break;} +return nodeType;},setStyle:function(node,style,options){style=style||node._style;options=options||node._options;var r=parseFloat(node.getAttributeNS(null,"r"));var widthFactor=1;var pos;if(node._geometryClass=="OpenLayers.Geometry.Point"&&r){node.style.visibility="";if(style.graphic===false){node.style.visibility="hidden";}else if(style.externalGraphic){pos=this.getPosition(node);if(style.graphicTitle){node.setAttributeNS(null,"title",style.graphicTitle);var label=this.nodeFactory(null,"title");label.textContent=style.graphicTitle;node.appendChild(label);} +if(style.graphicWidth&&style.graphicHeight){node.setAttributeNS(null,"preserveAspectRatio","none");} +var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);var opacity=style.graphicOpacity||style.fillOpacity;node.setAttributeNS(null,"x",(pos.x+xOffset).toFixed());node.setAttributeNS(null,"y",(pos.y+yOffset).toFixed());node.setAttributeNS(null,"width",width);node.setAttributeNS(null,"height",height);node.setAttributeNS(this.xlinkns,"href",style.externalGraphic);node.setAttributeNS(null,"style","opacity: "+opacity);node.onclick=OpenLayers.Renderer.SVG.preventDefault;}else if(this.isComplexSymbol(style.graphicName)){var offset=style.pointRadius*3;var size=offset*2;var src=this.importSymbol(style.graphicName);pos=this.getPosition(node);widthFactor=this.symbolMetrics[src.id][0]*3/size;var parent=node.parentNode;var nextSibling=node.nextSibling;if(parent){parent.removeChild(node);} +node.firstChild&&node.removeChild(node.firstChild);node.appendChild(src.firstChild.cloneNode(true));node.setAttributeNS(null,"viewBox",src.getAttributeNS(null,"viewBox"));node.setAttributeNS(null,"width",size);node.setAttributeNS(null,"height",size);node.setAttributeNS(null,"x",pos.x-offset);node.setAttributeNS(null,"y",pos.y-offset);if(nextSibling){parent.insertBefore(node,nextSibling);}else if(parent){parent.appendChild(node);}}else{node.setAttributeNS(null,"r",style.pointRadius);} +var rotation=style.rotation;if((rotation!==undefined||node._rotation!==undefined)&&pos){node._rotation=rotation;rotation|=0;if(node.nodeName!=="svg"){node.setAttributeNS(null,"transform","rotate("+rotation+" "+pos.x+" "+ +pos.y+")");}else{var metrics=this.symbolMetrics[src.id];node.firstChild.setAttributeNS(null,"transform","rotate(" ++rotation+" " ++metrics[1]+" " ++metrics[2]+")");}}} +if(options.isFilled){node.setAttributeNS(null,"fill",style.fillColor);node.setAttributeNS(null,"fill-opacity",style.fillOpacity);}else{node.setAttributeNS(null,"fill","none");} +if(options.isStroked){node.setAttributeNS(null,"stroke",style.strokeColor);node.setAttributeNS(null,"stroke-opacity",style.strokeOpacity);node.setAttributeNS(null,"stroke-width",style.strokeWidth*widthFactor);node.setAttributeNS(null,"stroke-linecap",style.strokeLinecap||"round");node.setAttributeNS(null,"stroke-linejoin","round");style.strokeDashstyle&&node.setAttributeNS(null,"stroke-dasharray",this.dashStyle(style,widthFactor));}else{node.setAttributeNS(null,"stroke","none");} +if(style.pointerEvents){node.setAttributeNS(null,"pointer-events",style.pointerEvents);} +if(style.cursor!=null){node.setAttributeNS(null,"cursor",style.cursor);} +return node;},dashStyle:function(style,widthFactor){var w=style.strokeWidth*widthFactor;var str=style.strokeDashstyle;switch(str){case'solid':return'none';case'dot':return[1,4*w].join();case'dash':return[4*w,4*w].join();case'dashdot':return[4*w,4*w,1,4*w].join();case'longdash':return[8*w,4*w].join();case'longdashdot':return[8*w,4*w,1,4*w].join();default:return OpenLayers.String.trim(str).replace(/\s+/g,",");}},createNode:function(type,id){var node=document.createElementNS(this.xmlns,type);if(id){node.setAttributeNS(null,"id",id);} +return node;},nodeTypeCompare:function(node,type){return(type==node.nodeName);},createRenderRoot:function(){return this.nodeFactory(this.container.id+"_svgRoot","svg");},createRoot:function(suffix){return this.nodeFactory(this.container.id+suffix,"g");},createDefs:function(){var defs=this.nodeFactory(this.container.id+"_defs","defs");this.rendererRoot.appendChild(defs);return defs;},drawPoint:function(node,geometry){return this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){var resolution=this.getResolution();var x=(geometry.x/resolution+this.left);var y=(this.top-geometry.y/resolution);if(this.inValidRange(x,y)){node.setAttributeNS(null,"cx",x);node.setAttributeNS(null,"cy",y);node.setAttributeNS(null,"r",radius);return node;}else{return false;}},drawLineString:function(node,geometry){var componentsResult=this.getComponentsString(geometry.components);if(componentsResult.path){node.setAttributeNS(null,"points",componentsResult.path);return(componentsResult.complete?node:null);}else{return false;}},drawLinearRing:function(node,geometry){var componentsResult=this.getComponentsString(geometry.components);if(componentsResult.path){node.setAttributeNS(null,"points",componentsResult.path);return(componentsResult.complete?node:null);}else{return false;}},drawPolygon:function(node,geometry){var d="";var draw=true;var complete=true;var linearRingResult,path;for(var j=0,len=geometry.components.length;jnumRows){label.removeChild(label.lastChild);} +for(var i=0;i0){if(this.getShortString(components[i-1])){strings.push(this.clipLine(components[i],components[i-1]));}} +if(imaxX){k=(y2-y1)/(x2-x1);x2=x2<0?-maxX:maxX;y2=y1+(x2-x1)*k;} +if(y2<-maxY||y2>maxY){k=(x2-x1)/(y2-y1);y2=y2<0?-maxY:maxY;x2=x1+(y2-y1)*k;} +return x2+","+y2;},getShortString:function(point){var resolution=this.getResolution();var x=(point.x/resolution+this.left);var y=(this.top-point.y/resolution);if(this.inValidRange(x,y)){return x+","+y;}else{return false;}},getPosition:function(node){return({x:parseFloat(node.getAttributeNS(null,"cx")),y:parseFloat(node.getAttributeNS(null,"cy"))});},importSymbol:function(graphicName){if(!this.defs){this.defs=this.createDefs();} +var id=this.container.id+"-"+graphicName;var existing=document.getElementById(id) +if(existing!=null){return existing;} +var symbol=OpenLayers.Renderer.symbol[graphicName];if(!symbol){throw new Error(graphicName+' is not a valid symbol name');} +var symbolNode=this.nodeFactory(id,"symbol");var node=this.nodeFactory(null,"polygon");symbolNode.appendChild(node);var symbolExtent=new OpenLayers.Bounds(Number.MAX_VALUE,Number.MAX_VALUE,0,0);var points=[];var x,y;for(var i=0;i0){a.push(path.slice());path.pop();} +a.reverse();} +return a;},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);} +if(data&&data.nodeType==9){data=data.documentElement;} +var context={};this.readNode(data,context);this.setNestingPath({layersContext:context.layersContext});var layers=[];this.processLayer(layers,context);delete context.layersContext;context.layersContext=layers;return context;},processLayer:function(layerArray,layer){if(layer.layersContext){for(var i=0,len=layer.layersContext.length;i=1){el=elements[0];} +if(el&&el.firstChild){var featurenode=(el.firstChild.nextSibling)?el.firstChild.nextSibling:el.firstChild;this.setNamespace("feature",featurenode.namespaceURI);this.featureType=featurenode.localName||featurenode.nodeName.split(":").pop();this.readChildNodes(node,obj);}},"Server":function(node,obj){if((!obj.service&&!obj.version)||(obj.service!=OpenLayers.Format.Context.serviceTypes.WMS)){obj.service=node.getAttribute("service");obj.version=node.getAttribute("version");this.readChildNodes(node,obj);}},"Name":function(node,obj){obj.name=this.getChildValue(node);this.readChildNodes(node,obj);},"Title":function(node,obj){obj.title=this.getChildValue(node);this.readChildNodes(node,obj);},"StyleList":function(node,obj){this.readChildNodes(node,obj.styles);},"Style":function(node,obj){var style={};obj.push(style);this.readChildNodes(node,style);},"LegendURL":function(node,obj){var legend={};obj.legend=legend;this.readChildNodes(node,legend);},"OnlineResource":function(node,obj){obj.url=this.getAttributeNS(node,this.namespaces.xlink,"href");this.readChildNodes(node,obj);}},"ows":OpenLayers.Format.OWSCommon.v1_0_0.prototype.readers.ows,"gml":OpenLayers.Format.GML.v2.prototype.readers.gml,"sld":OpenLayers.Format.SLD.v1_0_0.prototype.readers.sld,"feature":OpenLayers.Format.GML.v2.prototype.readers.feature},writers:{"owc":{"OWSContext":function(options){var node=this.createElementNSPlus("OWSContext",{attributes:{version:this.VERSION,id:options.id||OpenLayers.Util.createUniqueID("OpenLayers_OWSContext_")}});this.writeNode("General",options,node);this.writeNode("ResourceList",options,node);return node;},"General":function(options){var node=this.createElementNSPlus("General");this.writeNode("ows:BoundingBox",options,node);this.writeNode("ows:Title",options.title||'OpenLayers OWSContext',node);return node;},"ResourceList":function(options){var node=this.createElementNSPlus("ResourceList");for(var i=0,len=options.layers.length;i0){this.writeNode("StyleList",layer.metadata.styles,node);} +return node;},"_Layer":function(options){var layer,subPaths,node,title;layer=options.layer;subPaths=options.subPaths;node=null;title=null;if(subPaths.length>0){var path=subPaths[0].join("/");var index=path.lastIndexOf("/");node=this.nestingLayerLookup[path];title=(index>0)?path.substring(index+1,path.length):path;if(!node){node=this.createElementNSPlus("Layer");this.writeNode("ows:Title",title,node);this.nestingLayerLookup[path]=node;} +options.subPaths.shift();this.writeNode("_Layer",options,node);return node;}else{if(layer instanceof OpenLayers.Layer.WMS){node=this.writeNode("_WMS",layer);}else if(layer instanceof OpenLayers.Layer.Vector){if(layer.protocol instanceof OpenLayers.Protocol.WFS.v1){node=this.writeNode("_WFS",layer);}else if(layer.protocol instanceof OpenLayers.Protocol.HTTP){if(layer.protocol.format instanceof OpenLayers.Format.GML){layer.protocol.format.version="2.1.2";node=this.writeNode("_GML",layer);}else if(layer.protocol.format instanceof OpenLayers.Format.KML){layer.protocol.format.version="2.2";node=this.writeNode("_KML",layer);}}else{this.setNamespace("feature",this.featureNS);node=this.writeNode("_InlineGeometry",layer);}} +if(layer.options.maxScale){this.writeNode("sld:MinScaleDenominator",layer.options.maxScale,node);} +if(layer.options.minScale){this.writeNode("sld:MaxScaleDenominator",layer.options.minScale,node);} +this.nestingLayerLookup[layer.name]=node;return node;}},"_WFS":function(layer){var node=this.createElementNSPlus("Layer",{attributes:{name:layer.protocol.featurePrefix+":"+layer.protocol.featureType,hidden:layer.visibility?"0":"1"}});this.writeNode("ows:Title",layer.name,node);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.WFS,version:layer.protocol.version,url:layer.protocol.url},node);return node;},"_InlineGeometry":function(layer){var node=this.createElementNSPlus("Layer",{attributes:{name:this.featureType,hidden:layer.visibility?"0":"1"}});this.writeNode("ows:Title",layer.name,node);this.writeNode("InlineGeometry",layer,node);return node;},"_GML":function(layer){var node=this.createElementNSPlus("Layer");this.writeNode("ows:Title",layer.name,node);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.GML,url:layer.protocol.url,version:layer.protocol.format.version},node);return node;},"_KML":function(layer){var node=this.createElementNSPlus("Layer");this.writeNode("ows:Title",layer.name,node);this.writeNode("Server",{service:OpenLayers.Format.Context.serviceTypes.KML,version:layer.protocol.format.version,url:layer.protocol.url},node);return node;}},"gml":OpenLayers.Util.applyDefaults({"boundedBy":function(bounds){var node=this.createElementNSPlus("gml:boundedBy");this.writeNode("gml:Box",bounds,node);return node;}},OpenLayers.Format.GML.v2.prototype.writers.gml),"ows":OpenLayers.Format.OWSCommon.v1_0_0.prototype.writers.ows,"sld":OpenLayers.Format.SLD.v1_0_0.prototype.writers.sld,"feature":OpenLayers.Format.GML.v2.prototype.writers.feature},CLASS_NAME:"OpenLayers.Format.OWSContext.v0_3_1"});OpenLayers.Control.ScaleLine=OpenLayers.Class(OpenLayers.Control,{maxWidth:100,topOutUnits:"km",topInUnits:"m",bottomOutUnits:"mi",bottomInUnits:"ft",eTop:null,eBottom:null,geodesic:false,draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.eTop){this.eTop=document.createElement("div");this.eTop.className=this.displayClass+"Top";var theLen=this.topInUnits.length;this.div.appendChild(this.eTop);if((this.topOutUnits=="")||(this.topInUnits=="")){this.eTop.style.visibility="hidden";}else{this.eTop.style.visibility="visible";} +this.eBottom=document.createElement("div");this.eBottom.className=this.displayClass+"Bottom";this.div.appendChild(this.eBottom);if((this.bottomOutUnits=="")||(this.bottomInUnits=="")){this.eBottom.style.visibility="hidden";}else{this.eBottom.style.visibility="visible";}} +this.map.events.register('moveend',this,this.update);this.update();return this.div;},getBarLen:function(maxLen){var digits=parseInt(Math.log(maxLen)/Math.log(10));var pow10=Math.pow(10,digits);var firstChar=parseInt(maxLen/pow10);var barLen;if(firstChar>5){barLen=5;}else if(firstChar>2){barLen=2;}else{barLen=1;} +return barLen*pow10;},update:function(){var res=this.map.getResolution();if(!res){return;} +var curMapUnits=this.map.getUnits();var inches=OpenLayers.INCHES_PER_UNIT;var maxSizeData=this.maxWidth*res*inches[curMapUnits];var geodesicRatio=1;if(this.geodesic===true){var maxSizeGeodesic=(this.map.getGeodesicPixelSize().w||0.000001)*this.maxWidth;var maxSizeKilometers=maxSizeData/inches["km"];geodesicRatio=maxSizeGeodesic/maxSizeKilometers;maxSizeData*=geodesicRatio;} +var topUnits;var bottomUnits;if(maxSizeData>100000){topUnits=this.topOutUnits;bottomUnits=this.bottomOutUnits;}else{topUnits=this.topInUnits;bottomUnits=this.bottomInUnits;} +var topMax=maxSizeData/inches[topUnits];var bottomMax=maxSizeData/inches[bottomUnits];var topRounded=this.getBarLen(topMax);var bottomRounded=this.getBarLen(bottomMax);topMax=topRounded/inches[curMapUnits]*inches[topUnits];bottomMax=bottomRounded/inches[curMapUnits]*inches[bottomUnits];var topPx=topMax/res/geodesicRatio;var bottomPx=bottomMax/res/geodesicRatio;if(this.eBottom.style.visibility=="visible"){this.eBottom.style.width=Math.round(bottomPx)+"px";this.eBottom.innerHTML=bottomRounded+" "+bottomUnits;} +if(this.eTop.style.visibility=="visible"){this.eTop.style.width=Math.round(topPx)+"px";this.eTop.innerHTML=topRounded+" "+topUnits;}},CLASS_NAME:"OpenLayers.Control.ScaleLine"});OpenLayers.Icon=OpenLayers.Class({url:null,size:null,offset:null,calculateOffset:null,imageDiv:null,px:null,initialize:function(url,size,offset,calculateOffset){this.url=url;this.size=(size)?size:new OpenLayers.Size(20,20);this.offset=offset?offset:new OpenLayers.Pixel(-(this.size.w/2),-(this.size.h/2));this.calculateOffset=calculateOffset;var id=OpenLayers.Util.createUniqueID("OL_Icon_");this.imageDiv=OpenLayers.Util.createAlphaImageDiv(id);},destroy:function(){this.erase();OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild);this.imageDiv.innerHTML="";this.imageDiv=null;},clone:function(){return new OpenLayers.Icon(this.url,this.size,this.offset,this.calculateOffset);},setSize:function(size){if(size!=null){this.size=size;} +this.draw();},setUrl:function(url){if(url!=null){this.url=url;} +this.draw();},draw:function(px){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,this.size,this.url,"absolute");this.moveTo(px);return this.imageDiv;},erase:function(){if(this.imageDiv!=null&&this.imageDiv.parentNode!=null){OpenLayers.Element.remove(this.imageDiv);}},setOpacity:function(opacity){OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,null,null,null,null,null,null,opacity);},moveTo:function(px){if(px!=null){this.px=px;} +if(this.imageDiv!=null){if(this.px==null){this.display(false);}else{if(this.calculateOffset){this.offset=this.calculateOffset(this.size);} +var offsetPx=this.px.offset(this.offset);OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv,null,offsetPx);}}},display:function(display){this.imageDiv.style.display=(display)?"":"none";},isDrawn:function(){var isDrawn=(this.imageDiv&&this.imageDiv.parentNode&&(this.imageDiv.parentNode.nodeType!=11));return isDrawn;},CLASS_NAME:"OpenLayers.Icon"});OpenLayers.Marker=OpenLayers.Class({icon:null,lonlat:null,events:null,map:null,initialize:function(lonlat,icon){this.lonlat=lonlat;var newIcon=(icon)?icon:OpenLayers.Marker.defaultIcon();if(this.icon==null){this.icon=newIcon;}else{this.icon.url=newIcon.url;this.icon.size=newIcon.size;this.icon.offset=newIcon.offset;this.icon.calculateOffset=newIcon.calculateOffset;} +this.events=new OpenLayers.Events(this,this.icon.imageDiv,null);},destroy:function(){this.erase();this.map=null;this.events.destroy();this.events=null;if(this.icon!=null){this.icon.destroy();this.icon=null;}},draw:function(px){return this.icon.draw(px);},erase:function(){if(this.icon!=null){this.icon.erase();}},moveTo:function(px){if((px!=null)&&(this.icon!=null)){this.icon.moveTo(px);} +this.lonlat=this.map.getLonLatFromLayerPx(px);},isDrawn:function(){var isDrawn=(this.icon&&this.icon.isDrawn());return isDrawn;},onScreen:function(){var onScreen=false;if(this.map){var screenBounds=this.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);} +return onScreen;},inflate:function(inflate){if(this.icon){var newSize=new OpenLayers.Size(this.icon.size.w*inflate,this.icon.size.h*inflate);this.icon.setSize(newSize);}},setOpacity:function(opacity){this.icon.setOpacity(opacity);},setUrl:function(url){this.icon.setUrl(url);},display:function(display){this.icon.display(display);},CLASS_NAME:"OpenLayers.Marker"});OpenLayers.Marker.defaultIcon=function(){var url=OpenLayers.Util.getImagesLocation()+"marker.png";var size=new OpenLayers.Size(21,25);var calculateOffset=function(size){return new OpenLayers.Pixel(-(size.w/2),-size.h);};return new OpenLayers.Icon(url,size,null,calculateOffset);};OpenLayers.Layer.TileCache=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,format:'image/png',serverResolutions:null,initialize:function(name,url,layername,options){this.layername=layername;OpenLayers.Layer.Grid.prototype.initialize.apply(this,[name,url,{},options]);this.extension=this.format.split('/')[1].toLowerCase();this.extension=(this.extension=='jpg')?'jpeg':this.extension;},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TileCache(this.name,this.url,this.layername,this.getOptions());} +obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){var res=this.map.getResolution();var bbox=this.maxExtent;var size=this.tileSize;var tileX=Math.round((bounds.left-bbox.left)/(res*size.w));var tileY=Math.round((bounds.bottom-bbox.bottom)/(res*size.h));var tileZ=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,res):this.map.getZoom();function zeroPad(number,length){number=String(number);var zeros=[];for(var i=0;i0){this.length=newLength;} +return this.length;},pageNext:function(event){var changed=false;if(this.features){if(this.num===null){this.num=-1;} +var start=(this.num+1)*this.length;changed=this.page(start,event);} +return changed;},pagePrevious:function(){var changed=false;if(this.features){if(this.num===null){this.num=this.pageCount();} +var start=(this.num-1)*this.length;changed=this.page(start);} +return changed;},page:function(start,event){var changed=false;if(this.features){if(start>=0&&start=constrain||diff!==0){angle=Math.round(control._angle/constrain)*constrain- +diff;control._angle=0;control.box.geometry.rotate(angle,centerGeometry);control.transformFeature({rotation:angle});}};var handles=new Array(8);var rotationHandles=new Array(4);var geom,handle,rotationHandle;for(var i=0;i<8;++i){geom=box.geometry.components[i];handle=new OpenLayers.Feature.Vector(geom.clone(),null,typeof this.renderIntent=="string"?null:this.renderIntent);if(i%2==0){rotationHandle=new OpenLayers.Feature.Vector(geom.clone(),null,typeof this.rotationHandleSymbolizer=="string"?null:this.rotationHandleSymbolizer);rotationHandle.geometry.move=rotationHandleMoveFn;geom._rotationHandle=rotationHandle;rotationHandles[i/2]=rotationHandle;} +geom.move=vertexMoveFn;geom.resize=vertexResizeFn;geom.rotate=vertexRotateFn;handle.geometry.move=handleMoveFn;geom._handle=handle;handles[i]=handle;} +this.box=box;this.rotationHandles=rotationHandles;this.handles=handles;},createControl:function(){var control=this;this.dragControl=new OpenLayers.Control.DragFeature(this.layer,{documentDrag:true,moveFeature:function(pixel){if(this.feature===control.feature){this.feature=control.box;} +OpenLayers.Control.DragFeature.prototype.moveFeature.apply(this,arguments);},onDrag:function(feature,pixel){if(feature===control.box){control.transformFeature({center:control.center});control.drawHandles();}},onStart:function(feature,pixel){var eligible=!control.geometryTypes||OpenLayers.Util.indexOf(control.geometryTypes,feature.geometry.CLASS_NAME)!==-1;var i=OpenLayers.Util.indexOf(control.handles,feature);i+=OpenLayers.Util.indexOf(control.rotationHandles,feature);if(feature!==control.feature&&feature!==control.box&&i==-2&&eligible){control.setFeature(feature);}},onComplete:function(feature,pixel){control.events.triggerEvent("transformcomplete",{feature:control.feature});}});},drawHandles:function(){var layer=this.layer;for(var i=0;i<8;++i){if(this.rotate&&i%2===0){layer.drawFeature(this.rotationHandles[i/2],this.rotationHandleSymbolizer);} +layer.drawFeature(this.handles[i],this.renderIntent);}},transformFeature:function(mods){if(!this._setfeature){this.scale*=(mods.scale||1);this.ratio*=(mods.ratio||1);var oldRotation=this.rotation;this.rotation=(this.rotation+(mods.rotation||0))%360;if(this.events.triggerEvent("beforetransform",mods)!==false){var feature=this.feature;var geom=feature.geometry;var center=this.center;geom.rotate(-oldRotation,center);if(mods.scale||mods.ratio){geom.resize(mods.scale,center,mods.ratio);}else if(mods.center){feature.move(mods.center.getBounds().getCenterLonLat());} +geom.rotate(this.rotation,center);this.layer.drawFeature(feature);feature.toState(OpenLayers.State.UPDATE);this.events.triggerEvent("transform",mods);}} +this.layer.drawFeature(this.box,this.renderIntent);this.drawHandles();},destroy:function(){var geom;for(var i=0;i<8;++i){geom=this.box.geometry.components[i];geom._handle.destroy();geom._handle=null;geom._rotationHandle&&geom._rotationHandle.destroy();geom._rotationHandle=null;} +this.box.destroy();this.box=null;this.layer=null;this.dragControl.destroy();OpenLayers.Control.prototype.destroy.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.TransformFeature"});OpenLayers.Layer.XYZ=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,sphericalMercator:false,zoomOffset:0,serverResolutions:null,initialize:function(name,url,options){if(options&&options.sphericalMercator||this.sphericalMercator){options=OpenLayers.Util.extend({maxExtent:new OpenLayers.Bounds(-128*156543.03390625,-128*156543.03390625,128*156543.03390625,128*156543.03390625),maxResolution:156543.03390625,numZoomLevels:19,units:"m",projection:"EPSG:900913"},options);} +url=url||this.url;name=name||this.name;var newArguments=[name,url,{},options];OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.XYZ(this.name,this.url,this.getOptions());} +obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){var xyz=this.getXYZ(bounds);var url=this.url;if(OpenLayers.Util.isArray(url)){var s=''+xyz.x+xyz.y+xyz.z;url=this.selectUrl(s,url);} +return OpenLayers.String.format(url,xyz);},getXYZ:function(bounds){var res=this.map.getResolution();var x=Math.round((bounds.left-this.maxExtent.left)/(res*this.tileSize.w));var y=Math.round((this.maxExtent.top-bounds.top)/(res*this.tileSize.h));var z=this.serverResolutions!=null?OpenLayers.Util.indexOf(this.serverResolutions,res):this.map.getZoom()+this.zoomOffset;var limit=Math.pow(2,z);if(this.wrapDateLine) +{x=((x%limit)+limit)%limit;} +return{'x':x,'y':y,'z':z};},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.maxExtent.left,this.maxExtent.bottom);}},CLASS_NAME:"OpenLayers.Layer.XYZ"});OpenLayers.Layer.OSM=OpenLayers.Class(OpenLayers.Layer.XYZ,{name:"OpenStreetMap",attribution:"",sphericalMercator:true,url:'http://tile.openstreetmap.org/${z}/${x}/${y}.png',clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.OSM(this.name,this.url,this.getOptions());} +obj=OpenLayers.Layer.XYZ.prototype.clone.apply(this,[obj]);return obj;},wrapDateLine:true,CLASS_NAME:"OpenLayers.Layer.OSM"});OpenLayers.Handler.Box=OpenLayers.Class(OpenLayers.Handler,{dragHandler:null,boxDivClassName:'olHandlerBoxZoomBox',boxOffsets:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.dragHandler=new OpenLayers.Handler.Drag(this,{down:this.startBox,move:this.moveBox,out:this.removeBox,up:this.endBox},{keyMask:this.keyMask});},destroy:function(){OpenLayers.Handler.prototype.destroy.apply(this,arguments);if(this.dragHandler){this.dragHandler.destroy();this.dragHandler=null;}},setMap:function(map){OpenLayers.Handler.prototype.setMap.apply(this,arguments);if(this.dragHandler){this.dragHandler.setMap(map);}},startBox:function(xy){this.callback("start",[]);this.zoomBox=OpenLayers.Util.createDiv('zoomBox',new OpenLayers.Pixel(-9999,-9999));this.zoomBox.className=this.boxDivClassName;this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.eventsDiv.appendChild(this.zoomBox);OpenLayers.Element.addClass(this.map.eventsDiv,"olDrawBox");},moveBox:function(xy){var startX=this.dragHandler.start.x;var startY=this.dragHandler.start.y;var deltaX=Math.abs(startX-xy.x);var deltaY=Math.abs(startY-xy.y);var offset=this.getBoxOffsets();this.zoomBox.style.width=(deltaX+offset.width+1)+"px";this.zoomBox.style.height=(deltaY+offset.height+1)+"px";this.zoomBox.style.left=(xy.x5||Math.abs(this.dragHandler.start.y-end.y)>5){var start=this.dragHandler.start;var top=Math.min(start.y,end.y);var bottom=Math.max(start.y,end.y);var left=Math.min(start.x,end.x);var right=Math.max(start.x,end.x);result=new OpenLayers.Bounds(left,bottom,right,top);}else{result=this.dragHandler.start.clone();} +this.removeBox();this.callback("done",[result]);},removeBox:function(){this.map.eventsDiv.removeChild(this.zoomBox);this.zoomBox=null;this.boxOffsets=null;OpenLayers.Element.removeClass(this.map.eventsDiv,"olDrawBox");},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragHandler.activate();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){if(this.dragHandler.deactivate()){if(this.zoomBox){this.removeBox();}} +return true;}else{return false;}},getBoxOffsets:function(){if(!this.boxOffsets){var testDiv=document.createElement("div");testDiv.style.position="absolute";testDiv.style.border="1px solid black";testDiv.style.width="3px";document.body.appendChild(testDiv);var w3cBoxModel=testDiv.clientWidth==3;document.body.removeChild(testDiv);var left=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-left-width"));var right=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-right-width"));var top=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-top-width"));var bottom=parseInt(OpenLayers.Element.getStyle(this.zoomBox,"border-bottom-width"));this.boxOffsets={left:left,right:right,top:top,bottom:bottom,width:w3cBoxModel===false?left+right:0,height:w3cBoxModel===false?top+bottom:0};} +return this.boxOffsets;},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,out:false,alwaysZoom:false,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask});},zoomBox:function(position){if(position instanceof OpenLayers.Bounds){var bounds;if(!this.out){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.top));bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);}else{var pixWidth=Math.abs(position.right-position.left);var pixHeight=Math.abs(position.top-position.bottom);var zoomFactor=Math.min((this.map.size.h/pixHeight),(this.map.size.w/pixWidth));var extent=this.map.getExtent();var center=this.map.getLonLatFromPixel(position.getCenterPixel());var xmin=center.lon-(extent.getWidth()/2)*zoomFactor;var xmax=center.lon+(extent.getWidth()/2)*zoomFactor;var ymin=center.lat-(extent.getHeight()/2)*zoomFactor;var ymax=center.lat+(extent.getHeight()/2)*zoomFactor;bounds=new OpenLayers.Bounds(xmin,ymin,xmax,ymax);} +var lastZoom=this.map.getZoom();this.map.zoomToExtent(bounds);if(lastZoom==this.map.getZoom()&&this.alwaysZoom==true){this.map.zoomTo(lastZoom+(this.out?-1:1));}}else{if(!this.out){this.map.setCenter(this.map.getLonLatFromPixel(position),this.map.getZoom()+1);}else{this.map.setCenter(this.map.getLonLatFromPixel(position),this.map.getZoom()-1);}}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Control.DragPan=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,panned:false,interval:1,documentDrag:false,kinetic:null,enableKinetic:false,kineticInterval:10,draw:function(){if(this.enableKinetic){var config={interval:this.kineticInterval};if(typeof this.enableKinetic==="object"){config=OpenLayers.Util.extend(config,this.enableKinetic);} +this.kinetic=new OpenLayers.Kinetic(config);} +this.handler=new OpenLayers.Handler.Drag(this,{"move":this.panMap,"done":this.panMapDone,"down":this.panMapStart},{interval:this.interval,documentDrag:this.documentDrag});},panMapStart:function(){if(this.kinetic){this.kinetic.begin();}},panMap:function(xy){if(this.kinetic){this.kinetic.update(xy);} +this.panned=true;this.map.pan(this.handler.last.x-xy.x,this.handler.last.y-xy.y,{dragging:true,animate:false});},panMapDone:function(xy){if(this.panned){var res=null;if(this.kinetic){res=this.kinetic.end(xy);} +this.map.pan(this.handler.last.x-xy.x,this.handler.last.y-xy.y,{dragging:!!res,animate:false});if(res){var self=this;this.kinetic.move(res,function(x,y,end){self.map.pan(x,y,{dragging:!end,animate:false});});} +this.panned=false;}},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Handler.Click=OpenLayers.Class(OpenLayers.Handler,{delay:300,single:true,'double':false,pixelTolerance:0,dblclickTolerance:13,stopSingle:false,stopDouble:false,timerId:null,touch:false,down:null,last:null,first:null,rightclickTimerId:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);},touchstart:function(evt){if(!this.touch){this.unregisterMouseListeners();this.touch=true;} +this.down=this.getEventInfo(evt);this.last=this.getEventInfo(evt);return true;},touchmove:function(evt){this.last=this.getEventInfo(evt);return true;},touchend:function(evt){if(this.down){evt.xy=this.last.xy;evt.lastTouches=this.last.touches;this.handleSingle(evt);this.down=null;} +return true;},unregisterMouseListeners:function(){this.map.events.un({mousedown:this.mousedown,mouseup:this.mouseup,click:this.click,dblclick:this.dblclick,scope:this});},mousedown:function(evt){this.down=this.getEventInfo(evt);this.last=this.getEventInfo(evt);return true;},mouseup:function(evt){var propagate=true;if(this.checkModifiers(evt)&&this.control.handleRightClicks&&OpenLayers.Event.isRightClick(evt)){propagate=this.rightclick(evt);} +return propagate;},rightclick:function(evt){if(this.passesTolerance(evt)){if(this.rightclickTimerId!=null){this.clearTimer();this.callback('dblrightclick',[evt]);return!this.stopDouble;}else{var clickEvent=this['double']?OpenLayers.Util.extend({},evt):this.callback('rightclick',[evt]);var delayedRightCall=OpenLayers.Function.bind(this.delayedRightCall,this,clickEvent);this.rightclickTimerId=window.setTimeout(delayedRightCall,this.delay);}} +return!this.stopSingle;},delayedRightCall:function(evt){this.rightclickTimerId=null;if(evt){this.callback('rightclick',[evt]);}},click:function(evt){if(!this.last){this.last=this.getEventInfo(evt);} +this.handleSingle(evt);return!this.stopSingle;},dblclick:function(evt){this.handleDouble(evt);return!this.stopDouble;},handleDouble:function(evt){if(this["double"]&&this.passesDblclickTolerance(evt)){this.callback("dblclick",[evt]);}},handleSingle:function(evt){if(this.passesTolerance(evt)){if(this.timerId!=null){if(this.last.touches&&this.last.touches.length===1){if(this["double"]){OpenLayers.Event.stop(evt);} +this.handleDouble(evt);} +if(!this.last.touches||this.last.touches.length!==2){this.clearTimer();}}else{this.first=this.getEventInfo(evt);var clickEvent=this.single?OpenLayers.Util.extend({},evt):null;this.queuePotentialClick(clickEvent);}}},queuePotentialClick:function(evt){this.timerId=window.setTimeout(OpenLayers.Function.bind(this.delayedCall,this,evt),this.delay);},passesTolerance:function(evt){var passes=true;if(this.pixelTolerance!=null&&this.down&&this.down.xy){passes=this.pixelTolerance>=this.down.xy.distanceTo(evt.xy);if(passes&&this.touch&&this.down.touches.length===this.last.touches.length){for(var i=0,ii=this.down.touches.length;ithis.pixelTolerance){passes=false;break;}}}} +return passes;},getTouchDistance:function(from,to){return Math.sqrt(Math.pow(from.clientX-to.clientX,2)+ +Math.pow(from.clientY-to.clientY,2));},passesDblclickTolerance:function(evt){var passes=true;if(this.down&&this.first){passes=this.down.xy.distanceTo(this.first.xy)<=this.dblclickTolerance;} +return passes;},clearTimer:function(){if(this.timerId!=null){window.clearTimeout(this.timerId);this.timerId=null;} +if(this.rightclickTimerId!=null){window.clearTimeout(this.rightclickTimerId);this.rightclickTimerId=null;}},delayedCall:function(evt){this.timerId=null;if(evt){this.callback("click",[evt]);}},getEventInfo:function(evt){var touches;if(evt.touches){var len=evt.touches.length;touches=new Array(len);var touch;for(var i=0;i=0;--i){candidate=features[i].geometry;if((candidate instanceof OpenLayers.Geometry.Polygon||candidate instanceof OpenLayers.Geometry.MultiPolygon)&&candidate.intersects(geometry)){polygon=features[i];this.control.layer.removeFeatures([polygon],{silent:true});this.control.layer.events.registerPriority("sketchcomplete",this,this.finalizeInteriorRing);this.control.layer.events.registerPriority("sketchmodified",this,this.enforceTopology);polygon.geometry.addComponent(this.line.geometry);this.polygon=polygon;this.drawingHole=true;break;}}} +OpenLayers.Handler.Path.prototype.addPoint.apply(this,arguments);},getCurrentPointIndex:function(){return this.line.geometry.components.length-2;},enforceTopology:function(event){var point=event.vertex;var components=this.line.geometry.components;if(!this.polygon.geometry.intersects(point)){var last=components[components.length-3];point.x=last.x;point.y=last.y;}},finishGeometry:function(){var index=this.line.geometry.components.length-2;this.line.geometry.removeComponent(this.line.geometry.components[index]);this.removePoint();this.finalize();},finalizeInteriorRing:function(){var ring=this.line.geometry;var modified=(ring.getArea()!==0);if(modified){var rings=this.polygon.geometry.components;for(var i=rings.length-2;i>=0;--i){if(ring.intersects(rings[i])){modified=false;break;}} +if(modified){var target;outer:for(var i=rings.length-2;i>0;--i){var points=rings[i].components;for(var j=0,jj=points.length;j=this.resFactor||ratio<=(1/this.resFactor));} +return invalid;},calculateBounds:function(mapBounds){if(!mapBounds){mapBounds=this.getMapBounds();} +var center=mapBounds.getCenterLonLat();var dataWidth=mapBounds.getWidth()*this.ratio;var dataHeight=mapBounds.getHeight()*this.ratio;this.bounds=new OpenLayers.Bounds(center.lon-(dataWidth/2),center.lat-(dataHeight/2),center.lon+(dataWidth/2),center.lat+(dataHeight/2));},triggerRead:function(options){if(this.response){this.layer.protocol.abort(this.response);this.layer.events.triggerEvent("loadend");} +this.layer.events.triggerEvent("loadstart");this.response=this.layer.protocol.read(OpenLayers.Util.applyDefaults({filter:this.createFilter(),callback:this.merge,scope:this},options));},createFilter:function(){var filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.BBOX,value:this.bounds,projection:this.layer.projection});if(this.layer.filter){filter=new OpenLayers.Filter.Logical({type:OpenLayers.Filter.Logical.AND,filters:[this.layer.filter,filter]});} +return filter;},merge:function(resp){this.layer.destroyFeatures();var features=resp.features;if(features&&features.length>0){var remote=this.layer.projection;var local=this.layer.map.getProjectionObject();if(!local.equals(remote)){var geom;for(var i=0,len=features.length;i=0;--i){layer=layers[i];if(layer instanceof OpenLayers.Layer.Google&&layer.visibility===true&&layer.inRange===true){type=layer.type;visible=true;break;}} +var container=this.mapObject.getDiv();if(visible===true){this.mapObject.setMapTypeId(type);container.style.left="";if(cache.termsOfUse&&cache.termsOfUse.style){cache.termsOfUse.style.left="";cache.termsOfUse.style.display="";cache.poweredBy.style.display="";} +cache.displayed=this.id;}else{delete cache.displayed;container.style.left="-9999px";if(cache.termsOfUse&&cache.termsOfUse.style){cache.termsOfUse.style.display="none";cache.termsOfUse.style.left="-9999px";cache.poweredBy.style.display="none";}}}},getMapContainer:function(){return this.mapObject.getDiv();},getMapObjectBoundsFromOLBounds:function(olBounds){var moBounds=null;if(olBounds!=null){var sw=this.sphericalMercator?this.inverseMercator(olBounds.bottom,olBounds.left):new OpenLayers.LonLat(olBounds.bottom,olBounds.left);var ne=this.sphericalMercator?this.inverseMercator(olBounds.top,olBounds.right):new OpenLayers.LonLat(olBounds.top,olBounds.right);moBounds=new google.maps.LatLngBounds(new google.maps.LatLng(sw.lat,sw.lon),new google.maps.LatLng(ne.lat,ne.lon));} +return moBounds;},getMapObjectLonLatFromMapObjectPixel:function(moPixel){var size=this.map.getSize();var lon=this.getLongitudeFromMapObjectLonLat(this.mapObject.center);var lat=this.getLatitudeFromMapObjectLonLat(this.mapObject.center);var res=this.map.getResolution();var delta_x=moPixel.x-(size.w/2);var delta_y=moPixel.y-(size.h/2);var lonlat=new OpenLayers.LonLat(lon+delta_x*res,lat-delta_y*res);if(this.wrapDateLine){lonlat=lonlat.wrapDateLine(this.maxExtent);} +return this.getMapObjectLonLatFromLonLat(lonlat.lon,lonlat.lat);},getMapObjectPixelFromMapObjectLonLat:function(moLonLat){var lon=this.getLongitudeFromMapObjectLonLat(moLonLat);var lat=this.getLatitudeFromMapObjectLonLat(moLonLat);var res=this.map.getResolution();var extent=this.map.getExtent();var px=new OpenLayers.Pixel((1/res*(lon-extent.left)),(1/res*(extent.top-lat)));return this.getMapObjectPixelFromXY(px.x,px.y);},setMapObjectCenter:function(center,zoom){if(this.animationEnabled===false&&zoom!=this.mapObject.zoom){var mapContainer=this.getMapContainer();google.maps.event.addListenerOnce(this.mapObject,"idle",function(){mapContainer.style.visibility="";});mapContainer.style.visibility="hidden";} +this.mapObject.setOptions({center:center,zoom:zoom});},getMapObjectZoomFromMapObjectBounds:function(moBounds){return this.mapObject.getBoundsZoomLevel(moBounds);},getMapObjectLonLatFromLonLat:function(lon,lat){var gLatLng;if(this.sphericalMercator){var lonlat=this.inverseMercator(lon,lat);gLatLng=new google.maps.LatLng(lonlat.lat,lonlat.lon);}else{gLatLng=new google.maps.LatLng(lat,lon);} +return gLatLng;},getMapObjectPixelFromXY:function(x,y){return new google.maps.Point(x,y);},destroy:function(){if(this.repositionListener){google.maps.event.removeListener(this.repositionListener);} +if(this.repositionTimer){window.clearTimeout(this.repositionTimer);} +OpenLayers.Layer.Google.prototype.destroy.apply(this,arguments);}};OpenLayers.Format.WPSDescribeProcess=OpenLayers.Class(OpenLayers.Format.XML,{VERSION:"1.0.0",namespaces:{wps:"http://www.opengis.net/wps/1.0.0",ows:"http://www.opengis.net/ows/1.1",xsi:"http://www.w3.org/2001/XMLSchema-instance"},schemaLocation:"http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd",defaultPrefix:"wps",regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);} +if(data&&data.nodeType==9){data=data.documentElement;} +var info={};this.readNode(data,info);return info;},readers:{"wps":{"ProcessDescriptions":function(node,obj){obj.processDescriptions={};this.readChildNodes(node,obj.processDescriptions);},"ProcessDescription":function(node,processDescriptions){var processVersion=this.getAttributeNS(node,this.namespaces.wps,"processVersion");var processDescription={processVersion:processVersion,statusSupported:(node.getAttribute("statusSupported")==="true"),storeSupported:(node.getAttribute("storeSupported")==="true")};this.readChildNodes(node,processDescription);processDescriptions[processDescription.identifier]=processDescription;},"DataInputs":function(node,processDescription){processDescription.dataInputs=[];this.readChildNodes(node,processDescription.dataInputs);},"ProcessOutputs":function(node,processDescription){processDescription.processOutputs=[];this.readChildNodes(node,processDescription.processOutputs);},"Output":function(node,processOutputs){var output={};this.readChildNodes(node,output);processOutputs.push(output);},"ComplexOutput":function(node,output){output.complexOutput={};this.readChildNodes(node,output.complexOutput);},"Input":function(node,dataInputs){var input={maxOccurs:parseInt(node.getAttribute("maxOccurs")),minOccurs:parseInt(node.getAttribute("minOccurs"))};this.readChildNodes(node,input);dataInputs.push(input);},"BoundingBoxData":function(node,input){input.boundingBoxData={};this.readChildNodes(node,input.boundingBoxData);},"CRS":function(node,obj){if(!obj.CRSs){obj.CRSs={};} +obj.CRSs[this.getChildValue(node)]=true;},"LiteralData":function(node,input){input.literalData={};this.readChildNodes(node,input.literalData);},"ComplexData":function(node,input){input.complexData={};this.readChildNodes(node,input.complexData);},"Default":function(node,complexData){complexData["default"]={};this.readChildNodes(node,complexData["default"]);},"Supported":function(node,complexData){complexData["supported"]={};this.readChildNodes(node,complexData["supported"]);},"Format":function(node,obj){var format={};this.readChildNodes(node,format);if(!obj.formats){obj.formats={};} +obj.formats[format.mimeType]=true;},"MimeType":function(node,format){format.mimeType=this.getChildValue(node);}},"ows":OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]},CLASS_NAME:"OpenLayers.Format.WPSDescribeProcess"});OpenLayers.Control.NavToolbar=OpenLayers.Class(OpenLayers.Control.Panel,{initialize:function(options){OpenLayers.Control.Panel.prototype.initialize.apply(this,[options]);this.addControls([new OpenLayers.Control.Navigation(),new OpenLayers.Control.ZoomBox()]);},draw:function(){var div=OpenLayers.Control.Panel.prototype.draw.apply(this,arguments);if(this.defaultControl===null){this.defaultControl=this.controls[0];} +return div;},CLASS_NAME:"OpenLayers.Control.NavToolbar"});OpenLayers.Format.CSWGetRecords.v2_0_2=OpenLayers.Class(OpenLayers.Format.XML,{namespaces:{csw:"http://www.opengis.net/cat/csw/2.0.2",dc:"http://purl.org/dc/elements/1.1/",dct:"http://purl.org/dc/terms/",geonet:"http://www.fao.org/geonetwork",ogc:"http://www.opengis.net/ogc",ows:"http://www.opengis.net/ows",xlink:"http://www.w3.org/1999/xlink",xsi:"http://www.w3.org/2001/XMLSchema-instance"},defaultPrefix:"csw",version:"2.0.2",schemaLocation:"http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd",requestId:null,resultType:null,outputFormat:null,outputSchema:null,startPosition:null,maxRecords:null,DistributedSearch:null,ResponseHandler:null,Query:null,regExes:{trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)},initialize:function(options){OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);} +if(data&&data.nodeType==9){data=data.documentElement;} +var obj={};this.readNode(data,obj);return obj;},readers:{"csw":{"GetRecordsResponse":function(node,obj){obj.records=[];this.readChildNodes(node,obj);var version=this.getAttributeNS(node,"",'version');if(version!=""){obj.version=version;}},"RequestId":function(node,obj){obj.RequestId=this.getChildValue(node);},"SearchStatus":function(node,obj){obj.SearchStatus={};var timestamp=this.getAttributeNS(node,"",'timestamp');if(timestamp!=""){obj.SearchStatus.timestamp=timestamp;}},"SearchResults":function(node,obj){this.readChildNodes(node,obj);var attrs=node.attributes;var SearchResults={};for(var i=0,len=attrs.length;i0){for(var i=0,len=ResponseHandler.length;i0){for(var i=0,len=ElementName.length;i'+feature.attributes.title+''+'

'+feature.attributes.description+'

';} +data['overflow']=feature.attributes.overflow||"auto";var markerFeature=new OpenLayers.Feature(this,location,data);this.features.push(markerFeature);var marker=markerFeature.createMarker();if((feature.attributes.title!=null)&&(feature.attributes.description!=null)){marker.events.register('click',markerFeature,this.markerClick);} +this.addMarker(marker);} +this.events.triggerEvent("loadend");},markerClick:function(evt){var sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0,len=this.layer.map.popups.length;i0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.Text"});OpenLayers.Handler.RegularPolygon=OpenLayers.Class(OpenLayers.Handler.Drag,{sides:4,radius:null,snapAngle:null,snapToggle:'shiftKey',layerOptions:null,persist:false,irregular:false,angle:null,fixedRadius:false,feature:null,layer:null,origin:null,initialize:function(control,callbacks,options){if(!(options&&options.layerOptions&&options.layerOptions.styleMap)){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'],{});} +OpenLayers.Handler.Drag.prototype.initialize.apply(this,[control,callbacks,options]);this.options=(options)?options:{};},setOptions:function(newOptions){OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);},activate:function(){var activated=false;if(OpenLayers.Handler.Drag.prototype.activate.apply(this,arguments)){var options=OpenLayers.Util.extend({displayInLayerSwitcher:false,calculateInRange:OpenLayers.Function.True},this.layerOptions);this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,options);this.map.addLayer(this.layer);activated=true;} +return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.Drag.prototype.deactivate.apply(this,arguments)){if(this.dragging){this.cancel();} +if(this.layer.map!=null){this.layer.destroy(false);if(this.feature){this.feature.destroy();}} +this.layer=null;this.feature=null;deactivated=true;} +return deactivated;},down:function(evt){this.fixedRadius=!!(this.radius);var maploc=this.map.getLonLatFromPixel(evt.xy);this.origin=new OpenLayers.Geometry.Point(maploc.lon,maploc.lat);if(!this.fixedRadius||this.irregular){this.radius=this.map.getResolution();} +if(this.persist){this.clear();} +this.feature=new OpenLayers.Feature.Vector();this.createGeometry();this.callback("create",[this.origin,this.feature]);this.layer.addFeatures([this.feature],{silent:true});this.layer.drawFeature(this.feature,this.style);},move:function(evt){var maploc=this.map.getLonLatFromPixel(evt.xy);var point=new OpenLayers.Geometry.Point(maploc.lon,maploc.lat);if(this.irregular){var ry=Math.sqrt(2)*Math.abs(point.y-this.origin.y)/2;this.radius=Math.max(this.map.getResolution()/2,ry);}else if(this.fixedRadius){this.origin=point;}else{this.calculateAngle(point,evt);this.radius=Math.max(this.map.getResolution()/2,point.distanceTo(this.origin));} +this.modifyGeometry();if(this.irregular){var dx=point.x-this.origin.x;var dy=point.y-this.origin.y;var ratio;if(dy==0){ratio=dx/(this.radius*Math.sqrt(2));}else{ratio=dx/dy;} +this.feature.geometry.resize(1,this.origin,ratio);this.feature.geometry.move(dx/2,dy/2);} +this.layer.drawFeature(this.feature,this.style);},up:function(evt){this.finalize();if(this.start==this.last){this.callback("done",[evt.xy]);}},out:function(evt){this.finalize();},createGeometry:function(){this.angle=Math.PI*((1/this.sides)-(1/2));if(this.snapAngle){this.angle+=this.snapAngle*(Math.PI/180);} +this.feature.geometry=OpenLayers.Geometry.Polygon.createRegularPolygon(this.origin,this.radius,this.sides,this.snapAngle);},modifyGeometry:function(){var angle,point;var ring=this.feature.geometry.components[0];if(ring.components.length!=(this.sides+1)){this.createGeometry();ring=this.feature.geometry.components[0];} +for(var i=0;i=0){symbolizer={Polygon:this.selectionSymbolizer['Polygon']};}else if(geometryAttribute.type.indexOf('LineString')>=0){symbolizer={Line:this.selectionSymbolizer['Line']};}else if(geometryAttribute.type.indexOf('Point')>=0){symbolizer={Point:this.selectionSymbolizer['Point']};} +var filter=filters[i];sld.namedLayers[name].userStyles.push({name:'default',rules:[new OpenLayers.Rule({symbolizer:symbolizer,filter:filter,maxScaleDenominator:layer.options.minScale})]});} +return new OpenLayers.Format.SLD({srsName:this.map.getProjection()}).write(sld);},parseDescribeLayer:function(request){var format=new OpenLayers.Format.WMSDescribeLayer();var doc=request.responseXML;if(!doc||!doc.documentElement){doc=request.responseText;} +var describeLayer=format.read(doc);var typeNames=[];var url=null;for(var i=0,len=describeLayer.length;i=0)||(type.indexOf('GeometryAssociationType')>=0)||(type.indexOf('GeometryPropertyType')>=0)||(type.indexOf('Point')>=0)||(type.indexOf('Polygon')>=0)){result.push(property);}}} +return result;},activate:function(){var activated=OpenLayers.Control.prototype.activate.call(this);if(activated){for(var i=0,len=this.layers.length;i=0){filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.DWITHIN,property:geometryAttribute.name,distance:this.map.getExtent().getWidth()*0.01,distanceUnits:this.map.getUnits(),value:geometry});}else{filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:geometryAttribute.name,value:geometry});}}else if(this.handler instanceof OpenLayers.Handler.Click){if(geometryAttribute.type.indexOf('Polygon')>=0){filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.INTERSECTS,property:geometryAttribute.name,value:geometry});}else{filter=new OpenLayers.Filter.Spatial({type:OpenLayers.Filter.Spatial.DWITHIN,property:geometryAttribute.name,distance:this.map.getExtent().getWidth()*0.01,distanceUnits:this.map.getUnits(),value:geometry});}} +return filter;},select:function(geometry){this._queue=function(){for(var i=0,len=this.layers.length;i=9500&&scale<=950000){scale=Math.round(scale/1000)+"K";}else if(scale>=950000){scale=Math.round(scale/1000000)+"M";}else{scale=Math.round(scale);} +this.element.innerHTML=OpenLayers.i18n("Scale = 1 : ${scaleDenom}",{'scaleDenom':scale});},CLASS_NAME:"OpenLayers.Control.Scale"});OpenLayers.Control.Button=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){},CLASS_NAME:"OpenLayers.Control.Button"});OpenLayers.Layer.MapGuide=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,useHttpTile:false,singleTile:false,useOverlay:false,useAsyncOverlay:true,TILE_PARAMS:{operation:'GETTILEIMAGE',version:'1.2.0'},SINGLE_TILE_PARAMS:{operation:'GETMAPIMAGE',format:'PNG',locale:'en',clip:'1',version:'1.0.0'},OVERLAY_PARAMS:{operation:'GETDYNAMICMAPOVERLAYIMAGE',format:'PNG',locale:'en',clip:'1',version:'2.0.0'},FOLDER_PARAMS:{tileColumnsPerFolder:30,tileRowsPerFolder:30,format:'png',querystring:null},defaultSize:new OpenLayers.Size(300,300),tileOriginCorner:"tl",initialize:function(name,url,params,options){OpenLayers.Layer.Grid.prototype.initialize.apply(this,arguments);if(options==null||options.isBaseLayer==null){this.isBaseLayer=((this.transparent!="true")&&(this.transparent!=true));} +if(options&&options.useOverlay!=null){this.useOverlay=options.useOverlay;} +if(this.singleTile){if(this.useOverlay){OpenLayers.Util.applyDefaults(this.params,this.OVERLAY_PARAMS);if(!this.useAsyncOverlay){this.params.version="1.0.0";}}else{OpenLayers.Util.applyDefaults(this.params,this.SINGLE_TILE_PARAMS);}}else{if(this.useHttpTile){OpenLayers.Util.applyDefaults(this.params,this.FOLDER_PARAMS);}else{OpenLayers.Util.applyDefaults(this.params,this.TILE_PARAMS);} +this.setTileSize(this.defaultSize);}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapGuide(this.name,this.url,this.params,this.getOptions());} +obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){var url;var center=bounds.getCenterLonLat();var mapSize=this.map.getSize();if(this.singleTile){var params={setdisplaydpi:OpenLayers.DOTS_PER_INCH,setdisplayheight:mapSize.h*this.ratio,setdisplaywidth:mapSize.w*this.ratio,setviewcenterx:center.lon,setviewcentery:center.lat,setviewscale:this.map.getScale()};if(this.useOverlay&&!this.useAsyncOverlay){var getVisParams={};getVisParams=OpenLayers.Util.extend(getVisParams,params);getVisParams.operation="GETVISIBLEMAPEXTENT";getVisParams.version="1.0.0";getVisParams.session=this.params.session;getVisParams.mapName=this.params.mapName;getVisParams.format='text/xml';url=this.getFullRequestString(getVisParams);OpenLayers.Request.GET({url:url,async:false});} +url=this.getFullRequestString(params);}else{var currentRes=this.map.getResolution();var colidx=Math.floor((bounds.left-this.maxExtent.left)/currentRes);colidx=Math.round(colidx/this.tileSize.w);var rowidx=Math.floor((this.maxExtent.top-bounds.top)/currentRes);rowidx=Math.round(rowidx/this.tileSize.h);if(this.useHttpTile){url=this.getImageFilePath({tilecol:colidx,tilerow:rowidx,scaleindex:this.resolutions.length-this.map.zoom-1});}else{url=this.getFullRequestString({tilecol:colidx,tilerow:rowidx,scaleindex:this.resolutions.length-this.map.zoom-1});}} +return url;},getFullRequestString:function(newParams,altUrl){var url=(altUrl==null)?this.url:altUrl;if(typeof url=="object"){url=url[Math.floor(Math.random()*url.length)];} +var requestString=url;var allParams=OpenLayers.Util.extend({},this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}} +var paramsString=OpenLayers.Util.getParameterString(allParams);paramsString=paramsString.replace(/,/g,"+");if(paramsString!=""){var lastServerChar=url.charAt(url.length-1);if((lastServerChar=="&")||(lastServerChar=="?")){requestString+=paramsString;}else{if(url.indexOf('?')==-1){requestString+='?'+paramsString;}else{requestString+='&'+paramsString;}}} +return requestString;},getImageFilePath:function(newParams,altUrl){var url=(altUrl==null)?this.url:altUrl;if(typeof url=="object"){url=url[Math.floor(Math.random()*url.length)];} +var requestString=url;var tileRowGroup="";var tileColGroup="";if(newParams.tilerow<0){tileRowGroup='-';} +if(newParams.tilerow==0){tileRowGroup+='0';}else{tileRowGroup+=Math.floor(Math.abs(newParams.tilerow/this.params.tileRowsPerFolder))*this.params.tileRowsPerFolder;} +if(newParams.tilecol<0){tileColGroup='-';} +if(newParams.tilecol==0){tileColGroup+='0';}else{tileColGroup+=Math.floor(Math.abs(newParams.tilecol/this.params.tileColumnsPerFolder))*this.params.tileColumnsPerFolder;} +var tilePath='/S'+Math.floor(newParams.scaleindex) ++'/'+this.params.basemaplayergroupname ++'/R'+tileRowGroup ++'/C'+tileColGroup ++'/'+(newParams.tilerow%this.params.tileRowsPerFolder) ++'_'+(newParams.tilecol%this.params.tileColumnsPerFolder) ++'.'+this.params.format;if(this.params.querystring){tilePath+="?"+this.params.querystring;} +requestString+=tilePath;return requestString;},calculateGridLayout:function(bounds,origin,resolution){var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left-origin.lon;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=origin.lon+tilecol*tilelon;var offsetlat=origin.lat-bounds.top+tilelat;var tilerow=Math.floor(offsetlat/tilelat)-this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=tilerowremain*this.tileSize.h;var tileoffsetlat=origin.lat-tilelat*tilerow;return{tilelon:tilelon,tilelat:tilelat,tileoffsetlon:tileoffsetlon,tileoffsetlat:tileoffsetlat,tileoffsetx:tileoffsetx,tileoffsety:tileoffsety};},CLASS_NAME:"OpenLayers.Layer.MapGuide"});OpenLayers.Control.Measure=OpenLayers.Class(OpenLayers.Control,{EVENT_TYPES:['measure','measurepartial'],handlerOptions:null,callbacks:null,displaySystem:'metric',geodesic:false,displaySystemUnits:{geographic:['dd'],english:['mi','ft','in'],metric:['km','m']},partialDelay:300,delayedTrigger:null,persist:false,immediate:false,initialize:function(handler,options){this.EVENT_TYPES=OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat(OpenLayers.Control.prototype.EVENT_TYPES);OpenLayers.Control.prototype.initialize.apply(this,[options]);var callbacks={done:this.measureComplete,point:this.measurePartial};if(this.immediate){callbacks.modify=this.measureImmediate;} +this.callbacks=OpenLayers.Util.extend(callbacks,this.callbacks);this.handlerOptions=OpenLayers.Util.extend({persist:this.persist},this.handlerOptions);this.handler=new handler(this,this.callbacks,this.handlerOptions);},deactivate:function(){this.cancelDelay();return OpenLayers.Control.prototype.deactivate.apply(this,arguments);},cancel:function(){this.cancelDelay();this.handler.cancel();},setImmediate:function(immediate){this.immediate=immediate;if(this.immediate){this.callbacks.modify=this.measureImmediate;}else{delete this.callbacks.modify;}},updateHandler:function(handler,options){var active=this.active;if(active){this.deactivate();} +this.handler=new handler(this,this.callbacks,options);if(active){this.activate();}},measureComplete:function(geometry){this.cancelDelay();this.measure(geometry,"measure");},measurePartial:function(point,geometry){this.cancelDelay();geometry=geometry.clone();if(this.handler.freehandMode(this.handler.evt)){this.measure(geometry,"measurepartial");}else{this.delayedTrigger=window.setTimeout(OpenLayers.Function.bind(function(){this.delayedTrigger=null;this.measure(geometry,"measurepartial");},this),this.partialDelay);}},measureImmediate:function(point,feature,drawing){if(drawing&&this.delayedTrigger===null&&!this.handler.freehandMode(this.handler.evt)){this.measure(feature.geometry,"measurepartial");}},cancelDelay:function(){if(this.delayedTrigger!==null){window.clearTimeout(this.delayedTrigger);this.delayedTrigger=null;}},measure:function(geometry,eventType){var stat,order;if(geometry.CLASS_NAME.indexOf('LineString')>-1){stat=this.getBestLength(geometry);order=1;}else{stat=this.getBestArea(geometry);order=2;} +this.events.triggerEvent(eventType,{measure:stat[0],units:stat[1],order:order,geometry:geometry});},getBestArea:function(geometry){var units=this.displaySystemUnits[this.displaySystem];var unit,area;for(var i=0,len=units.length;i1){break;}} +return[area,unit];},getArea:function(geometry,units){var area,geomUnits;if(this.geodesic){area=geometry.getGeodesicArea(this.map.getProjectionObject());geomUnits="m";}else{area=geometry.getArea();geomUnits=this.map.getUnits();} +var inPerDisplayUnit=OpenLayers.INCHES_PER_UNIT[units];if(inPerDisplayUnit){var inPerMapUnit=OpenLayers.INCHES_PER_UNIT[geomUnits];area*=Math.pow((inPerMapUnit/inPerDisplayUnit),2);} +return area;},getBestLength:function(geometry){var units=this.displaySystemUnits[this.displaySystem];var unit,length;for(var i=0,len=units.length;i1){break;}} +return[length,unit];},getLength:function(geometry,units){var length,geomUnits;if(this.geodesic){length=geometry.getGeodesicLength(this.map.getProjectionObject());geomUnits="m";}else{length=geometry.getLength();geomUnits=this.map.getUnits();} +var inPerDisplayUnit=OpenLayers.INCHES_PER_UNIT[units];if(inPerDisplayUnit){var inPerMapUnit=OpenLayers.INCHES_PER_UNIT[geomUnits];length*=(inPerMapUnit/inPerDisplayUnit);} +return length;},CLASS_NAME:"OpenLayers.Control.Measure"});OpenLayers.Layer.KaMap=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,units:null,resolution:OpenLayers.DOTS_PER_INCH,DEFAULT_PARAMS:{i:'jpeg',map:''},initialize:function(name,url,params,options){var newArguments=[];newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);this.params=OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);},getURL:function(bounds){bounds=this.adjustBounds(bounds);var mapRes=this.map.getResolution();var scale=Math.round((this.map.getScale()*10000))/10000;var pX=Math.round(bounds.left/mapRes);var pY=-Math.round(bounds.top/mapRes);return this.getFullRequestString({t:pY,l:pX,s:scale});},calculateGridLayout:function(bounds,origin,resolution){var tilelon=resolution*this.tileSize.w;var tilelat=resolution*this.tileSize.h;var offsetlon=bounds.left;var tilecol=Math.floor(offsetlon/tilelon)-this.buffer;var tilecolremain=offsetlon/tilelon-tilecol;var tileoffsetx=-tilecolremain*this.tileSize.w;var tileoffsetlon=tilecol*tilelon;var offsetlat=bounds.top;var tilerow=Math.ceil(offsetlat/tilelat)+this.buffer;var tilerowremain=tilerow-offsetlat/tilelat;var tileoffsety=-(tilerowremain+1)*this.tileSize.h;var tileoffsetlat=tilerow*tilelat;return{tilelon:tilelon,tilelat:tilelat,tileoffsetlon:tileoffsetlon,tileoffsetlat:tileoffsetlat,tileoffsetx:tileoffsetx,tileoffsety:tileoffsety};},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.KaMap(this.name,this.url,this.params,this.getOptions());} +obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);if(this.tileSize!=null){obj.tileSize=this.tileSize.clone();} +obj.grid=[];return obj;},getTileBounds:function(viewPortPx){var resolution=this.getResolution();var tileMapWidth=resolution*this.tileSize.w;var tileMapHeight=resolution*this.tileSize.h;var mapPoint=this.getLonLatFromViewPortPx(viewPortPx);var tileLeft=tileMapWidth*Math.floor(mapPoint.lon/tileMapWidth);var tileBottom=tileMapHeight*Math.floor(mapPoint.lat/tileMapHeight);return new OpenLayers.Bounds(tileLeft,tileBottom,tileLeft+tileMapWidth,tileBottom+tileMapHeight);},CLASS_NAME:"OpenLayers.Layer.KaMap"});OpenLayers.Popup.Framed=OpenLayers.Class(OpenLayers.Popup.Anchored,{imageSrc:null,imageSize:null,isAlphaImage:false,positionBlocks:null,blocks:null,fixedRelativePosition:false,initialize:function(id,lonlat,contentSize,contentHTML,anchor,closeBox,closeBoxCallback){OpenLayers.Popup.Anchored.prototype.initialize.apply(this,arguments);if(this.fixedRelativePosition){this.updateRelativePosition();this.calculateRelativePosition=function(px){return this.relativePosition;};} +this.contentDiv.style.position="absolute";this.contentDiv.style.zIndex=1;if(closeBox){this.closeDiv.style.zIndex=1;} +this.groupDiv.style.position="absolute";this.groupDiv.style.top="0px";this.groupDiv.style.left="0px";this.groupDiv.style.height="100%";this.groupDiv.style.width="100%";},destroy:function(){this.imageSrc=null;this.imageSize=null;this.isAlphaImage=null;this.fixedRelativePosition=false;this.positionBlocks=null;for(var i=0;ithis.maxGetUrlLength;if(this.imgDiv!=null){var nodeName=this.imgDiv.nodeName.toLowerCase();if((this.useIFrame&&nodeName=="img")||(!this.useIFrame&&nodeName=="div")){this.removeImgDiv();this.imgDiv=null;}} +if(this.useIFrame){if(this.imgDiv==null){var eventPane=document.createElement("div");if(OpenLayers.BROWSER_NAME=="msie"){eventPane.style.backgroundColor='#FFFFFF';eventPane.style.filter='chroma(color=#FFFFFF)';} +OpenLayers.Util.modifyDOMElement(eventPane,null,new OpenLayers.Pixel(0,0),this.layer.getImageSize(),"absolute");this.imgDiv=document.createElement("div");this.imgDiv.appendChild(eventPane);OpenLayers.Util.modifyDOMElement(this.imgDiv,this.id,null,this.layer.getImageSize(),"relative");this.imgDiv.className='olTileImage';this.frame.appendChild(this.imgDiv);this.layer.div.appendChild(this.frame);if(this.layer.opacity!=null){OpenLayers.Util.modifyDOMElement(this.imgDiv,null,null,null,null,null,null,this.layer.opacity);} +this.imgDiv.map=this.layer.map;} +this.imgDiv.viewRequestID=this.layer.map.viewRequestID;}else{OpenLayers.Tile.Image.prototype.initImgDiv.apply(this,arguments);}},createIFrame:function(){var id=this.id+'_iFrame';var iframe;if(OpenLayers.BROWSER_NAME=="msie"){iframe=document.createElement('':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='
',m="";if(f||!i)m+=''+g[b]+"";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='"}k||(l+=m+(f||!i||!j?" ":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+=''+c+"";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?" ":"")+m),l+="
",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&bd?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.20",window["DP_jQuery_"+dpuuid]=$})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.ui.progressbar.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("
").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.20"})})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.core.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +jQuery.effects||function(a,b){function c(b){var c;return b&&b.constructor==Array&&b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:(c=/rgba\(0, 0, 0, 0\)/.exec(b))?e.transparent:e[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function k(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function l(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&&!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){return a.isFunction(d)&&(e=d,d=null),this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class")||"";a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&&e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.20",save:function(a,b){for(var c=0;c
").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;return b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus(),c):b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];return a.fx.off||!i?h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)}):i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h
").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500);setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide(),b.callback&&b.callback.apply(e[0]),e.dequeue(),a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.fade.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.fold.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.size||15,g=!!b.options.horizFirst,h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d),c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),j=e=="show"!=g,k=j?["width","height"]:["height","width"],l=j?[i.width(),i.height()]:[i.height(),i.width()],m=/([0-9]+)%/.exec(f);m&&(f=parseInt(m[1],10)/100*l[e=="hide"?0:1]),e=="show"&&i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f,p[k[1]]=e=="show"?l[1]:0,i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){e=="hide"&&c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.highlight.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&&(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),e=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.20 - 2012-04-30 +* https://github.com/jquery/jquery-ui +* Includes: jquery.effects.pulsate.js +* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ +(function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show"),e=(b.options.times||5)*2-1,f=b.duration?b.duration/2:a.fx.speeds._default/2,g=c.is(":visible"),h=0;g||(c.css("opacity",0).show(),h=1),(d=="hide"&&g||d=="show"&&!g)&&e--;for(var i=0;i
').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);; \ No newline at end of file diff --git a/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js b/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js new file mode 100644 index 000000000..54d0c5309 --- /dev/null +++ b/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js @@ -0,0 +1,107 @@ +/* Copyright (c) 2011 by MapQuery Contributors (see AUTHORS for + * full list of contributors). Published under the MIT license. + * See https://github.com/mapquery/mapquery/blob/master/LICENSE for the + * full text of the license. */ + +/** +#jquery.mapquery.mqMousePosition.js +The file containing the mqMousePosition Widget + +### *$('selector')*.`mqMousePosition([options])` +_version added 0.1_ +####**Description**: create a widget to show the location under the mouse pointer + + + **options** + - **map**: the mapquery instance + - **precision**: the number of decimals (default 2) + - **x**: the label for the x-coordinate (default x) + - **y**: the label for the y-coordinate (default y) + + +>Returns: widget + + +The mqMousePosition allows us to show the coordinates under the mouse pointer + + + $('#mousepointer').mqMousePointer({ + map: '#map' + }); + + */ +(function($) { +$.template('mqMousePosition', + '
'+ + ''+ + '
'+ + '
'+ + '
'); + +$.widget("mapQuery.mqMousePosition", { + options: { + // The MapQuery instance + map: undefined, + + // The number of decimals for the coordinates + // default: 2 + // TODO: JCB20110630 use dynamic precision based on the pixel + // resolution, no need to configure precision + precision: 2, + + // The label of the x-value + // default: 'x' + x: 'x', + // The label of the y-value + // default: 'y' + y: 'y' + + }, + _create: function() { + var map; + var self = this; + var element = this.element; + var mousepos; + + //get the mapquery object + map = $(this.options.map).data('mapQuery'); + + map.bind("mousemove", + {widget:self,map:map}, + self._onMouseMove); + + + $.tmpl('mqMousePosition',{ + mouseposition:mousepos + }).appendTo(element); + + }, + _destroy: function() { + this.element.removeClass(' ui-widget ui-helper-clearfix ' + + 'ui-corner-all') + .empty(); + }, + _mouseMoved: function(data, element, map) { + var x = data.layerX; + var y = data.layerY; + var mapProjection = map.options.projection; + var displayProjection = map.options.projection; + //if the coordinates should be displayed in something else, + //set them via the map displayProjection option + var pos = map.olMap.getLonLatFromLayerPx(new OpenLayers.Pixel(x,y)); + if(map.options.displayProjection) { + displayProjection = map.options.displayProjection; + pos=pos.transform( + new OpenLayers.Projection(mapProjection), + new OpenLayers.Projection(displayProjection)); + } + $("#mq-mouseposition-x", element).html( + this.options.x+': '+pos.lon.toFixed(this.options.precision)); + $("#mq-mouseposition-y", element).html( + this.options.y+': '+pos.lat.toFixed(this.options.precision)); + }, + + _onMouseMove: function(evt, data) { + evt.data.widget._mouseMoved(data,evt.data.control,evt.data.map); + } +}); +})(jQuery); diff --git a/view/theme/diabook/js/jquery.tmpl.js b/view/theme/diabook/js/jquery.tmpl.js new file mode 100644 index 000000000..1c5b2d62f --- /dev/null +++ b/view/theme/diabook/js/jquery.tmpl.js @@ -0,0 +1,486 @@ +/* + * jQuery Templating Plugin + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + */ +(function( jQuery, undefined ){ + var oldManip = jQuery.fn.domManip, tmplItmAtt = "_tmplitem", htmlExpr = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /, + newTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = []; + + function newTmplItem( options, parentItem, fn, data ) { + // Returns a template item data structure for a new rendered instance of a template (a 'template item'). + // The content field is a hierarchical array of strings and nested items (to be + // removed and replaced by nodes field of dom elements, once inserted in DOM). + var newItem = { + data: data || (parentItem ? parentItem.data : {}), + _wrap: parentItem ? parentItem._wrap : null, + tmpl: null, + parent: parentItem || null, + nodes: [], + calls: tiCalls, + nest: tiNest, + wrap: tiWrap, + html: tiHtml, + update: tiUpdate + }; + if ( options ) { + jQuery.extend( newItem, options, { nodes: [], parent: parentItem } ); + } + if ( fn ) { + // Build the hierarchical content to be used during insertion into DOM + newItem.tmpl = fn; + newItem._ctnt = newItem._ctnt || newItem.tmpl( jQuery, newItem ); + newItem.key = ++itemKey; + // Keep track of new template item, until it is stored as jQuery Data on DOM element + (stack.length ? wrappedItems : newTmplItems)[itemKey] = newItem; + } + return newItem; + } + + // Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core). + jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" + }, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var ret = [], insert = jQuery( selector ), elems, i, l, tmplItems, + parent = this.length === 1 && this[0].parentNode; + + appendToTmplItems = newTmplItems || {}; + if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { + insert[ original ]( this[0] ); + ret = this; + } else { + for ( i = 0, l = insert.length; i < l; i++ ) { + cloneIndex = i; + elems = (i > 0 ? this.clone(true) : this).get(); + jQuery.fn[ original ].apply( jQuery(insert[i]), elems ); + ret = ret.concat( elems ); + } + cloneIndex = 0; + ret = this.pushStack( ret, name, insert.selector ); + } + tmplItems = appendToTmplItems; + appendToTmplItems = null; + jQuery.tmpl.complete( tmplItems ); + return ret; + }; + }); + + jQuery.fn.extend({ + // Use first wrapped element as template markup. + // Return wrapped set of template items, obtained by rendering template against data. + tmpl: function( data, options, parentItem ) { + return jQuery.tmpl( this[0], data, options, parentItem ); + }, + + // Find which rendered template item the first wrapped DOM element belongs to + tmplItem: function() { + return jQuery.tmplItem( this[0] ); + }, + + // Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template. + template: function( name ) { + return jQuery.template( name, this[0] ); + }, + + domManip: function( args, table, callback, options ) { + // This appears to be a bug in the appendTo, etc. implementation + // it should be doing .call() instead of .apply(). See #6227 + if ( args[0] && args[0].nodeType ) { + var dmArgs = jQuery.makeArray( arguments ), argsLength = args.length, i = 0, tmplItem; + while ( i < argsLength && !(tmplItem = jQuery.data( args[i++], "tmplItem" ))) {} + if ( argsLength > 1 ) { + dmArgs[0] = [jQuery.makeArray( args )]; + } + if ( tmplItem && cloneIndex ) { + dmArgs[2] = function( fragClone ) { + // Handler called by oldManip when rendered template has been inserted into DOM. + jQuery.tmpl.afterManip( this, fragClone, callback ); + }; + } + oldManip.apply( this, dmArgs ); + } else { + oldManip.apply( this, arguments ); + } + cloneIndex = 0; + if ( !appendToTmplItems ) { + jQuery.tmpl.complete( newTmplItems ); + } + return this; + } + }); + + jQuery.extend({ + // Return wrapped set of template items, obtained by rendering template against data. + tmpl: function( tmpl, data, options, parentItem ) { + var ret, topLevel = !parentItem; + if ( topLevel ) { + // This is a top-level tmpl call (not from a nested template using {{tmpl}}) + parentItem = topTmplItem; + tmpl = jQuery.template[tmpl] || jQuery.template( null, tmpl ); + wrappedItems = {}; // Any wrapped items will be rebuilt, since this is top level + } else if ( !tmpl ) { + // The template item is already associated with DOM - this is a refresh. + // Re-evaluate rendered template for the parentItem + tmpl = parentItem.tmpl; + newTmplItems[parentItem.key] = parentItem; + parentItem.nodes = []; + if ( parentItem.wrapped ) { + updateWrapped( parentItem, parentItem.wrapped ); + } + // Rebuild, without creating a new template item + return jQuery( build( parentItem, null, parentItem.tmpl( jQuery, parentItem ) )); + } + if ( !tmpl ) { + return []; // Could throw... + } + if ( typeof data === "function" ) { + data = data.call( parentItem || {} ); + } + if ( options && options.wrapped ) { + updateWrapped( options, options.wrapped ); + } + ret = jQuery.isArray( data ) ? + jQuery.map( data, function( dataItem ) { + return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null; + }) : + [ newTmplItem( options, parentItem, tmpl, data ) ]; + return topLevel ? jQuery( build( parentItem, null, ret ) ) : ret; + }, + + // Return rendered template item for an element. + tmplItem: function( elem ) { + var tmplItem; + if ( elem instanceof jQuery ) { + elem = elem[0]; + } + while ( elem && elem.nodeType === 1 && !(tmplItem = jQuery.data( elem, "tmplItem" )) && (elem = elem.parentNode) ) {} + return tmplItem || topTmplItem; + }, + + // Set: + // Use $.template( name, tmpl ) to cache a named template, + // where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc. + // Use $( "selector" ).template( name ) to provide access by name to a script block template declaration. + + // Get: + // Use $.template( name ) to access a cached template. + // Also $( selectorToScriptBlock ).template(), or $.template( null, templateString ) + // will return the compiled template, without adding a name reference. + // If templateString includes at least one HTML tag, $.template( templateString ) is equivalent + // to $.template( null, templateString ) + template: function( name, tmpl ) { + if (tmpl) { + // Compile template and associate with name + if ( typeof tmpl === "string" ) { + // This is an HTML string being passed directly in. + tmpl = buildTmplFn( tmpl ) + } else if ( tmpl instanceof jQuery ) { + tmpl = tmpl[0] || {}; + } + if ( tmpl.nodeType ) { + // If this is a template block, use cached copy, or generate tmpl function and cache. + tmpl = jQuery.data( tmpl, "tmpl" ) || jQuery.data( tmpl, "tmpl", buildTmplFn( tmpl.innerHTML )); + } + return typeof name === "string" ? (jQuery.template[name] = tmpl) : tmpl; + } + // Return named compiled template + return name ? (typeof name !== "string" ? jQuery.template( null, name ): + (jQuery.template[name] || + // If not in map, treat as a selector. (If integrated with core, use quickExpr.exec) + jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null; + }, + + encode: function( text ) { + // Do HTML encoding replacing < > & and ' and " by corresponding entities. + return ("" + text).split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'"); + } + }); + + jQuery.extend( jQuery.tmpl, { + tag: { + "tmpl": { + _default: { $2: "null" }, + open: "if($notnull_1){_=_.concat($item.nest($1,$2));}" + // tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions) + // This means that {{tmpl foo}} treats foo as a template (which IS a function). + // Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}. + }, + "wrap": { + _default: { $2: "null" }, + open: "$item.calls(_,$1,$2);_=[];", + close: "call=$item.calls();_=call._.concat($item.wrap(call,_));" + }, + "each": { + _default: { $2: "$index, $value" }, + open: "if($notnull_1){$.each($1a,function($2){with(this){", + close: "}});}" + }, + "if": { + open: "if(($notnull_1) && $1a){", + close: "}" + }, + "else": { + _default: { $1: "true" }, + open: "}else if(($notnull_1) && $1a){" + }, + "html": { + // Unecoded expression evaluation. + open: "if($notnull_1){_.push($1a);}" + }, + "=": { + // Encoded expression evaluation. Abbreviated form is ${}. + _default: { $1: "$data" }, + open: "if($notnull_1){_.push($.encode($1a));}" + }, + "!": { + // Comment tag. Skipped by parser + open: "" + } + }, + + // This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events + complete: function( items ) { + newTmplItems = {}; + }, + + // Call this from code which overrides domManip, or equivalent + // Manage cloning/storing template items etc. + afterManip: function afterManip( elem, fragClone, callback ) { + // Provides cloned fragment ready for fixup prior to and after insertion into DOM + var content = fragClone.nodeType === 11 ? + jQuery.makeArray(fragClone.childNodes) : + fragClone.nodeType === 1 ? [fragClone] : []; + + // Return fragment to original caller (e.g. append) for DOM insertion + callback.call( elem, fragClone ); + + // Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data. + storeTmplItems( content ); + cloneIndex++; + } + }); + + //========================== Private helper functions, used by code above ========================== + + function build( tmplItem, nested, content ) { + // Convert hierarchical content into flat string array + // and finally return array of fragments ready for DOM insertion + var frag, ret = content ? jQuery.map( content, function( item ) { + return (typeof item === "string") ? + // Insert template item annotations, to be converted to jQuery.data( "tmplItem" ) when elems are inserted into DOM. + (tmplItem.key ? item.replace( /(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + tmplItmAtt + "=\"" + tmplItem.key + "\" $2" ) : item) : + // This is a child template item. Build nested template. + build( item, tmplItem, item._ctnt ); + }) : + // If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}. + tmplItem; + if ( nested ) { + return ret; + } + + // top-level template + ret = ret.join(""); + + // Support templates which have initial or final text nodes, or consist only of text + // Also support HTML entities within the HTML markup. + ret.replace( /^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/, function( all, before, middle, after) { + frag = jQuery( middle ).get(); + + storeTmplItems( frag ); + if ( before ) { + frag = unencode( before ).concat(frag); + } + if ( after ) { + frag = frag.concat(unencode( after )); + } + }); + return frag ? frag : unencode( ret ); + } + + function unencode( text ) { + // Use createElement, since createTextNode will not render HTML entities correctly + var el = document.createElement( "div" ); + el.innerHTML = text; + return jQuery.makeArray(el.childNodes); + } + + // Generate a reusable function that will serve to render a template against data + function buildTmplFn( markup ) { + return new Function("jQuery","$item", + "var $=jQuery,call,_=[],$data=$item.data;" + + + // Introduce the data as local variables using with(){} + "with($data){_.push('" + + + // Convert the template into pure JavaScript + jQuery.trim(markup) + .replace( /([\\'])/g, "\\$1" ) + .replace( /[\r\t\n]/g, " " ) + .replace( /\$\{([^\}]*)\}/g, "{{= $1}}" ) + .replace( /\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g, + function( all, slash, type, fnargs, target, parens, args ) { + var tag = jQuery.tmpl.tag[ type ], def, expr, exprAutoFnDetect; + if ( !tag ) { + throw "Template command not found: " + type; + } + def = tag._default || []; + if ( parens && !/\w$/.test(target)) { + target += parens; + parens = ""; + } + if ( target ) { + target = unescape( target ); + args = args ? ("," + unescape( args ) + ")") : (parens ? ")" : ""); + // Support for target being things like a.toLowerCase(); + // In that case don't call with template item as 'this' pointer. Just evaluate... + expr = parens ? (target.indexOf(".") > -1 ? target + parens : ("(" + target + ").call($item" + args)) : target; + exprAutoFnDetect = parens ? expr : "(typeof(" + target + ")==='function'?(" + target + ").call($item):(" + target + "))"; + } else { + exprAutoFnDetect = expr = def.$1 || "null"; + } + fnargs = unescape( fnargs ); + return "');" + + tag[ slash ? "close" : "open" ] + .split( "$notnull_1" ).join( target ? "typeof(" + target + ")!=='undefined' && (" + target + ")!=null" : "true" ) + .split( "$1a" ).join( exprAutoFnDetect ) + .split( "$1" ).join( expr ) + .split( "$2" ).join( fnargs ? + fnargs.replace( /\s*([^\(]+)\s*(\((.*?)\))?/g, function( all, name, parens, params ) { + params = params ? ("," + params + ")") : (parens ? ")" : ""); + return params ? ("(" + name + ").call($item" + params) : all; + }) + : (def.$2||"") + ) + + "_.push('"; + }) + + "');}return _;" + ); + } + function updateWrapped( options, wrapped ) { + // Build the wrapped content. + options._wrap = build( options, true, + // Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string. + jQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()] + ).join(""); + } + + function unescape( args ) { + return args ? args.replace( /\\'/g, "'").replace(/\\\\/g, "\\" ) : null; + } + function outerHtml( elem ) { + var div = document.createElement("div"); + div.appendChild( elem.cloneNode(true) ); + return div.innerHTML; + } + + // Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance. + function storeTmplItems( content ) { + var keySuffix = "_" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m; + for ( i = 0, l = content.length; i < l; i++ ) { + if ( (elem = content[i]).nodeType !== 1 ) { + continue; + } + elems = elem.getElementsByTagName("*"); + for ( m = elems.length - 1; m >= 0; m-- ) { + processItemKey( elems[m] ); + } + processItemKey( elem ); + } + function processItemKey( el ) { + var pntKey, pntNode = el, pntItem, tmplItem, key; + // Ensure that each rendered template inserted into the DOM has its own template item, + if ( (key = el.getAttribute( tmplItmAtt ))) { + while ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { } + if ( pntKey !== key ) { + // The next ancestor with a _tmplitem expando is on a different key than this one. + // So this is a top-level element within this template item + // Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment. + pntNode = pntNode.parentNode ? (pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0)) : 0; + if ( !(tmplItem = newTmplItems[key]) ) { + // The item is for wrapped content, and was copied from the temporary parent wrappedItem. + tmplItem = wrappedItems[key]; + tmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode], null, true ); + tmplItem.key = ++itemKey; + newTmplItems[itemKey] = tmplItem; + } + if ( cloneIndex ) { + cloneTmplItem( key ); + } + } + el.removeAttribute( tmplItmAtt ); + } else if ( cloneIndex && (tmplItem = jQuery.data( el, "tmplItem" )) ) { + // This was a rendered element, cloned during append or appendTo etc. + // TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem. + cloneTmplItem( tmplItem.key ); + newTmplItems[tmplItem.key] = tmplItem; + pntNode = jQuery.data( el.parentNode, "tmplItem" ); + pntNode = pntNode ? pntNode.key : 0; + } + if ( tmplItem ) { + pntItem = tmplItem; + // Find the template item of the parent element. + // (Using !=, not !==, since pntItem.key is number, and pntNode may be a string) + while ( pntItem && pntItem.key != pntNode ) { + // Add this element as a top-level node for this rendered template item, as well as for any + // ancestor items between this item and the item of its parent element + pntItem.nodes.push( el ); + pntItem = pntItem.parent; + } + // Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering... + delete tmplItem._ctnt; + delete tmplItem._wrap; + // Store template item as jQuery data on the element + jQuery.data( el, "tmplItem", tmplItem ); + } + function cloneTmplItem( key ) { + key = key + keySuffix; + tmplItem = newClonedItems[key] = + (newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent, null, true )); + } + } + } + + //---- Helper functions for template item ---- + + function tiCalls( content, tmpl, data, options ) { + if ( !content ) { + return stack.pop(); + } + stack.push({ _: content, tmpl: tmpl, item:this, data: data, options: options }); + } + + function tiNest( tmpl, data, options ) { + // nested template, using {{tmpl}} tag + return jQuery.tmpl( jQuery.template( tmpl ), data, options, this ); + } + + function tiWrap( call, wrapped ) { + // nested template, using {{wrap}} tag + var options = call.options || {}; + options.wrapped = wrapped; + // Apply the template, which may incorporate wrapped content, + return jQuery.tmpl( jQuery.template( call.tmpl ), call.data, options, call.item ); + } + + function tiHtml( filter, textOnly ) { + var wrapped = this._wrap; + return jQuery.map( + jQuery( jQuery.isArray( wrapped ) ? wrapped.join("") : wrapped ).filter( filter || "*" ), + function(e) { + return textOnly ? + e.innerText || e.textContent : + e.outerHTML || outerHtml(e); + }); + } + + function tiUpdate() { + var coll = this.nodes; + jQuery.tmpl( null, null, null, this).insertBefore( coll[0] ); + jQuery( coll ).remove(); + } +})( jQuery ); diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 6a2e55179..f6c9dd7c1 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -223,6 +223,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; '; } @@ -390,7 +391,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a = get_app(); // comunity_profiles if($_COOKIE['close_profiles'] != "1") { - $aside['$comunity_profilest_title'] = t('Community Profiles'); + $aside['$comunity_profiles_title'] = t('Community Profiles'); $aside['$comunity_profiles_items'] = array(); $r = q("select gcontact.* from gcontact left join glink on glink.gcid = gcontact.id where glink.cid = 0 and glink.uid = 0 order by rand() limit 9"); @@ -603,12 +604,13 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $twitter['title'] = Array("", "".t('Last Tweets')."", "", ""); $aside['$twitter'] = $twitter; $TSearchTerm = get_pconfig(local_user(), 'diabook', 'TSearchTerm' ); - $aside['$submit'] = t('Submit'); + $aside['$sub'] = t('Submit'); $aside['$TSearchTerm'] = array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm); - $baseurl = $a->get_baseurl(); + $baseurl = $a->get_baseurl($ssl_state); $aside['$baseurl'] = $baseurl; - if (isset($_POST['diabook-settings-submit'])){ + if (isset($_POST['diabook-settings-sub']) && $_POST['diabook-settings-sub']!=''){ set_pconfig(local_user(), 'diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']); + header("Location: network"); } } //end twitter From 3d0a0b6abfcb2e2fcb28a0b415d026c25de260d5 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 7 May 2012 02:24:43 +0200 Subject: [PATCH 10/57] diabook-theme: add "Earth Layers"-box at right_side --- view/theme/diabook/communityhome.tpl | 34 ++++++-- view/theme/diabook/config.php | 21 ++++- .../js/jquery.mapquery.mqZoomSlider.js | 85 +++++++++++++++++++ view/theme/diabook/js/jquery.mousewheel.js | 84 ++++++++++++++++++ view/theme/diabook/theme.php | 63 +++++++++++--- view/theme/diabook/theme_settings.tpl | 6 ++ 6 files changed, 269 insertions(+), 24 deletions(-) create mode 100644 view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js create mode 100644 view/theme/diabook/js/jquery.mousewheel.js diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl index 1749181fc..eb4385722 100755 --- a/view/theme/diabook/communityhome.tpl +++ b/view/theme/diabook/communityhome.tpl @@ -8,6 +8,32 @@
+ +
@@ -17,6 +43,7 @@ {{ if $page }}
$page
{{ endif }} +
{{ if $comunity_profiles_title }} @@ -122,13 +149,6 @@ $nv.search
Data CC-By-SA by OpenStreetMap
- -
{{ endif }}
\ No newline at end of file diff --git a/view/theme/diabook/config.php b/view/theme/diabook/config.php index e6c2681e3..40a539079 100644 --- a/view/theme/diabook/config.php +++ b/view/theme/diabook/config.php @@ -14,8 +14,11 @@ function theme_content(&$a){ $resolution = get_pconfig(local_user(), 'diabook', 'resolution' ); $color = get_pconfig(local_user(), 'diabook', 'color' ); $TSearchTerm = get_pconfig(local_user(), 'diabook', 'TSearchTerm' ); + $ELZoom = get_pconfig(local_user(), 'diabook', 'ELZoom' ); + $ELPosX = get_pconfig(local_user(), 'diabook', 'ELPosX' ); + $ELPosY = get_pconfig(local_user(), 'diabook', 'ELPosY' ); - return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm); + return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY); } function theme_post(&$a){ @@ -28,6 +31,9 @@ function theme_post(&$a){ set_pconfig(local_user(), 'diabook', 'resolution', $_POST['diabook_resolution']); set_pconfig(local_user(), 'diabook', 'color', $_POST['diabook_color']); set_pconfig(local_user(), 'diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']); + set_pconfig(local_user(), 'diabook', 'ELZoom', $_POST['diabook_ELZoom']); + set_pconfig(local_user(), 'diabook', 'ELPosX', $_POST['diabook_ELPosX']); + set_pconfig(local_user(), 'diabook', 'ELPosY', $_POST['diabook_ELPosY']); } } @@ -38,8 +44,11 @@ function theme_admin(&$a){ $resolution = get_config('diabook', 'resolution' ); $color = get_config('diabook', 'color' ); $TSearchTerm = get_config('diabook', 'TSearchTerm' ); + $ELZoom = get_config('diabook', 'ELZoom' ); + $ELPosX = get_config('diabook', 'ELPosX' ); + $ELPosY = get_config('diabook', 'ELPosY' ); - return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm); + return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY); } function theme_admin_post(&$a){ @@ -49,11 +58,14 @@ function theme_admin_post(&$a){ set_config('diabook', 'resolution', $_POST['diabook_resolution']); set_config('diabook', 'color', $_POST['diabook_color']); set_config('diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']); + set_config('diabook', 'ELZoom', $_POST['diabook_ELZoom']); + set_config('diabook', 'ELPosX', $_POST['diabook_ELPosX']); + set_config('diabook', 'ELPosY', $_POST['diabook_ELPosY']); } } -function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSearchTerm){ +function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY){ $line_heights = array( "1.3"=>"1.3", "---"=>"---", @@ -100,6 +112,9 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear '$resolution' => array('diabook_resolution', t('Set resolution for middle column'), $resolution, '', $resolutions), '$color' => array('diabook_color', t('Set color scheme'), $color, '', $colors), '$TSearchTerm' => array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm), + '$ELZoom' => array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom), + '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX), + '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY), )); return $o; } diff --git a/view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js b/view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js new file mode 100644 index 000000000..ebdce3bf3 --- /dev/null +++ b/view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js @@ -0,0 +1,85 @@ +/* Copyright (c) 2011 by MapQuery Contributors (see AUTHORS for + * full list of contributors). Published under the MIT license. + * See https://github.com/mapquery/mapquery/blob/master/LICENSE for the + * full text of the license. */ + + +/** +#jquery.mapquery.mqZoomSlider.js +The file containing the mqZoomSlider Widget + +### *$('selector')*.`mqZoomSlider([options])` +_version added 0.1_ +####**Description**: create a widget to show a zoom slider + + + **options**: + - **map**: the mapquery instance + +>Returns: widget + + +The mqZoomSlider widget allows us to display a vertical zoom slider. + + + $('#zoomslider').mqZoomSlider({ + map: '#map' + }); + + */ +(function($) { +$.template('mqZoomSlider', + '
'+ + '
'+ + '
'); + +$.widget("mapQuery.mqZoomSlider", { + options: { + // The MapQuery instance + map: undefined + + }, + _create: function() { + var map; + var zoom; + var numzoomlevels; + var self = this; + var element = this.element; + + //get the mapquery object + map = $(this.options.map).data('mapQuery'); + + $.tmpl('mqZoomSlider').appendTo(element); + + numzoomlevels = map.options.numZoomLevels; + $(".mq-zoomslider-slider", element).slider({ + max: numzoomlevels, + min:2, + orientation: 'vertical', + step: 1, + value: numzoomlevels - map.center().zoom, + slide: function(event, ui) { + map.center({zoom:numzoomlevels-ui.value}); + }, + change: function(event, ui) { + map.center({zoom:numzoomlevels-ui.value}); + } + }); + map.bind("zoomend", + {widget:self,map:map,control:element}, + self._onZoomEnd); + + }, + _destroy: function() { + this.element.removeClass(' ui-widget ui-helper-clearfix ' + + 'ui-corner-all') + .empty(); + }, + _zoomEnd: function (element,map) { + var slider = element.find('.mq-zoomslider-slider'); + slider.slider('value',map.options.numZoomLevels-map.center().zoom); + }, + _onZoomEnd: function(evt) { + evt.data.widget._zoomEnd(evt.data.control,evt.data.map); + } +}); +})(jQuery); \ No newline at end of file diff --git a/view/theme/diabook/js/jquery.mousewheel.js b/view/theme/diabook/js/jquery.mousewheel.js new file mode 100644 index 000000000..f1d5f72fd --- /dev/null +++ b/view/theme/diabook/js/jquery.mousewheel.js @@ -0,0 +1,84 @@ +/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) + * Licensed under the MIT License (LICENSE.txt). + * + * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. + * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. + * Thanks to: Seamus Leahy for adding deltaX and deltaY + * + * Version: 3.0.6 + * + * Requires: 1.2.2+ + */ + +(function($) { + +var types = ['DOMMouseScroll', 'mousewheel']; + +if ($.event.fixHooks) { + for ( var i=types.length; i; ) { + $.event.fixHooks[ types[--i] ] = $.event.mouseHooks; + } +} + +$.event.special.mousewheel = { + setup: function() { + if ( this.addEventListener ) { + for ( var i=types.length; i; ) { + this.addEventListener( types[--i], handler, false ); + } + } else { + this.onmousewheel = handler; + } + }, + + teardown: function() { + if ( this.removeEventListener ) { + for ( var i=types.length; i; ) { + this.removeEventListener( types[--i], handler, false ); + } + } else { + this.onmousewheel = null; + } + } +}; + +$.fn.extend({ + mousewheel: function(fn) { + return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); + }, + + unmousewheel: function(fn) { + return this.unbind("mousewheel", fn); + } +}); + + +function handler(event) { + var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0; + event = $.event.fix(orgEvent); + event.type = "mousewheel"; + + // Old school scrollwheel delta + if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; } + if ( orgEvent.detail ) { delta = -orgEvent.detail/3; } + + // New school multidimensional scroll (touchpads) deltas + deltaY = delta; + + // Gecko + if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { + deltaY = 0; + deltaX = -1*delta; + } + + // Webkit + if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; } + if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; } + + // Add event and delta to the front of the arguments + args.unshift(event, delta, deltaX, deltaY); + + return ($.event.dispatch || $.event.handle).apply(this, args); +} + +})(jQuery); \ No newline at end of file diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index f6c9dd7c1..dc9800343 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.025) + * Version: (Version: 1.026) * Author: */ @@ -13,7 +13,7 @@ $a = get_app(); function diabook_init(&$a) { //print diabook-version for debugging -$diabook_version = "Diabook (Version: 1.025)"; +$diabook_version = "Diabook (Version: 1.026)"; $a->page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages @@ -114,7 +114,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a->page['htmlhead'] .= sprintf('', $imageresizeJS); //load jquery.ui.js - if($ccCookie != "9") { + if($ccCookie != "10") { $jqueryuiJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js"; $a->page['htmlhead'] .= sprintf('', $jqueryuiJS); } @@ -126,7 +126,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; } //load jquery.mapquery.js - $_COOKIE['close_mapquery'] = "1"; + if($_COOKIE['close_mapquery'] != "1") { $mqtmplJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.tmpl.js"; $a->page['htmlhead'] .= sprintf('', $mqtmplJS); @@ -136,8 +136,8 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a->page['htmlhead'] .= sprintf('', $openlayersJS); $mqmouseposJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqMousePosition.js"; $a->page['htmlhead'] .= sprintf('', $mqmouseposJS); - $mqzoomsliderJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqZoomSlider.js"; - $a->page['htmlhead'] .= sprintf('', $mqzoomsliderJS); + $mousewheelJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mousewheel.js"; + $a->page['htmlhead'] .= sprintf('', $mousewheelJS); } @@ -156,8 +156,23 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }); '; //check if mapquerybox is active and print - $_COOKIE['close_mapquery'] = "1"; + if($_COOKIE['close_mapquery'] != "1") { + $ELZoom=false; + $ELPosX=false; + $ELPosy=false; + $site_ELZoom = get_config("diabook", "ELZoom" ); + $site_ELPosX = get_config("diabook", "ELPosX" ); + $site_ELPosY = get_config("diabook", "ELPosY" ); + $ELZoom = get_pconfig(local_user(), "diabook", "ELZoom"); + $ELPosX = get_pconfig(local_user(), "diabook", "ELPosX"); + $ELPosY = get_pconfig(local_user(), "diabook", "ELPosY"); + if ($ELZoom===false) $ELZoom=$site_ELZoom; + if ($ELPosX===false) $ELPosX=$site_ELPosX; + if ($ELPosY===false) $ELPosY=$site_ELPosY; + if ($ELZoom===false) $ELZoom="0"; + if ($ELPosX===false) $ELPosX="0"; + if ($ELPosY===false) $ELPosY="0"; $a->page['htmlhead'] .= ' '; @@ -265,7 +285,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }); '; - if($ccCookie != "9") { + if($ccCookie != "10") { $a->page['htmlhead'] .= ' '; + $a->page['htmlhead'] .= <<< EOT + + +EOT; } @@ -171,7 +172,9 @@ function message_content(&$a) { $preselect = (isset($a->argv[2])?array($a->argv[2]):false); - $select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10); +// $select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10); + $select = ''; + $tpl = get_markup_template('prv_message.tpl'); $o .= replace_macros($tpl,array( '$header' => t('Send Private Message'), From b74a776162b86b6257acf0406e7df4da236c8f09 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 6 May 2012 20:06:39 -0700 Subject: [PATCH 15/57] I'll leave the private mail recipient autocomplete partially done. Need a good UI/JS person to finish it off. --- mod/message.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mod/message.php b/mod/message.php index 70b85b84c..6fa128808 100644 --- a/mod/message.php +++ b/mod/message.php @@ -23,7 +23,7 @@ function message_init(&$a) { From 8c2664083531daba2ad3cf3f77a4d9c968314e63 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 6 May 2012 23:06:21 -0700 Subject: [PATCH 18/57] reset permissions to forum default when adding forum delivery chain --- include/items.php | 14 ++++++++++++-- mod/message.php | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/include/items.php b/include/items.php index e9df9b00c..b1dc1708f 100644 --- a/include/items.php +++ b/include/items.php @@ -952,7 +952,7 @@ function tag_deliver($uid,$item_id) { $mention = false; - $u = q("select uid, nickname, language, username, email, `page-flags`, `notify-flags` from user where uid = %d limit 1", + $u = q("select * from user where uid = %d limit 1", intval($uid) ); if(! count($u)) @@ -1027,10 +1027,20 @@ function tag_deliver($uid,$item_id) { if(! count($c)) return; - q("update item set wall = 1, origin = 1, forum_mode = 1, `owner-name` = '%s', `owner-link` = '%s', `owner-avatar` = '%s' where id = %d limit 1", + // also reset all the privacy bits to the forum default permissions + + $private = ($u[0]['allow_cid'] || $u[0]['allow_gid'] || $u[0]['deny_cid'] || $u[0]['deny_gid']) ? 1 : 0; + + q("update item set wall = 1, origin = 1, forum_mode = 1, `owner-name` = '%s', `owner-link` = '%s', `owner-avatar` = '%s', + `private` = %d, `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s' where id = %d limit 1", dbesc($c[0]['name']), dbesc($c[0]['url']), dbesc($c[0]['thumb']), + intval($private), + dbesc($u[0]['allow_cid']), + dbesc($u[0]['allow_gid']), + dbesc($u[0]['deny_cid']), + dbesc($u[0]['deny_gid']), intval($item_id) ); diff --git a/mod/message.php b/mod/message.php index 6fa128808..867f199c4 100644 --- a/mod/message.php +++ b/mod/message.php @@ -24,7 +24,8 @@ function message_init(&$a) { ', $twitterJS); } //load jquery.mapquery.js - if($_COOKIE['close_mapquery'] != "1") { + if($close_mapquery != "1") { $mqtmplJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.tmpl.js"; $a->page['htmlhead'] .= sprintf('', $mqtmplJS); $mapqueryJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.core.js"; @@ -146,8 +206,9 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $(function() { $("a.lightbox").fancybox(); // Select all links with lightbox class - $("a.#twittersettings-link").fancybox({onClosed: function() { $("#twittersettings").attr("style","display: none;");}} ); - $("a.#mapcontrol-link").fancybox({onClosed: function() { $("#mapcontrol").attr("style","display: none;");}} ); + $("a#twittersettings-link").fancybox({onClosed: function() { $("#twittersettings").attr("style","display: none;");}} ); + $("a#mapcontrol-link").fancybox({onClosed: function() { $("#mapcontrol").attr("style","display: none;");}} ); + $("a#closeicon").fancybox({onClosed: function() { $("#boxsettings").attr("style","display: none;");}} ); }); $(window).load(function() { @@ -157,7 +218,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; '; //check if mapquerybox is active and print - if($_COOKIE['close_mapquery'] != "1") { + if($close_mapquery != "1") { $ELZoom=false; $ELPosX=false; $ELPosy=false; @@ -193,26 +254,24 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $("#mouseposition").mqMousePosition({ map: "#map2", - x:"lon", - y:"lat", - precision:2 + x:"", + y:"", + precision:4 }); map = $("#map2").mapQuery().data("mapQuery"); - textarea = document.getElementById("mapzoom"); - - + textarea = document.getElementById("id_diabook_ELZoom"); + $("#map2").bind("mousewheel", function(event, delta) { if (delta > 0 || delta < 0){ textarea.value = map.center().zoom; } }); - }; '; } //check if twitterbox is active and print - if($_COOKIE['close_twitter'] != "1") { + if($close_twitter != "1") { $TSearchTerm=false; $site_TSearchTerm = get_config("diabook", "TSearchTerm" ); $TSearchTerm = get_pconfig(local_user(), "diabook", "TSearchTerm"); @@ -261,25 +320,14 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a->page['htmlhead'] .= ' ';} if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){ $a->page['htmlhead'] .= ' ';} } //end js scripts @@ -410,7 +414,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; function diabook_community_info() { $a = get_app(); // comunity_profiles - if($_COOKIE['close_profiles'] != "1") { + if($close_profiles != "1") { $aside['$comunity_profiles_title'] = t('Community Profiles'); $aside['$comunity_profiles_items'] = array(); $r = q("select gcontact.* from gcontact left join glink on glink.gcid = gcontact.id @@ -431,7 +435,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }} // last 12 users - if($_COOKIE['close_lastusers'] != "1") { + if($close_lastusers != "1") { $aside['$lastusers_title'] = t('Last users'); $aside['$lastusers_items'] = array(); $sql_extra = ""; @@ -460,7 +464,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }} // last 10 liked items - if($_COOKIE['close_lastlikes'] != "1") { + if($close_lastlikes != "1") { $aside['$like_title'] = t('Last likes'); $aside['$like_items'] = array(); $r = q("SELECT `T1`.`created`, `T1`.`liker`, `T1`.`liker-link`, `item`.* FROM @@ -505,7 +509,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }} // last 12 photos - if($_COOKIE['close_photos'] != "1") { + if($close_photos != "1") { $aside['$photos_title'] = t('Last photos'); $aside['$photos_items'] = array(); $r = q("SELECT `photo`.`id`, `photo`.`resource-id`, `photo`.`scale`, `photo`.`desc`, `user`.`nickname`, `user`.`username` FROM @@ -540,7 +544,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }} //right_aside FIND FRIENDS - if($_COOKIE['close_friends'] != "1") { + if($close_friends != "1") { if(local_user()) { $nv = array(); $nv['title'] = Array("", t('Find Friends'), "", ""); @@ -561,10 +565,10 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }} //Community_Pages at right_aside - if($_COOKIE['close_pages'] != "1") { + if($close_pages != "1") { if(local_user()) { $page = ' -

'.t("Community Pages").'

+

'.t("Community Pages").'

    '; $pagelist = array(); @@ -597,19 +601,16 @@ if ($color=="dark") $color_path = "/diabook-dark/"; //mapquery - if($_COOKIE['close_mapquery'] != "1") { + if($close_mapquery != "1") { $mapquery = array(); $mapquery['title'] = Array("", "".t('Earth Layers')."", "", ""); $aside['$mapquery'] = $mapquery; $ELZoom = get_pconfig(local_user(), 'diabook', 'ELZoom' ); $ELPosX = get_pconfig(local_user(), 'diabook', 'ELPosX' ); $ELPosY = get_pconfig(local_user(), 'diabook', 'ELPosY' ); - $aside['$sub'] = t('Submit'); $aside['$ELZoom'] = array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom); $aside['$ELPosX'] = array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX); $aside['$ELPosY'] = array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY); - $baseurl = $a->get_baseurl($ssl_state); - $aside['$baseurl'] = $baseurl; if (isset($_POST['diabook-settings-map-sub']) && $_POST['diabook-settings-map-sub']!=''){ set_pconfig(local_user(), 'diabook', 'ELZoom', $_POST['diabook_ELZoom']); set_pconfig(local_user(), 'diabook', 'ELPosX', $_POST['diabook_ELPosX']); @@ -618,28 +619,27 @@ if ($color=="dark") $color_path = "/diabook-dark/"; } } //end mapquery - + //helpers - if($_COOKIE['close_helpers'] != "1") { + if($close_helpers != "1") { $helpers = array(); $helpers['title'] = Array("", t('Help or @NewHere ?'), "", ""); $aside['$helpers'] = $helpers; } //end helpers //connectable services - if($_COOKIE['close_services'] != "1") { + if($close_services != "1") { $con_services = array(); $con_services['title'] = Array("", t('Connect Services'), "", ""); $aside['$con_services'] = $con_services; } //end connectable services //twitter - if($_COOKIE['close_twitter'] != "1") { + if($close_twitter != "1") { $twitter = array(); $twitter['title'] = Array("", "".t('Last Tweets')."", "", ""); $aside['$twitter'] = $twitter; $TSearchTerm = get_pconfig(local_user(), 'diabook', 'TSearchTerm' ); - $aside['$sub'] = t('Submit'); $aside['$TSearchTerm'] = array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm); $baseurl = $a->get_baseurl($ssl_state); $aside['$baseurl'] = $baseurl; @@ -649,7 +649,55 @@ if ($color=="dark") $color_path = "/diabook-dark/"; } } //end twitter - $close = t('Close'); + if($ccCookie != "10") { + $close_pages = get_pconfig(local_user(), 'diabook', 'close_pages' ); + $close_mapquery = get_pconfig(local_user(), 'diabook', 'close_mapquery' ); + $close_profiles = get_pconfig(local_user(), 'diabook', 'close_profiles' ); + $close_helpers = get_pconfig(local_user(), 'diabook', 'close_helpers' ); + $close_services = get_pconfig(local_user(), 'diabook', 'close_services' ); + $close_friends = get_pconfig(local_user(), 'diabook', 'close_friends' ); + $close_twitter = get_pconfig(local_user(), 'diabook', 'close_twitter' ); + $close_lastusers = get_pconfig(local_user(), 'diabook', 'close_lastusers' ); + $close_lastphotos = get_pconfig(local_user(), 'diabook', 'close_lastphotos' ); + $close_lastlikes = get_pconfig(local_user(), 'diabook', 'close_lastlikes' ); + $close_pagesC = array('1'=>'hide', '0'=>'show',); + $close_mapqueryC = array('1'=>'hide', '0'=>'show',); + $close_profilesC = array('0'=>'show', '1'=>'hide',); + $close_helpersC = array('0'=>'show', '1'=>'hide',); + $close_servicesC = array('0'=>'show', '1'=>'hide',); + $close_friendsC = array('0'=>'show', '1'=>'hide',); + $close_twitterC = array('1'=>'hide', '0'=>'show',); + $close_lastusersC = array('0'=>'show', '1'=>'hide',); + $close_lastphotosC = array('0'=>'show','1'=>'hide',); + $close_lastlikesC = array('0'=>'show', '1'=>'hide',); + $aside['$close_pages'] = array('diabook_close_pages', t('Show "Cummunity Pages" at right-hand coloumn?'), $close_pages, '', $close_pagesC); + $aside['$close_mapquery'] = array('diabook_close_mapquery', t('Show "Earth Layers" at right-hand coloumn?'), $close_mapquery, '', $close_mapqueryC); + $aside['$close_profiles'] = array('diabook_close_profiles', t('Show "Cummunity Profiles" at right-hand coloumn?'), $close_profiles, '', $close_profilesC); + $aside['$close_helpers'] = array('diabook_close_helpers', t('Show "Help or @NewHere" at right-hand coloumn?'), $close_helpers, '', $close_helpersC); + $aside['$close_services'] = array('diabook_close_services', t('Show "Connect Services" at right-hand coloumn?'), $close_services, '', $close_servicesC); + $aside['$close_friends'] = array('diabook_close_friends', t('Show "Find Friends" at right-hand coloumn?'), $close_friends, '', $close_friendsC); + $aside['$close_twitter'] = array('diabook_close_twitter', t('Show "Last Tweets" at right-hand coloumn?'), $close_twitter, '', $close_twitterC); + $aside['$close_lastusers'] = array('diabook_close_lastusers', t('Show "Last Users" at right-hand coloumn?'), $close_lastusers, '', $close_lastusersC); + $aside['$close_lastphotos'] = array('diabook_close_lastphotos', t('Show "Last Photos" at right-hand coloumn?'), $close_lastphotos, '', $close_lastphotosC); + $aside['$close_lastlikes'] = array('diabook_close_lastlikes', t('Show "Last Likes" at right-hand coloumn?'), $close_lastlikes, '', $close_lastlikesC); + $aside['$sub'] = t('Submit'); + $baseurl = $a->get_baseurl($ssl_state); + $aside['$baseurl'] = $baseurl; + if (isset($_POST['diabook-settings-box-sub']) && $_POST['diabook-settings-box-sub']!=''){ + set_pconfig(local_user(), 'diabook', 'close_pages', $_POST['diabook_close_pages']); + set_pconfig(local_user(), 'diabook', 'close_mapquery', $_POST['diabook_close_mapquery']); + set_pconfig(local_user(), 'diabook', 'close_profiles', $_POST['diabook_close_profiles']); + set_pconfig(local_user(), 'diabook', 'close_helpers', $_POST['diabook_close_helpers']); + set_pconfig(local_user(), 'diabook', 'close_services', $_POST['diabook_close_services']); + set_pconfig(local_user(), 'diabook', 'close_friends', $_POST['diabook_close_friends']); + set_pconfig(local_user(), 'diabook', 'close_twitter', $_POST['diabook_close_twitter']); + set_pconfig(local_user(), 'diabook', 'close_lastusers', $_POST['diabook_close_lastusers']); + set_pconfig(local_user(), 'diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']); + set_pconfig(local_user(), 'diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']); + header("Location: network"); + } + } + $close = t('Settings'); $aside['$close'] = $close; //get_baseurl $url = $a->get_baseurl($ssl_state); diff --git a/view/theme/diabook/theme_settings.tpl b/view/theme/diabook/theme_settings.tpl index 27122857c..68b22a168 100644 --- a/view/theme/diabook/theme_settings.tpl +++ b/view/theme/diabook/theme_settings.tpl @@ -14,11 +14,26 @@ {{inc field_input.tpl with $field=$ELZoom}}{{endinc}} -
    -Restore right-hand column +
    +
    +{{inc field_select.tpl with $field=$close_pages}}{{endinc}} +{{inc field_select.tpl with $field=$close_profiles}}{{endinc}} +{{inc field_select.tpl with $field=$close_helpers}}{{endinc}} +{{inc field_select.tpl with $field=$close_services}}{{endinc}} +{{inc field_select.tpl with $field=$close_friends}}{{endinc}} +{{inc field_select.tpl with $field=$close_lastusers}}{{endinc}} +{{inc field_select.tpl with $field=$close_lastphotos}}{{endinc}} +{{inc field_select.tpl with $field=$close_lastlikes}}{{endinc}} +{{inc field_select.tpl with $field=$close_twitter}}{{endinc}} +{{inc field_select.tpl with $field=$close_mapquery}}{{endinc}} +
    + + From f0b7a8ae35c67f2440c3c3574451f52e5126fa68 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 7 May 2012 18:36:28 -0700 Subject: [PATCH 24/57] finished dry run - now for real test --- include/queue_fn.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/queue_fn.php b/include/queue_fn.php index 613571c84..2aca338f5 100644 --- a/include/queue_fn.php +++ b/include/queue_fn.php @@ -21,7 +21,9 @@ function was_recently_delayed($cid) { and last > UTC_TIMESTAMP() - interval 15 minute limit 1", intval($cid) ); - + if(count($r)) + return true; + return false; } From df3574663944f50820e2d50cfb9d87f505ceff54 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 7 May 2012 23:09:57 -0700 Subject: [PATCH 25/57] make mod-follow hookable (e.g. service class limits) and also begin to prepare it for functionalisation --- mod/follow.php | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/mod/follow.php b/mod/follow.php index ae8cb200c..4a7f99bf0 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -10,7 +10,10 @@ function follow_init(&$a) { // NOTREACHED } + $uid = local_user(); $url = $orig_url = notags(trim($_REQUEST['url'])); + $return_url = $_SESSION['return_url']; + // remove ajax junk, e.g. Twitter @@ -18,19 +21,25 @@ function follow_init(&$a) { if(! allowed_url($url)) { notice( t('Disallowed profile URL.') . EOL); - goaway($_SESSION['return_url']); + goaway($return_url); // NOTREACHED } if(! $url) { notice( t('Connect URL missing.') . EOL); - goaway($_SESSION['return_url']); + goaway($return_url); // NOTREACHED } + $arr = array('url' => $url, 'contact' => array()); - $ret = probe_url($url); + call_hooks('follow', $arr); + + if(x($arr['contact'],'name')) + $ret = $arr['contact']; + else + $ret = probe_url($url); if($ret['network'] === NETWORK_DFRN) { if(strlen($a->path)) @@ -46,11 +55,11 @@ function follow_init(&$a) { if(get_config('system','dfrn_only')) { notice( t('This site is not configured to allow communications with other networks.') . EOL); notice( t('No compatible communication protocols or feeds were discovered.') . EOL); - goaway($_SESSION['return_url']); + goaway($return_url); } } - // This just confuses things, remove it + // This extra param just confuses things, remove it if($ret['network'] === NETWORK_DIASPORA) $ret['url'] = str_replace('?absolute=true','',$ret['url']); @@ -65,9 +74,11 @@ function follow_init(&$a) { notice( t('An author or name was not found.') . EOL); if(! x($ret,'url')) notice( t('No browser URL could be matched to this address.') . EOL); - if(strpos($url,'@') !== false) - notice('Unable to match @-style Identity Address with a known protocol or email contact'); - goaway($_SESSION['return_url']); + if(strpos($url,'@') !== false) { + notice( t('Unable to match @-style Identity Address with a known protocol or email contact.') . EOL); + notice( t('Use mailto: in front of address to force email check.') . EOL); + } + goaway($return_url); } if($ret['network'] === NETWORK_OSTATUS && get_config('system','ostatus_disabled')) { @@ -94,7 +105,7 @@ function follow_init(&$a) { // indirect links or webfinger links $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `poll` = '%s' LIMIT 1", - intval(local_user()), + intval($uid), dbesc($ret['poll']) ); @@ -104,7 +115,7 @@ function follow_init(&$a) { q("UPDATE `contact` SET `rel` = %d , `readonly` = 0 WHERE `id` = %d AND `uid` = %d LIMIT 1", intval(CONTACT_IS_FRIEND), intval($r[0]['id']), - intval(local_user()) + intval($uid) ); } } @@ -118,7 +129,7 @@ function follow_init(&$a) { $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `alias`, `batch`, `notify`, `poll`, `poco`, `name`, `nick`, `photo`, `network`, `pubkey`, `rel`, `priority`, `writable`, `hidden`, `blocked`, `readonly`, `pending` ) VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, 0, 0, 0 ) ", - intval(local_user()), + intval($uid), dbesc(datetime_convert()), dbesc($ret['url']), dbesc(normalise_link($ret['url'])), @@ -142,12 +153,12 @@ function follow_init(&$a) { $r = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1", dbesc($ret['url']), - intval(local_user()) + intval($uid) ); if(! count($r)) { notice( t('Unable to retrieve contact information.') . EOL); - goaway($_SESSION['return_url']); + goaway($return_url); // NOTREACHED } @@ -156,7 +167,7 @@ function follow_init(&$a) { require_once("Photo.php"); - $photos = import_profile_photo($ret['photo'],local_user(),$contact_id); + $photos = import_profile_photo($ret['photo'],$uid,$contact_id); $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', @@ -200,7 +211,7 @@ function follow_init(&$a) { $r = q("SELECT `contact`.*, `user`.* FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid` WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1", - intval(local_user()) + intval($uid) ); if(count($r)) { @@ -215,9 +226,9 @@ function follow_init(&$a) { } } - if(strstr($_SESSION['return_url'],'contacts')) + if(strstr($return_url,'contacts')) goaway($a->get_baseurl() . '/contacts/' . $contact_id); - goaway($_SESSION['return_url']); + goaway($return_url); // NOTREACHED } From d2c206308401bdcbb3fc94c0623eafde3b942240 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 8 May 2012 09:56:05 +0200 Subject: [PATCH 26/57] DE update for the strings --- view/de/messages.po | 692 +++++++++++++++++++++++--------------------- view/de/strings.php | 37 +-- 2 files changed, 380 insertions(+), 349 deletions(-) diff --git a/view/de/messages.po b/view/de/messages.po index 409a967bd..d7de20cec 100644 --- a/view/de/messages.po +++ b/view/de/messages.po @@ -19,8 +19,8 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: http://bugs.friendica.com/\n" -"POT-Creation-Date: 2012-05-02 10:00-0700\n" -"PO-Revision-Date: 2012-05-04 05:22+0000\n" +"POT-Creation-Date: 2012-05-06 10:00-0700\n" +"PO-Revision-Date: 2012-05-08 07:06+0000\n" "Last-Translator: bavatar \n" "Language-Team: German (http://www.transifex.net/projects/p/friendica/language/de/)\n" "MIME-Version: 1.0\n" @@ -47,7 +47,7 @@ msgid "Contact update failed." msgstr "Konnte den Kontakt nicht aktualisieren." #: ../../mod/crepair.php:115 ../../mod/wall_attach.php:44 -#: ../../mod/fsuggest.php:78 ../../mod/events.php:110 ../../mod/api.php:26 +#: ../../mod/fsuggest.php:78 ../../mod/events.php:138 ../../mod/api.php:26 #: ../../mod/api.php:31 ../../mod/photos.php:130 ../../mod/photos.php:865 #: ../../mod/editpost.php:10 ../../mod/install.php:171 #: ../../mod/notifications.php:66 ../../mod/contacts.php:125 @@ -63,12 +63,11 @@ msgstr "Konnte den Kontakt nicht aktualisieren." #: ../../mod/profile_photo.php:163 ../../mod/message.php:38 #: ../../mod/message.php:90 ../../mod/allfriends.php:9 #: ../../mod/nogroup.php:25 ../../mod/wall_upload.php:53 -#: ../../mod/follow.php:8 ../../mod/common.php:9 ../../mod/display.php:138 -#: ../../mod/profiles.php:7 ../../mod/profiles.php:365 -#: ../../mod/delegate.php:6 ../../mod/suggest.php:28 ../../mod/invite.php:13 -#: ../../mod/invite.php:81 ../../mod/dfrn_confirm.php:53 -#: ../../addon/facebook/facebook.php:485 ../../include/items.php:3187 -#: ../../index.php:306 +#: ../../mod/follow.php:8 ../../mod/display.php:138 ../../mod/profiles.php:7 +#: ../../mod/profiles.php:365 ../../mod/delegate.php:6 +#: ../../mod/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81 +#: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:495 +#: ../../include/items.php:3192 ../../index.php:306 msgid "Permission denied." msgstr "Zugriff verweigert." @@ -98,7 +97,7 @@ msgid "Return to contact editor" msgstr "Zurück zum Kontakteditor" #: ../../mod/crepair.php:148 ../../mod/settings.php:541 -#: ../../mod/settings.php:567 ../../mod/admin.php:638 ../../mod/admin.php:647 +#: ../../mod/settings.php:567 ../../mod/admin.php:640 ../../mod/admin.php:649 msgid "Name" msgstr "Name" @@ -135,17 +134,17 @@ msgid "New photo from this URL" msgstr "Neues Foto von dieser URL" #: ../../mod/crepair.php:166 ../../mod/fsuggest.php:107 -#: ../../mod/events.php:400 ../../mod/photos.php:900 ../../mod/photos.php:958 +#: ../../mod/events.php:428 ../../mod/photos.php:900 ../../mod/photos.php:958 #: ../../mod/photos.php:1193 ../../mod/photos.php:1233 #: ../../mod/photos.php:1273 ../../mod/photos.php:1304 #: ../../mod/install.php:251 ../../mod/install.php:289 #: ../../mod/localtime.php:45 ../../mod/contacts.php:322 #: ../../mod/settings.php:539 ../../mod/settings.php:685 #: ../../mod/settings.php:746 ../../mod/settings.php:940 -#: ../../mod/manage.php:109 ../../mod/group.php:85 ../../mod/admin.php:400 -#: ../../mod/admin.php:635 ../../mod/admin.php:771 ../../mod/admin.php:970 -#: ../../mod/admin.php:1057 ../../mod/profiles.php:534 -#: ../../mod/invite.php:119 ../../addon/facebook/facebook.php:575 +#: ../../mod/manage.php:109 ../../mod/group.php:85 ../../mod/admin.php:402 +#: ../../mod/admin.php:637 ../../mod/admin.php:773 ../../mod/admin.php:972 +#: ../../mod/admin.php:1059 ../../mod/profiles.php:534 +#: ../../mod/invite.php:119 ../../addon/facebook/facebook.php:597 #: ../../addon/yourls/yourls.php:76 ../../addon/ljpost/ljpost.php:93 #: ../../addon/nsfw/nsfw.php:57 ../../addon/planets/planets.php:158 #: ../../addon/uhremotestorage/uhremotestorage.php:89 @@ -170,8 +169,9 @@ msgstr "Neues Foto von dieser URL" #: ../../addon/twitter/twitter.php:209 ../../addon/twitter/twitter.php:375 #: ../../addon/irc/irc.php:55 ../../addon/blogger/blogger.php:102 #: ../../addon/posterous/posterous.php:90 -#: ../../view/theme/cleanzero/config.php:71 -#: ../../view/theme/diabook/config.php:91 +#: ../../view/theme/cleanzero/config.php:80 +#: ../../view/theme/diabook/theme.php:590 +#: ../../view/theme/diabook/config.php:95 #: ../../view/theme/quattro/config.php:52 ../../view/theme/dispy/config.php:70 #: ../../include/conversation.php:555 msgid "Submit" @@ -215,78 +215,78 @@ msgstr "Kontakte vorschlagen" msgid "Suggest a friend for %s" msgstr "Schlage %s einen Kontakt vor" -#: ../../mod/events.php:62 +#: ../../mod/events.php:65 msgid "Event description and start time are required." msgstr "Ereignis Beschreibung und Startzeit sind erforderlich." -#: ../../mod/events.php:230 +#: ../../mod/events.php:258 msgid "l, F j" msgstr "l, F j" -#: ../../mod/events.php:252 +#: ../../mod/events.php:280 msgid "Edit event" msgstr "Veranstaltung bearbeiten" -#: ../../mod/events.php:272 ../../include/text.php:1053 +#: ../../mod/events.php:300 ../../include/text.php:1054 msgid "link to source" msgstr "Link zum Originalbeitrag" -#: ../../mod/events.php:296 ../../view/theme/diabook/theme.php:274 +#: ../../mod/events.php:324 ../../view/theme/diabook/theme.php:69 #: ../../include/nav.php:52 ../../boot.php:1493 msgid "Events" msgstr "Veranstaltungen" -#: ../../mod/events.php:297 +#: ../../mod/events.php:325 msgid "Create New Event" msgstr "Neue Veranstaltung erstellen" -#: ../../mod/events.php:298 +#: ../../mod/events.php:326 msgid "Previous" msgstr "Vorherige" -#: ../../mod/events.php:299 ../../mod/install.php:210 +#: ../../mod/events.php:327 ../../mod/install.php:210 msgid "Next" msgstr "Nächste" -#: ../../mod/events.php:371 +#: ../../mod/events.php:399 msgid "hour:minute" msgstr "Stunde:Minute" -#: ../../mod/events.php:380 +#: ../../mod/events.php:408 msgid "Event details" msgstr "Veranstaltungsdetails" -#: ../../mod/events.php:381 +#: ../../mod/events.php:409 #, php-format msgid "Format is %s %s. Starting date and Description are required." msgstr "Format ist %s %s. Anfangsdatum und Beschreibung sind notwendig." -#: ../../mod/events.php:383 +#: ../../mod/events.php:411 msgid "Event Starts:" msgstr "Veranstaltungsbeginn:" -#: ../../mod/events.php:386 +#: ../../mod/events.php:414 msgid "Finish date/time is not known or not relevant" msgstr "Enddatum/-zeit ist nicht bekannt oder nicht relevant" -#: ../../mod/events.php:388 +#: ../../mod/events.php:416 msgid "Event Finishes:" msgstr "Veranstaltungsende:" -#: ../../mod/events.php:391 +#: ../../mod/events.php:419 msgid "Adjust for viewer timezone" msgstr "An Zeitzone des Betrachters anpassen" -#: ../../mod/events.php:393 +#: ../../mod/events.php:421 msgid "Description:" msgstr "Beschreibung" -#: ../../mod/events.php:395 ../../include/event.php:37 +#: ../../mod/events.php:423 ../../include/event.php:37 #: ../../include/bb2diaspora.php:260 ../../boot.php:1092 msgid "Location:" msgstr "Ort:" -#: ../../mod/events.php:397 +#: ../../mod/events.php:425 msgid "Share this event" msgstr "Veranstaltung teilen" @@ -364,7 +364,7 @@ msgstr "Fotoalben" #: ../../mod/photos.php:51 ../../mod/photos.php:151 ../../mod/photos.php:879 #: ../../mod/photos.php:950 ../../mod/photos.php:965 ../../mod/photos.php:1382 #: ../../mod/photos.php:1394 ../../addon/communityhome/communityhome.php:110 -#: ../../view/theme/diabook/theme.php:155 +#: ../../view/theme/diabook/theme.php:485 msgid "Contact Photos" msgstr "Kontaktbilder" @@ -387,7 +387,7 @@ msgstr "Kontaktinformationen nicht verfügbar" #: ../../mod/profile_photo.php:74 ../../mod/profile_photo.php:174 #: ../../mod/profile_photo.php:252 ../../mod/profile_photo.php:261 #: ../../addon/communityhome/communityhome.php:111 -#: ../../view/theme/diabook/theme.php:156 +#: ../../view/theme/diabook/theme.php:486 msgid "Profile Photos" msgstr "Profilbilder" @@ -409,7 +409,7 @@ msgstr "wurde getaggt in einem" #: ../../mod/photos.php:528 ../../mod/like.php:127 ../../mod/tagger.php:70 #: ../../addon/communityhome/communityhome.php:163 -#: ../../view/theme/diabook/theme.php:127 ../../include/text.php:1304 +#: ../../view/theme/diabook/theme.php:457 ../../include/text.php:1305 #: ../../include/diaspora.php:1654 ../../include/conversation.php:53 #: ../../include/conversation.php:126 msgid "photo" @@ -568,7 +568,7 @@ msgid "Preview" msgstr "Vorschau" #: ../../mod/photos.php:1331 ../../mod/settings.php:602 -#: ../../mod/settings.php:683 ../../mod/group.php:168 ../../mod/admin.php:642 +#: ../../mod/settings.php:683 ../../mod/group.php:168 ../../mod/admin.php:644 #: ../../include/conversation.php:318 ../../include/conversation.php:584 msgid "Delete" msgstr "Löschen" @@ -585,7 +585,7 @@ msgstr "Neueste Fotos" msgid "Not available." msgstr "Nicht verfügbar." -#: ../../mod/community.php:30 ../../view/theme/diabook/theme.php:276 +#: ../../mod/community.php:30 ../../view/theme/diabook/theme.php:71 #: ../../include/nav.php:101 msgid "Community" msgstr "Gemeinschaft" @@ -1228,7 +1228,7 @@ msgstr "Netzwerk" msgid "Personal" msgstr "Persönlich" -#: ../../mod/notifications.php:90 ../../view/theme/diabook/theme.php:270 +#: ../../mod/notifications.php:90 ../../view/theme/diabook/theme.php:65 #: ../../include/nav.php:77 ../../include/nav.php:115 msgid "Home" msgstr "Pinnwand" @@ -1277,7 +1277,7 @@ msgid "if applicable" msgstr "falls anwendbar" #: ../../mod/notifications.php:157 ../../mod/notifications.php:204 -#: ../../mod/admin.php:640 +#: ../../mod/admin.php:642 msgid "Approve" msgstr "Genehmigen" @@ -1466,7 +1466,7 @@ msgstr "Kontakte vorschlagen" msgid "Network type: %s" msgstr "Netzwerk Typ: %s" -#: ../../mod/contacts.php:280 +#: ../../mod/contacts.php:280 ../../include/contact_widgets.php:183 #, php-format msgid "%d contact in common" msgid_plural "%d contacts in common" @@ -1478,12 +1478,12 @@ msgid "View all contacts" msgstr "Alle Kontakte anzeigen" #: ../../mod/contacts.php:290 ../../mod/contacts.php:347 -#: ../../mod/admin.php:644 +#: ../../mod/admin.php:646 msgid "Unblock" msgstr "Entsperren" #: ../../mod/contacts.php:290 ../../mod/contacts.php:347 -#: ../../mod/admin.php:643 +#: ../../mod/admin.php:645 msgid "Block" msgstr "Sperren" @@ -1576,7 +1576,7 @@ msgstr "letzte Aktualisierung:" msgid "Update public posts" msgstr "Öffentliche Beiträge aktualisieren" -#: ../../mod/contacts.php:344 ../../mod/admin.php:1115 +#: ../../mod/contacts.php:344 ../../mod/admin.php:1117 msgid "Update now" msgstr "Jetzt aktualisieren" @@ -1669,7 +1669,7 @@ msgstr "du bist Fan von" msgid "Edit contact" msgstr "Kontakt bearbeiten" -#: ../../mod/contacts.php:544 ../../view/theme/diabook/theme.php:272 +#: ../../mod/contacts.php:544 ../../view/theme/diabook/theme.php:67 #: ../../include/nav.php:139 msgid "Contacts" msgstr "Kontakte" @@ -1703,8 +1703,8 @@ msgstr "Anfrage zum Zurücksetzen des Passworts auf %s erhalten" #: ../../mod/lostpass.php:45 ../../mod/lostpass.php:107 #: ../../mod/register.php:388 ../../mod/register.php:442 #: ../../mod/regmod.php:54 ../../mod/dfrn_confirm.php:742 -#: ../../addon/facebook/facebook.php:658 -#: ../../addon/facebook/facebook.php:1148 +#: ../../addon/facebook/facebook.php:680 +#: ../../addon/facebook/facebook.php:1170 #: ../../addon/testdrive/testdrive.php:58 ../../include/items.php:2716 #: ../../boot.php:686 msgid "Administrator" @@ -1788,7 +1788,7 @@ msgstr "Persönliche Daten exportieren" msgid "Remove account" msgstr "Account entfernen" -#: ../../mod/settings.php:88 ../../mod/admin.php:730 ../../mod/admin.php:935 +#: ../../mod/settings.php:88 ../../mod/admin.php:732 ../../mod/admin.php:937 #: ../../addon/mathjax/mathjax.php:36 ../../include/nav.php:137 msgid "Settings" msgstr "Einstellungen" @@ -1841,7 +1841,7 @@ msgstr " Keine gültige E-Mail." msgid " Cannot change to that email." msgstr "Ändern der E-Mail nicht möglich. " -#: ../../mod/settings.php:468 ../../addon/facebook/facebook.php:470 +#: ../../mod/settings.php:468 ../../addon/facebook/facebook.php:480 #: ../../addon/impressum/impressum.php:77 #: ../../addon/openstreetmap/openstreetmap.php:80 #: ../../addon/mathjax/mathjax.php:66 ../../addon/piwik/piwik.php:105 @@ -2015,7 +2015,7 @@ msgstr "Maximal 100 Beiträge" msgid "Don't show emoticons" msgstr "Keine Smilies anzeigen" -#: ../../mod/settings.php:821 ../../mod/admin.php:180 ../../mod/admin.php:616 +#: ../../mod/settings.php:821 ../../mod/admin.php:180 ../../mod/admin.php:618 msgid "Normal Account" msgstr "Normaler Account" @@ -2023,7 +2023,7 @@ msgstr "Normaler Account" msgid "This account is a normal personal profile" msgstr "Dieser Account ist ein normales persönliches Profil" -#: ../../mod/settings.php:825 ../../mod/admin.php:181 ../../mod/admin.php:617 +#: ../../mod/settings.php:825 ../../mod/admin.php:181 ../../mod/admin.php:619 msgid "Soapbox Account" msgstr "Sandkasten-Account" @@ -2031,7 +2031,7 @@ msgstr "Sandkasten-Account" msgid "Automatically approve all connection/friend requests as read-only fans" msgstr "Kontaktanfragen werden automatisch als Nurlese-Fans akzeptiert" -#: ../../mod/settings.php:829 ../../mod/admin.php:182 ../../mod/admin.php:618 +#: ../../mod/settings.php:829 ../../mod/admin.php:182 ../../mod/admin.php:620 msgid "Community/Celebrity Account" msgstr "Gemeinschafts/Promi-Account" @@ -2040,7 +2040,7 @@ msgid "" "Automatically approve all connection/friend requests as read-write fans" msgstr "Kontaktanfragen werden automatisch als Lese-und-Schreib-Fans akzeptiert" -#: ../../mod/settings.php:833 ../../mod/admin.php:183 ../../mod/admin.php:619 +#: ../../mod/settings.php:833 ../../mod/admin.php:183 ../../mod/admin.php:621 msgid "Automatic Friend Account" msgstr "Automatischer Freundesaccount" @@ -2371,7 +2371,7 @@ msgid "Personal Notes" msgstr "Persönliche Notizen" #: ../../mod/notes.php:63 ../../mod/filer.php:30 -#: ../../addon/facebook/facebook.php:726 +#: ../../addon/facebook/facebook.php:748 #: ../../addon/privacy_image_cache/privacy_image_cache.php:147 #: ../../include/text.php:652 msgid "Save" @@ -2615,7 +2615,7 @@ msgstr "Ungültiger Profil-Bezeichner" msgid "Profile Visibility Editor" msgstr "Editor für die Profil-Sichtbarkeit" -#: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:271 +#: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:66 #: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:74 #: ../../include/nav.php:50 ../../boot.php:1478 msgid "Profile" @@ -2766,7 +2766,7 @@ msgstr "Mitgliedschaft auf dieser Seite ist nur nach vorheriger Einladung mögli msgid "Your invitation ID: " msgstr "ID deiner Einladung: " -#: ../../mod/register.php:553 ../../mod/admin.php:401 +#: ../../mod/register.php:553 ../../mod/admin.php:403 msgid "Registration" msgstr "Registrierung" @@ -2798,19 +2798,19 @@ msgid "People Search" msgstr "Personen Suche" #: ../../mod/like.php:127 ../../mod/tagger.php:70 -#: ../../addon/facebook/facebook.php:1542 +#: ../../addon/facebook/facebook.php:1564 #: ../../addon/communityhome/communityhome.php:158 #: ../../addon/communityhome/communityhome.php:167 -#: ../../view/theme/diabook/theme.php:122 -#: ../../view/theme/diabook/theme.php:131 ../../include/diaspora.php:1654 +#: ../../view/theme/diabook/theme.php:452 +#: ../../view/theme/diabook/theme.php:461 ../../include/diaspora.php:1654 #: ../../include/conversation.php:48 ../../include/conversation.php:57 #: ../../include/conversation.php:121 ../../include/conversation.php:130 msgid "status" msgstr "Status" -#: ../../mod/like.php:144 ../../addon/facebook/facebook.php:1546 +#: ../../mod/like.php:144 ../../addon/facebook/facebook.php:1568 #: ../../addon/communityhome/communityhome.php:172 -#: ../../view/theme/diabook/theme.php:136 ../../include/diaspora.php:1670 +#: ../../view/theme/diabook/theme.php:466 ../../include/diaspora.php:1670 #: ../../include/conversation.php:65 #, php-format msgid "%1$s likes %2$s's %3$s" @@ -2822,8 +2822,8 @@ msgid "%1$s doesn't like %2$s's %3$s" msgstr "%1$s mag %2$ss %3$s nicht" #: ../../mod/notice.php:15 ../../mod/viewsrc.php:15 ../../mod/admin.php:156 -#: ../../mod/admin.php:679 ../../mod/admin.php:878 ../../mod/display.php:37 -#: ../../mod/display.php:142 ../../include/items.php:3099 +#: ../../mod/admin.php:681 ../../mod/admin.php:880 ../../mod/display.php:37 +#: ../../mod/display.php:142 ../../include/items.php:3074 msgid "Item not found." msgstr "Beitrag nicht gefunden." @@ -2831,7 +2831,7 @@ msgstr "Beitrag nicht gefunden." msgid "Access denied." msgstr "Zugriff verweigert." -#: ../../mod/fbrowser.php:23 ../../view/theme/diabook/theme.php:273 +#: ../../mod/fbrowser.php:23 ../../view/theme/diabook/theme.php:68 #: ../../include/nav.php:51 ../../boot.php:1484 msgid "Photos" msgstr "Bilder" @@ -2867,29 +2867,29 @@ msgstr "Leerer Beitrag wurde verworfen." msgid "Wall Photos" msgstr "Pinnwand-Bilder" -#: ../../mod/item.php:762 +#: ../../mod/item.php:781 msgid "System error. Post not saved." msgstr "Systemfehler. Beitrag konnte nicht gespeichert werden." -#: ../../mod/item.php:787 +#: ../../mod/item.php:806 #, php-format msgid "" "This message was sent to you by %s, a member of the Friendica social " "network." msgstr "Diese Nachricht wurde dir von %s geschickt, einem Mitglied des Sozialen Netzwerks Friendica." -#: ../../mod/item.php:789 +#: ../../mod/item.php:808 #, php-format msgid "You may visit them online at %s" msgstr "Du kannst sie online unter %s besuchen" -#: ../../mod/item.php:790 +#: ../../mod/item.php:809 msgid "" "Please contact the sender by replying to this post if you do not wish to " "receive these messages." msgstr "Falls du diese Beiträge nicht erhalten möchtest, kontaktiere bitte den Autor, indem du auf diese Nachricht antwortest." -#: ../../mod/item.php:792 +#: ../../mod/item.php:811 #, php-format msgid "%s posted an update." msgstr "%s hat ein Update veröffentlicht." @@ -3054,19 +3054,19 @@ msgstr "Keine Freunde zum Anzeigen." msgid "Theme settings updated." msgstr "Themen Einstellungen aktualisiert." -#: ../../mod/admin.php:96 ../../mod/admin.php:399 +#: ../../mod/admin.php:96 ../../mod/admin.php:401 msgid "Site" msgstr "Seite" -#: ../../mod/admin.php:97 ../../mod/admin.php:634 ../../mod/admin.php:646 +#: ../../mod/admin.php:97 ../../mod/admin.php:636 ../../mod/admin.php:648 msgid "Users" msgstr "Nutzer" -#: ../../mod/admin.php:98 ../../mod/admin.php:728 ../../mod/admin.php:770 +#: ../../mod/admin.php:98 ../../mod/admin.php:730 ../../mod/admin.php:772 msgid "Plugins" msgstr "Plugins" -#: ../../mod/admin.php:99 ../../mod/admin.php:933 ../../mod/admin.php:969 +#: ../../mod/admin.php:99 ../../mod/admin.php:935 ../../mod/admin.php:971 msgid "Themes" msgstr "Themen" @@ -3078,7 +3078,7 @@ msgstr "DB Updates" msgid "Software Update" msgstr "Software Update" -#: ../../mod/admin.php:115 ../../mod/admin.php:1056 +#: ../../mod/admin.php:115 ../../mod/admin.php:1058 msgid "Logs" msgstr "Protokolle" @@ -3086,9 +3086,9 @@ msgstr "Protokolle" msgid "User registrations waiting for confirmation" msgstr "Nutzeranmeldungen die auf Bestätigung warten" -#: ../../mod/admin.php:195 ../../mod/admin.php:398 ../../mod/admin.php:633 -#: ../../mod/admin.php:727 ../../mod/admin.php:769 ../../mod/admin.php:932 -#: ../../mod/admin.php:968 ../../mod/admin.php:1055 +#: ../../mod/admin.php:195 ../../mod/admin.php:400 ../../mod/admin.php:635 +#: ../../mod/admin.php:729 ../../mod/admin.php:771 ../../mod/admin.php:934 +#: ../../mod/admin.php:970 ../../mod/admin.php:1057 msgid "Administration" msgstr "Administration" @@ -3112,483 +3112,493 @@ msgstr "Version" msgid "Active plugins" msgstr "Aktive Plugins" -#: ../../mod/admin.php:337 +#: ../../mod/admin.php:339 msgid "Site settings updated." msgstr "Seiteneinstellungen aktualisiert." -#: ../../mod/admin.php:385 +#: ../../mod/admin.php:387 msgid "Closed" msgstr "Geschlossen" -#: ../../mod/admin.php:386 +#: ../../mod/admin.php:388 msgid "Requires approval" msgstr "Bedarf der Zustimmung" -#: ../../mod/admin.php:387 +#: ../../mod/admin.php:389 msgid "Open" msgstr "Offen" -#: ../../mod/admin.php:391 +#: ../../mod/admin.php:393 msgid "No SSL policy, links will track page SSL state" msgstr "Keine SSL Richtlinie, Links werden das verwendete Protokoll beibehalten" -#: ../../mod/admin.php:392 +#: ../../mod/admin.php:394 msgid "Force all links to use SSL" msgstr "SSL für alle Links erzwingen" -#: ../../mod/admin.php:393 +#: ../../mod/admin.php:395 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "Selbst-unterzeichnetes Zertifikat, SSL nur für lokale Links verwenden (nicht empfohlen)" -#: ../../mod/admin.php:402 +#: ../../mod/admin.php:404 msgid "File upload" msgstr "Datei hochladen" -#: ../../mod/admin.php:403 +#: ../../mod/admin.php:405 msgid "Policies" msgstr "Regeln" -#: ../../mod/admin.php:404 +#: ../../mod/admin.php:406 msgid "Advanced" msgstr "Erweitert" -#: ../../mod/admin.php:408 ../../addon/statusnet/statusnet.php:544 +#: ../../mod/admin.php:410 ../../addon/statusnet/statusnet.php:544 msgid "Site name" msgstr "Seitenname" -#: ../../mod/admin.php:409 +#: ../../mod/admin.php:411 msgid "Banner/Logo" msgstr "Banner/Logo" -#: ../../mod/admin.php:410 +#: ../../mod/admin.php:412 msgid "System language" msgstr "Systemsprache" -#: ../../mod/admin.php:411 +#: ../../mod/admin.php:413 msgid "System theme" msgstr "Systemweites Thema" -#: ../../mod/admin.php:411 +#: ../../mod/admin.php:413 msgid "" "Default system theme - may be over-ridden by user profiles - change theme settings" msgstr "Vorgabe für das System-Theme - kann von Benutzerprofilen überschrieben werden - Theme-Einstellungen ändern" -#: ../../mod/admin.php:412 +#: ../../mod/admin.php:414 msgid "SSL link policy" msgstr "Regeln für SSL Links" -#: ../../mod/admin.php:412 +#: ../../mod/admin.php:414 msgid "Determines whether generated links should be forced to use SSL" msgstr "Bestimmt, ob generierte Links SSL verwenden müssen" -#: ../../mod/admin.php:413 +#: ../../mod/admin.php:415 msgid "Maximum image size" msgstr "Maximale Größe von Bildern" -#: ../../mod/admin.php:413 +#: ../../mod/admin.php:415 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "Maximale Upload-Größe von Bildern in Bytes. Standard ist 0, d.h. ohne Limit." -#: ../../mod/admin.php:415 +#: ../../mod/admin.php:417 msgid "Register policy" msgstr "Registrierungsmethode" -#: ../../mod/admin.php:416 +#: ../../mod/admin.php:418 msgid "Register text" msgstr "Registrierungstext" -#: ../../mod/admin.php:416 +#: ../../mod/admin.php:418 msgid "Will be displayed prominently on the registration page." msgstr "Wird gut sichtbar auf der Registrierungs-Seite angezeigt." -#: ../../mod/admin.php:417 +#: ../../mod/admin.php:419 msgid "Accounts abandoned after x days" msgstr "Accounts gelten nach x Tagen als unbenutzt" -#: ../../mod/admin.php:417 +#: ../../mod/admin.php:419 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "Verschwende keine System-Ressourcen auf das Pollen externer Seiten, wenn Accounts nicht mehr benutzt werden. 0 eingeben für kein Limit." -#: ../../mod/admin.php:418 +#: ../../mod/admin.php:420 msgid "Allowed friend domains" msgstr "Erlaubte Domains für Kontakte" -#: ../../mod/admin.php:418 +#: ../../mod/admin.php:420 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "Liste der Domains, die für Freundschaften erlaubt sind, durch Kommas getrennt. Platzhalter werden akzeptiert. Leer lassen, um alle Domains zu erlauben." -#: ../../mod/admin.php:419 +#: ../../mod/admin.php:421 msgid "Allowed email domains" msgstr "Erlaubte Domains für Emails" -#: ../../mod/admin.php:419 +#: ../../mod/admin.php:421 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "Liste der Domains, die für E-Mail-Adressen bei der Registrierung erlaubt sind, durch Kommas getrennt. Platzhalter werden akzeptiert. Leer lassen, um alle Domains zu erlauben." -#: ../../mod/admin.php:420 +#: ../../mod/admin.php:422 msgid "Block public" msgstr "Öffentlichen Zugriff blockieren" -#: ../../mod/admin.php:420 +#: ../../mod/admin.php:422 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "Klicken, um öffentlichen Zugriff auf sonst öffentliche Profile zu blockieren, wenn man nicht eingeloggt ist." -#: ../../mod/admin.php:421 +#: ../../mod/admin.php:423 msgid "Force publish" msgstr "Erzwinge Veröffentlichung" -#: ../../mod/admin.php:421 +#: ../../mod/admin.php:423 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "Klicken, um Anzeige aller Profile dieses Servers im Verzeichnis zu erzwingen." -#: ../../mod/admin.php:422 +#: ../../mod/admin.php:424 msgid "Global directory update URL" msgstr "URL für Updates beim weltweiten Verzeichnis" -#: ../../mod/admin.php:422 +#: ../../mod/admin.php:424 msgid "" "URL to update the global directory. If this is not set, the global directory" " is completely unavailable to the application." msgstr "URL für Update des globalen Verzeichnisses. Wenn nichts eingetragen ist, bleibt das globale Verzeichnis unerreichbar." -#: ../../mod/admin.php:424 +#: ../../mod/admin.php:426 msgid "Block multiple registrations" msgstr "Unterbinde Mehrfachregistrierung" -#: ../../mod/admin.php:424 +#: ../../mod/admin.php:426 msgid "Disallow users to register additional accounts for use as pages." msgstr "Benutzern nicht erlauben, weitere Accounts als zusätzliche Profile anzulegen." -#: ../../mod/admin.php:425 +#: ../../mod/admin.php:427 msgid "OpenID support" msgstr "OpenID Unterstützung" -#: ../../mod/admin.php:425 +#: ../../mod/admin.php:427 msgid "OpenID support for registration and logins." msgstr "OpenID-Unterstützung für Registrierung und Login." -#: ../../mod/admin.php:426 +#: ../../mod/admin.php:428 msgid "Fullname check" msgstr "Namen auf Vollständigkeit überprüfen" -#: ../../mod/admin.php:426 +#: ../../mod/admin.php:428 msgid "" "Force users to register with a space between firstname and lastname in Full " "name, as an antispam measure" msgstr "Leerzeichen zwischen Vor- und Nachname im vollständigen Namen erzwingen, um SPAM zu vermeiden." -#: ../../mod/admin.php:427 +#: ../../mod/admin.php:429 msgid "UTF-8 Regular expressions" msgstr "UTF-8 Reguläre Ausdrücke" -#: ../../mod/admin.php:427 +#: ../../mod/admin.php:429 msgid "Use PHP UTF8 regular expressions" msgstr "PHP UTF8 Ausdrücke verwenden" -#: ../../mod/admin.php:428 +#: ../../mod/admin.php:430 msgid "Show Community Page" msgstr "Gemeinschaftsseite anzeigen" -#: ../../mod/admin.php:428 +#: ../../mod/admin.php:430 msgid "" "Display a Community page showing all recent public postings on this site." msgstr "Zeige die Gemeinschaftsseite mit allen öffentlichen Beiträgen auf diesem Server." -#: ../../mod/admin.php:429 +#: ../../mod/admin.php:431 msgid "Enable OStatus support" msgstr "OStatus Unterstützung aktivieren" -#: ../../mod/admin.php:429 +#: ../../mod/admin.php:431 msgid "" "Provide built-in OStatus (identi.ca, status.net, etc.) compatibility. All " "communications in OStatus are public, so privacy warnings will be " "occasionally displayed." msgstr "Biete die eingebaute OStatus (identi.ca, status.net, etc.) Unterstützung an. Jede Kommunikation in OStatus ist öffentlich, so Privatsphäre Warnungen werden bei Bedarf angezeigt." -#: ../../mod/admin.php:430 +#: ../../mod/admin.php:432 msgid "Enable Diaspora support" msgstr "Diaspora-Support aktivieren" -#: ../../mod/admin.php:430 +#: ../../mod/admin.php:432 msgid "Provide built-in Diaspora network compatibility." msgstr "Verwende die eingebaute Diaspora-Verknüpfung." -#: ../../mod/admin.php:431 +#: ../../mod/admin.php:433 msgid "Only allow Friendica contacts" msgstr "Nur Friendica-Kontakte erlauben" -#: ../../mod/admin.php:431 +#: ../../mod/admin.php:433 msgid "" "All contacts must use Friendica protocols. All other built-in communication " "protocols disabled." msgstr "Alle Kontakte müssen das Friendica Protokoll nutzen. Alle anderen Kommunikationsprotokolle werden deaktiviert." -#: ../../mod/admin.php:432 +#: ../../mod/admin.php:434 msgid "Verify SSL" msgstr "SSL Überprüfen" -#: ../../mod/admin.php:432 +#: ../../mod/admin.php:434 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you" " cannot connect (at all) to self-signed SSL sites." msgstr "Wenn gewollt, kann man hier eine strenge Zertifikat Kontrolle einstellen. Das bedeutet, dass man zu keinen Seiten mit selbst unterzeichnetem SSL eine Verbindung herstellen kann." -#: ../../mod/admin.php:433 +#: ../../mod/admin.php:435 msgid "Proxy user" msgstr "Proxy Nutzer" -#: ../../mod/admin.php:434 +#: ../../mod/admin.php:436 msgid "Proxy URL" msgstr "Proxy URL" -#: ../../mod/admin.php:435 +#: ../../mod/admin.php:437 msgid "Network timeout" msgstr "Netzwerk Wartezeit" -#: ../../mod/admin.php:435 +#: ../../mod/admin.php:437 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "Der Wert ist in Sekunden. Setze 0 für unbegrenzt (nicht empfohlen)." -#: ../../mod/admin.php:436 +#: ../../mod/admin.php:438 msgid "Delivery interval" msgstr "Zustellungsintervall" -#: ../../mod/admin.php:436 +#: ../../mod/admin.php:438 msgid "" "Delay background delivery processes by this many seconds to reduce system " "load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 " "for large dedicated servers." msgstr "Verzögere im Hintergrund laufende Auslieferungsprozesse um die angegebene Anzahl an Sekunden um die Systemlast zu verringern. Empfehlungen: 4-5 für Shared-Hosts, 2-3 für VPS, 0-1 für große dedizierte Server." -#: ../../mod/admin.php:451 +#: ../../mod/admin.php:439 +msgid "Maximum Load Average" +msgstr "Maximum Load Average" + +#: ../../mod/admin.php:439 +msgid "" +"Maximum system load before delivery and poll processes are deferred - " +"default 50." +msgstr "" + +#: ../../mod/admin.php:453 msgid "Update has been marked successful" msgstr "Update wurde als erfolgreich markiert" -#: ../../mod/admin.php:461 +#: ../../mod/admin.php:463 #, php-format msgid "Executing %s failed. Check system logs." msgstr "Ausführung von %s schlug fehl. Systemprotokolle prüfen." -#: ../../mod/admin.php:464 +#: ../../mod/admin.php:466 #, php-format msgid "Update %s was successfully applied." msgstr "Update %s war erfolgreich." -#: ../../mod/admin.php:468 +#: ../../mod/admin.php:470 #, php-format msgid "Update %s did not return a status. Unknown if it succeeded." msgstr "Update %s hat keinen Status zurückgegeben. Unbekannter Status." -#: ../../mod/admin.php:471 +#: ../../mod/admin.php:473 #, php-format msgid "Update function %s could not be found." msgstr "Updatefunktion %s konnte nicht gefunden werden." -#: ../../mod/admin.php:486 +#: ../../mod/admin.php:488 msgid "No failed updates." msgstr "Keine fehlgeschlagenen Updates." -#: ../../mod/admin.php:490 +#: ../../mod/admin.php:492 msgid "Failed Updates" msgstr "Fehlgeschlagene Updates" -#: ../../mod/admin.php:491 +#: ../../mod/admin.php:493 msgid "" "This does not include updates prior to 1139, which did not return a status." msgstr "Ohne Updates vor 1139, da diese keinen Status zurückgegeben haben." -#: ../../mod/admin.php:492 +#: ../../mod/admin.php:494 msgid "Mark success (if update was manually applied)" msgstr "Als erfolgreich markieren (falls das Update manuell installiert wurde)" -#: ../../mod/admin.php:493 +#: ../../mod/admin.php:495 msgid "Attempt to execute this update step automatically" msgstr "Versuchen, diesen Schritt automatisch auszuführen" -#: ../../mod/admin.php:518 +#: ../../mod/admin.php:520 #, php-format msgid "%s user blocked/unblocked" msgid_plural "%s users blocked/unblocked" msgstr[0] "%s Benutzer geblockt/freigegeben" msgstr[1] "%s Benutzer geblockt/freigegeben" -#: ../../mod/admin.php:525 +#: ../../mod/admin.php:527 #, php-format msgid "%s user deleted" msgid_plural "%s users deleted" msgstr[0] "%s Nutzer gelöscht" msgstr[1] "%s Nutzer gelöscht" -#: ../../mod/admin.php:564 +#: ../../mod/admin.php:566 #, php-format msgid "User '%s' deleted" msgstr "Nutzer '%s' gelöscht" -#: ../../mod/admin.php:572 +#: ../../mod/admin.php:574 #, php-format msgid "User '%s' unblocked" msgstr "Nutzer '%s' entsperrt" -#: ../../mod/admin.php:572 +#: ../../mod/admin.php:574 #, php-format msgid "User '%s' blocked" msgstr "Nutzer '%s' gesperrt" -#: ../../mod/admin.php:636 +#: ../../mod/admin.php:638 msgid "select all" msgstr "Alle auswählen" -#: ../../mod/admin.php:637 +#: ../../mod/admin.php:639 msgid "User registrations waiting for confirm" msgstr "Neuanmeldungen, die auf deine Bestätigung warten" -#: ../../mod/admin.php:638 +#: ../../mod/admin.php:640 msgid "Request date" msgstr "Anfrage Datum" -#: ../../mod/admin.php:638 ../../mod/admin.php:647 +#: ../../mod/admin.php:640 ../../mod/admin.php:649 #: ../../include/contact_selectors.php:79 msgid "Email" msgstr "Email" -#: ../../mod/admin.php:639 +#: ../../mod/admin.php:641 msgid "No registrations." msgstr "Keine Neuanmeldungen." -#: ../../mod/admin.php:641 +#: ../../mod/admin.php:643 msgid "Deny" msgstr "Verwehren" -#: ../../mod/admin.php:647 +#: ../../mod/admin.php:649 msgid "Register date" msgstr "Anmeldedatum" -#: ../../mod/admin.php:647 +#: ../../mod/admin.php:649 msgid "Last login" msgstr "Letzte Anmeldung" -#: ../../mod/admin.php:647 +#: ../../mod/admin.php:649 msgid "Last item" msgstr "Letzter Beitrag" -#: ../../mod/admin.php:647 +#: ../../mod/admin.php:649 msgid "Account" msgstr "Nutzerkonto" -#: ../../mod/admin.php:649 +#: ../../mod/admin.php:651 msgid "" "Selected users will be deleted!\\n\\nEverything these users had posted on " "this site will be permanently deleted!\\n\\nAre you sure?" msgstr "Die markierten Nutzer werden gelöscht!\\n\\nAlle Beiträge, die diese Nutzer auf dieser Seite veröffentlicht haben, werden permanent gelöscht!\\n\\nBist du sicher?" -#: ../../mod/admin.php:650 +#: ../../mod/admin.php:652 msgid "" "The user {0} will be deleted!\\n\\nEverything this user has posted on this " "site will be permanently deleted!\\n\\nAre you sure?" msgstr "Der Nutzer {0} wird gelöscht!\\n\\nAlles was dieser Nutzer auf dieser Seite veröffentlicht hat, wird permanent gelöscht!\\n\\nBist du sicher?" -#: ../../mod/admin.php:691 +#: ../../mod/admin.php:693 #, php-format msgid "Plugin %s disabled." msgstr "Plugin %s deaktiviert." -#: ../../mod/admin.php:695 +#: ../../mod/admin.php:697 #, php-format msgid "Plugin %s enabled." msgstr "Plugin %s aktiviert." -#: ../../mod/admin.php:705 ../../mod/admin.php:903 +#: ../../mod/admin.php:707 ../../mod/admin.php:905 msgid "Disable" msgstr "Ausschalten" -#: ../../mod/admin.php:707 ../../mod/admin.php:905 +#: ../../mod/admin.php:709 ../../mod/admin.php:907 msgid "Enable" msgstr "Einschalten" -#: ../../mod/admin.php:729 ../../mod/admin.php:934 +#: ../../mod/admin.php:731 ../../mod/admin.php:936 msgid "Toggle" msgstr "Umschalten" -#: ../../mod/admin.php:737 ../../mod/admin.php:944 +#: ../../mod/admin.php:739 ../../mod/admin.php:946 msgid "Author: " msgstr "Autor:" -#: ../../mod/admin.php:738 ../../mod/admin.php:945 +#: ../../mod/admin.php:740 ../../mod/admin.php:947 msgid "Maintainer: " msgstr "Betreuer:" -#: ../../mod/admin.php:867 +#: ../../mod/admin.php:869 msgid "No themes found." msgstr "Keine Themen gefunden." -#: ../../mod/admin.php:926 +#: ../../mod/admin.php:928 msgid "Screenshot" msgstr "Bildschirmfoto" -#: ../../mod/admin.php:974 +#: ../../mod/admin.php:976 msgid "[Experimental]" msgstr "[Experimentell]" -#: ../../mod/admin.php:975 +#: ../../mod/admin.php:977 msgid "[Unsupported]" msgstr "[Nicht unterstützt]" -#: ../../mod/admin.php:1002 +#: ../../mod/admin.php:1004 msgid "Log settings updated." msgstr "Protokolleinstellungen aktualisiert." -#: ../../mod/admin.php:1058 +#: ../../mod/admin.php:1060 msgid "Clear" msgstr "löschen" -#: ../../mod/admin.php:1064 +#: ../../mod/admin.php:1066 msgid "Debugging" msgstr "Protokoll führen" -#: ../../mod/admin.php:1065 +#: ../../mod/admin.php:1067 msgid "Log file" msgstr "Protokolldatei" -#: ../../mod/admin.php:1065 +#: ../../mod/admin.php:1067 msgid "" "Must be writable by web server. Relative to your Friendica top-level " "directory." msgstr "Webserver muss Schreibrechte besitzen. Abhängig vom Friendica-Installationsverzeichnis." -#: ../../mod/admin.php:1066 +#: ../../mod/admin.php:1068 msgid "Log level" msgstr "Protokoll-Level" -#: ../../mod/admin.php:1116 +#: ../../mod/admin.php:1118 ../../view/theme/diabook/theme.php:599 msgid "Close" msgstr "Schließen" -#: ../../mod/admin.php:1122 +#: ../../mod/admin.php:1124 msgid "FTP Host" msgstr "FTP Host" -#: ../../mod/admin.php:1123 +#: ../../mod/admin.php:1125 msgid "FTP Path" msgstr "FTP Pfad" -#: ../../mod/admin.php:1124 +#: ../../mod/admin.php:1126 msgid "FTP User" msgstr "FTP Nutzername" -#: ../../mod/admin.php:1125 +#: ../../mod/admin.php:1127 msgid "FTP Password" msgstr "FTP Passwort" @@ -3712,13 +3722,13 @@ msgstr "Konnte die Kontaktinformationen nicht empfangen." msgid "following" msgstr "folgen" -#: ../../mod/common.php:34 +#: ../../mod/common.php:42 msgid "Common Friends" msgstr "Gemeinsame Freunde" -#: ../../mod/common.php:42 -msgid "No friends in common." -msgstr "Keine gemeinsamen Freunde." +#: ../../mod/common.php:78 +msgid "No contacts in common." +msgstr "Keine gemeinsamen Kontakte." #: ../../mod/display.php:135 msgid "Item has been removed." @@ -3799,13 +3809,8 @@ msgstr "öffentliches Profil" #: ../../mod/profiles.php:331 #, php-format -msgid "%1$s changed %2$s to \"%3$s\"" -msgstr "%1$s änderte %2$s zu \"%3$s\"" - -#: ../../mod/profiles.php:332 -#, php-format -msgid " - Visit %1$s's %2$s" -msgstr " - %1$s's %2$s besuchen" +msgid "%1$s changed %2$s to “%3$s”" +msgstr "%1$s hat %2$s geändert auf “%3$s”" #: ../../mod/profiles.php:335 #, php-format @@ -4063,7 +4068,7 @@ msgstr "Hinzufügen" msgid "No entries." msgstr "Keine Einträge" -#: ../../mod/suggest.php:38 ../../view/theme/diabook/theme.php:183 +#: ../../mod/suggest.php:38 ../../view/theme/diabook/theme.php:513 #: ../../include/contact_widgets.php:34 msgid "Friend Suggestions" msgstr "Kontaktvorschläge" @@ -4078,7 +4083,7 @@ msgstr "Keine Vorschläge. Falls der Server frisch aufgesetzt wurde, versuche es msgid "Ignore/Hide" msgstr "Ignorieren/Verbergen" -#: ../../mod/directory.php:47 ../../view/theme/diabook/theme.php:181 +#: ../../mod/directory.php:47 ../../view/theme/diabook/theme.php:511 msgid "Global Directory" msgstr "Weltweites Verzeichnis" @@ -4269,71 +4274,83 @@ msgstr "Auf %s wurde die Verbindung akzeptiert" msgid "%1$s has joined %2$s" msgstr "%1$s ist %2$s beigetreten" -#: ../../addon/facebook/facebook.php:491 +#: ../../addon/facebook/facebook.php:501 msgid "Facebook disabled" msgstr "Facebook deaktiviert" -#: ../../addon/facebook/facebook.php:496 +#: ../../addon/facebook/facebook.php:506 msgid "Updating contacts" msgstr "Aktualisiere Kontakte" -#: ../../addon/facebook/facebook.php:516 +#: ../../addon/facebook/facebook.php:529 msgid "Facebook API key is missing." msgstr "Facebook-API-Schlüssel nicht gefunden" -#: ../../addon/facebook/facebook.php:523 +#: ../../addon/facebook/facebook.php:536 msgid "Facebook Connect" msgstr "Mit Facebook verbinden" -#: ../../addon/facebook/facebook.php:529 +#: ../../addon/facebook/facebook.php:542 msgid "Install Facebook connector for this account." msgstr "Facebook-Connector für diesen Account installieren." -#: ../../addon/facebook/facebook.php:536 +#: ../../addon/facebook/facebook.php:549 msgid "Remove Facebook connector" msgstr "Facebook-Connector entfernen" -#: ../../addon/facebook/facebook.php:541 +#: ../../addon/facebook/facebook.php:554 msgid "" "Re-authenticate [This is necessary whenever your Facebook password is " "changed.]" msgstr "Neu authentifizieren [Das ist immer dann nötig, wenn Du Dein Facebook-Passwort geändert hast.]" -#: ../../addon/facebook/facebook.php:548 +#: ../../addon/facebook/facebook.php:561 msgid "Post to Facebook by default" msgstr "Veröffentliche standardmäßig bei Facebook" -#: ../../addon/facebook/facebook.php:552 +#: ../../addon/facebook/facebook.php:567 +msgid "" +"Facebook friend linking has been disabled on this site. The following " +"settings will have no effect." +msgstr "" + +#: ../../addon/facebook/facebook.php:571 +msgid "" +"Facebook friend linking has been disabled on this site. If you disable it, " +"you will be unable to re-enable it." +msgstr "" + +#: ../../addon/facebook/facebook.php:574 msgid "Link all your Facebook friends and conversations on this website" msgstr "All meine Facebook-Kontakte und -Konversationen hier auf diese Website importieren" -#: ../../addon/facebook/facebook.php:554 +#: ../../addon/facebook/facebook.php:576 msgid "" "Facebook conversations consist of your profile wall and your friend" " stream." msgstr "Facebook-Konversationen bestehen aus deinen Beiträgen auf deinerPinnwand, sowie den Beiträgen deiner Freunde Stream." -#: ../../addon/facebook/facebook.php:555 +#: ../../addon/facebook/facebook.php:577 msgid "On this website, your Facebook friend stream is only visible to you." msgstr "Hier auf dieser Webseite kannst nur du die Beiträge Deiner Facebook-Freunde (Stream) sehen." -#: ../../addon/facebook/facebook.php:556 +#: ../../addon/facebook/facebook.php:578 msgid "" "The following settings determine the privacy of your Facebook profile wall " "on this website." msgstr "Mit den folgenden Einstellungen kannst Du die Privatsphäre der Kopie Deiner Facebook-Pinnwand hier auf dieser Seite einstellen." -#: ../../addon/facebook/facebook.php:560 +#: ../../addon/facebook/facebook.php:582 msgid "" "On this website your Facebook profile wall conversations will only be " "visible to you" msgstr "Meine Facebook-Pinnwand hier auf dieser Webseite nur für mich sichtbar machen" -#: ../../addon/facebook/facebook.php:565 +#: ../../addon/facebook/facebook.php:587 msgid "Do not import your Facebook profile wall conversations" msgstr "Facebook-Pinnwand nicht importieren" -#: ../../addon/facebook/facebook.php:567 +#: ../../addon/facebook/facebook.php:589 msgid "" "If you choose to link conversations and leave both of these boxes unchecked," " your Facebook profile wall will be merged with your profile wall on this " @@ -4341,120 +4358,120 @@ msgid "" "who may see the conversations." msgstr "Wenn Du Facebook-Konversationen importierst und diese beiden Häkchen nicht setzt, wird Deine Facebook-Pinnwand mit der Pinnwand hier auf dieser Webseite vereinigt. Die Privatsphäre-Einstellungen für Deine Pinnwand auf dieser Webseite geben dann an, wer die Konversationen sehen kann." -#: ../../addon/facebook/facebook.php:572 +#: ../../addon/facebook/facebook.php:594 msgid "Comma separated applications to ignore" msgstr "Komma separiert Anwendungen, die ignoriert werden sollen" -#: ../../addon/facebook/facebook.php:656 +#: ../../addon/facebook/facebook.php:678 msgid "Problems with Facebook Real-Time Updates" msgstr "Probleme mit Facebook Echtzeit-Updates" -#: ../../addon/facebook/facebook.php:684 +#: ../../addon/facebook/facebook.php:706 #: ../../include/contact_selectors.php:81 msgid "Facebook" msgstr "Facebook" -#: ../../addon/facebook/facebook.php:685 +#: ../../addon/facebook/facebook.php:707 msgid "Facebook Connector Settings" msgstr "Facebook-Verbindungseinstellungen" -#: ../../addon/facebook/facebook.php:700 +#: ../../addon/facebook/facebook.php:722 msgid "Facebook API Key" msgstr "Facebook API Schlüssel" -#: ../../addon/facebook/facebook.php:710 +#: ../../addon/facebook/facebook.php:732 msgid "" "Error: it appears that you have specified the App-ID and -Secret in your " ".htconfig.php file. As long as they are specified there, they cannot be set " "using this form.

    " msgstr "Fehler: du scheinst die App-ID und das App-Geheimnis in deiner .htconfig.php Datei angegeben zu haben. Solange sie dort festgelegt werden kannst du dieses Formular hier nicht verwenden.

    " -#: ../../addon/facebook/facebook.php:715 +#: ../../addon/facebook/facebook.php:737 msgid "" "Error: the given API Key seems to be incorrect (the application access token" " could not be retrieved)." msgstr "Fehler: der angegebene API Schlüssel scheint nicht korrekt zu sein (Zugriffstoken konnte nicht empfangen werden)." -#: ../../addon/facebook/facebook.php:717 +#: ../../addon/facebook/facebook.php:739 msgid "The given API Key seems to work correctly." msgstr "Der angegebene API Schlüssel scheint korrekt zu funktionieren." -#: ../../addon/facebook/facebook.php:719 +#: ../../addon/facebook/facebook.php:741 msgid "" "The correctness of the API Key could not be detected. Somthing strange's " "going on." msgstr "Die Echtheit des API Schlüssels konnte nicht überprüft werden. Etwas Merkwürdiges ist hier im Gange." -#: ../../addon/facebook/facebook.php:722 +#: ../../addon/facebook/facebook.php:744 msgid "App-ID / API-Key" msgstr "App-ID / API-Key" -#: ../../addon/facebook/facebook.php:723 +#: ../../addon/facebook/facebook.php:745 msgid "Application secret" msgstr "Anwendungs-Geheimnis" -#: ../../addon/facebook/facebook.php:724 +#: ../../addon/facebook/facebook.php:746 #, php-format msgid "Polling Interval in minutes (minimum %1$s minutes)" msgstr "Abfrage-Intervall in Minuten (min %1$s Minuten)" -#: ../../addon/facebook/facebook.php:725 +#: ../../addon/facebook/facebook.php:747 msgid "" "Synchronize comments (no comments on Facebook are missed, at the cost of " "increased system load)" msgstr "Kommentare synchronisieren (Kein Kommentar von Facebook geht verlohren, verursacht höhere Last auf dem Server)" -#: ../../addon/facebook/facebook.php:729 +#: ../../addon/facebook/facebook.php:751 msgid "Real-Time Updates" msgstr "Echt-Zeit Aktualisierungen" -#: ../../addon/facebook/facebook.php:733 +#: ../../addon/facebook/facebook.php:755 msgid "Real-Time Updates are activated." msgstr "Echtzeit-Updates sind aktiviert." -#: ../../addon/facebook/facebook.php:734 +#: ../../addon/facebook/facebook.php:756 msgid "Deactivate Real-Time Updates" msgstr "Echtzeit-Updates deaktivieren" -#: ../../addon/facebook/facebook.php:736 +#: ../../addon/facebook/facebook.php:758 msgid "Real-Time Updates not activated." msgstr "Echtzeit-Updates nicht aktiviert." -#: ../../addon/facebook/facebook.php:736 +#: ../../addon/facebook/facebook.php:758 msgid "Activate Real-Time Updates" msgstr "Echtzeit-Updates aktivieren" -#: ../../addon/facebook/facebook.php:755 +#: ../../addon/facebook/facebook.php:777 msgid "The new values have been saved." msgstr "Die neuen Einstellungen wurden gespeichert." -#: ../../addon/facebook/facebook.php:779 +#: ../../addon/facebook/facebook.php:801 msgid "Post to Facebook" msgstr "Bei Facebook veröffentlichen" -#: ../../addon/facebook/facebook.php:877 +#: ../../addon/facebook/facebook.php:899 msgid "" "Post to Facebook cancelled because of multi-network access permission " "conflict." msgstr "Beitrag wurde nicht bei Facebook veröffentlicht, da Konflikte bei den Multi-Netzwerk-Zugriffsrechten vorliegen." -#: ../../addon/facebook/facebook.php:1097 +#: ../../addon/facebook/facebook.php:1119 msgid "View on Friendica" msgstr "In Friendica betrachten" -#: ../../addon/facebook/facebook.php:1130 +#: ../../addon/facebook/facebook.php:1152 msgid "Facebook post failed. Queued for retry." msgstr "Veröffentlichung bei Facebook gescheitert. Wir versuchen es später erneut." -#: ../../addon/facebook/facebook.php:1170 +#: ../../addon/facebook/facebook.php:1192 msgid "Your Facebook connection became invalid. Please Re-authenticate." msgstr "Deine Facebook Anmeldedaten sind ungültig geworden. Bitte re-authentifiziere dich." -#: ../../addon/facebook/facebook.php:1171 +#: ../../addon/facebook/facebook.php:1193 msgid "Facebook connection became invalid" msgstr "Facebook Anmeldedaten sind ungültig geworden" -#: ../../addon/facebook/facebook.php:1172 +#: ../../addon/facebook/facebook.php:1194 #, php-format msgid "" "Hi %1$s,\n" @@ -4599,10 +4616,16 @@ msgstr "NSFW-Einstellungen gespeichert" msgid "%s - Click to open/close" msgstr "%s – Zum Öffnen/Schließen klicken" -#: ../../addon/page/page.php:47 +#: ../../addon/page/page.php:48 msgid "Forums" msgstr "Foren" +#: ../../addon/page/page.php:63 ../../addon/showmore/showmore.php:87 +#: ../../include/contact_widgets.php:187 ../../include/conversation.php:466 +#: ../../boot.php:507 +msgid "show more" +msgstr "mehr anzeigen" + #: ../../addon/planets/planets.php:150 msgid "Planets Settings" msgstr "Planeten Einstellungen" @@ -4643,7 +4666,7 @@ msgid "Latest likes" msgstr "Neueste Favoriten" #: ../../addon/communityhome/communityhome.php:155 -#: ../../view/theme/diabook/theme.php:119 ../../include/text.php:1302 +#: ../../view/theme/diabook/theme.php:449 ../../include/text.php:1303 #: ../../include/conversation.php:45 ../../include/conversation.php:118 msgid "event" msgstr "Veranstaltung" @@ -4796,7 +4819,7 @@ msgid "Post to Drupal by default" msgstr "Veröffentliche öffentliche Beiträge standardmäßig bei Drupal" #: ../../addon/drpost/drpost.php:184 ../../addon/wppost/wppost.php:190 -#: ../../addon/blogger/blogger.php:172 ../../addon/posterous/posterous.php:173 +#: ../../addon/blogger/blogger.php:172 ../../addon/posterous/posterous.php:177 msgid "Post from Friendica" msgstr "Beitrag via Friendica" @@ -5352,11 +5375,6 @@ msgstr "Begrenze Beiträge nach einer bestimmten Anzahl an Buchstaben" msgid "Show More Settings saved." msgstr "\"Mehr zeigen\" Einstellungen gesichert." -#: ../../addon/showmore/showmore.php:87 ../../include/conversation.php:466 -#: ../../boot.php:507 -msgid "show more" -msgstr "mehr anzeigen" - #: ../../addon/piwik/piwik.php:79 msgid "" "This website is tracked using the Piwik " @@ -5539,109 +5557,126 @@ msgstr "Posterous-Passwort" msgid "Post to Posterous by default" msgstr "Veröffentliche öffentliche Beiträge standardmäßig bei Posterous" -#: ../../view/theme/cleanzero/config.php:73 -#: ../../view/theme/diabook/config.php:93 +#: ../../view/theme/cleanzero/config.php:82 +#: ../../view/theme/diabook/config.php:97 #: ../../view/theme/quattro/config.php:54 ../../view/theme/dispy/config.php:72 msgid "Theme settings" msgstr "Themen Einstellungen" -#: ../../view/theme/cleanzero/config.php:74 +#: ../../view/theme/cleanzero/config.php:83 msgid "Set resize level for images in posts and comments (width and height)" msgstr "Wähle das Vergrößerungsmaß für Bilder in Beiträgen und Kommentaren (Höhe und Breite)" -#: ../../view/theme/cleanzero/config.php:75 -#: ../../view/theme/diabook/config.php:94 ../../view/theme/dispy/config.php:73 +#: ../../view/theme/cleanzero/config.php:84 +#: ../../view/theme/diabook/config.php:98 ../../view/theme/dispy/config.php:73 msgid "Set font-size for posts and comments" msgstr "Schriftgröße für Beiträge und Kommentare festlegen" -#: ../../view/theme/cleanzero/config.php:76 +#: ../../view/theme/cleanzero/config.php:85 +msgid "Set theme width" +msgstr "Theme Breite festlegen" + +#: ../../view/theme/cleanzero/config.php:86 #: ../../view/theme/quattro/config.php:56 msgid "Color scheme" msgstr "Farbschema" -#: ../../view/theme/diabook/theme.php:48 -msgid "Community Profiles" -msgstr "Community-Profile" - -#: ../../view/theme/diabook/theme.php:68 -msgid "Last users" -msgstr "Letzte Nutzer" - -#: ../../view/theme/diabook/theme.php:97 -msgid "Last likes" -msgstr "Zuletzt gemocht" - -#: ../../view/theme/diabook/theme.php:142 -msgid "Last photos" -msgstr "Letzte Fotos" - -#: ../../view/theme/diabook/theme.php:179 -msgid "Find Friends" -msgstr "Freunde finden" - -#: ../../view/theme/diabook/theme.php:180 -msgid "Local Directory" -msgstr "Lokales Verzeichnis" - -#: ../../view/theme/diabook/theme.php:182 ../../include/contact_widgets.php:35 -msgid "Similar Interests" -msgstr "Ähnliche Interessen" - -#: ../../view/theme/diabook/theme.php:184 ../../include/contact_widgets.php:37 -msgid "Invite Friends" -msgstr "Freunde einladen" - -#: ../../view/theme/diabook/theme.php:199 -#: ../../view/theme/diabook/theme.php:277 -msgid "Community Pages" -msgstr "Foren" - -#: ../../view/theme/diabook/theme.php:232 -msgid "Help or @NewHere ?" -msgstr "Hilfe oder @NewHere" - -#: ../../view/theme/diabook/theme.php:238 -msgid "Connect Services" -msgstr "Verbinde Dienste" - -#: ../../view/theme/diabook/theme.php:270 ../../include/nav.php:49 +#: ../../view/theme/diabook/theme.php:65 ../../include/nav.php:49 #: ../../include/nav.php:115 msgid "Your posts and conversations" msgstr "Deine Beiträge und Unterhaltungen" -#: ../../view/theme/diabook/theme.php:271 ../../include/nav.php:50 +#: ../../view/theme/diabook/theme.php:66 ../../include/nav.php:50 msgid "Your profile page" msgstr "Deine Profilseite" -#: ../../view/theme/diabook/theme.php:272 +#: ../../view/theme/diabook/theme.php:67 msgid "Your contacts" msgstr "Deine Kontakte" -#: ../../view/theme/diabook/theme.php:273 ../../include/nav.php:51 +#: ../../view/theme/diabook/theme.php:68 ../../include/nav.php:51 msgid "Your photos" msgstr "Deine Fotos" -#: ../../view/theme/diabook/theme.php:274 ../../include/nav.php:52 +#: ../../view/theme/diabook/theme.php:69 ../../include/nav.php:52 msgid "Your events" msgstr "Deine Ereignisse" -#: ../../view/theme/diabook/theme.php:275 ../../include/nav.php:53 +#: ../../view/theme/diabook/theme.php:70 ../../include/nav.php:53 msgid "Personal notes" msgstr "Persönliche Notizen" -#: ../../view/theme/diabook/theme.php:275 ../../include/nav.php:53 +#: ../../view/theme/diabook/theme.php:70 ../../include/nav.php:53 msgid "Your personal photos" msgstr "Deine privaten Fotos" -#: ../../view/theme/diabook/config.php:95 ../../view/theme/dispy/config.php:74 +#: ../../view/theme/diabook/theme.php:72 +#: ../../view/theme/diabook/theme.php:530 +msgid "Community Pages" +msgstr "Foren" + +#: ../../view/theme/diabook/theme.php:377 +msgid "Community Profiles" +msgstr "Community-Profile" + +#: ../../view/theme/diabook/theme.php:398 +msgid "Last users" +msgstr "Letzte Nutzer" + +#: ../../view/theme/diabook/theme.php:427 +msgid "Last likes" +msgstr "Zuletzt gemocht" + +#: ../../view/theme/diabook/theme.php:472 +msgid "Last photos" +msgstr "Letzte Fotos" + +#: ../../view/theme/diabook/theme.php:509 +msgid "Find Friends" +msgstr "Freunde finden" + +#: ../../view/theme/diabook/theme.php:510 +msgid "Local Directory" +msgstr "Lokales Verzeichnis" + +#: ../../view/theme/diabook/theme.php:512 ../../include/contact_widgets.php:35 +msgid "Similar Interests" +msgstr "Ähnliche Interessen" + +#: ../../view/theme/diabook/theme.php:514 ../../include/contact_widgets.php:37 +msgid "Invite Friends" +msgstr "Freunde einladen" + +#: ../../view/theme/diabook/theme.php:565 +msgid "Earth View" +msgstr "Earth View" + +#: ../../view/theme/diabook/theme.php:573 +msgid "Help or @NewHere ?" +msgstr "Hilfe oder @NewHere" + +#: ../../view/theme/diabook/theme.php:580 +msgid "Connect Services" +msgstr "Verbinde Dienste" + +#: ../../view/theme/diabook/theme.php:587 +msgid "Last Tweets" +msgstr "Neueste Tweets" + +#: ../../view/theme/diabook/theme.php:591 +#: ../../view/theme/diabook/config.php:102 +msgid "Set twitter search term" +msgstr "" + +#: ../../view/theme/diabook/config.php:99 ../../view/theme/dispy/config.php:74 msgid "Set line-height for posts and comments" msgstr "Liniengröße für Beiträge und Kommantare festlegen" -#: ../../view/theme/diabook/config.php:96 +#: ../../view/theme/diabook/config.php:100 msgid "Set resolution for middle column" msgstr "Auflösung für die Mittelspalte setzen" -#: ../../view/theme/diabook/config.php:97 +#: ../../view/theme/diabook/config.php:101 msgid "Set color scheme" msgstr "Wähle Farbschema" @@ -6050,11 +6085,11 @@ msgstr "Beginnt:" msgid "Finishes:" msgstr "Endet:" -#: ../../include/delivery.php:434 ../../include/notifier.php:652 +#: ../../include/delivery.php:445 ../../include/notifier.php:652 msgid "(no subject)" msgstr "(kein Betreff)" -#: ../../include/delivery.php:441 ../../include/enotify.php:23 +#: ../../include/delivery.php:452 ../../include/enotify.php:23 #: ../../include/notifier.php:659 msgid "noreply" msgstr "noreply" @@ -6170,47 +6205,47 @@ msgstr "Dezember" msgid "bytes" msgstr "Byte" -#: ../../include/text.php:936 -msgid "Categories:" -msgstr "Kategorien:" - -#: ../../include/text.php:948 +#: ../../include/text.php:934 ../../include/text.php:949 msgid "remove" msgstr "löschen" -#: ../../include/text.php:948 +#: ../../include/text.php:934 ../../include/text.php:949 msgid "[remove]" msgstr "[löschen]" -#: ../../include/text.php:951 +#: ../../include/text.php:937 +msgid "Categories:" +msgstr "Kategorien:" + +#: ../../include/text.php:952 msgid "Filed under:" msgstr "Abgelegt unter:" -#: ../../include/text.php:967 ../../include/text.php:979 +#: ../../include/text.php:968 ../../include/text.php:980 msgid "Click to open/close" msgstr "Zum öffnen/schließen klicken" -#: ../../include/text.php:1084 +#: ../../include/text.php:1085 msgid "default" msgstr "standard" -#: ../../include/text.php:1096 +#: ../../include/text.php:1097 msgid "Select an alternate language" msgstr "Alternative Sprache auswählen" -#: ../../include/text.php:1306 +#: ../../include/text.php:1307 msgid "activity" msgstr "Aktivität" -#: ../../include/text.php:1308 +#: ../../include/text.php:1309 msgid "comment" msgstr "Kommentar" -#: ../../include/text.php:1309 +#: ../../include/text.php:1310 msgid "post" msgstr "Beitrag" -#: ../../include/text.php:1464 +#: ../../include/text.php:1465 msgid "Item filed" msgstr "Beitrag abgelegt" @@ -6441,13 +6476,6 @@ msgstr "Alles" msgid "Categories" msgstr "Kategorien" -#: ../../include/contact_widgets.php:183 -#, php-format -msgid "%d friend in common" -msgid_plural "%d friends in common" -msgstr[0] "%d gemeinsamer Freund" -msgstr[1] "%d gemeinsame Freunde" - #: ../../include/auth.php:29 msgid "Logged out." msgstr "Abgemeldet." diff --git a/view/de/strings.php b/view/de/strings.php index f88c969d9..a3ccab692 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -751,6 +751,8 @@ $a->strings["Network timeout"] = "Netzwerk Wartezeit"; $a->strings["Value is in seconds. Set to 0 for unlimited (not recommended)."] = "Der Wert ist in Sekunden. Setze 0 für unbegrenzt (nicht empfohlen)."; $a->strings["Delivery interval"] = "Zustellungsintervall"; $a->strings["Delay background delivery processes by this many seconds to reduce system load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 for large dedicated servers."] = "Verzögere im Hintergrund laufende Auslieferungsprozesse um die angegebene Anzahl an Sekunden um die Systemlast zu verringern. Empfehlungen: 4-5 für Shared-Hosts, 2-3 für VPS, 0-1 für große dedizierte Server."; +$a->strings["Maximum Load Average"] = "Maximum Load Average"; +$a->strings["Maximum system load before delivery and poll processes are deferred - default 50."] = ""; $a->strings["Update has been marked successful"] = "Update wurde als erfolgreich markiert"; $a->strings["Executing %s failed. Check system logs."] = "Ausführung von %s schlug fehl. Systemprotokolle prüfen."; $a->strings["Update %s was successfully applied."] = "Update %s war erfolgreich."; @@ -834,7 +836,7 @@ $a->strings["Limited profile. This person will be unable to receive direct/perso $a->strings["Unable to retrieve contact information."] = "Konnte die Kontaktinformationen nicht empfangen."; $a->strings["following"] = "folgen"; $a->strings["Common Friends"] = "Gemeinsame Freunde"; -$a->strings["No friends in common."] = "Keine gemeinsamen Freunde."; +$a->strings["No contacts in common."] = "Keine gemeinsamen Kontakte."; $a->strings["Item has been removed."] = "Eintrag wurde entfernt."; $a->strings["Applications"] = "Anwendungen"; $a->strings["No installed applications."] = "Keine Applikationen installiert."; @@ -854,8 +856,7 @@ $a->strings["Location"] = "Wohnort"; $a->strings["Profile updated."] = "Profil aktualisiert."; $a->strings[" and "] = " und "; $a->strings["public profile"] = "öffentliches Profil"; -$a->strings["%1\$s changed %2\$s to \"%3\$s\""] = "%1\$s änderte %2\$s zu \"%3\$s\""; -$a->strings[" - Visit %1\$s's %2\$s"] = " - %1\$s's %2\$s besuchen"; +$a->strings["%1\$s changed %2\$s to “%3\$s”"] = "%1\$s hat %2\$s geändert auf “%3\$s”"; $a->strings["%1\$s has an updated %2\$s, changing %3\$s."] = "%1\$s hat folgendes aktualisiert %2\$s, verändert wurde %3\$s."; $a->strings["Profile deleted."] = "Profil gelöscht."; $a->strings["Profile-"] = "Profil-"; @@ -971,6 +972,8 @@ $a->strings["Install Facebook connector for this account."] = "Facebook-Connecto $a->strings["Remove Facebook connector"] = "Facebook-Connector entfernen"; $a->strings["Re-authenticate [This is necessary whenever your Facebook password is changed.]"] = "Neu authentifizieren [Das ist immer dann nötig, wenn Du Dein Facebook-Passwort geändert hast.]"; $a->strings["Post to Facebook by default"] = "Veröffentliche standardmäßig bei Facebook"; +$a->strings["Facebook friend linking has been disabled on this site. The following settings will have no effect."] = ""; +$a->strings["Facebook friend linking has been disabled on this site. If you disable it, you will be unable to re-enable it."] = ""; $a->strings["Link all your Facebook friends and conversations on this website"] = "All meine Facebook-Kontakte und -Konversationen hier auf diese Website importieren"; $a->strings["Facebook conversations consist of your profile wall and your friend stream."] = "Facebook-Konversationen bestehen aus deinen Beiträgen auf deinerPinnwand, sowie den Beiträgen deiner Freunde Stream."; $a->strings["On this website, your Facebook friend stream is only visible to you."] = "Hier auf dieser Webseite kannst nur du die Beiträge Deiner Facebook-Freunde (Stream) sehen."; @@ -1042,6 +1045,7 @@ $a->strings["Use /expression/ to provide regular expressions"] = "Verwende /expr $a->strings["NSFW Settings saved."] = "NSFW-Einstellungen gespeichert"; $a->strings["%s - Click to open/close"] = "%s – Zum Öffnen/Schließen klicken"; $a->strings["Forums"] = "Foren"; +$a->strings["show more"] = "mehr anzeigen"; $a->strings["Planets Settings"] = "Planeten Einstellungen"; $a->strings["Enable Planets Plugin"] = "Aktiviere Planeten Plugin"; $a->strings["Login"] = "Anmeldung"; @@ -1212,7 +1216,6 @@ $a->strings["\"Show more\" Settings"] = "\"Mehr zeigen\" Einstellungen"; $a->strings["Enable Show More"] = "Aktiviere \"Mehr zeigen\""; $a->strings["Cutting posts after how much characters"] = "Begrenze Beiträge nach einer bestimmten Anzahl an Buchstaben"; $a->strings["Show More Settings saved."] = "\"Mehr zeigen\" Einstellungen gesichert."; -$a->strings["show more"] = "mehr anzeigen"; $a->strings["This website is tracked using the Piwik analytics tool."] = "Diese Website benutzt Piwik, eine Open Source-Software zur statistischen Auswertung der Besucherzugriffe."; $a->strings["If you do not want that your visits are logged this way you can set a cookie to prevent Piwik from tracking further visits of the site (opt-out)."] = "Wenn Du nicht willst, dass Deine Besuche auf diese Weise gespeichert werden, kannst Du ein Cookie setzen. Dann wird Piwik Dich auf dieser Website nicht mehr verfolgen (opt-out)."; $a->strings["Piwik Base URL"] = "Piwik Basis URL"; @@ -1256,7 +1259,16 @@ $a->strings["Post to Posterous by default"] = "Veröffentliche öffentliche Beit $a->strings["Theme settings"] = "Themen Einstellungen"; $a->strings["Set resize level for images in posts and comments (width and height)"] = "Wähle das Vergrößerungsmaß für Bilder in Beiträgen und Kommentaren (Höhe und Breite)"; $a->strings["Set font-size for posts and comments"] = "Schriftgröße für Beiträge und Kommentare festlegen"; +$a->strings["Set theme width"] = "Theme Breite festlegen"; $a->strings["Color scheme"] = "Farbschema"; +$a->strings["Your posts and conversations"] = "Deine Beiträge und Unterhaltungen"; +$a->strings["Your profile page"] = "Deine Profilseite"; +$a->strings["Your contacts"] = "Deine Kontakte"; +$a->strings["Your photos"] = "Deine Fotos"; +$a->strings["Your events"] = "Deine Ereignisse"; +$a->strings["Personal notes"] = "Persönliche Notizen"; +$a->strings["Your personal photos"] = "Deine privaten Fotos"; +$a->strings["Community Pages"] = "Foren"; $a->strings["Community Profiles"] = "Community-Profile"; $a->strings["Last users"] = "Letzte Nutzer"; $a->strings["Last likes"] = "Zuletzt gemocht"; @@ -1265,16 +1277,11 @@ $a->strings["Find Friends"] = "Freunde finden"; $a->strings["Local Directory"] = "Lokales Verzeichnis"; $a->strings["Similar Interests"] = "Ähnliche Interessen"; $a->strings["Invite Friends"] = "Freunde einladen"; -$a->strings["Community Pages"] = "Foren"; +$a->strings["Earth View"] = "Earth View"; $a->strings["Help or @NewHere ?"] = "Hilfe oder @NewHere"; $a->strings["Connect Services"] = "Verbinde Dienste"; -$a->strings["Your posts and conversations"] = "Deine Beiträge und Unterhaltungen"; -$a->strings["Your profile page"] = "Deine Profilseite"; -$a->strings["Your contacts"] = "Deine Kontakte"; -$a->strings["Your photos"] = "Deine Fotos"; -$a->strings["Your events"] = "Deine Ereignisse"; -$a->strings["Personal notes"] = "Persönliche Notizen"; -$a->strings["Your personal photos"] = "Deine privaten Fotos"; +$a->strings["Last Tweets"] = "Neueste Tweets"; +$a->strings["Set twitter search term"] = ""; $a->strings["Set line-height for posts and comments"] = "Liniengröße für Beiträge und Kommantare festlegen"; $a->strings["Set resolution for middle column"] = "Auflösung für die Mittelspalte setzen"; $a->strings["Set color scheme"] = "Wähle Farbschema"; @@ -1411,9 +1418,9 @@ $a->strings["October"] = "Oktober"; $a->strings["November"] = "November"; $a->strings["December"] = "Dezember"; $a->strings["bytes"] = "Byte"; -$a->strings["Categories:"] = "Kategorien:"; $a->strings["remove"] = "löschen"; $a->strings["[remove]"] = "[löschen]"; +$a->strings["Categories:"] = "Kategorien:"; $a->strings["Filed under:"] = "Abgelegt unter:"; $a->strings["Click to open/close"] = "Zum öffnen/schließen klicken"; $a->strings["default"] = "standard"; @@ -1480,10 +1487,6 @@ $a->strings["All Networks"] = "Alle Netzwerke"; $a->strings["Saved Folders"] = "Gespeicherte Ordner"; $a->strings["Everything"] = "Alles"; $a->strings["Categories"] = "Kategorien"; -$a->strings["%d friend in common"] = array( - 0 => "%d gemeinsamer Freund", - 1 => "%d gemeinsame Freunde", -); $a->strings["Logged out."] = "Abgemeldet."; $a->strings["We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID."] = "Beim versuch dich mit der von dir angegebenen OpenID anzumelden trat ein Problem auf. Bitte überprüfe dass du die OpenID richtig geschrieben hast."; $a->strings["The error message was:"] = "Die Fehlermeldung lautete:"; From c141909f338c259d953ba165a54a09e09fa247ba Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 8 May 2012 01:14:24 -0700 Subject: [PATCH 27/57] wrap private message autocomplete in an ifdef to make it easier to test/develop --- mod/message.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/mod/message.php b/mod/message.php index 867f199c4..b8695fdd9 100644 --- a/mod/message.php +++ b/mod/message.php @@ -173,15 +173,22 @@ function message_content(&$a) { $preselect = (isset($a->argv[2])?array($a->argv[2]):false); - $select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10); + if(defined('EMAIL_AUTOCOMP')) { -// here's sort of where we want to do contact autocomplete -// comment out the contact selector line just above and use the following one instead, -// then figure out how to make it do the right thing -// pictures would be nice, but that didn't seem to work when I tried it -// (the json backend is found in mod/acl.php) + // here's where we want to do contact autocomplete + // just figure out how to make it do the right thing + // pictures would be nice, but that didn't work when I tried. + // It sort of barely works, but needs help + // (the json backend is found in mod/acl.php) -// $select = ''; + $select = ''; + } + else { + + // the ugly select box + + $select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10); + } $tpl = get_markup_template('prv_message.tpl'); $o .= replace_macros($tpl,array( From 10812e0c19b9a8db3620c40656ba8bb480e04da0 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 8 May 2012 15:33:01 -0700 Subject: [PATCH 28/57] make it optional to optimize the item table after expire --- boot.php | 2 +- include/expire.php | 6 +- util/messages.po | 242 ++++++++++++++++++++++++++++----------------- 3 files changed, 157 insertions(+), 93 deletions(-) diff --git a/boot.php b/boot.php index 15e2d5c06..d44d2bddc 100644 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1335' ); +define ( 'FRIENDICA_VERSION', '2.3.1336' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1143 ); diff --git a/include/expire.php b/include/expire.php index 5fa0ec758..755cd2494 100644 --- a/include/expire.php +++ b/include/expire.php @@ -32,7 +32,11 @@ function expire_run($argv, $argc){ // physically remove anything that has been deleted for more than two months $r = q("delete from item where deleted = 1 and changed < UTC_TIMESTAMP() - INTERVAL 60 DAY"); - q("optimize table item"); + + // make this optional as it could have a performance impact on large sites + + if(intval(get_config('system','optimize_items'))) + q("optimize table item"); logger('expire: start'); diff --git a/util/messages.po b/util/messages.po index 9e9ecc4d1..e6376310b 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 2.3.1335\n" +"Project-Id-Version: 2.3.1336\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-07 10:00-0700\n" +"POT-Creation-Date: 2012-05-08 10:00-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -158,9 +158,8 @@ msgstr "" #: ../../addon/irc/irc.php:55 ../../addon/blogger/blogger.php:102 #: ../../addon/posterous/posterous.php:90 #: ../../view/theme/cleanzero/config.php:80 -#: ../../view/theme/diabook/theme.php:607 -#: ../../view/theme/diabook/theme.php:642 -#: ../../view/theme/diabook/config.php:107 +#: ../../view/theme/diabook/theme.php:683 +#: ../../view/theme/diabook/config.php:190 #: ../../view/theme/quattro/config.php:52 ../../view/theme/dispy/config.php:70 #: ../../include/conversation.php:555 msgid "Submit" @@ -220,7 +219,7 @@ msgstr "" msgid "link to source" msgstr "" -#: ../../mod/events.php:324 ../../view/theme/diabook/theme.php:66 +#: ../../mod/events.php:324 ../../view/theme/diabook/theme.php:127 #: ../../include/nav.php:52 ../../boot.php:1493 msgid "Events" msgstr "" @@ -353,7 +352,7 @@ msgstr "" #: ../../mod/photos.php:51 ../../mod/photos.php:151 ../../mod/photos.php:879 #: ../../mod/photos.php:950 ../../mod/photos.php:965 ../../mod/photos.php:1382 #: ../../mod/photos.php:1394 ../../addon/communityhome/communityhome.php:110 -#: ../../view/theme/diabook/theme.php:522 +#: ../../view/theme/diabook/theme.php:526 msgid "Contact Photos" msgstr "" @@ -376,7 +375,7 @@ msgstr "" #: ../../mod/profile_photo.php:74 ../../mod/profile_photo.php:174 #: ../../mod/profile_photo.php:252 ../../mod/profile_photo.php:261 #: ../../addon/communityhome/communityhome.php:111 -#: ../../view/theme/diabook/theme.php:523 +#: ../../view/theme/diabook/theme.php:527 msgid "Profile Photos" msgstr "" @@ -398,7 +397,7 @@ msgstr "" #: ../../mod/photos.php:528 ../../mod/like.php:127 ../../mod/tagger.php:70 #: ../../addon/communityhome/communityhome.php:163 -#: ../../view/theme/diabook/theme.php:494 ../../include/text.php:1305 +#: ../../view/theme/diabook/theme.php:498 ../../include/text.php:1305 #: ../../include/diaspora.php:1654 ../../include/conversation.php:53 #: ../../include/conversation.php:126 msgid "photo" @@ -533,8 +532,8 @@ msgid "Share" msgstr "" #: ../../mod/photos.php:1214 ../../mod/editpost.php:104 -#: ../../mod/wallmessage.php:145 ../../mod/message.php:199 -#: ../../mod/message.php:391 ../../include/conversation.php:361 +#: ../../mod/wallmessage.php:145 ../../mod/message.php:206 +#: ../../mod/message.php:398 ../../include/conversation.php:361 #: ../../include/conversation.php:706 ../../include/conversation.php:983 msgid "Please wait" msgstr "" @@ -573,7 +572,7 @@ msgstr "" msgid "Not available." msgstr "" -#: ../../mod/community.php:30 ../../view/theme/diabook/theme.php:68 +#: ../../mod/community.php:30 ../../view/theme/diabook/theme.php:129 #: ../../include/nav.php:101 msgid "Community" msgstr "" @@ -632,7 +631,7 @@ msgid "Edit" msgstr "" #: ../../mod/editpost.php:96 ../../mod/wallmessage.php:143 -#: ../../mod/message.php:197 ../../mod/message.php:389 +#: ../../mod/message.php:204 ../../mod/message.php:396 #: ../../include/conversation.php:965 msgid "Upload photo" msgstr "" @@ -642,7 +641,7 @@ msgid "Attach file" msgstr "" #: ../../mod/editpost.php:98 ../../mod/wallmessage.php:144 -#: ../../mod/message.php:198 ../../mod/message.php:390 +#: ../../mod/message.php:205 ../../mod/message.php:397 #: ../../include/conversation.php:969 msgid "Insert web link" msgstr "" @@ -768,7 +767,7 @@ msgstr "" msgid "Invalid profile URL." msgstr "" -#: ../../mod/dfrn_request.php:476 ../../mod/follow.php:20 +#: ../../mod/dfrn_request.php:476 ../../mod/follow.php:23 msgid "Disallowed profile URL." msgstr "" @@ -1215,7 +1214,7 @@ msgstr "" msgid "Personal" msgstr "" -#: ../../mod/notifications.php:90 ../../view/theme/diabook/theme.php:62 +#: ../../mod/notifications.php:90 ../../view/theme/diabook/theme.php:123 #: ../../include/nav.php:77 ../../include/nav.php:115 msgid "Home" msgstr "" @@ -1656,7 +1655,7 @@ msgstr "" msgid "Edit contact" msgstr "" -#: ../../mod/contacts.php:544 ../../view/theme/diabook/theme.php:64 +#: ../../mod/contacts.php:544 ../../view/theme/diabook/theme.php:125 #: ../../include/nav.php:139 msgid "Contacts" msgstr "" @@ -1776,7 +1775,8 @@ msgid "Remove account" msgstr "" #: ../../mod/settings.php:88 ../../mod/admin.php:735 ../../mod/admin.php:940 -#: ../../addon/mathjax/mathjax.php:36 ../../include/nav.php:137 +#: ../../addon/mathjax/mathjax.php:36 ../../view/theme/diabook/theme.php:700 +#: ../../include/nav.php:137 msgid "Settings" msgstr "" @@ -2397,7 +2397,7 @@ msgstr "" msgid "Please enter a link URL:" msgstr "" -#: ../../mod/wallmessage.php:131 ../../mod/message.php:188 +#: ../../mod/wallmessage.php:131 ../../mod/message.php:195 msgid "Send Private Message" msgstr "" @@ -2408,18 +2408,18 @@ msgid "" "your site allow private mail from unknown senders." msgstr "" -#: ../../mod/wallmessage.php:133 ../../mod/message.php:189 -#: ../../mod/message.php:381 +#: ../../mod/wallmessage.php:133 ../../mod/message.php:196 +#: ../../mod/message.php:388 msgid "To:" msgstr "" -#: ../../mod/wallmessage.php:134 ../../mod/message.php:190 -#: ../../mod/message.php:382 +#: ../../mod/wallmessage.php:134 ../../mod/message.php:197 +#: ../../mod/message.php:389 msgid "Subject:" msgstr "" -#: ../../mod/wallmessage.php:140 ../../mod/message.php:194 -#: ../../mod/message.php:385 ../../mod/invite.php:113 +#: ../../mod/wallmessage.php:140 ../../mod/message.php:201 +#: ../../mod/message.php:392 ../../mod/invite.php:113 msgid "Your message:" msgstr "" @@ -2601,7 +2601,7 @@ msgstr "" msgid "Profile Visibility Editor" msgstr "" -#: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:63 +#: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:124 #: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:74 #: ../../include/nav.php:50 ../../boot.php:1478 msgid "Profile" @@ -2787,8 +2787,8 @@ msgstr "" #: ../../addon/facebook/facebook.php:1564 #: ../../addon/communityhome/communityhome.php:158 #: ../../addon/communityhome/communityhome.php:167 -#: ../../view/theme/diabook/theme.php:489 -#: ../../view/theme/diabook/theme.php:498 ../../include/diaspora.php:1654 +#: ../../view/theme/diabook/theme.php:493 +#: ../../view/theme/diabook/theme.php:502 ../../include/diaspora.php:1654 #: ../../include/conversation.php:48 ../../include/conversation.php:57 #: ../../include/conversation.php:121 ../../include/conversation.php:130 msgid "status" @@ -2796,7 +2796,7 @@ msgstr "" #: ../../mod/like.php:144 ../../addon/facebook/facebook.php:1568 #: ../../addon/communityhome/communityhome.php:172 -#: ../../view/theme/diabook/theme.php:503 ../../include/diaspora.php:1670 +#: ../../view/theme/diabook/theme.php:507 ../../include/diaspora.php:1670 #: ../../include/conversation.php:65 #, php-format msgid "%1$s likes %2$s's %3$s" @@ -2817,7 +2817,7 @@ msgstr "" msgid "Access denied." msgstr "" -#: ../../mod/fbrowser.php:23 ../../view/theme/diabook/theme.php:65 +#: ../../mod/fbrowser.php:23 ../../view/theme/diabook/theme.php:126 #: ../../include/nav.php:51 ../../boot.php:1484 msgid "Photos" msgstr "" @@ -2974,55 +2974,55 @@ msgstr "" msgid "Conversation removed." msgstr "" -#: ../../mod/message.php:230 +#: ../../mod/message.php:237 msgid "No messages." msgstr "" -#: ../../mod/message.php:237 +#: ../../mod/message.php:244 #, php-format msgid "Unknown sender - %s" msgstr "" -#: ../../mod/message.php:240 +#: ../../mod/message.php:247 #, php-format msgid "You and %s" msgstr "" -#: ../../mod/message.php:243 +#: ../../mod/message.php:250 #, php-format msgid "%s and You" msgstr "" -#: ../../mod/message.php:253 ../../mod/message.php:374 +#: ../../mod/message.php:260 ../../mod/message.php:381 msgid "Delete conversation" msgstr "" -#: ../../mod/message.php:256 +#: ../../mod/message.php:263 msgid "D, d M Y - g:i A" msgstr "" -#: ../../mod/message.php:258 +#: ../../mod/message.php:265 #, php-format msgid "%d message" msgid_plural "%d messages" msgstr[0] "" msgstr[1] "" -#: ../../mod/message.php:293 +#: ../../mod/message.php:300 msgid "Message not available." msgstr "" -#: ../../mod/message.php:358 +#: ../../mod/message.php:365 msgid "Delete message" msgstr "" -#: ../../mod/message.php:376 +#: ../../mod/message.php:383 msgid "" "No secure communications available. You may be able to " "respond from the sender's profile page." msgstr "" -#: ../../mod/message.php:380 +#: ../../mod/message.php:387 msgid "Send Reply" msgstr "" @@ -3577,7 +3577,7 @@ msgstr "" msgid "Log level" msgstr "" -#: ../../mod/admin.php:1121 ../../view/theme/diabook/theme.php:652 +#: ../../mod/admin.php:1121 msgid "Close" msgstr "" @@ -3672,48 +3672,58 @@ msgstr "" msgid "Login failed." msgstr "" -#: ../../mod/follow.php:27 +#: ../../mod/follow.php:30 msgid "Connect URL missing." msgstr "" -#: ../../mod/follow.php:47 +#: ../../mod/follow.php:56 msgid "" "This site is not configured to allow communications with other networks." msgstr "" -#: ../../mod/follow.php:48 ../../mod/follow.php:63 +#: ../../mod/follow.php:57 ../../mod/follow.php:72 msgid "No compatible communication protocols or feeds were discovered." msgstr "" -#: ../../mod/follow.php:61 +#: ../../mod/follow.php:70 msgid "The profile address specified does not provide adequate information." msgstr "" -#: ../../mod/follow.php:65 +#: ../../mod/follow.php:74 msgid "An author or name was not found." msgstr "" -#: ../../mod/follow.php:67 +#: ../../mod/follow.php:76 msgid "No browser URL could be matched to this address." msgstr "" -#: ../../mod/follow.php:74 +#: ../../mod/follow.php:78 +msgid "" +"Unable to match @-style Identity Address with a known protocol or email " +"contact." +msgstr "" + +#: ../../mod/follow.php:79 +msgid "Use mailto: in front of address to force email check." +msgstr "" + +#: ../../mod/follow.php:85 msgid "" "The profile address specified belongs to a network which has been disabled " "on this site." msgstr "" -#: ../../mod/follow.php:79 +#: ../../mod/follow.php:90 msgid "" "Limited profile. This person will be unable to receive direct/personal " "notifications from you." msgstr "" -#: ../../mod/follow.php:149 +#: ../../mod/follow.php:160 msgid "Unable to retrieve contact information." msgstr "" -#: ../../mod/follow.php:195 +#: ../../mod/follow.php:206 msgid "following" msgstr "" @@ -4063,7 +4073,7 @@ msgstr "" msgid "No entries." msgstr "" -#: ../../mod/suggest.php:38 ../../view/theme/diabook/theme.php:550 +#: ../../mod/suggest.php:38 ../../view/theme/diabook/theme.php:554 #: ../../include/contact_widgets.php:34 msgid "Friend Suggestions" msgstr "" @@ -4083,7 +4093,7 @@ msgstr "" msgid "%s [%s]" msgstr "" -#: ../../mod/directory.php:47 ../../view/theme/diabook/theme.php:548 +#: ../../mod/directory.php:47 ../../view/theme/diabook/theme.php:552 msgid "Global Directory" msgstr "" @@ -4668,7 +4678,7 @@ msgid "Latest likes" msgstr "" #: ../../addon/communityhome/communityhome.php:155 -#: ../../view/theme/diabook/theme.php:486 ../../include/text.php:1303 +#: ../../view/theme/diabook/theme.php:490 ../../include/text.php:1303 #: ../../include/conversation.php:45 ../../include/conversation.php:118 msgid "event" msgstr "" @@ -5564,7 +5574,7 @@ msgid "Post to Posterous by default" msgstr "" #: ../../view/theme/cleanzero/config.php:82 -#: ../../view/theme/diabook/config.php:109 +#: ../../view/theme/diabook/config.php:192 #: ../../view/theme/quattro/config.php:54 ../../view/theme/dispy/config.php:72 msgid "Theme settings" msgstr "" @@ -5574,7 +5584,7 @@ msgid "Set resize level for images in posts and comments (width and height)" msgstr "" #: ../../view/theme/cleanzero/config.php:84 -#: ../../view/theme/diabook/config.php:110 +#: ../../view/theme/diabook/config.php:193 #: ../../view/theme/dispy/config.php:73 msgid "Set font-size for posts and comments" msgstr "" @@ -5588,118 +5598,168 @@ msgstr "" msgid "Color scheme" msgstr "" -#: ../../view/theme/diabook/theme.php:62 ../../include/nav.php:49 +#: ../../view/theme/diabook/theme.php:123 ../../include/nav.php:49 #: ../../include/nav.php:115 msgid "Your posts and conversations" msgstr "" -#: ../../view/theme/diabook/theme.php:63 ../../include/nav.php:50 +#: ../../view/theme/diabook/theme.php:124 ../../include/nav.php:50 msgid "Your profile page" msgstr "" -#: ../../view/theme/diabook/theme.php:64 +#: ../../view/theme/diabook/theme.php:125 msgid "Your contacts" msgstr "" -#: ../../view/theme/diabook/theme.php:65 ../../include/nav.php:51 +#: ../../view/theme/diabook/theme.php:126 ../../include/nav.php:51 msgid "Your photos" msgstr "" -#: ../../view/theme/diabook/theme.php:66 ../../include/nav.php:52 +#: ../../view/theme/diabook/theme.php:127 ../../include/nav.php:52 msgid "Your events" msgstr "" -#: ../../view/theme/diabook/theme.php:67 ../../include/nav.php:53 +#: ../../view/theme/diabook/theme.php:128 ../../include/nav.php:53 msgid "Personal notes" msgstr "" -#: ../../view/theme/diabook/theme.php:67 ../../include/nav.php:53 +#: ../../view/theme/diabook/theme.php:128 ../../include/nav.php:53 msgid "Your personal photos" msgstr "" -#: ../../view/theme/diabook/theme.php:69 -#: ../../view/theme/diabook/theme.php:567 +#: ../../view/theme/diabook/theme.php:130 +#: ../../view/theme/diabook/theme.php:571 msgid "Community Pages" msgstr "" -#: ../../view/theme/diabook/theme.php:414 +#: ../../view/theme/diabook/theme.php:418 msgid "Community Profiles" msgstr "" -#: ../../view/theme/diabook/theme.php:435 +#: ../../view/theme/diabook/theme.php:439 msgid "Last users" msgstr "" -#: ../../view/theme/diabook/theme.php:464 +#: ../../view/theme/diabook/theme.php:468 msgid "Last likes" msgstr "" -#: ../../view/theme/diabook/theme.php:509 +#: ../../view/theme/diabook/theme.php:513 msgid "Last photos" msgstr "" -#: ../../view/theme/diabook/theme.php:546 +#: ../../view/theme/diabook/theme.php:550 msgid "Find Friends" msgstr "" -#: ../../view/theme/diabook/theme.php:547 +#: ../../view/theme/diabook/theme.php:551 msgid "Local Directory" msgstr "" -#: ../../view/theme/diabook/theme.php:549 ../../include/contact_widgets.php:35 +#: ../../view/theme/diabook/theme.php:553 ../../include/contact_widgets.php:35 msgid "Similar Interests" msgstr "" -#: ../../view/theme/diabook/theme.php:551 ../../include/contact_widgets.php:37 +#: ../../view/theme/diabook/theme.php:555 ../../include/contact_widgets.php:37 msgid "Invite Friends" msgstr "" -#: ../../view/theme/diabook/theme.php:602 +#: ../../view/theme/diabook/theme.php:606 msgid "Earth Layers" msgstr "" -#: ../../view/theme/diabook/theme.php:608 -#: ../../view/theme/diabook/config.php:115 +#: ../../view/theme/diabook/theme.php:611 +#: ../../view/theme/diabook/config.php:198 msgid "Set zoomfactor for Earth Layer" msgstr "" -#: ../../view/theme/diabook/theme.php:609 -#: ../../view/theme/diabook/config.php:116 +#: ../../view/theme/diabook/theme.php:612 +#: ../../view/theme/diabook/config.php:199 msgid "Set longitude (X) for Earth Layer" msgstr "" -#: ../../view/theme/diabook/theme.php:610 -#: ../../view/theme/diabook/config.php:117 +#: ../../view/theme/diabook/theme.php:613 +#: ../../view/theme/diabook/config.php:200 msgid "Set latitude (Y) for Earth Layer" msgstr "" -#: ../../view/theme/diabook/theme.php:625 +#: ../../view/theme/diabook/theme.php:626 msgid "Help or @NewHere ?" msgstr "" -#: ../../view/theme/diabook/theme.php:632 +#: ../../view/theme/diabook/theme.php:633 msgid "Connect Services" msgstr "" -#: ../../view/theme/diabook/theme.php:639 +#: ../../view/theme/diabook/theme.php:640 msgid "Last Tweets" msgstr "" #: ../../view/theme/diabook/theme.php:643 -#: ../../view/theme/diabook/config.php:114 +#: ../../view/theme/diabook/config.php:197 msgid "Set twitter search term" msgstr "" -#: ../../view/theme/diabook/config.php:111 +#: ../../view/theme/diabook/theme.php:673 +#: ../../view/theme/diabook/config.php:201 +msgid "Show \"Cummunity Pages\" at right-hand coloumn?" +msgstr "" + +#: ../../view/theme/diabook/theme.php:674 +#: ../../view/theme/diabook/config.php:202 +msgid "Show \"Earth Layers\" at right-hand coloumn?" +msgstr "" + +#: ../../view/theme/diabook/theme.php:675 +#: ../../view/theme/diabook/config.php:203 +msgid "Show \"Cummunity Profiles\" at right-hand coloumn?" +msgstr "" + +#: ../../view/theme/diabook/theme.php:676 +#: ../../view/theme/diabook/config.php:204 +msgid "Show \"Help or @NewHere\" at right-hand coloumn?" +msgstr "" + +#: ../../view/theme/diabook/theme.php:677 +#: ../../view/theme/diabook/config.php:205 +msgid "Show \"Connect Services\" at right-hand coloumn?" +msgstr "" + +#: ../../view/theme/diabook/theme.php:678 +#: ../../view/theme/diabook/config.php:206 +msgid "Show \"Find Friends\" at right-hand coloumn?" +msgstr "" + +#: ../../view/theme/diabook/theme.php:679 +#: ../../view/theme/diabook/config.php:207 +msgid "Show \"Last Tweets\" at right-hand coloumn?" +msgstr "" + +#: ../../view/theme/diabook/theme.php:680 +#: ../../view/theme/diabook/config.php:208 +msgid "Show \"Last Users\" at right-hand coloumn?" +msgstr "" + +#: ../../view/theme/diabook/theme.php:681 +#: ../../view/theme/diabook/config.php:209 +msgid "Show \"Last Photos\" at right-hand coloumn?" +msgstr "" + +#: ../../view/theme/diabook/theme.php:682 +#: ../../view/theme/diabook/config.php:210 +msgid "Show \"Last Likes\" at right-hand coloumn?" +msgstr "" + +#: ../../view/theme/diabook/config.php:194 #: ../../view/theme/dispy/config.php:74 msgid "Set line-height for posts and comments" msgstr "" -#: ../../view/theme/diabook/config.php:112 +#: ../../view/theme/diabook/config.php:195 msgid "Set resolution for middle column" msgstr "" -#: ../../view/theme/diabook/config.php:113 +#: ../../view/theme/diabook/config.php:196 msgid "Set color scheme" msgstr "" @@ -6108,11 +6168,11 @@ msgstr "" msgid "Finishes:" msgstr "" -#: ../../include/delivery.php:445 ../../include/notifier.php:652 +#: ../../include/delivery.php:452 ../../include/notifier.php:652 msgid "(no subject)" msgstr "" -#: ../../include/delivery.php:452 ../../include/enotify.php:23 +#: ../../include/delivery.php:459 ../../include/enotify.php:23 #: ../../include/notifier.php:659 msgid "noreply" msgstr "" @@ -6586,7 +6646,7 @@ msgstr "" msgid "%1$d %2$s ago" msgstr "" -#: ../../include/onepoll.php:402 +#: ../../include/onepoll.php:406 msgid "From: " msgstr "" From a048fd806aa64aa1a8498effa2ab5a7aafd54bb5 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 8 May 2012 17:40:56 -0700 Subject: [PATCH 29/57] don't provide 'show more' on remote friends in common unless there are actually more --- include/contact_widgets.php | 3 ++- view/remote_friends_common.tpl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 42d3afdee..ce1cdbad5 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -183,7 +183,8 @@ function common_friends_visitor_widget($profile_uid) { '$desc' => sprintf( tt("%d contact in common", "%d contacts in common", $t), $t), '$base' => $a->get_baseurl(), '$uid' => $profile_uid, - '$cid' => $cid, + '$cid' => (($cid) ? $cid : '0'), + '$linkmore' => (($t > 5) ? 'true' : ''), '$more' => t('show more'), '$items' => $r )); diff --git a/view/remote_friends_common.tpl b/view/remote_friends_common.tpl index fa66c4731..9e0562878 100644 --- a/view/remote_friends_common.tpl +++ b/view/remote_friends_common.tpl @@ -1,5 +1,5 @@
    -
    $desc      $more
    +
    $desc      {{ if $linkmore }}$more{{ endif }}
    {{ if $items }} {{ for $items as $item }}
    From a0293ae442c165c5257b0ca89dd73d78d1f0be12 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Wed, 9 May 2012 03:21:26 +0100 Subject: [PATCH 30/57] Diabook-dark cleaned up a bit. --- view/theme/diabook/diabook-dark/style-network.css | 7 +------ view/theme/diabook/diabook-dark/style-profile.css | 8 ++------ view/theme/diabook/diabook-dark/style.css | 10 ++-------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/view/theme/diabook/diabook-dark/style-network.css b/view/theme/diabook/diabook-dark/style-network.css index 43541d266..d9e2d0094 100644 --- a/view/theme/diabook/diabook-dark/style-network.css +++ b/view/theme/diabook/diabook-dark/style-network.css @@ -522,9 +522,6 @@ header { background: #1d1f1d; background-color: #1d1f1d; z-index: 100; - border-bottom: 1px; - border-bottom-color: black; - border-bottom-style: inset; } header #site-location { display: none; @@ -567,9 +564,7 @@ nav { background: #1d1f1d; color: #2e2f2e; z-index: 99; - border-bottom: 1px; - border-bottom-color: black; - border-bottom-style: inset; + } nav a, nav a:active, diff --git a/view/theme/diabook/diabook-dark/style-profile.css b/view/theme/diabook/diabook-dark/style-profile.css index 3ecad85af..4b6bc15b5 100644 --- a/view/theme/diabook/diabook-dark/style-profile.css +++ b/view/theme/diabook/diabook-dark/style-profile.css @@ -522,9 +522,7 @@ header { background: #1d1f1d; background-color: #1d1f1d; z-index: 100; - border-bottom: 1px; - border-bottom-color: black; - border-bottom-style: inset; + } header #site-location { display: none; @@ -567,9 +565,7 @@ nav { background: #1d1f1d; color: #2e2f2e; z-index: 99; - border-bottom: 1px; - border-bottom-color: black; - border-bottom-style: inset; + } nav a, nav a:active, diff --git a/view/theme/diabook/diabook-dark/style.css b/view/theme/diabook/diabook-dark/style.css index f00973085..fbba4ec2a 100644 --- a/view/theme/diabook/diabook-dark/style.css +++ b/view/theme/diabook/diabook-dark/style.css @@ -576,9 +576,6 @@ header { background: #0c0e0c; background-color: #1d1f1d; z-index: 100; - border-bottom: 1px; - border-bottom-color: black; - border-bottom-style: inset; } header #site-location { display: none; @@ -701,10 +698,7 @@ nav { background: #1d1f1d; color: #2e2f2e; z-index: 99; - border-bottom: 1px; - border-bottom-color: black; - border-bottom-style: inset; -} + } nav a, nav a:active, nav a:visited, @@ -1401,7 +1395,7 @@ body .pageheader{ padding-top: 10px; } .tread-wrapper a{ - color: #1872A2; + /* color: #1872A2; */ } .wall-item-decor { From 8a1f8515ca3c053d6e8eb67fcb6a3f04a6a958fe Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Wed, 9 May 2012 03:31:56 +0100 Subject: [PATCH 31/57] Fix jquery.fancybox, but still needs adding to theme.php --- .../diabook-dark/jquery.fancybox-1.3.4.css | 360 ++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 view/theme/diabook/diabook-dark/jquery.fancybox-1.3.4.css diff --git a/view/theme/diabook/diabook-dark/jquery.fancybox-1.3.4.css b/view/theme/diabook/diabook-dark/jquery.fancybox-1.3.4.css new file mode 100644 index 000000000..2bde4f96d --- /dev/null +++ b/view/theme/diabook/diabook-dark/jquery.fancybox-1.3.4.css @@ -0,0 +1,360 @@ +/* + * FancyBox - jQuery Plugin + * Simple and fancy lightbox alternative + * + * Examples and documentation at: http://fancybox.net + * + * Copyright (c) 2008 - 2010 Janis Skarnelis + * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. + * + * Version: 1.3.4 (11/11/2010) + * Requires: jQuery v1.3+ + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +#fancybox-loading { + position: fixed; + top: 50%; + left: 50%; + width: 40px; + height: 40px; + margin-top: -20px; + margin-left: -20px; + cursor: pointer; + overflow: hidden; + z-index: 1104; + display: none; +} + +#fancybox-loading div { + position: absolute; + top: 0; + left: 0; + width: 40px; + height: 480px; + background-image: url('fancybox.png'); +} + +#fancybox-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + z-index: 1100; + display: none; +} + +#fancybox-tmp { + padding: 0; + margin: 0; + border: 0; + overflow: auto; + display: none; +} + +#fancybox-wrap { + position: absolute; + top: 0; + left: 0; + padding: 20px; + z-index: 1101; + outline: none; + display: none; +} + +#fancybox-outer { + position: relative; + width: 100%; + height: 100%; + background: #fff; +} + +#fancybox-content { + width: 0; + height: 0; + padding: 0; + outline: none; + position: relative; + overflow: hidden; + z-index: 1102; + border: 0px solid #fff; + background: #2e2e2f; +} + +#fancybox-hide-sel-frame { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: transparent; + z-index: 1101; +} + +#fancybox-close { + position: absolute; + top: -15px; + right: -15px; + width: 30px; + height: 30px; + background: transparent url('fancybox.png') -40px 0px; + cursor: pointer; + z-index: 1103; + display: none; +} + +#fancybox-error { + color: #444; + font: normal 12px/20px Arial; + padding: 14px; + margin: 0; +} + +#fancybox-img { + width: 100%; + height: 100%; + padding: 0; + margin: 0; + border: none; + outline: none; + line-height: 0; + vertical-align: top; +} + +#fancybox-frame { + width: 100%; + height: 100%; + border: none; + display: block; +} + +#fancybox-left, #fancybox-right { + position: absolute; + bottom: 0px; + height: 100%; + width: 35%; + cursor: pointer; + outline: none; + background: transparent url('blank.gif'); + z-index: 1102; + display: none; +} + +#fancybox-left { + left: 0px; +} + +#fancybox-right { + right: 0px; +} + +#fancybox-left-ico, #fancybox-right-ico { + position: absolute; + top: 50%; + left: -9999px; + width: 30px; + height: 30px; + margin-top: -15px; + cursor: pointer; + z-index: 1102; + display: block; +} + +#fancybox-left-ico { + background-image: url('fancybox.png'); + background-position: -40px -30px; +} + +#fancybox-right-ico { + background-image: url('fancybox.png'); + background-position: -40px -60px; +} + +#fancybox-left:hover, #fancybox-right:hover { + visibility: visible; /* IE6 */ +} + +#fancybox-left:hover span { + left: 20px; +} + +#fancybox-right:hover span { + left: auto; + right: 20px; +} + +.fancybox-bg { + position: absolute; + padding: 0; + margin: 0; + border: 0; + width: 20px; + height: 20px; + z-index: 1001; +} + +#fancybox-bg-n { + top: -20px; + left: 0; + width: 100%; + background-image: url('fancybox-x.png'); +} + +#fancybox-bg-ne { + top: -20px; + right: -20px; + background-image: url('fancybox.png'); + background-position: -40px -162px; +} + +#fancybox-bg-e { + top: 0; + right: -20px; + height: 100%; + background-image: url('fancybox-y.png'); + background-position: -20px 0px; +} + +#fancybox-bg-se { + bottom: -20px; + right: -20px; + background-image: url('fancybox.png'); + background-position: -40px -182px; +} + +#fancybox-bg-s { + bottom: -20px; + left: 0; + width: 100%; + background-image: url('fancybox-x.png'); + background-position: 0px -20px; +} + +#fancybox-bg-sw { + bottom: -20px; + left: -20px; + background-image: url('fancybox.png'); + background-position: -40px -142px; +} + +#fancybox-bg-w { + top: 0; + left: -20px; + height: 100%; + background-image: url('fancybox-y.png'); +} + +#fancybox-bg-nw { + top: -20px; + left: -20px; + background-image: url('fancybox.png'); + background-position: -40px -122px; +} + +#fancybox-title { + font-family: Helvetica; + font-size: 12px; + z-index: 1102; +} + +.fancybox-title-inside { + padding-bottom: 10px; + text-align: center; + color: #333; + background: #fff; + position: relative; +} + +.fancybox-title-outside { + padding-top: 10px; + color: #fff; +} + +.fancybox-title-over { + position: absolute; + bottom: 0; + left: 0; + color: #FFF; + text-align: left; +} + +#fancybox-title-over { + padding: 10px; + background-image: url('fancy_title_over.png'); + display: block; +} + +.fancybox-title-float { + position: absolute; + left: 0; + bottom: -20px; + height: 32px; +} + +#fancybox-title-float-wrap { + border: none; + border-collapse: collapse; + width: auto; +} + +#fancybox-title-float-wrap td { + border: none; + white-space: nowrap; +} + +#fancybox-title-float-left { + padding: 0 0 0 15px; + background: url('fancybox.png') -40px -90px no-repeat; +} + +#fancybox-title-float-main { + color: #FFF; + line-height: 29px; + font-weight: bold; + padding: 0 0 3px 0; + background: url('fancybox-x.png') 0px -40px; +} + +#fancybox-title-float-right { + padding: 0 0 0 15px; + background: url('fancybox.png') -55px -90px no-repeat; +} + +/* IE6 */ + +.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; } +.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); } +.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); } + +.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame { + height: expression(this.parentNode.clientHeight + "px"); +} + +#fancybox-loading.fancybox-ie6 { + position: absolute; margin-top: 0; + top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'); +} + +#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); } + +/* IE6, IE7, IE8 */ + +.fancybox-ie .fancybox-bg { background: transparent !important; } + +.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); } +.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); } \ No newline at end of file From d2bbd92889216c41dd0dc0b0e8d4f3607b5c9a0c Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Wed, 9 May 2012 03:42:09 +0100 Subject: [PATCH 32/57] Fix TinyMCE, but needs adding to theme.php --- .../diabook/diabook-dark/custom_tinymce.css | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 view/theme/diabook/diabook-dark/custom_tinymce.css diff --git a/view/theme/diabook/diabook-dark/custom_tinymce.css b/view/theme/diabook/diabook-dark/custom_tinymce.css new file mode 100644 index 000000000..7932653b6 --- /dev/null +++ b/view/theme/diabook/diabook-dark/custom_tinymce.css @@ -0,0 +1,41 @@ +body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; margin:8px;} +body {background:#FFF;} +body.mceForceColors {background:#FFF; color:#000;} +h1 {font-size: 2em} +h2 {font-size: 1.5em} +h3 {font-size: 1.17em} +h4 {font-size: 1em} +h5 {font-size: .83em} +h6 {font-size: .75em} +.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} +img {border:0;} +table {cursor:default} +table td, table th {cursor:text} +ins {border-bottom:1px solid green; text-decoration: none; color:green} +del {color:red; text-decoration:line-through} +cite {border-bottom:1px dashed blue} +acronym {border-bottom:1px dotted #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} + +/* IE */ +* html body { +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +} + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} + + +object { + display: block; width: 400px; + background: #cccccc url(../images/plugin.png) no-repeat center center; +} From 89d3ce7b5d57acbeda09eb6b5ae53496133a9d45 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Wed, 9 May 2012 04:54:17 +0100 Subject: [PATCH 33/57] Diabook-dark - do things the right way instead of the stupid way. --- .../diabook-dark/jquery.fancybox-1.3.4.css | 360 ------------------ view/theme/diabook/diabook-dark/style.css | 12 + 2 files changed, 12 insertions(+), 360 deletions(-) delete mode 100644 view/theme/diabook/diabook-dark/jquery.fancybox-1.3.4.css diff --git a/view/theme/diabook/diabook-dark/jquery.fancybox-1.3.4.css b/view/theme/diabook/diabook-dark/jquery.fancybox-1.3.4.css deleted file mode 100644 index 2bde4f96d..000000000 --- a/view/theme/diabook/diabook-dark/jquery.fancybox-1.3.4.css +++ /dev/null @@ -1,360 +0,0 @@ -/* - * FancyBox - jQuery Plugin - * Simple and fancy lightbox alternative - * - * Examples and documentation at: http://fancybox.net - * - * Copyright (c) 2008 - 2010 Janis Skarnelis - * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated. - * - * Version: 1.3.4 (11/11/2010) - * Requires: jQuery v1.3+ - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ - -#fancybox-loading { - position: fixed; - top: 50%; - left: 50%; - width: 40px; - height: 40px; - margin-top: -20px; - margin-left: -20px; - cursor: pointer; - overflow: hidden; - z-index: 1104; - display: none; -} - -#fancybox-loading div { - position: absolute; - top: 0; - left: 0; - width: 40px; - height: 480px; - background-image: url('fancybox.png'); -} - -#fancybox-overlay { - position: absolute; - top: 0; - left: 0; - width: 100%; - z-index: 1100; - display: none; -} - -#fancybox-tmp { - padding: 0; - margin: 0; - border: 0; - overflow: auto; - display: none; -} - -#fancybox-wrap { - position: absolute; - top: 0; - left: 0; - padding: 20px; - z-index: 1101; - outline: none; - display: none; -} - -#fancybox-outer { - position: relative; - width: 100%; - height: 100%; - background: #fff; -} - -#fancybox-content { - width: 0; - height: 0; - padding: 0; - outline: none; - position: relative; - overflow: hidden; - z-index: 1102; - border: 0px solid #fff; - background: #2e2e2f; -} - -#fancybox-hide-sel-frame { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: transparent; - z-index: 1101; -} - -#fancybox-close { - position: absolute; - top: -15px; - right: -15px; - width: 30px; - height: 30px; - background: transparent url('fancybox.png') -40px 0px; - cursor: pointer; - z-index: 1103; - display: none; -} - -#fancybox-error { - color: #444; - font: normal 12px/20px Arial; - padding: 14px; - margin: 0; -} - -#fancybox-img { - width: 100%; - height: 100%; - padding: 0; - margin: 0; - border: none; - outline: none; - line-height: 0; - vertical-align: top; -} - -#fancybox-frame { - width: 100%; - height: 100%; - border: none; - display: block; -} - -#fancybox-left, #fancybox-right { - position: absolute; - bottom: 0px; - height: 100%; - width: 35%; - cursor: pointer; - outline: none; - background: transparent url('blank.gif'); - z-index: 1102; - display: none; -} - -#fancybox-left { - left: 0px; -} - -#fancybox-right { - right: 0px; -} - -#fancybox-left-ico, #fancybox-right-ico { - position: absolute; - top: 50%; - left: -9999px; - width: 30px; - height: 30px; - margin-top: -15px; - cursor: pointer; - z-index: 1102; - display: block; -} - -#fancybox-left-ico { - background-image: url('fancybox.png'); - background-position: -40px -30px; -} - -#fancybox-right-ico { - background-image: url('fancybox.png'); - background-position: -40px -60px; -} - -#fancybox-left:hover, #fancybox-right:hover { - visibility: visible; /* IE6 */ -} - -#fancybox-left:hover span { - left: 20px; -} - -#fancybox-right:hover span { - left: auto; - right: 20px; -} - -.fancybox-bg { - position: absolute; - padding: 0; - margin: 0; - border: 0; - width: 20px; - height: 20px; - z-index: 1001; -} - -#fancybox-bg-n { - top: -20px; - left: 0; - width: 100%; - background-image: url('fancybox-x.png'); -} - -#fancybox-bg-ne { - top: -20px; - right: -20px; - background-image: url('fancybox.png'); - background-position: -40px -162px; -} - -#fancybox-bg-e { - top: 0; - right: -20px; - height: 100%; - background-image: url('fancybox-y.png'); - background-position: -20px 0px; -} - -#fancybox-bg-se { - bottom: -20px; - right: -20px; - background-image: url('fancybox.png'); - background-position: -40px -182px; -} - -#fancybox-bg-s { - bottom: -20px; - left: 0; - width: 100%; - background-image: url('fancybox-x.png'); - background-position: 0px -20px; -} - -#fancybox-bg-sw { - bottom: -20px; - left: -20px; - background-image: url('fancybox.png'); - background-position: -40px -142px; -} - -#fancybox-bg-w { - top: 0; - left: -20px; - height: 100%; - background-image: url('fancybox-y.png'); -} - -#fancybox-bg-nw { - top: -20px; - left: -20px; - background-image: url('fancybox.png'); - background-position: -40px -122px; -} - -#fancybox-title { - font-family: Helvetica; - font-size: 12px; - z-index: 1102; -} - -.fancybox-title-inside { - padding-bottom: 10px; - text-align: center; - color: #333; - background: #fff; - position: relative; -} - -.fancybox-title-outside { - padding-top: 10px; - color: #fff; -} - -.fancybox-title-over { - position: absolute; - bottom: 0; - left: 0; - color: #FFF; - text-align: left; -} - -#fancybox-title-over { - padding: 10px; - background-image: url('fancy_title_over.png'); - display: block; -} - -.fancybox-title-float { - position: absolute; - left: 0; - bottom: -20px; - height: 32px; -} - -#fancybox-title-float-wrap { - border: none; - border-collapse: collapse; - width: auto; -} - -#fancybox-title-float-wrap td { - border: none; - white-space: nowrap; -} - -#fancybox-title-float-left { - padding: 0 0 0 15px; - background: url('fancybox.png') -40px -90px no-repeat; -} - -#fancybox-title-float-main { - color: #FFF; - line-height: 29px; - font-weight: bold; - padding: 0 0 3px 0; - background: url('fancybox-x.png') 0px -40px; -} - -#fancybox-title-float-right { - padding: 0 0 0 15px; - background: url('fancybox.png') -55px -90px no-repeat; -} - -/* IE6 */ - -.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); } - -.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); } -.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); } - -.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; } -.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); } -.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); } -.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); } - -.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame { - height: expression(this.parentNode.clientHeight + "px"); -} - -#fancybox-loading.fancybox-ie6 { - position: absolute; margin-top: 0; - top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'); -} - -#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); } - -/* IE6, IE7, IE8 */ - -.fancybox-ie .fancybox-bg { background: transparent !important; } - -.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); } -.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); } \ No newline at end of file diff --git a/view/theme/diabook/diabook-dark/style.css b/view/theme/diabook/diabook-dark/style.css index fbba4ec2a..fdc4e6481 100644 --- a/view/theme/diabook/diabook-dark/style.css +++ b/view/theme/diabook/diabook-dark/style.css @@ -7,6 +7,18 @@ /* = Admin = */ /* ========= */ +#fancybox-content { + width: 0; + height: 0; + padding: 0; + outline: none; + position: relative; + overflow: hidden; + z-index: 1102; + border: 0px solid #fff; + background: #2e2e2f !important; +} + #adminpage { /* width: 80%;*/ } From 70a07086ad186e3f0cd978dd3f52e78fb92494cf Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 8 May 2012 22:46:40 -0700 Subject: [PATCH 34/57] slight improvement in a couple of queries --- boot.php | 6 ++++++ include/text.php | 6 ++++++ mod/network.php | 16 ++++++++-------- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/boot.php b/boot.php index d44d2bddc..e98bfea9d 100644 --- a/boot.php +++ b/boot.php @@ -29,6 +29,12 @@ define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); define ( 'JPEG_QUALITY', 100 ); +/** + * Not yet used + */ + +define ( 'DEFAULT_DB_ENGINE', 'MyISAM' ); + /** * SSL redirection policies */ diff --git a/include/text.php b/include/text.php index 1b5b0afd4..e3c683338 100644 --- a/include/text.php +++ b/include/text.php @@ -1524,3 +1524,9 @@ function fix_mce_lf($s) { $s = str_replace("\n\n","\n",$s); return $s; } + + +function protect_sprintf($s) { + return(str_replace('%','%%',$s)); +} + diff --git a/mod/network.php b/mod/network.php index 5655f1bfa..e59839ccc 100644 --- a/mod/network.php +++ b/mod/network.php @@ -340,7 +340,7 @@ function network_content(&$a, $update = 0) { info( t('Group is empty')); } - $sql_extra = " AND `item`.`parent` IN ( SELECT DISTINCT(`parent`) FROM `item` WHERE 1 $sql_options AND ( `contact-id` IN ( $contact_str ) OR `allow_gid` REGEXP '<" . intval($group) . ">' ) and deleted = 0 ) "; + $sql_extra = " AND `item`.`parent` IN ( SELECT DISTINCT(`parent`) FROM `item` WHERE 1 $sql_options AND ( `contact-id` IN ( $contact_str ) OR `allow_gid` like '" . protect_sprintf('%<' . intval($group) . '>%') . "' ) and deleted = 0 ) "; $o = '

    ' . t('Group: ') . $r[0]['name'] . '

    ' . $o; } elseif($cid) { @@ -398,9 +398,9 @@ function network_content(&$a, $update = 0) { if(x($_GET,'search')) { $search = escape_tags($_GET['search']); - $sql_extra .= sprintf(" AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' ) ", - dbesc(preg_quote($search)), - dbesc('\\]' . preg_quote($search) . '\\[') + $sql_extra .= sprintf(" AND ( `item`.`body` like '%s' OR `item`.`tag` like '%s' ) ", + dbesc(protect_sprintf('%' . $search . '%')), + dbesc(protect_sprintf('%]' . $search . '[%')) ); } if(strlen($file)) { @@ -412,10 +412,10 @@ function network_content(&$a, $update = 0) { $myurl = substr($myurl,strpos($myurl,'://')+3); $myurl = str_replace(array('www.','.'),array('','\\.'),$myurl); $diasp_url = str_replace('/profile/','/u/',$myurl); - $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` regexp '%s' or `tag` regexp '%s' or tag regexp '%s' )) ", - dbesc($myurl . '$'), - dbesc($myurl . '\\]'), - dbesc($diasp_url . '\\]') + $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` like '%s' or `tag` like '%s' or tag like '%s' )) ", + dbesc(protect_sprintf('%s' . $myurl)), + dbesc(protect_sprintf('%' . $myurl . '\\]%')), + dbesc(protect_sprintf('%' . $diasp_url . '\\]%')) ); } From 53157bb954acb7597347c6b4a87e64e7a2f6cc79 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 9 May 2012 04:18:01 -0700 Subject: [PATCH 35/57] send browser back to correct page (with query args) after posting --- include/conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/conversation.php b/include/conversation.php index 521b4623b..e48a8e6d6 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -959,7 +959,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins)); $o .= replace_macros($tpl,array( - '$return_path' => $a->cmd, + '$return_path' => $a->query_string, '$action' => $a->get_baseurl(true) . '/item', '$share' => (x($x,'button') ? $x['button'] : t('Share')), '$upload' => t('Upload photo'), From 8be8db39de9ffc0947e681d5e04b305d4fdf9e20 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 9 May 2012 17:56:05 -0700 Subject: [PATCH 36/57] rev update --- boot.php | 2 +- util/messages.po | 132 ++++++++++++++++++++++++++--------------------- 2 files changed, 73 insertions(+), 61 deletions(-) diff --git a/boot.php b/boot.php index e98bfea9d..ef8763136 100644 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1336' ); +define ( 'FRIENDICA_VERSION', '2.3.1337' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1143 ); diff --git a/util/messages.po b/util/messages.po index e6376310b..37878d86a 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 2.3.1336\n" +"Project-Id-Version: 2.3.1337\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-08 10:00-0700\n" +"POT-Creation-Date: 2012-05-09 10:00-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -156,7 +156,7 @@ msgstr "" #: ../../addon/piwik/piwik.php:89 ../../addon/twitter/twitter.php:180 #: ../../addon/twitter/twitter.php:209 ../../addon/twitter/twitter.php:375 #: ../../addon/irc/irc.php:55 ../../addon/blogger/blogger.php:102 -#: ../../addon/posterous/posterous.php:90 +#: ../../addon/posterous/posterous.php:103 #: ../../view/theme/cleanzero/config.php:80 #: ../../view/theme/diabook/theme.php:683 #: ../../view/theme/diabook/config.php:190 @@ -220,7 +220,7 @@ msgid "link to source" msgstr "" #: ../../mod/events.php:324 ../../view/theme/diabook/theme.php:127 -#: ../../include/nav.php:52 ../../boot.php:1493 +#: ../../include/nav.php:52 ../../boot.php:1499 msgid "Events" msgstr "" @@ -270,7 +270,7 @@ msgid "Description:" msgstr "" #: ../../mod/events.php:423 ../../include/event.php:37 -#: ../../include/bb2diaspora.php:260 ../../boot.php:1092 +#: ../../include/bb2diaspora.php:260 ../../boot.php:1098 msgid "Location:" msgstr "" @@ -345,7 +345,7 @@ msgstr "" msgid "No" msgstr "" -#: ../../mod/photos.php:43 ../../boot.php:1487 +#: ../../mod/photos.php:43 ../../boot.php:1493 msgid "Photo Albums" msgstr "" @@ -545,7 +545,7 @@ msgstr "" #: ../../mod/photos.php:1232 ../../mod/photos.php:1272 #: ../../mod/photos.php:1303 ../../include/conversation.php:554 -#: ../../boot.php:506 +#: ../../boot.php:512 msgid "Comment" msgstr "" @@ -1166,7 +1166,7 @@ msgid "is interested in:" msgstr "" #: ../../mod/match.php:58 ../../mod/suggest.php:59 -#: ../../include/contact_widgets.php:9 ../../boot.php:1036 +#: ../../include/contact_widgets.php:9 ../../boot.php:1042 msgid "Connect" msgstr "" @@ -1692,7 +1692,7 @@ msgstr "" #: ../../addon/facebook/facebook.php:680 #: ../../addon/facebook/facebook.php:1170 #: ../../addon/testdrive/testdrive.php:58 ../../include/items.php:2726 -#: ../../boot.php:686 +#: ../../boot.php:692 msgid "Administrator" msgstr "" @@ -1702,7 +1702,7 @@ msgid "" "Password reset failed." msgstr "" -#: ../../mod/lostpass.php:83 ../../boot.php:818 +#: ../../mod/lostpass.php:83 ../../boot.php:824 msgid "Password Reset" msgstr "" @@ -2352,7 +2352,7 @@ msgstr "" msgid "Invalid contact." msgstr "" -#: ../../mod/notes.php:44 ../../boot.php:1499 +#: ../../mod/notes.php:44 ../../boot.php:1505 msgid "Personal Notes" msgstr "" @@ -2603,7 +2603,7 @@ msgstr "" #: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:124 #: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:74 -#: ../../include/nav.php:50 ../../boot.php:1478 +#: ../../include/nav.php:50 ../../boot.php:1484 msgid "Profile" msgstr "" @@ -2775,7 +2775,7 @@ msgstr "" msgid "Choose a nickname: " msgstr "" -#: ../../mod/register.php:567 ../../include/nav.php:81 ../../boot.php:784 +#: ../../mod/register.php:567 ../../include/nav.php:81 ../../boot.php:790 msgid "Register" msgstr "" @@ -2818,7 +2818,7 @@ msgid "Access denied." msgstr "" #: ../../mod/fbrowser.php:23 ../../view/theme/diabook/theme.php:126 -#: ../../include/nav.php:51 ../../boot.php:1484 +#: ../../include/nav.php:51 ../../boot.php:1490 msgid "Photos" msgstr "" @@ -3597,7 +3597,7 @@ msgstr "" msgid "FTP Password" msgstr "" -#: ../../mod/profile.php:21 ../../boot.php:949 +#: ../../mod/profile.php:21 ../../boot.php:955 msgid "Requested profile is not available." msgstr "" @@ -4005,23 +4005,23 @@ msgstr "" msgid "Edit/Manage Profiles" msgstr "" -#: ../../mod/profiles.php:621 ../../boot.php:1058 +#: ../../mod/profiles.php:621 ../../boot.php:1064 msgid "Change profile photo" msgstr "" -#: ../../mod/profiles.php:622 ../../boot.php:1059 +#: ../../mod/profiles.php:622 ../../boot.php:1065 msgid "Create New Profile" msgstr "" -#: ../../mod/profiles.php:633 ../../boot.php:1069 +#: ../../mod/profiles.php:633 ../../boot.php:1075 msgid "Profile Image" msgstr "" -#: ../../mod/profiles.php:635 ../../boot.php:1072 +#: ../../mod/profiles.php:635 ../../boot.php:1078 msgid "visible to everybody" msgstr "" -#: ../../mod/profiles.php:636 ../../boot.php:1073 +#: ../../mod/profiles.php:636 ../../boot.php:1079 msgid "Edit visibility" msgstr "" @@ -4633,8 +4633,8 @@ msgid "Forums" msgstr "" #: ../../addon/page/page.php:63 ../../addon/showmore/showmore.php:87 -#: ../../include/contact_widgets.php:187 ../../include/conversation.php:466 -#: ../../boot.php:507 +#: ../../include/contact_widgets.php:188 ../../include/conversation.php:466 +#: ../../boot.php:513 msgid "show more" msgstr "" @@ -4650,7 +4650,7 @@ msgstr "" #: ../../addon/communityhome/communityhome.php:34 #: ../../addon/communityhome/twillingham/communityhome.php:28 #: ../../addon/communityhome/twillingham/communityhome.php:34 -#: ../../include/nav.php:64 ../../boot.php:805 +#: ../../include/nav.php:64 ../../boot.php:811 msgid "Login" msgstr "" @@ -4683,6 +4683,10 @@ msgstr "" msgid "event" msgstr "" +#: ../../addon/hangman/hangman.php:19 +msgid "Hangman" +msgstr "" + #: ../../addon/uhremotestorage/uhremotestorage.php:84 #, php-format msgid "" @@ -4830,7 +4834,7 @@ msgid "Post to Drupal by default" msgstr "" #: ../../addon/drpost/drpost.php:184 ../../addon/wppost/wppost.php:190 -#: ../../addon/blogger/blogger.php:172 ../../addon/posterous/posterous.php:177 +#: ../../addon/blogger/blogger.php:172 ../../addon/posterous/posterous.php:192 msgid "Post from Friendica" msgstr "" @@ -5549,27 +5553,35 @@ msgstr "" msgid "Post to Blogger by default" msgstr "" -#: ../../addon/posterous/posterous.php:36 +#: ../../addon/posterous/posterous.php:37 msgid "Post to Posterous" msgstr "" -#: ../../addon/posterous/posterous.php:67 +#: ../../addon/posterous/posterous.php:70 msgid "Posterous Post Settings" msgstr "" -#: ../../addon/posterous/posterous.php:69 +#: ../../addon/posterous/posterous.php:72 msgid "Enable Posterous Post Plugin" msgstr "" -#: ../../addon/posterous/posterous.php:74 +#: ../../addon/posterous/posterous.php:77 msgid "Posterous login" msgstr "" -#: ../../addon/posterous/posterous.php:79 +#: ../../addon/posterous/posterous.php:82 msgid "Posterous password" msgstr "" -#: ../../addon/posterous/posterous.php:84 +#: ../../addon/posterous/posterous.php:87 +msgid "Posterous site ID" +msgstr "" + +#: ../../addon/posterous/posterous.php:92 +msgid "Posterous API token" +msgstr "" + +#: ../../addon/posterous/posterous.php:97 msgid "Post to Posterous by default" msgstr "" @@ -5779,7 +5791,7 @@ msgstr "" msgid "Set colour scheme" msgstr "" -#: ../../include/profile_advanced.php:17 ../../boot.php:1094 +#: ../../include/profile_advanced.php:17 ../../boot.php:1100 msgid "Gender:" msgstr "" @@ -5800,11 +5812,11 @@ msgstr "" msgid "Age:" msgstr "" -#: ../../include/profile_advanced.php:37 ../../boot.php:1097 +#: ../../include/profile_advanced.php:37 ../../boot.php:1103 msgid "Status:" msgstr "" -#: ../../include/profile_advanced.php:45 ../../boot.php:1099 +#: ../../include/profile_advanced.php:45 ../../boot.php:1105 msgid "Homepage:" msgstr "" @@ -6388,7 +6400,7 @@ msgstr "" msgid "Contacts not in any group" msgstr "" -#: ../../include/nav.php:46 ../../boot.php:804 +#: ../../include/nav.php:46 ../../boot.php:810 msgid "Logout" msgstr "" @@ -6396,7 +6408,7 @@ msgstr "" msgid "End this session" msgstr "" -#: ../../include/nav.php:49 ../../boot.php:1472 +#: ../../include/nav.php:49 ../../boot.php:1478 msgid "Status" msgstr "" @@ -6476,11 +6488,11 @@ msgstr "" msgid "Manage other pages" msgstr "" -#: ../../include/nav.php:138 ../../boot.php:1052 +#: ../../include/nav.php:138 ../../boot.php:1058 msgid "Profiles" msgstr "" -#: ../../include/nav.php:138 ../../boot.php:1052 +#: ../../include/nav.php:138 ../../boot.php:1058 msgid "Manage/edit profiles" msgstr "" @@ -7155,96 +7167,96 @@ msgstr "" msgid "permissions" msgstr "" -#: ../../boot.php:505 +#: ../../boot.php:511 msgid "Delete this item?" msgstr "" -#: ../../boot.php:508 +#: ../../boot.php:514 msgid "show fewer" msgstr "" -#: ../../boot.php:681 +#: ../../boot.php:687 #, php-format msgid "Update %s failed. See error logs." msgstr "" -#: ../../boot.php:683 +#: ../../boot.php:689 #, php-format msgid "Update Error at %s" msgstr "" -#: ../../boot.php:783 +#: ../../boot.php:789 msgid "Create a New Account" msgstr "" -#: ../../boot.php:807 +#: ../../boot.php:813 msgid "Nickname or Email address: " msgstr "" -#: ../../boot.php:808 +#: ../../boot.php:814 msgid "Password: " msgstr "" -#: ../../boot.php:811 +#: ../../boot.php:817 msgid "Or login using OpenID: " msgstr "" -#: ../../boot.php:817 +#: ../../boot.php:823 msgid "Forgot your password?" msgstr "" -#: ../../boot.php:984 +#: ../../boot.php:990 msgid "Edit profile" msgstr "" -#: ../../boot.php:1044 +#: ../../boot.php:1050 msgid "Message" msgstr "" -#: ../../boot.php:1160 ../../boot.php:1236 +#: ../../boot.php:1166 ../../boot.php:1242 msgid "g A l F d" msgstr "" -#: ../../boot.php:1161 ../../boot.php:1237 +#: ../../boot.php:1167 ../../boot.php:1243 msgid "F d" msgstr "" -#: ../../boot.php:1206 ../../boot.php:1277 +#: ../../boot.php:1212 ../../boot.php:1283 msgid "[today]" msgstr "" -#: ../../boot.php:1218 +#: ../../boot.php:1224 msgid "Birthday Reminders" msgstr "" -#: ../../boot.php:1219 +#: ../../boot.php:1225 msgid "Birthdays this week:" msgstr "" -#: ../../boot.php:1270 +#: ../../boot.php:1276 msgid "[No description]" msgstr "" -#: ../../boot.php:1288 +#: ../../boot.php:1294 msgid "Event Reminders" msgstr "" -#: ../../boot.php:1289 +#: ../../boot.php:1295 msgid "Events this week:" msgstr "" -#: ../../boot.php:1475 +#: ../../boot.php:1481 msgid "Status Messages and Posts" msgstr "" -#: ../../boot.php:1481 +#: ../../boot.php:1487 msgid "Profile Details" msgstr "" -#: ../../boot.php:1496 +#: ../../boot.php:1502 msgid "Events and Calendar" msgstr "" -#: ../../boot.php:1502 +#: ../../boot.php:1508 msgid "Only You Can See This" msgstr "" From 4a42414135538fedad53ba6a2bc46ae18d652609 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 9 May 2012 18:15:27 -0700 Subject: [PATCH 37/57] rev update --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index ef8763136..e4d8663a3 100644 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1337' ); +define ( 'FRIENDICA_VERSION', '3.0.1337' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1143 ); From a077e63fa58992fe04eeb7f5aa9a865985fa1039 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Thu, 10 May 2012 02:27:48 -0400 Subject: [PATCH 38/57] don't make -desc so obnoxious looking Signed-off-by: Simon L'nu --- view/theme/dispy/dark/style.css | 7 ++++--- view/theme/dispy/dark/style.less | 13 +++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/view/theme/dispy/dark/style.css b/view/theme/dispy/dark/style.css index 7582c9add..169a00398 100644 --- a/view/theme/dispy/dark/style.css +++ b/view/theme/dispy/dark/style.css @@ -48,7 +48,7 @@ h1,h2,h3,h4,h5,h6{margin:10px 0px;font-weight:bold;border-bottom:1px solid #638e .action{margin:5px 0;} .tool{margin:5px 0;list-style:none;} #articlemain{width:100%;height:100%;margin:0 auto;} -[class$="-desc"],[id$="-desc"]{color:#2e2f2e;background:#eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-moz-box-shadow:3px 3px 5px 0px #111111;-o-box-shadow:3px 3px 5px 0px #111111;-webkit-box-shadow:3px 3px 5px 0px #111111;-ms-box-shadow:3px 3px 5px 0px #111111;box-shadow:3px 3px 5px 0px #111111;margin:3px 10px 7px 0;padding:6px 7px;font-weight:bold;font-size:smaller;} +[class$="-desc"],[id$="-desc"]{color:#2e2f2e;background:#eeeecc;margin:3px 10px 7px 0;padding:6px 7px;font-weight:bold;font-size:smaller;} #asidemain .field{overflow:hidden;width:200px;} #login-extra-links{overflow:auto !important;padding-top:60px !important;width:100% !important;}#login-extra-links a{margin-right:20px;} #login_standard{display:block !important;float:none !important;height:100% !important;position:relative !important;width:100% !important;}#login_standard .field label{width:200px !important;} @@ -279,11 +279,12 @@ div[id$="wrapper"]{height:100%;margin-bottom:1em;}div[id$="wrapper"] br{clear:le .mail-conv-subject{clear:right;font-weight:bold;font-size:1.2em;} .mail-conv-body{clear:both;} .mail-conv-delete-wrapper{margin-top:5px;} -.view-contact-wrapper,.contact-entry-wrapper{float:left;margin:0 5px 40px 0;width:120px;height:120px;padding:3px;position:relative;} +.view-contact-wrapper,.contact-entry-wrapper{float:left;margin:0 5px 40px 0;width:120px;height:135px;padding:3px;position:relative;} .contact-direction-wrapper{position:absolute;top:20px;} .contact-edit-links{position:absolute;top:60px;} .contact-entry-photo{margin-left:20px;} -.contact-entry-name{width:120px;font-weight:bold;} +.contact-entry-name{width:120px;font-weight:bold;font-size:small;} +.contact-entry-details{font-size:x-small;} .contact-entry-photo{position:relative;} .contact-entry-edit-links .icon{border:1px solid #babdb6;-o-border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;background-color:white;} #contact-entry-url,[id^="contact-entry-url"],#contact-entry-network,[id^="contact-entry-network"]{font-size:smaller;} diff --git a/view/theme/dispy/dark/style.less b/view/theme/dispy/dark/style.less index f48a77e27..caa45918c 100644 --- a/view/theme/dispy/dark/style.less +++ b/view/theme/dispy/dark/style.less @@ -268,8 +268,8 @@ h4, h5, h6 { [class$="-desc"], [id$="-desc"] { color: @bg_colour; background: @main_colour; - .rounded_corners; - .box_shadow(3px, 3px, 5px); + // .rounded_corners; + // .box_shadow(3px, 3px, 5px); margin: 3px 10px 7px 0; padding: 6px 7px; font-weight: bold; @@ -1736,10 +1736,11 @@ div { /** * contacts */ -.view-contact-wrapper, .contact-entry-wrapper { +.view-contact-wrapper, +.contact-entry-wrapper { float: left; margin: 0 5px 40px 0; - .box(120px, 120px); + .box(120px, 135px); padding: 3px; position: relative; } @@ -1759,6 +1760,10 @@ div { .contact-entry-name { width: 120px; font-weight: bold; + font-size: small; +} +.contact-entry-details { + font-size: x-small; } .contact-entry-photo { position: relative; From 69b43582d07d90536030c780b8c85db2ef789ee4 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Thu, 10 May 2012 09:54:16 +0200 Subject: [PATCH 39/57] diabook-theme: some css/bug-fixes --- view/theme/diabook/admin_site.tpl | 3 +++ view/theme/diabook/bottom.tpl | 2 ++ view/theme/diabook/diabook-aerith/style-wide.css | 5 ++--- view/theme/diabook/diabook-aerith/style.css | 5 ++--- view/theme/diabook/diabook-blue/style-wide.css | 5 ++--- view/theme/diabook/diabook-blue/style.css | 5 ++--- view/theme/diabook/diabook-dark/style-wide.css | 5 ++--- view/theme/diabook/diabook-dark/style.css | 5 ++--- view/theme/diabook/diabook-green/style-wide.css | 5 ++--- view/theme/diabook/diabook-green/style.css | 5 ++--- view/theme/diabook/diabook-pink/style-wide.css | 5 ++--- view/theme/diabook/diabook-pink/style.css | 5 ++--- view/theme/diabook/diabook-red/style-wide.css | 6 ++---- view/theme/diabook/diabook-red/style.css | 6 ++---- view/theme/diabook/nav.tpl | 2 +- view/theme/diabook/style-wide.css | 4 +--- view/theme/diabook/style.css | 4 +--- view/theme/diabook/theme.php | 8 ++++---- 18 files changed, 36 insertions(+), 49 deletions(-) diff --git a/view/theme/diabook/admin_site.tpl b/view/theme/diabook/admin_site.tpl index dd89b81a9..346934b70 100644 --- a/view/theme/diabook/admin_site.tpl +++ b/view/theme/diabook/admin_site.tpl @@ -49,6 +49,9 @@ {{ inc field_input.tpl with $field=$proxy }}{{ endinc }} {{ inc field_input.tpl with $field=$proxyuser }}{{ endinc }} {{ inc field_input.tpl with $field=$timeout }}{{ endinc }} + {{ inc field_input.tpl with $field=$delivery_interval }}{{ endinc }} + {{ inc field_input.tpl with $field=$poll_interval }}{{ endinc }} + {{ inc field_input.tpl with $field=$maxloadavg }}{{ endinc }} {{ inc field_input.tpl with $field=$abandon_days }}{{ endinc }}
    diff --git a/view/theme/diabook/bottom.tpl b/view/theme/diabook/bottom.tpl index 02ad1dcd2..081199360 100644 --- a/view/theme/diabook/bottom.tpl +++ b/view/theme/diabook/bottom.tpl @@ -67,12 +67,14 @@ $(document).ready(function() { $("a#top").attr("id","down"); $("a#down").attr("onclick","scrolldown()"); $("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_bottom.png"); + $("img#scroll_top_bottom").attr("title","Scroll to bottom"); } if (scrollInfo > "900"){ $("a#down").attr("id","top"); $("a#top").attr("onclick","scrolltop()"); $("img#scroll_top_bottom").attr("src","view/theme/diabook/icons/scroll_top.png"); + $("img#scroll_top_bottom").attr("title","Back to top"); } }); diff --git a/view/theme/diabook/diabook-aerith/style-wide.css b/view/theme/diabook/diabook-aerith/style-wide.css index 5c263154f..43c0974b1 100644 --- a/view/theme/diabook/diabook-aerith/style-wide.css +++ b/view/theme/diabook/diabook-aerith/style-wide.css @@ -555,6 +555,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -621,9 +622,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/diabook-aerith/style.css b/view/theme/diabook/diabook-aerith/style.css index e0f38aff6..b512c8bfe 100644 --- a/view/theme/diabook/diabook-aerith/style.css +++ b/view/theme/diabook/diabook-aerith/style.css @@ -555,6 +555,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -621,9 +622,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/diabook-blue/style-wide.css b/view/theme/diabook/diabook-blue/style-wide.css index 189f4d559..103047f32 100644 --- a/view/theme/diabook/diabook-blue/style-wide.css +++ b/view/theme/diabook/diabook-blue/style-wide.css @@ -554,6 +554,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -607,9 +608,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/diabook-blue/style.css b/view/theme/diabook/diabook-blue/style.css index 2b68afc6f..e7f3fd0bc 100644 --- a/view/theme/diabook/diabook-blue/style.css +++ b/view/theme/diabook/diabook-blue/style.css @@ -554,6 +554,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -607,9 +608,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/diabook-dark/style-wide.css b/view/theme/diabook/diabook-dark/style-wide.css index 73d0e4c0f..3475408b2 100644 --- a/view/theme/diabook/diabook-dark/style-wide.css +++ b/view/theme/diabook/diabook-dark/style-wide.css @@ -553,6 +553,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -606,9 +607,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/diabook-dark/style.css b/view/theme/diabook/diabook-dark/style.css index fdc4e6481..24d319f8a 100644 --- a/view/theme/diabook/diabook-dark/style.css +++ b/view/theme/diabook/diabook-dark/style.css @@ -565,6 +565,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #2e2f2e; @@ -615,9 +616,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/diabook-green/style-wide.css b/view/theme/diabook/diabook-green/style-wide.css index d98a6c325..0a9c5e35c 100644 --- a/view/theme/diabook/diabook-green/style-wide.css +++ b/view/theme/diabook/diabook-green/style-wide.css @@ -555,6 +555,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -609,9 +610,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/diabook-green/style.css b/view/theme/diabook/diabook-green/style.css index 6a9d8f7d0..762310e4d 100644 --- a/view/theme/diabook/diabook-green/style.css +++ b/view/theme/diabook/diabook-green/style.css @@ -557,6 +557,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -611,9 +612,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /*color*/ /* messages */ diff --git a/view/theme/diabook/diabook-pink/style-wide.css b/view/theme/diabook/diabook-pink/style-wide.css index 849566aa0..e85c58850 100644 --- a/view/theme/diabook/diabook-pink/style-wide.css +++ b/view/theme/diabook/diabook-pink/style-wide.css @@ -555,6 +555,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -609,9 +610,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/diabook-pink/style.css b/view/theme/diabook/diabook-pink/style.css index 798d73979..248e3ead0 100644 --- a/view/theme/diabook/diabook-pink/style.css +++ b/view/theme/diabook/diabook-pink/style.css @@ -557,6 +557,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -611,9 +612,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ /*color*/ diff --git a/view/theme/diabook/diabook-red/style-wide.css b/view/theme/diabook/diabook-red/style-wide.css index b9ea238e2..b068a2f5d 100644 --- a/view/theme/diabook/diabook-red/style-wide.css +++ b/view/theme/diabook/diabook-red/style-wide.css @@ -554,6 +554,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -619,10 +620,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; - margin-left: 3px; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/diabook-red/style.css b/view/theme/diabook/diabook-red/style.css index 05c802102..37e26b8b9 100644 --- a/view/theme/diabook/diabook-red/style.css +++ b/view/theme/diabook/diabook-red/style.css @@ -554,6 +554,7 @@ code { text-decoration: none; } /* popup notifications */ +div.jGrowl.top-right { top: 30px; /* put it below header/nav bar */ } div.jGrowl div.notice { background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; color: #ffffff; @@ -619,10 +620,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; - margin-left: 3px; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl index f611de004..4165656bd 100644 --- a/view/theme/diabook/nav.tpl +++ b/view/theme/diabook/nav.tpl @@ -136,7 +136,7 @@ - +
    $langselector
    diff --git a/view/theme/diabook/style-wide.css b/view/theme/diabook/style-wide.css index cf54e5b58..64393bdff 100644 --- a/view/theme/diabook/style-wide.css +++ b/view/theme/diabook/style-wide.css @@ -610,9 +610,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 2834e76f2..736817c7b 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -611,9 +611,7 @@ header #banner #logo-img { margin-top: 3px; } header #banner #logo-text { - font-size: 20px; - position: absolute; - top: 10%; + font-size: 20px!important;position: relative!important;top: -4px!important; } /* messages */ #message-new { diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 607414f17..15c0794fa 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.026) + * Version: (Version: 1.027) * Author: */ @@ -13,7 +13,7 @@ $a = get_app(); function diabook_init(&$a) { //print diabook-version for debugging -$diabook_version = "Diabook (Version: 1.026)"; +$diabook_version = "Diabook (Version: 1.027)"; $a->page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages @@ -401,7 +401,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; // custom css if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('', $cssFile); - + //footer $tpl = get_markup_template('footer.tpl'); $a->page['footer'] .= replace_macros($tpl, array()); @@ -568,7 +568,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; if($close_pages != "1") { if(local_user()) { $page = ' -

    '.t("Community Pages").'

    +

    '.t("Community Pages").'

      '; $pagelist = array(); From 774c51cc19c2e1fd135a7f692dd53bfb3a4d0ed3 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 10 May 2012 01:45:51 -0700 Subject: [PATCH 40/57] email autocomplete --- mod/message.php | 41 +++++++++++++++---------- view/theme/duepuntozero/prv_message.tpl | 35 +++++++++++++++++++++ view/theme/duepuntozero/style.css | 11 ++++++- 3 files changed, 69 insertions(+), 18 deletions(-) create mode 100644 view/theme/duepuntozero/prv_message.tpl diff --git a/mod/message.php b/mod/message.php index b8695fdd9..8cfa0256c 100644 --- a/mod/message.php +++ b/mod/message.php @@ -25,8 +25,12 @@ function message_init(&$a) { var a; a = $("#recip").autocomplete({ serviceUrl: '$base/acl', - width: 350 + width: 350, + onSelect: function(value,data) { + $("#recip-complete").val(data); + } }); + }); @@ -95,10 +99,6 @@ function message_content(&$a) { $myprofile = $a->get_baseurl(true) . '/profile/' . $a->user['nickname']; - - - - $tpl = get_markup_template('mail_head.tpl'); $header = replace_macros($tpl, array( '$messages' => t('Messages'), @@ -173,27 +173,34 @@ function message_content(&$a) { $preselect = (isset($a->argv[2])?array($a->argv[2]):false); - if(defined('EMAIL_AUTOCOMP')) { - // here's where we want to do contact autocomplete - // just figure out how to make it do the right thing - // pictures would be nice, but that didn't work when I tried. - // It sort of barely works, but needs help - // (the json backend is found in mod/acl.php) + $prename = $preurl = $preid = ''; - $select = ''; - } - else { + if($preselect) { + $r = q("select name, url, id from contact where uid = %d and id = %d limit 1", + intval(local_user()), + intval($a->argv[2]) + ); + if(count($r)) { + $prename = $r[0]['name']; + $preurl = $r[0]['url']; + $preid = $r[0]['id']; + } + } - // the ugly select box + $prefill = (($preselect) ? $prename . ' [' . $preurl . ']' : ''); - $select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10); - } + // the ugly select box + + $select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10); $tpl = get_markup_template('prv_message.tpl'); $o .= replace_macros($tpl,array( '$header' => t('Send Private Message'), '$to' => t('To:'), + '$prefill' => $prefill, + '$autocomp' => $autocomp, + '$preid' => $preid, '$subject' => t('Subject:'), '$subjtxt' => ((x($_REQUEST,'subject')) ? strip_tags($_REQUEST['subject']) : ''), '$text' => ((x($_REQUEST,'body')) ? escape_tags(htmlspecialchars($_REQUEST['body'])) : ''), diff --git a/view/theme/duepuntozero/prv_message.tpl b/view/theme/duepuntozero/prv_message.tpl new file mode 100644 index 000000000..5d884fe96 --- /dev/null +++ b/view/theme/duepuntozero/prv_message.tpl @@ -0,0 +1,35 @@ + +

      $header

      + +
      +
      + +$parent + +
      $to
      + + + + +
      $subject
      + + +
      $yourmessage
      + + + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      +
      diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 7cbcdc4d2..19d7d652e 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -3166,4 +3166,13 @@ ul.menu-popup { } #id_term { width:100px; -} \ No newline at end of file +} + +#recip { + +} +.autocomplete-w1 { background:url(img/shadow.png) no-repeat bottom right; position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; } +.autocomplete { border:1px solid #999; background:#FFF; cursor:default; text-align:left; max-height:350px; overflow:auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px; _margin:0; _overflow-x:hidden; } +.autocomplete .selected { background:#F0F0F0; } +.autocomplete div { padding:2px 5px; white-space:nowrap; overflow:hidden; } +.autocomplete strong { font-weight:normal; color:#3399FF; } From c9bb88861162873ec339530a32c8458721aed777 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 10 May 2012 02:01:08 -0700 Subject: [PATCH 41/57] priv mail autocomplete, improved contrast for darkzero, etc. --- view/theme/duepuntozero/style.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 19d7d652e..a84fb1040 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -3172,7 +3172,6 @@ ul.menu-popup { } .autocomplete-w1 { background:url(img/shadow.png) no-repeat bottom right; position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; } -.autocomplete { border:1px solid #999; background:#FFF; cursor:default; text-align:left; max-height:350px; overflow:auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px; _margin:0; _overflow-x:hidden; } +.autocomplete { color:#000; border:1px solid #999; background:#FFF; cursor:default; text-align:left; max-height:350px; overflow:auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px; _margin:0; _overflow-x:hidden; } .autocomplete .selected { background:#F0F0F0; } .autocomplete div { padding:2px 5px; white-space:nowrap; overflow:hidden; } -.autocomplete strong { font-weight:normal; color:#3399FF; } From 3ac5d19b92ad9e9a88fd3c0a0195ffae350914eb Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Thu, 10 May 2012 12:19:51 +0200 Subject: [PATCH 42/57] diabook-theme: some fixes --- view/theme/diabook/communityhome.tpl | 2 + view/theme/diabook/config.php | 32 ++++++------- .../theme/diabook/js/jquery.twitter.search.js | 2 +- view/theme/diabook/theme.php | 47 ++++++++++--------- view/theme/diabook/theme_settings.tpl | 32 +++++++------ 5 files changed, 60 insertions(+), 55 deletions(-) diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl index 60d4646cc..17acc1eab 100755 --- a/view/theme/diabook/communityhome.tpl +++ b/view/theme/diabook/communityhome.tpl @@ -33,6 +33,7 @@ just contact me, if you are intesrested in joining

      diff --git a/view/theme/diabook/config.php b/view/theme/diabook/config.php index 84dd64834..2a418909b 100644 --- a/view/theme/diabook/config.php +++ b/view/theme/diabook/config.php @@ -143,12 +143,12 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear 'dark'=>'dark', ); $close_pagesC = array( - '1'=>'hide', - '0'=>'show', + '0'=>'show', + '1'=>'hide', ); $close_mapqueryC = array( - '1'=>'hide', - '0'=>'show', + '0'=>'show', + '1'=>'hide', ); $close_profilesC = array( '0'=>'show', @@ -167,8 +167,8 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear '1'=>'hide', ); $close_twitterC = array( - '1'=>'hide', - '0'=>'show', + '0'=>'show', + '1'=>'hide', ); $close_lastusersC = array( '0'=>'show', @@ -198,16 +198,16 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear '$ELZoom' => array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom), '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX), '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY), - '$close_pages' => array('diabook_close_pages', t('Show "Cummunity Pages" at right-hand coloumn?'), $close_pages, '', $close_pagesC), - '$close_mapquery' => array('diabook_close_mapquery', t('Show "Earth Layers" at right-hand coloumn?'), $close_mapquery, '', $close_mapqueryC), - '$close_profiles' => array('diabook_close_profiles', t('Show "Cummunity Profiles" at right-hand coloumn?'), $close_profiles, '', $close_profilesC), - '$close_helpers' => array('diabook_close_helpers', t('Show "Help or @NewHere" at right-hand coloumn?'), $close_helpers, '', $close_helpersC), - '$close_services' => array('diabook_close_services', t('Show "Connect Services" at right-hand coloumn?'), $close_services, '', $close_servicesC), - '$close_friends' => array('diabook_close_friends', t('Show "Find Friends" at right-hand coloumn?'), $close_friends, '', $close_friendsC), - '$close_twitter' => array('diabook_close_twitter', t('Show "Last Tweets" at right-hand coloumn?'), $close_twitter, '', $close_twitterC), - '$close_lastusers' => array('diabook_close_lastusers', t('Show "Last Users" at right-hand coloumn?'), $close_lastusers, '', $close_lastusersC), - '$close_lastphotos' => array('diabook_close_lastphotos', t('Show "Last Photos" at right-hand coloumn?'), $close_lastphotos, '', $close_lastphotosC), - '$close_lastlikes' => array('diabook_close_lastlikes', t('Show "Last Likes" at right-hand coloumn?'), $close_lastlikes, '', $close_lastlikesC), + '$close_pages' => array('diabook_close_pages', t('Community Pages'), $close_pages, '', $close_pagesC), + '$close_mapquery' => array('diabook_close_mapquery', t('Earth Layers'), $close_mapquery, '', $close_mapqueryC), + '$close_profiles' => array('diabook_close_profiles', t('Community Profiles'), $close_profiles, '', $close_profilesC), + '$close_helpers' => array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_helpersC), + '$close_services' => array('diabook_close_services', t('Connect Services'), $close_services, '', $close_servicesC), + '$close_friends' => array('diabook_close_friends', t('Find Friends'), $close_friends, '', $close_friendsC), + '$close_twitter' => array('diabook_close_twitter', t('Last Tweets'), $close_twitter, '', $close_twitterC), + '$close_lastusers' => array('diabook_close_lastusers', t('Last users'), $close_lastusers, '', $close_lastusersC), + '$close_lastphotos' => array('diabook_close_lastphotos', t('Last photos'), $close_lastphotos, '', $close_lastphotosC), + '$close_lastlikes' => array('diabook_close_lastlikes', t('Last likes'), $close_lastlikes, '', $close_lastlikesC), )); return $o; } diff --git a/view/theme/diabook/js/jquery.twitter.search.js b/view/theme/diabook/js/jquery.twitter.search.js index d3ccfe68e..a57bd255d 100644 --- a/view/theme/diabook/js/jquery.twitter.search.js +++ b/view/theme/diabook/js/jquery.twitter.search.js @@ -202,7 +202,7 @@ // default styling a: { textDecoration: 'none', color: '#3B5998' }, bird: { width: '50px', height: '20px', position: 'absolute', left: '-30px', top: '-20px', border: 'none' }, - container: { overflow: 'hidden', backgroundColor: '', height: '600px' }, + container: { overflow: 'hidden', backgroundColor: '', height: '600px', width: '170px' }, fail: { background: '#6cc5c3 url(http://cloud.github.com/downloads/malsup/twitter/failwhale.png) no-repeat 50% 50%', height: '100%', padding: '10px' }, frame: { border: '0px solid #C2CFF1', borderRadius: '0px', '-moz-border-radius': '0px', '-webkit-border-radius': '0px' }, tweet: { padding: '5px 10px', clear: 'left' }, diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 15c0794fa..f1e4d0ba0 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -391,8 +391,8 @@ if ($color=="dark") $color_path = "/diabook-dark/"; ); function open_boxsettings() { - $("div#boxsettings").attr("style","display: block;height:500px;width:450px;"); - $("label").attr("style","width: 350px;"); + $("div#boxsettings").attr("style","display: block;height:500px;width:300px;"); + $("label").attr("style","width: 150px;"); }; ';} @@ -660,26 +660,28 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $close_lastusers = get_pconfig(local_user(), 'diabook', 'close_lastusers' ); $close_lastphotos = get_pconfig(local_user(), 'diabook', 'close_lastphotos' ); $close_lastlikes = get_pconfig(local_user(), 'diabook', 'close_lastlikes' ); - $close_pagesC = array('1'=>'hide', '0'=>'show',); - $close_mapqueryC = array('1'=>'hide', '0'=>'show',); - $close_profilesC = array('0'=>'show', '1'=>'hide',); - $close_helpersC = array('0'=>'show', '1'=>'hide',); - $close_servicesC = array('0'=>'show', '1'=>'hide',); - $close_friendsC = array('0'=>'show', '1'=>'hide',); - $close_twitterC = array('1'=>'hide', '0'=>'show',); - $close_lastusersC = array('0'=>'show', '1'=>'hide',); - $close_lastphotosC = array('0'=>'show','1'=>'hide',); - $close_lastlikesC = array('0'=>'show', '1'=>'hide',); - $aside['$close_pages'] = array('diabook_close_pages', t('Show "Cummunity Pages" at right-hand coloumn?'), $close_pages, '', $close_pagesC); - $aside['$close_mapquery'] = array('diabook_close_mapquery', t('Show "Earth Layers" at right-hand coloumn?'), $close_mapquery, '', $close_mapqueryC); - $aside['$close_profiles'] = array('diabook_close_profiles', t('Show "Cummunity Profiles" at right-hand coloumn?'), $close_profiles, '', $close_profilesC); - $aside['$close_helpers'] = array('diabook_close_helpers', t('Show "Help or @NewHere" at right-hand coloumn?'), $close_helpers, '', $close_helpersC); - $aside['$close_services'] = array('diabook_close_services', t('Show "Connect Services" at right-hand coloumn?'), $close_services, '', $close_servicesC); - $aside['$close_friends'] = array('diabook_close_friends', t('Show "Find Friends" at right-hand coloumn?'), $close_friends, '', $close_friendsC); - $aside['$close_twitter'] = array('diabook_close_twitter', t('Show "Last Tweets" at right-hand coloumn?'), $close_twitter, '', $close_twitterC); - $aside['$close_lastusers'] = array('diabook_close_lastusers', t('Show "Last Users" at right-hand coloumn?'), $close_lastusers, '', $close_lastusersC); - $aside['$close_lastphotos'] = array('diabook_close_lastphotos', t('Show "Last Photos" at right-hand coloumn?'), $close_lastphotos, '', $close_lastphotosC); - $aside['$close_lastlikes'] = array('diabook_close_lastlikes', t('Show "Last Likes" at right-hand coloumn?'), $close_lastlikes, '', $close_lastlikesC); + $close_pagesC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_mapqueryC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_profilesC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_helpersC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_servicesC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_friendsC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_twitterC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_lastusersC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_lastphotosC = array('1'=>t("don't show"), '0'=>t("show"),); + $close_lastlikesC = array('1'=>t("don't show"), '0'=>t("show"),); + $boxsettings['title'] = Array("", t('Show/hide boxes at right-hand coloumn:'), "", ""); + $aside['$boxsettings'] = $boxsettings; + $aside['$close_pages'] = array('diabook_close_pages', t('Community Pages'), $close_pages, '', $close_pagesC); + $aside['$close_mapquery'] = array('diabook_close_mapquery', t('Earth Layers'), $close_mapquery, '', $close_mapqueryC); + $aside['$close_profiles'] = array('diabook_close_profiles', t('Community Profiles'), $close_profiles, '', $close_profilesC); + $aside['$close_helpers'] = array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_helpersC); + $aside['$close_services'] = array('diabook_close_services', t('Connect Services'), $close_services, '', $close_servicesC); + $aside['$close_friends'] = array('diabook_close_friends', t('Find Friends'), $close_friends, '', $close_friendsC); + $aside['$close_twitter'] = array('diabook_close_twitter', t('Last Tweets'), $close_twitter, '', $close_twitterC); + $aside['$close_lastusers'] = array('diabook_close_lastusers', t('Last users'), $close_lastusers, '', $close_lastusersC); + $aside['$close_lastphotos'] = array('diabook_close_lastphotos', t('Last photos'), $close_lastphotos, '', $close_lastphotosC); + $aside['$close_lastlikes'] = array('diabook_close_lastlikes', t('Last likes'), $close_lastlikes, '', $close_lastlikesC); $aside['$sub'] = t('Submit'); $baseurl = $a->get_baseurl($ssl_state); $aside['$baseurl'] = $baseurl; @@ -694,7 +696,6 @@ if ($color=="dark") $color_path = "/diabook-dark/"; set_pconfig(local_user(), 'diabook', 'close_lastusers', $_POST['diabook_close_lastusers']); set_pconfig(local_user(), 'diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']); set_pconfig(local_user(), 'diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']); - header("Location: network"); } } $close = t('Settings'); diff --git a/view/theme/diabook/theme_settings.tpl b/view/theme/diabook/theme_settings.tpl index 68b22a168..ad024dfe9 100644 --- a/view/theme/diabook/theme_settings.tpl +++ b/view/theme/diabook/theme_settings.tpl @@ -6,7 +6,22 @@ {{inc field_select.tpl with $field=$resolution}}{{endinc}} +
      + +
      +
      +

      Show/hide boxes at right-hand column

      +{{inc field_select.tpl with $field=$close_pages}}{{endinc}} +{{inc field_select.tpl with $field=$close_profiles}}{{endinc}} +{{inc field_select.tpl with $field=$close_helpers}}{{endinc}} +{{inc field_select.tpl with $field=$close_services}}{{endinc}} +{{inc field_select.tpl with $field=$close_friends}}{{endinc}} +{{inc field_select.tpl with $field=$close_lastusers}}{{endinc}} +{{inc field_select.tpl with $field=$close_lastphotos}}{{endinc}} +{{inc field_select.tpl with $field=$close_lastlikes}}{{endinc}} +{{inc field_select.tpl with $field=$close_twitter}}{{endinc}} {{inc field_input.tpl with $field=$TSearchTerm}}{{endinc}} +{{inc field_select.tpl with $field=$close_mapquery}}{{endinc}} {{inc field_input.tpl with $field=$ELPosX}}{{endinc}} @@ -18,22 +33,9 @@
    -{{inc field_select.tpl with $field=$close_pages}}{{endinc}} -{{inc field_select.tpl with $field=$close_profiles}}{{endinc}} -{{inc field_select.tpl with $field=$close_helpers}}{{endinc}} -{{inc field_select.tpl with $field=$close_services}}{{endinc}} -{{inc field_select.tpl with $field=$close_friends}}{{endinc}} -{{inc field_select.tpl with $field=$close_lastusers}}{{endinc}} -{{inc field_select.tpl with $field=$close_lastphotos}}{{endinc}} -{{inc field_select.tpl with $field=$close_lastlikes}}{{endinc}} -{{inc field_select.tpl with $field=$close_twitter}}{{endinc}} -{{inc field_select.tpl with $field=$close_mapquery}}{{endinc}} - -
    - -
    +
    From c5f6755bdd7d3171cfb45a05dd918722e2674dd2 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 10 May 2012 05:49:48 -0700 Subject: [PATCH 43/57] specified background image does not exist --- view/theme/duepuntozero/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index a84fb1040..b978c13e5 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -3171,7 +3171,7 @@ ul.menu-popup { #recip { } -.autocomplete-w1 { background:url(img/shadow.png) no-repeat bottom right; position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; } +.autocomplete-w1 { background: #ffffff; no-repeat bottom right; position:absolute; top:0px; left:0px; margin:6px 0 0 6px; /* IE6 fix: */ _background:none; _margin:1px 0 0 0; } .autocomplete { color:#000; border:1px solid #999; background:#FFF; cursor:default; text-align:left; max-height:350px; overflow:auto; margin:-6px 6px 6px -6px; /* IE6 specific: */ _height:350px; _margin:0; _overflow-x:hidden; } .autocomplete .selected { background:#F0F0F0; } .autocomplete div { padding:2px 5px; white-space:nowrap; overflow:hidden; } From e7b8e839ae0de9103cfca7815a5bc1917627fff4 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Thu, 10 May 2012 17:14:27 +0100 Subject: [PATCH 44/57] Diabook-dark. More touchups. --- .../diabook/diabook-dark/style-network.css | 2 +- view/theme/diabook/diabook-dark/style.css | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/view/theme/diabook/diabook-dark/style-network.css b/view/theme/diabook/diabook-dark/style-network.css index d9e2d0094..678e8597c 100644 --- a/view/theme/diabook/diabook-dark/style-network.css +++ b/view/theme/diabook/diabook-dark/style-network.css @@ -831,7 +831,7 @@ ul.menu-popup .empty { box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); } .acpopupitem { - color: #2e2f2e; + color: #eec; padding: 4px; clear: left; } diff --git a/view/theme/diabook/diabook-dark/style.css b/view/theme/diabook/diabook-dark/style.css index 24d319f8a..189bd30bf 100644 --- a/view/theme/diabook/diabook-dark/style.css +++ b/view/theme/diabook/diabook-dark/style.css @@ -3,10 +3,7 @@ * Additional Changes: Michael Vogel **/ -/* ========= */ -/* = Admin = */ -/* ========= */ - +/** Fancy Box **/ #fancybox-content { width: 0; height: 0; @@ -19,6 +16,11 @@ background: #2e2e2f !important; } + +/* ========= */ +/* = Admin = */ +/* ========= */ + #adminpage { /* width: 80%;*/ } @@ -633,7 +635,7 @@ header #banner #logo-text { text-decoration: none; } .mail-list-wrapper { - background-color: #eec; + background-color: #333; margin-bottom: 5px; width: 100%; height: auto; @@ -644,6 +646,7 @@ header #banner #logo-text { float: left; width: 20%; overflow: hidden; + background: #2e2e2f; } .mail-list-wrapper .mail-subject { width: 30%; @@ -915,7 +918,7 @@ nav #nav-apps-link.selected { } .notify-seen { - background: none repeat scroll 0 0 #DDDDDD; + background: none repeat scroll 0 0 #666; } ul.menu-popup { @@ -1685,7 +1688,7 @@ body .pageheader{ .wall-item-comment-wrapper .comment-edit-text-full { font-size: 14px; height: 4em; - color: #2e302e; + color: #eec; border: 1px solid #2e302e; } .comment-edit-preview { From ccc825ccbc58890b1619852a34b60bacf71b185d Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Fri, 11 May 2012 02:39:54 +0200 Subject: [PATCH 45/57] diabook-theme: small fix --- view/theme/diabook/config.php | 6 +++--- view/theme/diabook/theme.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/view/theme/diabook/config.php b/view/theme/diabook/config.php index 2a418909b..cc7da1b00 100644 --- a/view/theme/diabook/config.php +++ b/view/theme/diabook/config.php @@ -196,15 +196,15 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear '$color' => array('diabook_color', t('Set color scheme'), $color, '', $colors), '$TSearchTerm' => array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm), '$ELZoom' => array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom), - '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX), - '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY), + '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layers'), $ELPosX, '', $ELPosX), + '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layers'), $ELPosY, '', $ELPosY), '$close_pages' => array('diabook_close_pages', t('Community Pages'), $close_pages, '', $close_pagesC), '$close_mapquery' => array('diabook_close_mapquery', t('Earth Layers'), $close_mapquery, '', $close_mapqueryC), '$close_profiles' => array('diabook_close_profiles', t('Community Profiles'), $close_profiles, '', $close_profilesC), '$close_helpers' => array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_helpersC), '$close_services' => array('diabook_close_services', t('Connect Services'), $close_services, '', $close_servicesC), '$close_friends' => array('diabook_close_friends', t('Find Friends'), $close_friends, '', $close_friendsC), - '$close_twitter' => array('diabook_close_twitter', t('Last Tweets'), $close_twitter, '', $close_twitterC), + '$close_twitter' => array('diabook_close_twitter', t('Last tweets'), $close_twitter, '', $close_twitterC), '$close_lastusers' => array('diabook_close_lastusers', t('Last users'), $close_lastusers, '', $close_lastusersC), '$close_lastphotos' => array('diabook_close_lastphotos', t('Last photos'), $close_lastphotos, '', $close_lastphotosC), '$close_lastlikes' => array('diabook_close_lastlikes', t('Last likes'), $close_lastlikes, '', $close_lastlikesC), diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index f1e4d0ba0..7336383d7 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -608,9 +608,9 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $ELZoom = get_pconfig(local_user(), 'diabook', 'ELZoom' ); $ELPosX = get_pconfig(local_user(), 'diabook', 'ELPosX' ); $ELPosY = get_pconfig(local_user(), 'diabook', 'ELPosY' ); - $aside['$ELZoom'] = array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom); - $aside['$ELPosX'] = array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX); - $aside['$ELPosY'] = array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY); + $aside['$ELZoom'] = array('diabook_ELZoom', t('Set zoomfactor for Earth Layers'), $ELZoom, '', $ELZoom); + $aside['$ELPosX'] = array('diabook_ELPosX', t('Set longitude (X) for Earth Layers'), $ELPosX, '', $ELPosX); + $aside['$ELPosY'] = array('diabook_ELPosY', t('Set latitude (Y) for Earth Layers'), $ELPosY, '', $ELPosY); if (isset($_POST['diabook-settings-map-sub']) && $_POST['diabook-settings-map-sub']!=''){ set_pconfig(local_user(), 'diabook', 'ELZoom', $_POST['diabook_ELZoom']); set_pconfig(local_user(), 'diabook', 'ELPosX', $_POST['diabook_ELPosX']); @@ -670,7 +670,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $close_lastusersC = array('1'=>t("don't show"), '0'=>t("show"),); $close_lastphotosC = array('1'=>t("don't show"), '0'=>t("show"),); $close_lastlikesC = array('1'=>t("don't show"), '0'=>t("show"),); - $boxsettings['title'] = Array("", t('Show/hide boxes at right-hand coloumn:'), "", ""); + $boxsettings['title'] = Array("", t('Show/hide boxes at right-hand column:'), "", ""); $aside['$boxsettings'] = $boxsettings; $aside['$close_pages'] = array('diabook_close_pages', t('Community Pages'), $close_pages, '', $close_pagesC); $aside['$close_mapquery'] = array('diabook_close_mapquery', t('Earth Layers'), $close_mapquery, '', $close_mapqueryC); From 8600afafe29051425e775d56166124f12020e191 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 10 May 2012 18:50:11 -0700 Subject: [PATCH 46/57] rev update --- boot.php | 2 +- util/messages.po | 174 ++++++++++++++++++++++------------------------- 2 files changed, 82 insertions(+), 94 deletions(-) diff --git a/boot.php b/boot.php index e4d8663a3..6e3f8c0b5 100644 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1337' ); +define ( 'FRIENDICA_VERSION', '3.0.1338' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1143 ); diff --git a/util/messages.po b/util/messages.po index 37878d86a..485dfd7b7 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 2.3.1337\n" +"Project-Id-Version: 3.0.1338\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-09 10:00-0700\n" +"POT-Creation-Date: 2012-05-10 10:00-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -48,8 +48,8 @@ msgstr "" #: ../../mod/register.php:38 ../../mod/regmod.php:116 ../../mod/item.php:124 #: ../../mod/item.php:140 ../../mod/profile_photo.php:19 #: ../../mod/profile_photo.php:139 ../../mod/profile_photo.php:150 -#: ../../mod/profile_photo.php:163 ../../mod/message.php:40 -#: ../../mod/message.php:92 ../../mod/allfriends.php:9 +#: ../../mod/profile_photo.php:163 ../../mod/message.php:44 +#: ../../mod/message.php:96 ../../mod/allfriends.php:9 #: ../../mod/nogroup.php:25 ../../mod/wall_upload.php:53 #: ../../mod/follow.php:8 ../../mod/display.php:138 ../../mod/profiles.php:7 #: ../../mod/profiles.php:365 ../../mod/delegate.php:6 @@ -158,7 +158,7 @@ msgstr "" #: ../../addon/irc/irc.php:55 ../../addon/blogger/blogger.php:102 #: ../../addon/posterous/posterous.php:103 #: ../../view/theme/cleanzero/config.php:80 -#: ../../view/theme/diabook/theme.php:683 +#: ../../view/theme/diabook/theme.php:685 #: ../../view/theme/diabook/config.php:190 #: ../../view/theme/quattro/config.php:52 ../../view/theme/dispy/config.php:70 #: ../../include/conversation.php:555 @@ -532,8 +532,8 @@ msgid "Share" msgstr "" #: ../../mod/photos.php:1214 ../../mod/editpost.php:104 -#: ../../mod/wallmessage.php:145 ../../mod/message.php:206 -#: ../../mod/message.php:398 ../../include/conversation.php:361 +#: ../../mod/wallmessage.php:145 ../../mod/message.php:213 +#: ../../mod/message.php:405 ../../include/conversation.php:361 #: ../../include/conversation.php:706 ../../include/conversation.php:983 msgid "Please wait" msgstr "" @@ -631,7 +631,7 @@ msgid "Edit" msgstr "" #: ../../mod/editpost.php:96 ../../mod/wallmessage.php:143 -#: ../../mod/message.php:204 ../../mod/message.php:396 +#: ../../mod/message.php:211 ../../mod/message.php:403 #: ../../include/conversation.php:965 msgid "Upload photo" msgstr "" @@ -641,7 +641,7 @@ msgid "Attach file" msgstr "" #: ../../mod/editpost.php:98 ../../mod/wallmessage.php:144 -#: ../../mod/message.php:205 ../../mod/message.php:397 +#: ../../mod/message.php:212 ../../mod/message.php:404 #: ../../include/conversation.php:969 msgid "Insert web link" msgstr "" @@ -1775,8 +1775,8 @@ msgid "Remove account" msgstr "" #: ../../mod/settings.php:88 ../../mod/admin.php:735 ../../mod/admin.php:940 -#: ../../addon/mathjax/mathjax.php:36 ../../view/theme/diabook/theme.php:700 -#: ../../include/nav.php:137 +#: ../../addon/mathjax/mathjax.php:36 ../../view/theme/diabook/theme.php:571 +#: ../../view/theme/diabook/theme.php:701 ../../include/nav.php:137 msgid "Settings" msgstr "" @@ -2368,7 +2368,7 @@ msgstr "" msgid "Number of daily wall messages for %s exceeded. Message failed." msgstr "" -#: ../../mod/wallmessage.php:56 ../../mod/message.php:61 +#: ../../mod/wallmessage.php:56 ../../mod/message.php:65 msgid "No recipient selected." msgstr "" @@ -2376,15 +2376,15 @@ msgstr "" msgid "Unable to check your home location." msgstr "" -#: ../../mod/wallmessage.php:62 ../../mod/message.php:68 +#: ../../mod/wallmessage.php:62 ../../mod/message.php:72 msgid "Message could not be sent." msgstr "" -#: ../../mod/wallmessage.php:65 ../../mod/message.php:71 +#: ../../mod/wallmessage.php:65 ../../mod/message.php:75 msgid "Message collection failure." msgstr "" -#: ../../mod/wallmessage.php:68 ../../mod/message.php:74 +#: ../../mod/wallmessage.php:68 ../../mod/message.php:78 msgid "Message sent." msgstr "" @@ -2397,7 +2397,7 @@ msgstr "" msgid "Please enter a link URL:" msgstr "" -#: ../../mod/wallmessage.php:131 ../../mod/message.php:195 +#: ../../mod/wallmessage.php:131 ../../mod/message.php:199 msgid "Send Private Message" msgstr "" @@ -2408,18 +2408,18 @@ msgid "" "your site allow private mail from unknown senders." msgstr "" -#: ../../mod/wallmessage.php:133 ../../mod/message.php:196 -#: ../../mod/message.php:388 +#: ../../mod/wallmessage.php:133 ../../mod/message.php:200 +#: ../../mod/message.php:395 msgid "To:" msgstr "" -#: ../../mod/wallmessage.php:134 ../../mod/message.php:197 -#: ../../mod/message.php:389 +#: ../../mod/wallmessage.php:134 ../../mod/message.php:204 +#: ../../mod/message.php:396 msgid "Subject:" msgstr "" -#: ../../mod/wallmessage.php:140 ../../mod/message.php:201 -#: ../../mod/message.php:392 ../../mod/invite.php:113 +#: ../../mod/wallmessage.php:140 ../../mod/message.php:208 +#: ../../mod/message.php:399 ../../mod/invite.php:113 msgid "Your message:" msgstr "" @@ -2962,7 +2962,7 @@ msgstr "" msgid "New Message" msgstr "" -#: ../../mod/message.php:65 +#: ../../mod/message.php:69 msgid "Unable to locate contact information." msgstr "" @@ -2974,55 +2974,55 @@ msgstr "" msgid "Conversation removed." msgstr "" -#: ../../mod/message.php:237 +#: ../../mod/message.php:244 msgid "No messages." msgstr "" -#: ../../mod/message.php:244 +#: ../../mod/message.php:251 #, php-format msgid "Unknown sender - %s" msgstr "" -#: ../../mod/message.php:247 +#: ../../mod/message.php:254 #, php-format msgid "You and %s" msgstr "" -#: ../../mod/message.php:250 +#: ../../mod/message.php:257 #, php-format msgid "%s and You" msgstr "" -#: ../../mod/message.php:260 ../../mod/message.php:381 +#: ../../mod/message.php:267 ../../mod/message.php:388 msgid "Delete conversation" msgstr "" -#: ../../mod/message.php:263 +#: ../../mod/message.php:270 msgid "D, d M Y - g:i A" msgstr "" -#: ../../mod/message.php:265 +#: ../../mod/message.php:272 #, php-format msgid "%d message" msgid_plural "%d messages" msgstr[0] "" msgstr[1] "" -#: ../../mod/message.php:300 +#: ../../mod/message.php:307 msgid "Message not available." msgstr "" -#: ../../mod/message.php:365 +#: ../../mod/message.php:372 msgid "Delete message" msgstr "" -#: ../../mod/message.php:383 +#: ../../mod/message.php:390 msgid "" "No secure communications available. You may be able to " "respond from the sender's profile page." msgstr "" -#: ../../mod/message.php:387 +#: ../../mod/message.php:394 msgid "Send Reply" msgstr "" @@ -4683,10 +4683,6 @@ msgstr "" msgid "event" msgstr "" -#: ../../addon/hangman/hangman.php:19 -msgid "Hangman" -msgstr "" - #: ../../addon/uhremotestorage/uhremotestorage.php:84 #, php-format msgid "" @@ -5641,26 +5637,38 @@ msgstr "" #: ../../view/theme/diabook/theme.php:130 #: ../../view/theme/diabook/theme.php:571 +#: ../../view/theme/diabook/theme.php:675 +#: ../../view/theme/diabook/config.php:201 msgid "Community Pages" msgstr "" #: ../../view/theme/diabook/theme.php:418 +#: ../../view/theme/diabook/theme.php:677 +#: ../../view/theme/diabook/config.php:203 msgid "Community Profiles" msgstr "" #: ../../view/theme/diabook/theme.php:439 +#: ../../view/theme/diabook/theme.php:682 +#: ../../view/theme/diabook/config.php:208 msgid "Last users" msgstr "" #: ../../view/theme/diabook/theme.php:468 +#: ../../view/theme/diabook/theme.php:684 +#: ../../view/theme/diabook/config.php:210 msgid "Last likes" msgstr "" #: ../../view/theme/diabook/theme.php:513 +#: ../../view/theme/diabook/theme.php:683 +#: ../../view/theme/diabook/config.php:209 msgid "Last photos" msgstr "" #: ../../view/theme/diabook/theme.php:550 +#: ../../view/theme/diabook/theme.php:680 +#: ../../view/theme/diabook/config.php:206 msgid "Find Friends" msgstr "" @@ -5677,6 +5685,8 @@ msgid "Invite Friends" msgstr "" #: ../../view/theme/diabook/theme.php:606 +#: ../../view/theme/diabook/theme.php:676 +#: ../../view/theme/diabook/config.php:202 msgid "Earth Layers" msgstr "" @@ -5696,14 +5706,20 @@ msgid "Set latitude (Y) for Earth Layer" msgstr "" #: ../../view/theme/diabook/theme.php:626 +#: ../../view/theme/diabook/theme.php:678 +#: ../../view/theme/diabook/config.php:204 msgid "Help or @NewHere ?" msgstr "" #: ../../view/theme/diabook/theme.php:633 +#: ../../view/theme/diabook/theme.php:679 +#: ../../view/theme/diabook/config.php:205 msgid "Connect Services" msgstr "" #: ../../view/theme/diabook/theme.php:640 +#: ../../view/theme/diabook/theme.php:681 +#: ../../view/theme/diabook/config.php:207 msgid "Last Tweets" msgstr "" @@ -5712,54 +5728,34 @@ msgstr "" msgid "Set twitter search term" msgstr "" +#: ../../view/theme/diabook/theme.php:663 +#: ../../view/theme/diabook/theme.php:664 +#: ../../view/theme/diabook/theme.php:665 +#: ../../view/theme/diabook/theme.php:666 +#: ../../view/theme/diabook/theme.php:667 +#: ../../view/theme/diabook/theme.php:668 +#: ../../view/theme/diabook/theme.php:669 +#: ../../view/theme/diabook/theme.php:670 +#: ../../view/theme/diabook/theme.php:671 +#: ../../view/theme/diabook/theme.php:672 ../../include/acl_selectors.php:288 +msgid "don't show" +msgstr "" + +#: ../../view/theme/diabook/theme.php:663 +#: ../../view/theme/diabook/theme.php:664 +#: ../../view/theme/diabook/theme.php:665 +#: ../../view/theme/diabook/theme.php:666 +#: ../../view/theme/diabook/theme.php:667 +#: ../../view/theme/diabook/theme.php:668 +#: ../../view/theme/diabook/theme.php:669 +#: ../../view/theme/diabook/theme.php:670 +#: ../../view/theme/diabook/theme.php:671 +#: ../../view/theme/diabook/theme.php:672 ../../include/acl_selectors.php:287 +msgid "show" +msgstr "" + #: ../../view/theme/diabook/theme.php:673 -#: ../../view/theme/diabook/config.php:201 -msgid "Show \"Cummunity Pages\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:674 -#: ../../view/theme/diabook/config.php:202 -msgid "Show \"Earth Layers\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:675 -#: ../../view/theme/diabook/config.php:203 -msgid "Show \"Cummunity Profiles\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:676 -#: ../../view/theme/diabook/config.php:204 -msgid "Show \"Help or @NewHere\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:677 -#: ../../view/theme/diabook/config.php:205 -msgid "Show \"Connect Services\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:678 -#: ../../view/theme/diabook/config.php:206 -msgid "Show \"Find Friends\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:679 -#: ../../view/theme/diabook/config.php:207 -msgid "Show \"Last Tweets\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:680 -#: ../../view/theme/diabook/config.php:208 -msgid "Show \"Last Users\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:681 -#: ../../view/theme/diabook/config.php:209 -msgid "Show \"Last Photos\" at right-hand coloumn?" -msgstr "" - -#: ../../view/theme/diabook/theme.php:682 -#: ../../view/theme/diabook/config.php:210 -msgid "Show \"Last Likes\" at right-hand coloumn?" +msgid "Show/hide boxes at right-hand coloumn:" msgstr "" #: ../../view/theme/diabook/config.php:194 @@ -6683,14 +6679,6 @@ msgstr "" msgid "Visible to everybody" msgstr "" -#: ../../include/acl_selectors.php:287 -msgid "show" -msgstr "" - -#: ../../include/acl_selectors.php:288 -msgid "don't show" -msgstr "" - #: ../../include/enotify.php:14 msgid "Friendica Notification" msgstr "" From 547007e1993a21347db327f5c030dd1dac60f28f Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 10 May 2012 19:29:01 -0700 Subject: [PATCH 47/57] add photos to PM autocomplete, improved appearance --- library/jquery_ac/friendica.complete.js | 395 ++++++++++++++++++++++++ mod/acl.php | 7 +- mod/message.php | 2 +- 3 files changed, 401 insertions(+), 3 deletions(-) create mode 100644 library/jquery_ac/friendica.complete.js diff --git a/library/jquery_ac/friendica.complete.js b/library/jquery_ac/friendica.complete.js new file mode 100644 index 000000000..81eba564e --- /dev/null +++ b/library/jquery_ac/friendica.complete.js @@ -0,0 +1,395 @@ +/** +* Ajax Autocomplete for jQuery, version 1.1.3 +* (c) 2010 Tomas Kirda +* +* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license. +* For details, see the web site: http://www.devbridge.com/projects/autocomplete/jquery/ +* +* Last Review: 04/19/2010 +* Heavily modified for contact completion in Friendica (add photos, hover tips. etc.) 11-May-2012 mike@macgirvin.com +*/ + +/*jslint onevar: true, evil: true, nomen: true, eqeqeq: true, bitwise: true, regexp: true, newcap: true, immed: true */ +/*global window: true, document: true, clearInterval: true, setInterval: true, jQuery: true */ + +(function($) { + + var reEscape = new RegExp('(\\' + ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'].join('|\\') + ')', 'g'); + + function fnFormatResult(value, data, currentValue) { + var pattern = '(' + currentValue.replace(reEscape, '\\$1') + ')'; + return value.replace(new RegExp(pattern, 'gi'), '$1<\/strong>'); + } + + function Autocomplete(el, options) { + this.el = $(el); + this.el.attr('autocomplete', 'off'); + this.suggestions = []; + this.data = []; + this.badQueries = []; + this.selectedIndex = -1; + this.currentValue = this.el.val(); + this.intervalId = 0; + this.cachedResponse = []; + this.onChangeInterval = null; + this.ignoreValueChange = false; + this.serviceUrl = options.serviceUrl; + this.isLocal = false; + this.options = { + autoSubmit: false, + minChars: 1, + maxHeight: 300, + deferRequestBy: 0, + width: 0, + highlight: true, + params: {}, + fnFormatResult: fnFormatResult, + delimiter: null, + zIndex: 9999 + }; + this.initialize(); + this.setOptions(options); + } + + $.fn.autocomplete = function(options) { + return new Autocomplete(this.get(0)||$(''), options); + }; + + + Autocomplete.prototype = { + + killerFn: null, + + initialize: function() { + + var me, uid, autocompleteElId; + me = this; + uid = Math.floor(Math.random()*0x100000).toString(16); + autocompleteElId = 'Autocomplete_' + uid; + + this.killerFn = function(e) { + if ($(e.target).parents('.autocomplete').size() === 0) { + me.killSuggestions(); + me.disableKillerFn(); + } + }; + + if (!this.options.width) { this.options.width = this.el.width(); } + this.mainContainerId = 'AutocompleteContainter_' + uid; + + $('
    ').appendTo('body'); + + this.container = $('#' + autocompleteElId); + this.fixPosition(); + if (window.opera) { + this.el.keypress(function(e) { me.onKeyPress(e); }); + } else { + this.el.keydown(function(e) { me.onKeyPress(e); }); + } + this.el.keyup(function(e) { me.onKeyUp(e); }); + this.el.blur(function() { me.enableKillerFn(); }); + this.el.focus(function() { me.fixPosition(); }); + }, + + setOptions: function(options){ + var o = this.options; + $.extend(o, options); + if(o.lookup){ + this.isLocal = true; + if($.isArray(o.lookup)){ o.lookup = { suggestions:o.lookup, data:[] }; } + } + $('#'+this.mainContainerId).css({ zIndex:o.zIndex }); + this.container.css({ maxHeight: o.maxHeight + 'px', width:o.width }); + }, + + clearCache: function(){ + this.cachedResponse = []; + this.badQueries = []; + }, + + disable: function(){ + this.disabled = true; + }, + + enable: function(){ + this.disabled = false; + }, + + fixPosition: function() { + var offset = this.el.offset(); + $('#' + this.mainContainerId).css({ top: (offset.top + this.el.innerHeight()) + 'px', left: offset.left + 'px' }); + }, + + enableKillerFn: function() { + var me = this; + $(document).bind('click', me.killerFn); + }, + + disableKillerFn: function() { + var me = this; + $(document).unbind('click', me.killerFn); + }, + + killSuggestions: function() { + var me = this; + this.stopKillSuggestions(); + this.intervalId = window.setInterval(function() { me.hide(); me.stopKillSuggestions(); }, 300); + }, + + stopKillSuggestions: function() { + window.clearInterval(this.intervalId); + }, + + onKeyPress: function(e) { + if (this.disabled || !this.enabled) { return; } + // return will exit the function + // and event will not be prevented + switch (e.keyCode) { + case 27: //KEY_ESC: + this.el.val(this.currentValue); + this.hide(); + break; + case 9: //KEY_TAB: + case 13: //KEY_RETURN: + if (this.selectedIndex === -1) { + this.hide(); + return; + } + this.select(this.selectedIndex); + if(e.keyCode === 9){ return; } + break; + case 38: //KEY_UP: + this.moveUp(); + break; + case 40: //KEY_DOWN: + this.moveDown(); + break; + default: + return; + } + e.stopImmediatePropagation(); + e.preventDefault(); + }, + + onKeyUp: function(e) { + if(this.disabled){ return; } + switch (e.keyCode) { + case 38: //KEY_UP: + case 40: //KEY_DOWN: + return; + } + clearInterval(this.onChangeInterval); + if (this.currentValue !== this.el.val()) { + if (this.options.deferRequestBy > 0) { + // Defer lookup in case when value changes very quickly: + var me = this; + this.onChangeInterval = setInterval(function() { me.onValueChange(); }, this.options.deferRequestBy); + } else { + this.onValueChange(); + } + } + }, + + onValueChange: function() { + clearInterval(this.onChangeInterval); + this.currentValue = this.el.val(); + var q = this.getQuery(this.currentValue); + this.selectedIndex = -1; + if (this.ignoreValueChange) { + this.ignoreValueChange = false; + return; + } + if (q === '' || q.length < this.options.minChars) { + this.hide(); + } else { + this.getSuggestions(q); + } + }, + + getQuery: function(val) { + var d, arr; + d = this.options.delimiter; + if (!d) { return $.trim(val); } + arr = val.split(d); + return $.trim(arr[arr.length - 1]); + }, + + getSuggestionsLocal: function(q) { + var ret, arr, len, val, i; + arr = this.options.lookup; + len = arr.suggestions.length; + ret = { suggestions:[], data:[] }; + q = q.toLowerCase(); + for(i=0; i< len; i++){ + val = arr.suggestions[i]; + if(val.toLowerCase().indexOf(q) === 0){ + ret.suggestions.push(val); + ret.data.push(arr.data[i]); + } + } + return ret; + }, + + getSuggestions: function(q) { + var cr, me; + cr = this.isLocal ? this.getSuggestionsLocal(q) : this.cachedResponse[q]; + if (cr && $.isArray(cr.suggestions)) { + this.suggestions = cr.suggestions; + this.data = cr.data; + this.suggest(); + } else if (!this.isBadQuery(q)) { + me = this; + me.options.params.query = q; + $.get(this.serviceUrl, me.options.params, function(txt) { me.processResponse(txt); }, 'text'); + } + }, + + isBadQuery: function(q) { + var i = this.badQueries.length; + while (i--) { + if (q.indexOf(this.badQueries[i]) === 0) { return true; } + } + return false; + }, + + hide: function() { + this.enabled = false; + this.selectedIndex = -1; + this.container.hide(); + }, + + suggest: function() { + if (this.suggestions.length === 0) { + this.hide(); + return; + } + + var me, len, div, f, v, i, s, mOver, mClick, l, img; + me = this; + len = this.suggestions.length; + f = this.options.fnFormatResult; + v = this.getQuery(this.currentValue); + mOver = function(xi) { return function() { me.activate(xi); }; }; + mClick = function(xi) { return function() { me.select(xi); }; }; + this.container.hide().empty(); + for (i = 0; i < len; i++) { + s = this.suggestions[i]; + l = this.links[i]; + img = '' + s + ' '; + div = $((me.selectedIndex === i ? '
    ' + img + f(s, this.data[i], v) + '
    '); + div.mouseover(mOver(i)); + div.click(mClick(i)); + this.container.append(div); + } + this.enabled = true; + this.container.show(); + }, + + processResponse: function(text) { + var response; + try { + response = eval('(' + text + ')'); + } catch (err) { return; } + if (!$.isArray(response.data)) { response.data = []; } + if(!this.options.noCache){ + this.cachedResponse[response.query] = response; + if (response.suggestions.length === 0) { this.badQueries.push(response.query); } + } + if (response.query === this.getQuery(this.currentValue)) { + this.photos = response.photos; + this.links = response.links; + this.suggestions = response.suggestions; + this.data = response.data; + this.suggest(); + } + }, + + activate: function(index) { + var divs, activeItem; + divs = this.container.children(); + // Clear previous selection: + if (this.selectedIndex !== -1 && divs.length > this.selectedIndex) { + $(divs.get(this.selectedIndex)).removeClass(); + } + this.selectedIndex = index; + if (this.selectedIndex !== -1 && divs.length > this.selectedIndex) { + activeItem = divs.get(this.selectedIndex); + $(activeItem).addClass('selected'); + } + return activeItem; + }, + + deactivate: function(div, index) { + div.className = ''; + if (this.selectedIndex === index) { this.selectedIndex = -1; } + }, + + select: function(i) { + var selectedValue, f; + selectedValue = this.suggestions[i]; + if (selectedValue) { + this.el.val(selectedValue); + if (this.options.autoSubmit) { + f = this.el.parents('form'); + if (f.length > 0) { f.get(0).submit(); } + } + this.ignoreValueChange = true; + this.hide(); + this.onSelect(i); + } + }, + + moveUp: function() { + if (this.selectedIndex === -1) { return; } + if (this.selectedIndex === 0) { + this.container.children().get(0).className = ''; + this.selectedIndex = -1; + this.el.val(this.currentValue); + return; + } + this.adjustScroll(this.selectedIndex - 1); + }, + + moveDown: function() { + if (this.selectedIndex === (this.suggestions.length - 1)) { return; } + this.adjustScroll(this.selectedIndex + 1); + }, + + adjustScroll: function(i) { + var activeItem, offsetTop, upperBound, lowerBound; + activeItem = this.activate(i); + offsetTop = activeItem.offsetTop; + upperBound = this.container.scrollTop(); + lowerBound = upperBound + this.options.maxHeight - 25; + if (offsetTop < upperBound) { + this.container.scrollTop(offsetTop); + } else if (offsetTop > lowerBound) { + this.container.scrollTop(offsetTop - this.options.maxHeight + 25); + } + this.el.val(this.getValue(this.suggestions[i])); + }, + + onSelect: function(i) { + var me, fn, s, d; + me = this; + fn = me.options.onSelect; + s = me.suggestions[i]; + d = me.data[i]; + me.el.val(me.getValue(s)); + if ($.isFunction(fn)) { fn(s, d, me.el); } + }, + + getValue: function(value){ + var del, currVal, arr, me; + me = this; + del = me.options.delimiter; + if (!del) { return value; } + currVal = me.currentValue; + arr = currVal.split(del); + if (arr.length === 1) { return value; } + return currVal.substr(0, currVal.length - arr[arr.length - 1].length) + value; + } + + }; + +}(jQuery)); diff --git a/mod/acl.php b/mod/acl.php index 402d37376..168b1f59f 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -127,12 +127,15 @@ function acl_init(&$a){ if($type == 'm') { $x = array(); $x['query'] = $search; + $x['photos'] = array(); + $x['links'] = array(); $x['suggestions'] = array(); $x['data'] = array(); if(count($r)) { foreach($r as $g) { - $x['suggestions'][] = sprintf( t('%s [%s]'),$g['name'],$g['url']); - // '' . t('Image/photo') . '' . + $x['photos'][] = $g['micro']; + $x['links'][] = $g['url']; + $x['suggestions'][] = $g['name']; // sprintf( t('%s [%s]'),$g['name'],$g['url']); $x['data'][] = intval($g['id']); } } diff --git a/mod/message.php b/mod/message.php index 8cfa0256c..29a2fa253 100644 --- a/mod/message.php +++ b/mod/message.php @@ -18,7 +18,7 @@ function message_init(&$a) { )); $base = $a->get_baseurl(); - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= ''; $a->page['htmlhead'] .= <<< EOT ', $cookieJS); //load jquery.ae.image.resize.js - $imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.ae.image.resize.js"; + $imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.ae.image.resize.min.js"; $a->page['htmlhead'] .= sprintf('', $imageresizeJS); //load jquery.ui.js @@ -198,6 +198,10 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a->page['htmlhead'] .= sprintf('', $mqmouseposJS); $mousewheelJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mousewheel.js"; $a->page['htmlhead'] .= sprintf('', $mousewheelJS); + $mqlegendJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.legend.js"; + $a->page['htmlhead'] .= sprintf('', $mqlegendJS); + $mqlayermanagerJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js"; + $a->page['htmlhead'] .= sprintf('', $mqlayermanagerJS); } @@ -248,9 +252,12 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }); function open_mapcontrol() { - $("div#mapcontrol").attr("style","display: block;width:900px;height:600px;"); - $("#map2").mapQuery({layers:[{type:"osm"}], - center:({zoom:'.$ELZoom.',position:['.$ELPosX.','.$ELPosY.']})}); + $("div#mapcontrol").attr("style","display: block;width:900px;height:900px;"); + $("#map2").mapQuery({ + layers:[{type:"osm", minZoom:1, label:"OpenStreetMap" }, + {type:"wms", minZoom:1, label:"Population density 2010", legend:{url:"http://mapserver.edugis.nl/cgi-bin/mapserv?map=maps/edugis/cache/population.map&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=Bevolkingsdichtheid_2010&format=image/png"}, url:"http://t1.edugis.nl/tiles/tilecache.py?map=maps/edugis/cache/population.map", + layers:"Bevolkingsdichtheid_2010" }], + center:({zoom:'.$ELZoom.',position:['.$ELPosX.','.$ELPosY.']})}); $("#mouseposition").mqMousePosition({ map: "#map2", @@ -259,7 +266,8 @@ if ($color=="dark") $color_path = "/diabook-dark/"; precision:4 }); - + $("#layermanager").mqLayerManager({map:"#map2"}); + map = $("#map2").mapQuery().data("mapQuery"); textarea = document.getElementById("id_diabook_ELZoom"); From 48c48d644f4b6dca237e61594d5d95a0c1c3f6e8 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Fri, 11 May 2012 16:41:16 +0200 Subject: [PATCH 56/57] diabook-theme: update mapquery and small fix --- view/theme/diabook/communityhome.tpl | 3 +- view/theme/diabook/js/jquery.mapquery.core.js | 655 +++++++++++++++--- .../js/jquery.mapquery.mqLayerManager.js | 23 +- .../js/jquery.mapquery.mqMousePosition.js | 59 +- view/theme/diabook/theme.php | 14 +- 5 files changed, 596 insertions(+), 158 deletions(-) diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl index 90253882f..6fa330140 100755 --- a/view/theme/diabook/communityhome.tpl +++ b/view/theme/diabook/communityhome.tpl @@ -10,8 +10,9 @@