From ad61ffdbaf004dd3b33adf8f2780500069fa097b Mon Sep 17 00:00:00 2001
From: Ugnich Anton
Date: Sat, 28 Jan 2012 14:45:42 +0700
Subject: JS, CSS, PNG
---
nbproject/project.properties | 3 +-
src/java/com/juick/http/www/UserThread.java | 4 +-
web/favicon.png | Bin 0 -> 244 bytes
web/js/jquery.autoresize.js | 230 ++++++++++++++++++++++++++++
web/logo3.png | Bin 0 -> 1722 bytes
web/map.js | 182 ++++++++++++++++++++++
web/maps.js | 228 +++++++++++++++++++++++++++
web/mc.js | 1 +
web/message-menu-icon.png | Bin 0 -> 479 bytes
web/post3.js | 55 +++++++
web/scripts3.js | 48 ++++++
web/style3.css | 112 ++++++++++++++
12 files changed, 859 insertions(+), 4 deletions(-)
create mode 100644 web/favicon.png
create mode 100644 web/js/jquery.autoresize.js
create mode 100644 web/logo3.png
create mode 100644 web/map.js
create mode 100644 web/maps.js
create mode 100644 web/mc.js
create mode 100644 web/message-menu-icon.png
create mode 100644 web/post3.js
create mode 100644 web/scripts3.js
create mode 100644 web/style3.css
diff --git a/nbproject/project.properties b/nbproject/project.properties
index 873bcd4c..1ae4ca76 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -1,10 +1,9 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=true
-annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
build.classes.dir=${build.web.dir}/WEB-INF/classes
-build.classes.excludes=**/*.java,**/*.form
+build.classes.excludes=**/*.java,**/*.form,**/*.js,**/*.css,**/*.png
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java
index 4643da42..7248697b 100644
--- a/src/java/com/juick/http/www/UserThread.java
+++ b/src/java/com/juick/http/www/UserThread.java
@@ -268,7 +268,7 @@ public class UserThread {
out.println(" ");
out.println("
");
out.println(" " + msg.Text + "
");
- out.println(" ");
+ out.println(" ");
out.println(" ");
if (ReplyTo == 0) {
int childs = msg.getChildsCount() - 1;
@@ -306,7 +306,7 @@ public class UserThread {
out.println(" ");
out.println(" ");
out.println(" " + msg.Text + "
");
- out.println(" ");
+ out.println(" ");
out.println(" ");
out.println(" ");
}
diff --git a/web/favicon.png b/web/favicon.png
new file mode 100644
index 00000000..bc7161e2
Binary files /dev/null and b/web/favicon.png differ
diff --git a/web/js/jquery.autoresize.js b/web/js/jquery.autoresize.js
new file mode 100644
index 00000000..a54ec545
--- /dev/null
+++ b/web/js/jquery.autoresize.js
@@ -0,0 +1,230 @@
+/*
+ * jQuery.fn.autoResize 1.1
+ * --
+ * https://github.com/jamespadolsey/jQuery.fn.autoResize
+ * --
+ * This program is free software. It comes without any warranty, to
+ * the extent permitted by applicable law. You can redistribute it
+ * and/or modify it under the terms of the Do What The Fuck You Want
+ * To Public License, Version 2, as published by Sam Hocevar. See
+ * http://sam.zoy.org/wtfpl/COPYING for more details. */
+
+(function($){
+
+ var defaults = autoResize.defaults = {
+ onResize: function(){},
+ animate: {
+ duration: 200,
+ complete: function(){}
+ },
+ extraSpace: 0,
+ minHeight: 1,
+ maxHeight: 500,
+ minWidth: 'original',
+ maxWidth: 500
+ };
+
+ autoResize.cloneCSSProperties = [
+ 'lineHeight', 'textDecoration', 'letterSpacing',
+ 'fontSize', 'fontFamily', 'fontStyle', 'fontWeight',
+ 'textTransform', 'textAlign', 'direction', 'wordSpacing', 'fontSizeAdjust',
+ 'padding'
+ ];
+
+ autoResize.cloneCSSValues = {
+ position: 'absolute',
+ top: -9999,
+ left: -9999,
+ opacity: 0,
+ overflow: 'hidden'
+ };
+
+ autoResize.resizableFilterSelector = 'textarea,input:not(input[type]),input[type=text],input[type=password]';
+
+ autoResize.AutoResizer = AutoResizer;
+
+ $.fn.autoResize = autoResize;
+
+ function autoResize(config) {
+ this.filter(autoResize.resizableFilterSelector).each(function(){
+ new AutoResizer( $(this), config );
+ });
+ return this;
+ }
+
+ function AutoResizer(el, config) {
+
+ config = this.config = $.extend(autoResize.defaults, config);
+ this.el = el;
+
+ this.nodeName = el[0].nodeName.toLowerCase();
+
+ this.originalHeight = el.height();
+ this.previousScrollTop = null;
+
+ this.value = el.val();
+
+ if (config.maxWidth === 'original') config.maxWidth = el.width();
+ if (config.minWidth === 'original') config.minWidth = el.width();
+ if (config.maxHeight === 'original') config.maxHeight = el.height();
+ if (config.minHeight === 'original') config.minHeight = el.height();
+
+ if (this.nodeName === 'textarea') {
+ el.css({
+ resize: 'none',
+ overflowY: 'hidden'
+ });
+ }
+
+ el.data('AutoResizer', this);
+
+ this.createClone();
+ this.injectClone();
+ this.bind();
+
+ }
+
+ AutoResizer.prototype = {
+
+ bind: function() {
+
+ var check = $.proxy(function(){
+ this.check();
+ return true;
+ }, this);
+
+ this.unbind();
+
+ this.el
+ .bind('keyup.autoResize', check)
+ //.bind('keydown.autoResize', check)
+ .bind('change.autoResize', check);
+
+ this.check(null, true);
+
+ },
+
+ unbind: function() {
+ this.el.unbind('.autoResize');
+ },
+
+ createClone: function() {
+
+ var el = this.el,
+ clone;
+
+ if (this.nodeName === 'textarea') {
+ clone = el.clone().height('auto');
+ } else {
+ clone = $('').width('auto').css({
+ whiteSpace: 'nowrap'
+ });
+ }
+
+ this.clone = clone;
+
+ $.each(autoResize.cloneCSSProperties, function(i, p){
+ clone[0].style[p] = el.css(p);
+ });
+
+ clone
+ .removeAttr('name')
+ .removeAttr('id')
+ .attr('tabIndex', -1)
+ .css(autoResize.cloneCSSValues);
+
+ },
+
+ check: function(e, immediate) {
+
+ var config = this.config,
+ clone = this.clone,
+ el = this.el,
+ value = el.val();
+
+ if (this.nodeName === 'input') {
+
+ clone.text(value);
+
+ // Calculate new width + whether to change
+ var cloneWidth = clone.width(),
+ newWidth = (cloneWidth + config.extraSpace) >= config.minWidth ?
+ cloneWidth + config.extraSpace : config.minWidth,
+ currentWidth = el.width();
+
+ newWidth = Math.min(newWidth, config.maxWidth);
+
+ if (
+ (newWidth < currentWidth && newWidth >= config.minWidth) ||
+ (newWidth >= config.minWidth && newWidth <= config.maxWidth)
+ ) {
+
+ config.onResize.call(el);
+
+ el.scrollLeft(0);
+
+ config.animate && !immediate ?
+ el.stop(1,1).animate({
+ width: newWidth
+ }, config.animate)
+ : el.width(newWidth);
+
+ }
+
+ return;
+
+ }
+
+ // TEXTAREA
+
+ clone.height(0).val(value).scrollTop(10000);
+
+ var scrollTop = clone[0].scrollTop + config.extraSpace;
+
+ // Don't do anything if scrollTop hasen't changed:
+ if (this.previousScrollTop === scrollTop) {
+ return;
+ }
+
+ this.previousScrollTop = scrollTop;
+
+ if (scrollTop >= config.maxHeight) {
+ el.css('overflowY', '');
+ return;
+ }
+
+ el.css('overflowY', 'hidden');
+
+ if (scrollTop < config.minHeight) {
+ scrollTop = config.minHeight;
+ }
+
+ config.onResize.call(el);
+
+ // Either animate or directly apply height:
+ config.animate && !immediate ?
+ el.stop(1,1).animate({
+ height: scrollTop
+ }, config.animate)
+ : el.height(scrollTop);
+
+ },
+
+ destroy: function() {
+ this.unbind();
+ this.el.removeData('AutoResizer');
+ this.clone.remove();
+ delete this.el;
+ delete this.clone;
+ },
+
+ injectClone: function() {
+ (
+ autoResize.cloneContainer ||
+ (autoResize.cloneContainer = $('').appendTo('body'))
+ ).append(this.clone);
+ }
+
+ };
+
+})(jQuery);
\ No newline at end of file
diff --git a/web/logo3.png b/web/logo3.png
new file mode 100644
index 00000000..df656d3f
Binary files /dev/null and b/web/logo3.png differ
diff --git a/web/map.js b/web/map.js
new file mode 100644
index 00000000..4359727f
--- /dev/null
+++ b/web/map.js
@@ -0,0 +1,182 @@
+var map;
+var mc;
+var icon=new GIcon(G_DEFAULT_ICON,"http://maps.google.com/mapfiles/marker_orange.png");
+
+function mapInit() {
+ var lat=getHashVar("lat");
+ var lon=getHashVar("lon");
+ var zoom=getHashVar("zoom");
+ if(!lat || !lon || !zoom) {
+ lat=readCookie("lat");
+ lon=readCookie("lon");
+ zoom=readCookie("zoom");
+ if(!lat || !lon || !zoom) {
+ lat=30;
+ lon=0;
+ zoom=2;
+ }
+ else {
+ lat=parseFloat(lat);
+ lon=parseFloat(lon);
+ zoom=parseInt(zoom);
+ }
+ } else {
+ lat=parseFloat(lat);
+ lon=parseFloat(lon);
+ zoom=parseInt(zoom);
+ }
+
+ map=new GMap2(document.getElementById("geomap"));
+ map.setCenter(new GLatLng(lat,lon),zoom,G_HYBRID_MAP);
+ map.addControl(new GMapTypeControl());
+ map.enableScrollWheelZoom();
+ map.addControl(new GLargeMapControl(),new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(-10,-60)));
+
+ mc=new MarkerClusterer(map,null,{
+ gridSize:40,
+ maxZoom:15
+ });
+
+ GEvent.addListener(map,"moveend",mapLoadMarkers);
+ GEvent.addListener(map,"zoomend",mapLoadMarkers);
+
+ mapLoadMarkers();
+}
+
+function mapLoadMarkers() {
+ var mapcenter=map.getCenter();
+ var lat=Math.round(mapcenter.lat()*100000)/100000;
+ var lon=Math.round(mapcenter.lng()*100000)/100000;
+ window.location.hash.replace("#lat="+lat+"&lon="+lon+"&zoom="+map.getZoom());
+ writeCookie("lat",lat,365,"/map");
+ writeCookie("lon",lon,365,"/map");
+ writeCookie("zoom",map.getZoom(),365,"/map");
+
+ var bounds=map.getBounds();
+ var swlat=bounds.getSouthWest().lat();
+ if(swlat<-90) swlat=-90;
+ var swlng=bounds.getSouthWest().lng();
+ if(swlng<-180) swlng=-180;
+
+ var nelat=bounds.getNorthEast().lat();
+ if(nelat>90) nelat=90;
+ var nelng=bounds.getNorthEast().lng();
+ if(nelng>180) nelng=180;
+
+ if(nelng'+json[i].name+'';
+ places.appendChild(li);
+ }
+ }
+ mc.clearMarkers();
+ mc.addMarkers(markers);
+}
+
+function mapParseMessages(json) {
+ var msgs=document.getElementById("messages");
+ while(msgs.hasChildNodes()) msgs.removeChild(msgs.lastChild);
+ for(var i=0; i@'+json[i].user.uname+':';
+ if(json[i].tags)
+ for(var n=0; n*'+json[i].tags[n]+'';
+ ihtml+='';
+ if(json[i].location)
+ ihtml+='
Location: '+json[i].location.name+'';
+ if(json[i].photo)
+ ihtml+='
Attachment: Photo';
+ if(json[i].video)
+ ihtml+='
Attachment: Video';
+ ihtml+=json[i].body+'
';
+
+ var li=document.createElement("li");
+ li.className='liav';
+ li.style.backgroundImage='url(http://i.juick.com/as/'+json[i].user.uid+'.png)';
+ li.innerHTML=ihtml;
+ msgs.appendChild(li);
+ }
+}
+
+function createMarker(id,latlng,title,href,icon) {
+ var marker=new GMarker(latlng,{
+ 'icon':icon,
+ 'title':title
+ });
+ marker.param=id;
+ if(href && href!="")
+ GEvent.addListener(marker,"click",function(ll) {
+ var txt=''+title+'';
+ map.openInfoWindowHtml(ll,txt);
+ });
+ return marker;
+}
+
+function getHashVar(variable) {
+ var query=window.location.hash.substring(1);
+ var vars=query.split("&");
+ for(var i=0; i14 && cross!=null && !crossOnMap) {
+ map.addControl(jcontrol);
+ map.addOverlay(cross);
+ crossOnMap=true;
+ }
+ if(zoom<=14 && cross!=null && crossOnMap) {
+ map.removeControl(jcontrol);
+ map.removeOverlay(cross);
+ crossOnMap=false;
+ }
+
+ var bounds=map.getBounds();
+ if(mapBounds==null || !mapBounds.containsBounds(bounds) || zoomOld>0) {
+ var span=bounds.toSpan();
+
+ var swlat=bounds.getSouthWest().lat()-span.lat()/3;
+ if(swlat<-90) swlat=-90;
+ var swlng=bounds.getSouthWest().lng()-span.lng()/3;
+ if(swlng<-180) swlng=-180;
+
+ var nelat=bounds.getNorthEast().lat()+span.lat()/3;
+ if(nelat>90) nelat=90;
+ var nelng=bounds.getNorthEast().lng()+span.lng()/3;
+ if(nelng>180) nelng=180;
+
+ mapBounds=new GLatLngBounds(new GLatLng(swlat,swlng),new GLatLng(nelat,nelng));
+
+ var q="/_mapxml?"+mapParams+"&south="+swlat+"&west="+swlng+"&north="+nelat+"&east="+nelng;
+ GDownloadUrl(q,function(data) {
+ var xmlmarkers=GXml.parse(data).documentElement.getElementsByTagName("marker");
+ var markers=[];
+ var mbounds=new GLatLngBounds();
+ var icon;
+ var iconcolor="null";
+ for(var i=0; i14) zoom=14;
+ else if(zoom<1) zoom=1;
+ map.setCenter(mbounds.getCenter(),zoom);
+ }
+ });
+ }
+}
+
+function createMarker(id,latlng,title,href,icon) {
+ var marker=new GMarker(latlng,{
+ 'icon':icon,
+ 'title':title
+ });
+ marker.param=id;
+ if(href && href!="")
+ GEvent.addListener(marker,"click",function(ll) {
+ var txt=''+title+'';
+ map.openInfoWindowHtml(ll,txt);
+ });
+ return marker;
+}
+
+//
+
+function JuickControl() {}
+JuickControl.prototype = new GControl();
+JuickControl.prototype.initialize = function(map) {
+ var container = document.createElement("div");
+
+ var bAddPlace = document.createElement("div");
+ this.setButtonStyle_(bAddPlace);
+ container.appendChild(bAddPlace);
+ bAddPlace.appendChild(document.createTextNode("Add place"));
+ GEvent.addDomListener(bAddPlace, "click", this.onAddPlaceClick);
+ map.getContainer().appendChild(container);
+ return container;
+}
+
+JuickControl.prototype.getDefaultPosition = function() {
+ return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(7, 35));
+}
+
+JuickControl.prototype.setButtonStyle_ = function(button) {
+ button.style.color = "#000000";
+ button.style.backgroundColor = "white";
+ button.style.font = "small Arial";
+ button.style.border = "1px solid black";
+ button.style.padding = "2px";
+ button.style.marginBottom = "5px";
+ button.style.textAlign = "center";
+ button.style.width = "6em";
+ button.style.cursor = "pointer";
+}
+
+var htmlAddPlace='';
+
+var placeLatLng;
+
+JuickControl.prototype.onAddPlaceClick = function() {
+ placeLatLng=map.getCenter();
+ map.removeOverlay(cross);
+ map.openInfoWindowHtml(placeLatLng,htmlAddPlace,{
+ onCloseFn:function() {
+ map.panTo(placeLatLng);
+ map.addOverlay(cross);
+ }
+ });
+}
+
+function addPlace(form) {
+ var description=form.description.value;
+ if(description=='') {
+ alert('Enter place name.');
+ return;
+ }
+ var text=form.text.value;
+ var url=form.url.value;
+ var tags=form.tags.value;
+ map.closeInfoWindow();
+ GDownloadUrl("/_mapxml",function(data) {
+ var xmlmarkers=GXml.parse(data).documentElement.getElementsByTagName("marker");
+
+ var icon=new GIcon(G_DEFAULT_ICON);
+ icon.image="http://maps.google.com/mapfiles/marker_orange.png";
+ var markers=[];
+ markers.push(createMarker(
+ xmlmarkers[0].getAttribute("param"),
+ placeLatLng,
+ description,
+ xmlmarkers[0].getAttribute("href"),
+ icon
+ ));
+ mc.addMarkers(markers);
+ },'lat='+placeLatLng.lat()+'&lon='+placeLatLng.lng()+'&description='+escape(description)+'&text='+escape(text)+'&url='+escape(url)+'&tags='+escape(tags));
+}
diff --git a/web/mc.js b/web/mc.js
new file mode 100644
index 00000000..986d19ac
--- /dev/null
+++ b/web/mc.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 37(n,v,w){4 o=[];4 m=n;4 t=z;4 q=3;4 r=20;4 x=[36,30,2R,2E,2z];4 s=[];4 u=[];4 p=z;4 i=0;A(i=1;i<=5;++i){s.O({\'18\':"1V://35-31-2Z.2W.2Q/2K/2C/2B/2y/m"+i+".2u",\'S\':x[i-1],\'Z\':x[i-1]})}6(F w==="X"&&w!==z){6(F w.1f==="13"&&w.1f>0){r=w.1f}6(F w.1y==="13"){t=w.1y}6(F w.14==="X"&&w.14!==z&&w.14.9!==0){s=w.14}}7 1t(){6(u.9===0){8}4 a=[];A(i=0;i=0;--i){q.Q(a[i].C,G,a[i].I,b,G)}1t()}3.Q=7(g,j,b,h,a){6(a!==G){6(!1p(g)){u.O(g);8}}4 f=b;4 d=h;4 e=m.M(g.1o());6(F f!=="2A"){f=T}6(F d!=="X"||d===z){d=o}4 k=d.9;4 c=z;A(4 i=k-1;i>=0;i--){c=d[i];4 l=c.1L();6(l===z){1I}l=m.M(l);6(e.x>=l.x-r&&e.x<=l.x+r&&e.y>=l.y-r&&e.y<=l.y+r){c.Q({\'I\':f,\'C\':g});6(!j){c.L()}8}}c=R 1J(3,n);c.Q({\'I\':f,\'C\':g});6(!j){c.L()}d.O(c);6(d!==o){o.O(c)}};3.1C=7(a){A(4 i=0;ia.x)){e=T}6(e&&(b.y+fg.y)){e=T}8 e};3.1L=7(){8 o};3.Q=7(a){6(o===z){o=a.C.1o()}n.O(a)};3.1C=7(a){A(4 i=0;i=a||3.Y()===1){A(i=0;i0&&3.D[0]<3.H){g+=\'S:\'+(3.H-3.D[0])+\'B;1H-1g:\'+3.D[0]+\'B;\'}N{g+=\'S:\'+3.H+\'B;1G-S:\'+3.H+\'B;\'}6(F 3.D[1]==="13"&&3.D[1]>0&&3.D[1]<3.P){g+=\'Z:\'+(3.P-3.D[1])+\'B;1H-1i:\'+3.D[1]+\'B;\'}N{g+=\'Z:\'+3.P+\'B;1F-1E:1D;\'}}N{g+=\'S:\'+3.H+\'B;1G-S:\'+3.H+\'B;\';g+=\'Z:\'+3.P+\'B;1F-1E:1D;\'}4 k=3.19?3.19:\'2x\';j.U.2w=g+\'2v:2t;1g:\'+f.y+"B;1i:"+f.x+"B;2D:"+k+";2s:2F;1h-2r:2q;"+\'1h-2p:2o,2n-2m;1h-2N:2l\';j.2k=3.1m;i.2j(2i).2h(j);4 e=3.1l;17.2g(j,"2f",7(){4 a=i.M(h);4 d=R 1Q(a.x-e,a.y+e);d=i.1B(d);4 b=R 1Q(a.x+e,a.y-e);b=i.1B(b);4 c=i.2e(R 2d(d,b),i.2c());i.2b(h,c)});3.K=j};E.J.1K=7(){3.K.2a.33(3.K)};E.J.28=7(){8 R E(3.15,3.1T,3.1m,3.1R,3.1l)};E.J.1q=7(a){6(!a){8}4 b=3.1P.M(3.15);b.x-=V(3.P/2,10);b.y-=V(3.H/2,10);3.K.U.1g=b.y+"B";3.K.U.1i=b.x+"B"};E.J.1k=7(){3.K.U.1d="1z"};E.J.1a=7(){3.K.U.1d=""};E.J.11=7(){8 3.K.U.1d==="1z"};',62,194,'|||this|var||if|function|return|length||||||||||||||||||||||||||null|for|px|marker|anchor_|ClusterMarker_|typeof|true|height_|isAdded|prototype|div_|redraw_|fromLatLngToDivPixel|else|push|width_|addMarker|new|height|false|style|parseInt|getZoom|object|getTotalMarkers|width||isHidden|clearMarkers|number|styles|latlng_|url_|GEvent|url|textColor_|show|getBounds|removeOverlay|display|getGridSize_|gridSize|top|font|left|getClustersInViewport_|hide|padding_|text_|isInBounds|getLatLng|isMarkerInViewport_|redraw|addOverlay|getStyles_|addLeftMarkers_|addMarkers|splice|getMarkers|getCurrentZoom|maxZoom|none|resetViewport|fromDivPixelToLatLng|removeMarker|center|align|text|line|padding|continue|Cluster|remove|getCenter|getMap_|getMaxZoom_|document|map_|GPoint|styles_|reAddMarkers_|index_|opt_textColor|http|removeListener|while|undefined|getMaximumResolution|60|getCurrentMapType|pow|Math|getNorthEast|getSouthWest|moveend|addListener|copy|getTotalClusters|parentNode|setCenter|getSize|GLatLngBounds|getBoundsZoomLevel|click|addDomListener|appendChild|G_MAP_MAP_PANE|getPane|innerHTML|bold|serif|sans|Arial|family|11px|size|position|pointer|png|cursor|cssText|black|images|90|boolean|markerclusterer|trunk|color|78|absolute|background|src|scale|sizingMethod|svn|AlphaImageLoader|Microsoft|weight|DXImageTransform|progid|com|66|filter|all|div|createElement|googlecode|initialize|GOverlay|library|56|utility|opt_anchor|removeChild|containsLatLng|gmaps|53|MarkerClusterer'.split('|'),0,{}))
\ No newline at end of file
diff --git a/web/message-menu-icon.png b/web/message-menu-icon.png
new file mode 100644
index 00000000..4cac2563
Binary files /dev/null and b/web/message-menu-icon.png differ
diff --git a/web/post3.js b/web/post3.js
new file mode 100644
index 00000000..31b3f8f2
--- /dev/null
+++ b/web/post3.js
@@ -0,0 +1,55 @@
+if(window!=window.top) {
+ window.top.location.href='http://juick.com/post';
+}
+
+function clearLocation() {
+ document.getElementById("location").innerHTML='Choose';
+ document.getElementById("locationclear").style.display="none";
+ document.getElementById("geomap").style.display="none";
+ document.forms["postmsg"].place_id.value=0;
+}
+
+function addLocation() {
+ document.getElementById("location").innerHTML="?";
+ document.getElementById("locationclear").style.display="inline";
+ document.getElementById("geomap").style.display="block";
+ if(!map) {
+ mapInit('show=places',1,1);
+ GEvent.addListener(map,"click", function(overlay) {
+ if(overlay instanceof GMarker) {
+ document.getElementById("location").innerHTML=''+overlay.getTitle()+'';
+ document.forms["postmsg"].place_id.value=overlay.param;
+ }
+ });
+ }
+}
+
+function addTag(tag) {
+ document.forms["postmsg"].body.value='*'+tag+' '+document.forms["postmsg"].body.value;
+ return false;
+}
+
+function webcamShow() {
+ swfobject.embedSWF('http://juick.com/_webcam.swf','webcam','320','280','9.0.115','false',null,null,null);
+}
+
+function webcamImage(hash) {
+ document.getElementById("webcamwrap").innerHTML='';
+ document.getElementById("attachmentfile").style.display="none";
+ document.getElementById("attachmentwebcam").style.display="inline";
+ document.forms["postmsg"].webcam.value=hash;
+}
+
+function clearAttachment() {
+ document.getElementById("attachmentfile").style.display="inline";
+ document.getElementById("attachmentwebcam").style.display="none";
+ document.forms["postmsg"].webcam.value="";
+}
+
+$(document).ready(function() {
+ clearLocation();
+ clearAttachment();
+ $("textarea")[0].focus();
+});
+
+$(window).unload(GUnload);
diff --git a/web/scripts3.js b/web/scripts3.js
new file mode 100644
index 00000000..ec86d39e
--- /dev/null
+++ b/web/scripts3.js
@@ -0,0 +1,48 @@
+function inlinevideo(mid) {
+ var flashvars={
+ file:'http://i.juick.com/video/'+mid+'.mp4',
+ image:'http://i.juick.com/thumbs/'+mid+'.jpg',
+ skin:'http://static.juick.com/glow.zip'
+ };
+ var params={
+ allowfullscreen:'true'
+ };
+ swfobject.embedSWF('http://static.juick.com/player.swf','video-'+mid,'640','390','9.0.115','false',flashvars,params,null);
+}
+
+function postformListener(formEl,ev) {
+ if(ev.ctrlKey && (ev.keyCode==10 || ev.keyCode==13)) formEl.submit();
+}
+
+function showMoreReplies(id) {
+ $('#'+id+' .msg-comments').hide();
+
+ var replies=$('#replies>li');
+ var flagshow=0;
+ for(var i=0; i');
+ c.before('');
+ c.append('');
+ }
+ $('#replies #'+rid+' .msg-links').hide();
+ $('#replies #'+rid+' .msg-comment').show();
+ $('#replies #'+rid+' textarea')[0].focus();
+ return false;
+}
diff --git a/web/style3.css b/web/style3.css
new file mode 100644
index 00000000..49add6f2
--- /dev/null
+++ b/web/style3.css
@@ -0,0 +1,112 @@
+html { margin: 0; padding: 0; font-family: sans-serif; font-size: 16px; }
+body { margin: 0; padding: 0; }
+h1,h2 { font-weight: normal; }
+ul { list-style-type: none; }
+a { text-decoration: none; }
+hr { display: none; }
+img { border: none; }
+
+/********/
+
+#header { width: 900px; margin: 0 auto; }
+#logo { float: left; margin: 8px 16px 0 0; }
+#header ul { margin: 0; padding: 0; }
+#header a { text-decoration: none; font-size: 18px; }
+
+#nav li { float: left; }
+#nav-right { float: right; }
+#nav-right li { float: left; }
+
+#header ul a { display: block; line-height: 56px; padding: 0 20px; }
+#nav-right img { vertical-align: middle; margin: 0 4px 0 0; }
+#nav-menu { display: none; position: absolute; z-index: 1; }
+#nav-menu li { float: none; }
+
+/********/
+
+#title { clear: both; width: 100%; border-top: 1px solid; border-bottom: 1px solid; background: #F0F0F0; }
+#title>h1 { width: 900px; margin: 20px auto; font-size: 28px; }
+
+#title-container { width: 900px; margin: 20px auto; min-height: 100px; }
+#title-av { width: 100px; height: 100px; margin-left: 20px; float: left; }
+#title-av img { vertical-align: top; padding: 2px; }
+#title-stats { width: 200px; float: right; border-left: 1px solid; }
+#title-stats ul { margin: 10px 0 10px 20px; padding: 0; }
+#title-stats li { margin: 0; padding: 0; }
+#title-username { margin: 0 220px 0 140px; }
+
+/********/
+
+#wrapper { width: 900px; margin: 0 auto; }
+#content { width: 640px; margin-left: 260px; float: left; }
+#content ul { list-style-type: none; margin: 0; padding: 0; }
+#content li { background-repeat: no-repeat; }
+
+/********/
+
+#geomap { margin-top: 1em; width: 640px; height: 360px; overflow: hidden; }
+
+#content .msg { padding: 16px 0 0 0; margin: 0 0 16px 0; border-top: 1px solid; width: 640px; }
+#content .msg-media { text-align: center; margin-bottom: 10px; }
+#content .msg-avatar { float: left; }
+#content .msg-avatar img { width: 48px; height: 48px; vertical-align: top; }
+#content .msg-ts { float: right; }
+#content .msg-ts a { font-size: small; }
+#content .msg-menu { margin: 0 8px; display: inline; position: relative; }
+#content .msg-menu img { vertical-align: top; }
+#content .msg-menu ul { display: none; position: absolute; top: 20px; right: 0; width: 200px; margin: 0; padding: 5px; }
+#content .msg-menu li { margin: 0; padding: 0; }
+#content .msg-header { margin-left: 58px; }
+#content .msg-txt { margin-left: 58px; padding: 6px 0 0 0; }
+#content .msg-links { font-size: small; margin: 10px 0 0 68px; }
+#content .msg-comments { margin: 10px 0 0 58px; padding: 5px 20px; overflow: hidden; font-size: small; }
+#content .msg-comment { margin: 10px 0 0 58px; padding: 0px 0 0 20px; }
+#content textarea { border: 1px solid; width: 556px; padding: 2px; resize: vertical; }
+
+#chats li { margin: 16px; }
+
+.title2 { padding: 10px 20px; margin: 20px 0 10px 0; }
+.title2-right { float: right; line-height: 24px; }
+.title2 h2 { margin: 0; font-size: 24px; }
+
+#gallery { margin: 20px auto; padding: 0; }
+.galleryitem { float: left; margin: 0; padding: 0; line-height: 0; }
+.galleryitem img { margin: 0 5px 5px 0; }
+
+.page { text-align: center; padding: 5px; }
+
+/********/
+
+#column { float: left; width: 210px; margin-left: -900px; }
+#column ul { margin: 8px 0 0 0; padding: 0; }
+#column li { margin: 0; padding: 2px 0 2px 10px; }
+#column p { font-size: 14px; margin: 0 0 0 10px; }
+#column .inp { width: 195px; }
+#column h2 { border-bottom: 1px solid; font-size: 18px; margin: 24px 0 8px 0; padding: 0 0 2px 2px; }
+
+/********/
+
+#footer { clear: both; width: 900px; margin: 0 auto; font-size: small; padding: 25px 0 10px; }
+#footer-right { float: right; }
+
+/******************************************************************************/
+
+html { background: #FFF; color: #000; }
+a { color: #069; }
+#header li a:hover { background: #E0F0FF; }
+#title { border-color: #CCC; }
+#nav-menu { background: #DDD; }
+#title-stats { border-color: #CCC; }
+
+#content .msg { border-color: #DDD; }
+#content .msg-comments { background: #F5F5F5; color: #999; }
+#content .msg-ts a { color: #999; }
+#content textarea { border-color: #DDD; }
+#content .msg-menu ul { background: #DDD; }
+.title2 { background: #F0F0F0; }
+.page { background: #F0F0F0; }
+
+#column li:hover { background: #E0F0FF; }
+#column h2 { border-color: #CCC; }
+
+#footer { color: #999; }
--
cgit v1.2.3