First Upload

This commit is contained in:
Xavier Balderas 2011-07-30 12:08:23 +02:00
parent 4507b99796
commit 066b54b180
25 changed files with 1491 additions and 0 deletions

View File

@ -0,0 +1,176 @@
/*
Plupload
------------------------------------------------------------------- */
.plupload_button {
display: -moz-inline-box; /* FF < 3*/
display: inline-block;
font: normal 12px sans-serif;
text-decoration: none;
color: #42454a;
border: 1px solid #bababa;
padding: 2px 8px 3px 20px;
margin-right: 4px;
background: #f3f3f3 url('../img/buttons.png') no-repeat 0 center;
outline: 0;
/* Optional rounded corners for browsers that support it */
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.plupload_button:hover {
color: #000;
text-decoration: none;
}
.plupload_disabled, a.plupload_disabled:hover {
color: #737373;
border-color: #c5c5c5;
background: #ededed url('../img/buttons-disabled.png') no-repeat 0 center;
cursor: default;
}
.plupload_add {
background-position: -181px center;
}
.plupload_wrapper {
font: normal 11px Verdana,sans-serif;
width: 100%;
}
.plupload_container {
background: url('../img/transp50.png');
/*-moz-border-radius: 5px;*/
}
.plupload_container input {
border: 1px solid #DDD;
font: normal 11px Verdana,sans-serif;
width: 98%;
}
.plupload_header {background: #2A2C2E url('../img/backgrounds.gif') repeat-x;}
.plupload_header_content {
background: url('../img/backgrounds.gif') no-repeat 0 -317px;
min-height: 56px;
padding-left: 60px;
color: #FFF;
}
.plupload_header_title {
font: normal 18px sans-serif;
padding: 6px 0 3px;
}
.plupload_header_text {
font: normal 12px sans-serif;
}
.plupload_filelist {
margin: 0;
padding: 0;
list-style: none;
}
.plupload_scroll .plupload_filelist {
height: 185px;
background: #F5F5F5;
overflow-y: scroll;
}
.plupload_filelist li {
padding: 10px 8px;
background: #F5F5F5 url('../img/backgrounds.gif') repeat-x 0 -156px;
border-bottom: 1px solid #DDD;
}
.plupload_filelist_header, .plupload_filelist_footer {
background: #DFDFDF;
padding: 8px 8px;
color: #42454A;
}
.plupload_filelist_header {
border-top: 1px solid #EEE;
border-bottom: 1px solid #CDCDCD;
}
.plupload_filelist_footer {border-top: 1px solid #FFF; height: 40px; line-height: 25px; vertical-align: middle;}
.plupload_file_name {float: left; overflow: hidden}
.plupload_file_status {color: #777;}
.plupload_file_status span {color: #42454A;}
.plupload_file_size, .plupload_file_status, .plupload_progress {
float: right;
width: 80px;
}
.plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;}
.plupload_filelist .plupload_file_name {width: 205px}
.plupload_file_action {
float: right;
width: 16px;
height: 16px;
margin-left: 15px;
}
.plupload_file_action * {
display: none;
width: 16px;
height: 16px;
}
li.plupload_uploading {background: #ECF3DC url('../img/backgrounds.gif') repeat-x 0 -238px;}
li.plupload_done {color:#AAA}
li.plupload_delete a {
background: url('../img/delete.gif');
}
li.plupload_failed a {
background: url('../img/error.gif');
cursor: default;
}
li.plupload_done a {
background: url('../img/done.gif');
cursor: default;
}
.plupload_progress, .plupload_upload_status {
display: none;
}
.plupload_progress_container {
margin-top: 3px;
border: 1px solid #CCC;
background: #FFF;
padding: 1px;
}
.plupload_progress_bar {
width: 0px;
height: 7px;
background: #CDEB8B;
}
.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action {
margin-right: 17px;
}
/* Floats */
.plupload_clear,.plupload_clearer {clear: both;}
.plupload_clearer, .plupload_progress_bar {
display: block;
font-size: 0;
line-height: 0;
}
li.plupload_droptext {
background: transparent;
text-align: center;
vertical-align: middle;
border: 0;
line-height: 165px;
}

View File

@ -0,0 +1,2 @@
#map_canvas{width:100%; height:400px};

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
soundmap/img/buttons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
soundmap/img/delete.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

BIN
soundmap/img/done.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
soundmap/img/error.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

BIN
soundmap/img/throbber.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
soundmap/img/transp50.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

View File

@ -0,0 +1,229 @@
/*!
* jQuery UI Google Maps 2.0
* http://code.google.com/p/jquery-ui-map/
*
* Copyright (c) 2010-2011 Johan Säll Larsson
*
* Microdatajs
* http://gitorious.org/microdatajs/microdatajs
* Copyright (c) 2009-2011 Philip Jägenstedt
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.map.js
*/
( function($) {
jQuery.fn.extend({
items: getItems,
itemScope: itemScope,
itemType: itemType,
itemId: itemId,
itemProp: tokenList('itemprop'),
itemRef: tokenList('itemref'),
itemValue: itemValue
});
function itemValue() {
var elm = this.get(0);
if (this.attr('itemprop') === undefined) {
return null;
}
if (this.itemScope()) {
return elm;
}
switch (elm.tagName.toUpperCase()) {
case 'META':
return this.attr('content') || '';
case 'AUDIO':
case 'EMBED':
case 'IFRAME':
case 'IMG':
case 'SOURCE':
case 'VIDEO':
return resolve(this.attr('src'));
case 'A':
case 'AREA':
case 'LINK':
return resolve(this.attr('href'));
case 'OBJECT':
return resolve(this.attr('data'));
case 'TIME':
var datetime = this.attr('datetime');
if (!(datetime === undefined))
return datetime;
default:
return this.text();
}
}
function itemId() {
return resolve(this.attr('itemid'));
}
function itemScope() {
return this.attr('itemscope') != undefined;
}
function itemType() {
return this.attr('itemtype') || '';
}
function splitTokens(s) {
if (s && /\S/.test(s))
return s.replace(/^\s+|\s+$/g,'').split(/\s+/);
return [];
}
function resolve(url) {
if (!url)
return '';
var img = document.createElement('img');
img.setAttribute('src', url);
return img.src;
}
function getItems(types) {
var selector = jQuery.map(splitTokens(types), function(t) {
return '[itemtype~="'+t.replace(/"/g, '\\"')+'"]';
}).join(',') || '*';
// filter results to only match top-level items
// because [attr] selector doesn't work in IE we have to
// filter the elements. http://dev.jquery.com/ticket/5637
return jQuery(selector, this).filter(function() {
return (this.getAttribute('itemscope') != null && this.getAttribute('itemprop') == null);
});
}
function tokenList(attr) {
return function() {
var tokens = [];
jQuery.each(splitTokens(this.attr(attr)), function(i, token) {
if (jQuery.inArray(token, tokens) == -1)
tokens.push(token);
});
return jQuery(tokens);
};
}
function getItem($item, list, key, latlngs) {
var result = {};
if ( $item.itemType() ) {
result.type = $item.itemType();
}
if ( $item.itemId() ) {
result.id = $item.itemId();
}
result.properties = {};
result.list = list;
$item.children().each(function() {
var $elem = jQuery(this);
var value;
if ( $elem.itemScope() ) {
value = getItem($elem, list, key, latlngs);
} else {
value = $elem.itemValue();
}
$elem.itemProp().each(function() {
if (!result.properties[this]) {
result.properties[this] = [];
}
if ( typeof value != "object" ) {
result.list[this] = value;
}
result.properties[this].push(value);
});
if ( latlngs.length > 0 ) {
var t = $elem.itemType();
if ( typeof t == "string" && t.toLowerCase().indexOf('geo') > -1 ) {
result.properties['geo'][0].properties = latlngs[key];
result.list['geo'] = new google.maps.LatLng(latlngs[key].latitude[0],latlngs[key].longitude[0]);
}
}
});
return result;
}
function getMetaTag() {
var latlng = [];
if ( $.browser.mozilla ) {
var lats = [];
var lngs = [];
var metas = document.getElementsByTagName('meta');
for ( i = 0; i < metas.length; i++ ) {
var meta = $(metas[i]);
if ( meta.attr('itemprop') == 'latitude' ) {
lats.push(meta.attr('content'));
}
if ( meta.attr('itemprop') == 'longitude' ) {
lngs.push(meta.attr('content'));
}
}
for ( i = 0; i < lats.length; i++ ) {
latlng.push({ 'latitude': [lats[i]], 'longitude': [lngs[i]] });
}
}
return latlng;
}
$.extend($.ui.gmap, {
version: '1.0',
microdata: function(ns, callback) {
// Mozilla/Firefox adds meta tags in header
var latlngs = getMetaTag();
var items = jQuery(document).items(ns);
items.each(function(i, value) {
var item = $(value);
if (item.itemScope()) {
$.ui.gmap._trigger(callback, i, item, getItem(item, [], i, latlngs));
}
});
}
});
} (jQuery) );

View File

@ -0,0 +1,34 @@
/*!
* jQuery UI Google Maps 2.0
* http://code.google.com/p/jquery-ui-map/
*
* Copyright (c) 2010-2011 Johan Säll Larsson
*
* Microdatajs
* http://gitorious.org/microdatajs/microdatajs
* Copyright (c) 2009-2011 Philip Jägenstedt
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.map.js
*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('(4($){b.1l.16({z:15,e:e,j:j,o:o,U:I(\'m\'),1m:I(\'1n\'),x:x});4 x(){5 D=3.1k(0);6(3.7(\'m\')===T){2 J}6(3.e()){2 D}1j(D.1f.1g()){9\'1h\':2 3.7(\'N\')||\'\';9\'1i\':9\'1o\':9\'1p\':9\'1v\':9\'1w\':9\'1x\':2 p(3.7(\'E\'));9\'A\':9\'1e\':9\'1t\':2 p(3.7(\'1q\'));9\'1r\':2 p(3.7(\'1s\'));9\'1y\':5 v=3.7(\'v\');6(!(v===T))2 v;1d:2 3.1c()}}4 o(){2 p(3.7(\'1b\'))}4 e(){2 3.7(\'W\')!=T}4 j(){2 3.7(\'13\')||\'\'}4 C(s){6(s&&/\\S/.1a(s))2 s.17(/^\\s+|\\s+$/g,\'\').1u(/\\s+/);2[]}4 p(K){6(!K)2\'\';5 r=F.1Q(\'r\');r.1O(\'E\',K);2 r.E}4 15(14){5 19=b.1N(C(14),4(t){2\'[13~="\'+t.17(/"/g,\'\\\\"\')+\'"]\'}).1S(\',\')||\'*\';2 b(19,3).1z(4(){2(3.Z(\'W\')!=J&&3.Z(\'m\')==J)})}4 I(7){2 4(){5 u=[];b.y(C(3.7(7)),4(i,H){6(b.1W(H,u)==-1)u.n(H)});2 b(u)}}4 B($a,f,q,d){5 8={};6($a.j()){8.1T=$a.j()}6($a.o()){8.1U=$a.o()}8.k={};8.f=f;$a.1L().y(4(){5 $l=b(3);5 c;6($l.e()){c=B($l,f,q,d)}1K{c=$l.x()}$l.U().y(4(){6(!8.k[3]){8.k[3]=[]}6(11 c!="1D"){8.f[3]=c}8.k[3].n(c)});6(d.M>0){5 t=$l.j();6(11 t=="1B"&&t.1A().1E(\'L\')>-1){8.k[\'L\'][0].k=d[q];8.f[\'L\']=1J 1I.1H.1G(d[q].R[0],d[q].G[0])}}});2 8}4 12(){5 O=[];6($.1C.1V){5 w=[];5 P=[];5 Q=F.1R(\'h\');V(i=0;i<Q.M;i++){5 h=$(Q[i]);6(h.7(\'m\')==\'R\'){w.n(h.7(\'N\'))}6(h.7(\'m\')==\'G\'){P.n(h.7(\'N\'))}}V(i=0;i<w.M;i++){O.n({\'R\':[w[i]],\'G\':[P[i]]})}}2 O}$.16($.Y.10,{1P:\'1.0\',1F:4(X,18){5 d=12();5 z=b(F).z(X);z.y(4(i,c){5 a=$(c);6(a.e()){$.Y.10.1M(18,i,a,B(a,[],i,d))}})}})}(b));',62,121,'||return|this|function|var|if|attr|result|case|item|jQuery|value|latlngs|itemScope|list||meta||itemType|properties|elem|itemprop|push|itemId|resolve|key|img|||tokens|datetime|lats|itemValue|each|items||getItem|splitTokens|elm|src|document|longitude|token|tokenList|null|url|geo|length|content|latlng|lngs|metas|latitude||undefined|itemProp|for|itemscope|ns|ui|getAttribute|gmap|typeof|getMetaTag|itemtype|types|getItems|extend|replace|callback|selector|test|itemid|text|default|AREA|tagName|toUpperCase|META|AUDIO|switch|get|fn|itemRef|itemref|EMBED|IFRAME|href|OBJECT|data|LINK|split|IMG|SOURCE|VIDEO|TIME|filter|toLowerCase|string|browser|object|indexOf|microdata|LatLng|maps|google|new|else|children|_trigger|map|setAttribute|version|createElement|getElementsByTagName|join|type|id|mozilla|inArray'.split('|'),0,{}))

View File

@ -0,0 +1,152 @@
/*!
* jQuery UI Google Maps 2.0
* http://code.google.com/p/jquery-ui-map/
*
* Copyright (c) 2010-2011 Johan Säll Larsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.map.js
*/
( function($) {
/* see http://en.wikipedia.org/wiki/XHTML_Friends_Network */
var XFN = [
'friend',
'contact',
'acquaintance'
];
/* Supported properties */
var properties = [
'summary',
'description',
'url',
'photo',
'street-address',
'postal-code',
'locality',
'region',
'latitude',
'longitude',
'startDate',
'dtstart',
'endDate',
'dtend',
'duration',
'eventType',
'category',
'fn',
'name',
'nickname',
'title',
'role',
'org',
'tel',
'reviewer',
'dtreviewed',
'rating'
];
$.extend($.ui.gmap, {
version: '1.0',
microformat: function(ns, callback) {
$('.'+ns).each(function(i, node) {
$.ui.gmap._trigger(callback, i, $(node), getItem($(node), []));
});
}
});
function hasProperty(property) {
for( var i = 0; i < properties.length; i++) {
if ( properties[i] === property ) {
return true;
}
};
return false;
}
function hasXFN(xfn) {
for( var i = 0; i < XFN.length; i++) {
if ( XFN[i] === xfn ) {
return true;
}
};
return false;
}
function getItem(node, list) {
node.children().each(function() {
var childNode = $(this);
if ( childNode.attr('class') != undefined ) {
$.each(childNode.attr('class').split(' '), function(i, c) {
if ( c.length > 0 && hasProperty(c) ) {
if ( !list[c] ) {
list[c] = {};
}
if ( childNode.attr('id') != '' ) {
list[c].id = childNode.attr('id');
}
if ( childNode.attr('title') != '' ) {
list[c].title = childNode.attr('title');
}
if ( childNode.attr('href') != undefined ) {
list[c].href = childNode.attr('href');
}
if ( childNode.attr('src') != undefined ) {
list[c].src = childNode.attr('src');
}
if ( childNode.text() != '' ) {
list[c].text = childNode.text();
}
}
});
}
if ( childNode.attr('rel') != undefined ) {
$.each(childNode.attr('rel').split(' '), function(i, c) {
if ( c.length > 0 && hasXFN(c) ) {
if (!list[c]) {
list[c] = [];
}
list[c].push({ 'text': childNode.text(), 'href': childNode.attr('href') });
}
});
}
getItem(childNode, list);
});
return list;
}
} (jQuery) );

View File

@ -0,0 +1,29 @@
/*!
* jQuery UI Google Maps 1.0.0
* http://code.google.com/p/jquery-ui-map/
*
* Copyright (c) 2010 Johan Säll Larsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('(6($){9 m=[\'O\',\'L\',\'R\'];9 j=[\'M\',\'N\',\'U\',\'Q\',\'T-S\',\'V-I\',\'E\',\'D\',\'C\',\'F\',\'G\',\'J\',\'K\',\'H\',\'B\',\'P\',\'Z\',\'18\',\'17\',\'16\',\'g\',\'1a\',\'1b\',\'1c\',\'1d\',\'19\',\'14\'];$.15($.s.t,{Y:\'1.0\',X:6(r,u){$(\'.\'+r).d(6(i,8){$.s.t.W(u,i,$(8),k($(8),[]))})}});6 w(q){n(9 i=0;i<j.f;i++){5(j[i]===q){a v}};a o}6 y(p){n(9 i=0;i<m.f;i++){5(m[i]===p){a v}};a o}6 k(8,3){8.11().d(6(){9 2=$(13);5(2.4(\'z\')!=e){$.d(2.4(\'z\').A(\' \'),6(i,c){5(c.f>0&&w(c)){5(!3[c]){3[c]={}}5(2.4(\'l\')!=\'\'){3[c].l=2.4(\'l\')}5(2.4(\'g\')!=\'\'){3[c].g=2.4(\'g\')}5(2.4(\'b\')!=e){3[c].b=2.4(\'b\')}5(2.4(\'h\')!=e){3[c].h=2.4(\'h\')}5(2.7()!=\'\'){3[c].7=2.7()}}})}5(2.4(\'x\')!=e){$.d(2.4(\'x\').A(\' \'),6(i,c){5(c.f>0&&y(c)){5(!3[c]){3[c]=[]}3[c].12({\'7\':2.7(),\'b\':2.4(\'b\')})}})}k(2,3)});a 3}}(10));',62,76,'||childNode|list|attr|if|function|text|node|var|return|href||each|undefined|length|title|src||properties|getItem|id|XFN|for|false|xfn|property|ns|ui|gmap|callback|true|hasProperty|rel|hasXFN|class|split|duration|latitude|region|locality|longitude|startDate|dtend|code|dtstart|endDate|contact|summary|description|friend|eventType|photo|acquaintance|address|street|url|postal|_trigger|microformat|version|category|jQuery|children|push|this|rating|extend|nickname|name|fn|dtreviewed|role|org|tel|reviewer'.split('|'),0,{}))

View File

@ -0,0 +1,110 @@
/*!
* jQuery UI Google Maps 2.0
* http://code.google.com/p/jquery-ui-map/
*
* Copyright (c) 2010 Johan Säll Larsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.map.js
*/
( function($) {
jQuery.fn.extend({
items: getItems
});
function splitTokens(s) {
if (s && /\S/.test(s))
return s.replace(/^\s+|\s+$/g,'').split(/\s+/);
return [];
}
function getItems(types) {
var selector = jQuery.map(splitTokens(types), function(t) {
return '[typeof~="'+t.replace(/"/g, '\\"')+'"]';
}).join(',') || '*';
// filter results to only match top-level items
// because [attr] selector doesn't work in IE we have to
// filter the elements. http://dev.jquery.com/ticket/5637
return jQuery(selector, this).filter(function() {
return (this.getAttribute('typeof') != null);
});
}
function getItem(node, list) {
node.children().each(function() {
var childNode = $(this);
var property = childNode.attr('property');
if ( property != undefined && property != null && property != '' && typeof property == 'string' ) {
if ( !list[property] ) {
list[property] = {};
}
if ( childNode.attr('content') != undefined ) {
list[property].content = childNode.attr('content');
}
if ( childNode.attr('href') != '' ) {
list[property].href = childNode.attr('href');
}
if ( childNode.attr('rel') != undefined ) {
list[property].rel = childNode.attr('rel');
}
if ( childNode.attr('src') != undefined ) {
list[property].src = childNode.attr('src');
}
if ( childNode.text() != '' ) {
list[property].text = childNode.text();
}
}
getItem(childNode, list);
});
return list;
}
$.extend($.ui.gmap, {
rdfa: function(ns, callback) {
var items = jQuery(document).items(ns);
//console.log(items);
items.each(function(i, node) {
var item = getItem($(node), []);
$.ui.gmap._trigger(callback, i, $(node), item);
//console.log(item);
});
}
});
} (jQuery) );

29
soundmap/js/jquery.ui.gmap.rdfa.min.js vendored Normal file
View File

@ -0,0 +1,29 @@
/*!
* jQuery UI Google Maps 1.0.0
* http://code.google.com/p/jquery-ui-map/
*
* Copyright (c) 2010 Johan Säll Larsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('(3($){8.C.v({a:p});3 q(s){5(s&&/\\F/.B(s))6 s.w(/^\\s+|\\s+$/g,\'\').E(/\\s+/);6[]}3 p(r){7 u=8.D(q(r),3(t){6\'[e~="\'+t.w(/"/g,\'\\\\"\')+\'"]\'}).N(\',\')||\'*\';6 8(u,d).M(3(){6(d.G(\'e\')!=n)})}3 l(9,2){9.L().y(3(){7 0=$(d);7 1=0.4(\'1\');5(1!=b&&1!=n&&1!=\'\'&&e 1==\'K\'){5(!2[1]){2[1]={}}5(0.4(\'h\')!=b){2[1].h=0.4(\'h\')}5(0.4(\'k\')!=\'\'){2[1].k=0.4(\'k\')}5(0.4(\'j\')!=b){2[1].j=0.4(\'j\')}5(0.4(\'f\')!=b){2[1].f=0.4(\'f\')}5(0.c()!=\'\'){2[1].c=0.c()}}l(0,2)});6 2}$.v($.o.m,{J:3(z,A){7 a=8(I).a(z);a.y(3(i,9){7 x=l($(9),[]);$.o.m.H(A,i,$(9),x)})}})}(8));',50,50,'childNode|property|list|function|attr|if|return|var|jQuery|node|items|undefined|text|this|typeof|src||content||rel|href|getItem|gmap|null|ui|getItems|splitTokens|types|||selector|extend|replace|item|each|ns|callback|test|fn|map|split|S|getAttribute|_trigger|document|rdfa|string|children|filter|join'.split('|'),0,{}))

350
soundmap/js/jquery.ui.map.js vendored Normal file
View File

@ -0,0 +1,350 @@
/*!
* jQuery UI Google Map 2.0
* http://code.google.com/p/jquery-ui-map/
*
* Copyright (c) 2010 - 2011 Johan Säll Larsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*/
( function($) {
jQuery.fn.extend( {
click: function(a) {
return this.addEventListener('click', a);
},
rightclick: function(a) {
return this.addEventListener('rightclick', a);
},
dblclick: function(a) {
return this.addEventListener('dblclick', a);
},
mouseover: function(a) {
return this.addEventListener('mouseover', a);
},
mouseout: function(a) {
return this.addEventListener('mouseout', a);
},
drag: function(a) {
return this.addEventListener('drag', a );
},
dragend: function(a) {
return this.addEventListener('dragend', a );
},
triggerEvent: function(a) {
google.maps.event.trigger(this.get(0), a);
},
addEventListener: function(a, b) {
if ( google.maps && this.get(0) instanceof google.maps.MVCObject ) {
google.maps.event.addListener(this.get(0), a, b );
} else {
this.bind(a, b);
}
return this;
}
});
$.widget( "ui.gmap", {
options: {
backgroundColor : null,
center: ( google.maps ) ? new google.maps.LatLng(0.0, 0.0) : null,
disableDefaultUI: false,
disableDoubleClickZoom: false,
draggable: true,
draggableCursor: null,
draggingCursor: null,
keyboardShortcuts: true,
mapTypeControl: true,
mapTypeControlOptions: null,
mapTypeId: ( google.maps ) ? google.maps.MapTypeId.ROADMAP : null,
navigationControl: true,
navigationControlOptions: null,
noClear: false,
scaleControl: false,
scaleControlOptions: null,
scrollwheel: false,
streetViewControl: true,
streetViewControlOptions: null,
zoom: 5,
callback: null
},
_create: function() {
$.ui.gmap.instances[this.element.attr('id')] = { map: new google.maps.Map( this.element[0], this.options ), markers: [], bounds: null, services: [] };
},
_init: function() {
$.ui.gmap._trigger(this.options.callback, this.getMap() );
return $(this.getMap());
},
_setOption: function(a, b) {
var map = this.getMap();
this.options.center = map.getCenter();
this.options.mapTypeId = map.getMapTypeId();
this.options.zoom = map.getZoom();
$.Widget.prototype._setOption.apply(this, arguments);
map.setOptions(this.options);
},
/**
* Adds a LatLng to the bounds.
*/
addBounds: function(a) {
var instances = $.ui.gmap.instances[this.element.attr('id')];
if ( !instances.bounds ) {
instances.bounds = new google.maps.LatLngBounds();
}
instances.bounds.extend(a);
instances.map.fitBounds(instances.bounds);
},
/**
* Adds a control to the map
* @param a:jQuery/Node/String
* @param b:google.maps.ControlPosition, http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#ControlPosition
*/
addControl: function(a, b) {
this.getMap().controls[b].push($.ui.gmap._unwrap(a));
},
/**
* Adds a Marker to the map
* @param a:google.maps.MarkerOptions, http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#MarkerOptions
* @param b:function(map:google.maps.Map, marker:Marker)
* @return $(google.maps.Marker)
*/
addMarker: function(a, b) {
var marker = new google.maps.Marker( jQuery.extend( { 'map': this.getMap(), 'bounds':false }, a) );
this.getMarkers().push( marker );
if ( marker.bounds ) {
this.addBounds(marker.getPosition());
}
$.ui.gmap._trigger(b, this.getMap(), marker );
return $(marker);
},
/**
* Adds an InfoWindow to the map
* @param a:google.maps.InfoWindowOptions, http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#InfoWindowOptions
* @param b:function(InfoWindow:google.maps.InfoWindowOptions)
* @return $(google.maps.InfoWindowOptions)
*/
addInfoWindow: function(a, b) {
var iw = new google.maps.InfoWindow(a);
$.ui.gmap._trigger(b, iw);
return $(iw);
},
/**
* Computes directions between two or more places.
* @param a:google.maps.DirectionsRequest, http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#DirectionsRequest
* @param b:google.maps.DirectionsRendererOptions, http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#DirectionsRendererOptions
* @param c:function(success:boolean, result:google.maps.DirectionsResult), http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#DirectionsResult
*/
displayDirections: function(a, b, c) {
var instance = $.ui.gmap.instances[this.element.attr('id')];
if ( !instance.services.DirectionsService ) {
instance.services.DirectionsService = new google.maps.DirectionsService();
}
if ( !instance.services.DirectionsRenderer ) {
instance.services.DirectionsRenderer = new google.maps.DirectionsRenderer();
}
instance.services.DirectionsRenderer.setOptions(jQuery.extend({'map': instance.map}, b));
instance.services.DirectionsService.route( a, function(result, status) {
if ( status === google.maps.DirectionsStatus.OK ) {
if ( b.panel ) {
instance.services.DirectionsRenderer.setDirections(result);
}
} else {
instance.services.DirectionsRenderer.setMap(null);
}
$.ui.gmap._trigger(c, ( status === google.maps.DirectionsStatus.OK ), result);
});
},
/**
* Displays the panorama for a given LatLng or panorama ID.
* @param a:jQuery/String/Node
* @param b?:google.maps.StreetViewPanoramaOptions, http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#StreetViewPanoramaOptions
*/
displayStreetView: function(a, b) {
var instance = $.ui.gmap.instances[this.element.attr('id')];
instance.services.StreetViewPanorama = new google.maps.StreetViewPanorama($.ui.gmap._unwrap(a), b);
instance.map.setStreetView(instance.services.StreetViewPanorama);
},
/**
* Returns the marker(s) with a specific property and value, e.g. 'category', 'airports'
* @param a:String - the property to search within
* @param b:String - the query
* @param c:function(found:boolean, marker:google.maps.Marker)
*/
findMarker : function(a, b, c) {
$.each( this.getMarkers(), function(i, marker) {
$.ui.gmap._trigger(c, ( marker[a] === b ), marker);
});
},
/**
* Extracts meta data from the HTML
* @param a:String - rdfa, microformats or microdata
* @param b:String - the namespace
* @param c:function(item:jQuery, result:Array<String>)
*/
loadMetadata: function(a, b, c) {
if ( a === 'rdfa' ) {
$.ui.gmap.rdfa(b, c);
} else if ( a === 'microformat') {
$.ui.gmap.microformat(b, c);
} else if ( a === 'microdata') {
$.ui.gmap.microdata(b, c);
}
},
/**
* Adds fusion data to the map.
* @param a:google.maps.FusionTablesLayerOptions, http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#FusionTablesLayerOptions
*/
loadFusion: function(a) {
var instance = $.ui.gmap.instances[this.element.attr('id')];
if ( !instance.services.FusionTablesLayer ) {
instance.services.FusionTablesLayer = new google.maps.FusionTablesLayer();
}
instance.services.FusionTablesLayer.setOptions(a);
instance.services.FusionTablesLayer.setMap(this.getMap());
},
/**
* Adds markers from KML file or GeoRSS feed
* @param a:String - an identifier for the RSS e.g. 'rss_dogs'
* @param b:String - URL to feed
* @param c:google.maps.KmlLayerOptions, http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#KmlLayerOptions
*/
loadKML: function(a, b, c) {
var instance = $.ui.gmap.instances[this.element.attr('id')];
if ( !instance.services[a] )
instance.services[a] = new google.maps.KmlLayer(b, jQuery.extend({'map': instance.map }, c));
},
/**
* A service for converting between an address and a LatLng.
* @param a:google.maps.GeocoderRequest
* @param b:function(success:boolean, result:google.maps.GeocoderResult), http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#GeocoderResult
*/
search: function(a, b) {
var instance = $.ui.gmap.instances[this.element.attr('id')];
if ( !instance.services.Geocoder ) {
instance.services.Geocoder = new google.maps.Geocoder();
}
instance.services.Geocoder.geocode( a, function(result, status) {
$.ui.gmap._trigger(b, ( status === google.maps.GeocoderStatus.OK ), result);
});
},
/**
* Returns the map.
* @return google.maps.Map
*/
getMap: function() {
return $.ui.gmap.instances[this.element.attr('id')].map;
},
/**
* Returns all markers.
* @return Array<google.maps.Marker>
*/
getMarkers: function() {
return $.ui.gmap.instances[this.element.attr('id')].markers;
},
/**
* Returns a service by its service name
* @param id:string
*/
getService: function(id) {
return $.ui.gmap.instances[this.element.attr('id')].services[id];
},
/**
* Clears all the markers and added event listeners.
*/
clearMarkers: function() {
$.each( this.getMarkers(), function(a,b) {
google.maps.event.clearInstanceListeners(b);
b.setMap(null);
b = null;
});
$.ui.gmap.instances[this.element.attr('id')].markers = [];
},
/**
* Destroys the plugin.
*/
destroy: function() {
this.clearMarkers();
google.maps.event.clearInstanceListeners(this.getMap());
$.each($.ui.gmap.instances[this.element.attr('id')].services, function (a, b) {
b = null;
});
$.Widget.prototype.destroy.call( this );
}
});
$.extend($.ui.gmap, {
version: "2.0",
instances: [],
_trigger: function(a) {
if ( $.isFunction(a) ) {
a.apply(this, Array.prototype.slice.call(arguments, 1));
}
},
_unwrap: function unwrap(a) {
if ( !a ) {
return null;
} else if ( a instanceof jQuery ) {
return a[0];
} else if ( a instanceof Object ) {
return a;
}
return document.getElementById(a);
}
});
} (jQuery) );

7
soundmap/js/jquery.ui.map.min.js vendored Normal file
View File

@ -0,0 +1,7 @@
/*!
* jQuery UI Google Map 2.0
* http://code.google.com/p/jquery-ui-map/
* Copyright (c) 2010 - 2011 Johan Säll Larsson
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('(4($){z.1B.y({16:4(a){g 3.s(\'16\',a)},1b:4(a){g 3.s(\'1b\',a)},19:4(a){g 3.s(\'19\',a)},17:4(a){g 3.s(\'17\',a)},1c:4(a){g 3.s(\'1c\',a)},1d:4(a){g 3.s(\'1d\',a)},1i:4(a){g 3.s(\'1i\',a)},1C:4(a){9.d.G.1D(3.K(0),a)},s:4(a,b){h(9.d&&3.K(0)Q 9.d.1A){9.d.G.1z(3.K(0),a,b)}w{3.1w(a,b)}g 3}});$.1x("8.7",{u:{1y:j,1f:(9.d)?o 9.d.1E(0.0,0.0):j,1F:x,1u:x,1M:C,1N:j,1K:j,1J:C,1G:C,1H:j,13:(9.d)?9.d.1I.1O:j,1n:C,1j:j,1k:x,1l:x,1t:j,1r:x,1m:C,1p:j,15:5,1g:j},1o:4(){$.8.7.f[3.m.n(\'k\')]={l:o 9.d.1s(3.m[0],3.u),O:[],v:j,e:[]}},1L:4(){$.8.7.t(3.u.1g,3.r());g $(3.r())},U:4(a,b){q l=3.r();3.u.1f=l.1W();3.u.13=l.2d();3.u.15=l.2c();$.18.T.U.1h(3,14);l.N(3.u)},10:4(a){q f=$.8.7.f[3.m.n(\'k\')];h(!f.v){f.v=o 9.d.28()}f.v.y(a);f.l.1P(f.v)},29:4(a,b){3.r().2a[b].11($.8.7.S(a))},2f:4(a,b){q p=o 9.d.2g(z.y({\'l\':3.r(),\'v\':x},a));3.F().11(p);h(p.v){3.10(p.2l())}$.8.7.t(b,3.r(),p);g $(p)},2k:4(a,b){q L=o 9.d.2j(a);$.8.7.t(b,L);g $(L)},2i:4(a,b,c){q 6=$.8.7.f[3.m.n(\'k\')];h(!6.e.I){6.e.I=o 9.d.I()}h(!6.e.A){6.e.A=o 9.d.A()}6.e.A.N(z.y({\'l\':6.l},b));6.e.I.27(a,4(D,B){h(B===9.d.12.M){h(b.26){6.e.A.1V(D)}}w{6.e.A.J(j)}$.8.7.t(c,(B===9.d.12.M),D)})},1U:4(a,b){q 6=$.8.7.f[3.m.n(\'k\')];6.e.P=o 9.d.P($.8.7.S(a),b);6.l.1T(6.e.P)},1Q:4(a,b,c){$.R(3.F(),4(i,p){$.8.7.t(c,(p[a]===b),p)})},1S:4(a,b,c){h(a===\'V\'){$.8.7.V(b,c)}w h(a===\'W\'){$.8.7.W(b,c)}w h(a===\'X\'){$.8.7.X(b,c)}},1X:4(a){q 6=$.8.7.f[3.m.n(\'k\')];h(!6.e.E){6.e.E=o 9.d.E()}6.e.E.N(a);6.e.E.J(3.r())},24:4(a,b,c){q 6=$.8.7.f[3.m.n(\'k\')];h(!6.e[a])6.e[a]=o 9.d.25(b,z.y({\'l\':6.l},c))},1Z:4(a,b){q 6=$.8.7.f[3.m.n(\'k\')];h(!6.e.H){6.e.H=o 9.d.H()}6.e.H.22(a,4(D,B){$.8.7.t(b,(B===9.d.1R.M),D)})},r:4(){g $.8.7.f[3.m.n(\'k\')].l},F:4(){g $.8.7.f[3.m.n(\'k\')].O},2e:4(k){g $.8.7.f[3.m.n(\'k\')].e[k]},Z:4(){$.R(3.F(),4(a,b){9.d.G.1e(b);b.J(j);b=j});$.8.7.f[3.m.n(\'k\')].O=[]},1a:4(){3.Z();9.d.G.1e(3.r());$.R($.8.7.f[3.m.n(\'k\')].e,4(a,b){b=j});$.18.T.1a.Y(3)}});$.y($.8.7,{23:"2.0",f:[],t:4(a){h($.21(a)){a.1h(3,20.T.1Y.Y(14,1))}},S:4 2h(a){h(!a){g j}w h(a Q z){g a[0]}w h(a Q 2b){g a}g 1q.1v(a)}})}(z));',62,146,'|||this|function||instance|gmap|ui|google||||maps|services|instances|return|if||null|id|map|element|attr|new|marker|var|getMap|addEventListener|_trigger|options|bounds|else|false|extend|jQuery|DirectionsRenderer|status|true|result|FusionTablesLayer|getMarkers|event|Geocoder|DirectionsService|setMap|get|iw|OK|setOptions|markers|StreetViewPanorama|instanceof|each|_unwrap|prototype|_setOption|rdfa|microformat|microdata|call|clearMarkers|addBounds|push|DirectionsStatus|mapTypeId|arguments|zoom|click|mouseover|Widget|dblclick|destroy|rightclick|mouseout|drag|clearInstanceListeners|center|callback|apply|dragend|navigationControlOptions|noClear|scaleControl|streetViewControl|navigationControl|_create|streetViewControlOptions|document|scrollwheel|Map|scaleControlOptions|disableDoubleClickZoom|getElementById|bind|widget|backgroundColor|addListener|MVCObject|fn|triggerEvent|trigger|LatLng|disableDefaultUI|mapTypeControl|mapTypeControlOptions|MapTypeId|keyboardShortcuts|draggingCursor|_init|draggable|draggableCursor|ROADMAP|fitBounds|findMarker|GeocoderStatus|loadMetadata|setStreetView|displayStreetView|setDirections|getCenter|loadFusion|slice|search|Array|isFunction|geocode|version|loadKML|KmlLayer|panel|route|LatLngBounds|addControl|controls|Object|getZoom|getMapTypeId|getService|addMarker|Marker|unwrap|displayDirections|InfoWindow|addInfoWindow|getPosition'.split('|'),0,{}))

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,124 @@
<?php
/**
* upload.php
*
* Copyright 2009, Moxiecode Systems AB
* Released under GPL License.
*
* License: http://www.plupload.com/license
* Contributing: http://www.plupload.com/contributing
*/
// HTTP headers for no cache etc
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
// Settings
$targetDir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
//$targetDir = 'uploads/';
//$cleanupTargetDir = false; // Remove old files
//$maxFileAge = 60 * 60; // Temp file age in seconds
// 5 minutes execution time
@set_time_limit(5 * 60);
// Uncomment this one to fake upload time
// usleep(5000);
// Get parameters
$chunk = isset($_REQUEST["chunk"]) ? $_REQUEST["chunk"] : 0;
$chunks = isset($_REQUEST["chunks"]) ? $_REQUEST["chunks"] : 0;
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
// Clean the fileName for security reasons
$fileName = preg_replace('/[^\w\._]+/', '', $fileName);
// Make sure the fileName is unique but only if chunking is disabled
if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {
$ext = strrpos($fileName, '.');
$fileName_a = substr($fileName, 0, $ext);
$fileName_b = substr($fileName, $ext);
$count = 1;
while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName_a . '_' . $count . $fileName_b))
$count++;
$fileName = $fileName_a . '_' . $count . $fileName_b;
}
// Create target dir
if (!file_exists($targetDir))
@mkdir($targetDir);
// Remove old temp files
/* this doesn't really work by now
if (is_dir($targetDir) && ($dir = opendir($targetDir))) {
while (($file = readdir($dir)) !== false) {
$filePath = $targetDir . DIRECTORY_SEPARATOR . $file;
// Remove temp files if they are older than the max age
if (preg_match('/\\.tmp$/', $file) && (filemtime($filePath) < time() - $maxFileAge))
@unlink($filePath);
}
closedir($dir);
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 100, "message": "Failed to open temp directory."}, "id" : "id"}');
*/
// Look for the content type header
if (isset($_SERVER["HTTP_CONTENT_TYPE"]))
$contentType = $_SERVER["HTTP_CONTENT_TYPE"];
if (isset($_SERVER["CONTENT_TYPE"]))
$contentType = $_SERVER["CONTENT_TYPE"];
// Handle non multipart uploads older WebKit versions didn't support multipart in HTML5
if (strpos($contentType, "multipart") !== false) {
if (isset($_FILES['file']['tmp_name']) && is_uploaded_file($_FILES['file']['tmp_name'])) {
// Open temp file
$out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? "wb" : "ab");
if ($out) {
// Read binary input stream and append it to temp file
$in = fopen($_FILES['file']['tmp_name'], "rb");
if ($in) {
while ($buff = fread($in, 4096))
fwrite($out, $buff);
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}');
fclose($in);
fclose($out);
@unlink($_FILES['file']['tmp_name']);
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}');
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 103, "message": "Failed to move uploaded file."}, "id" : "id"}');
} else {
// Open temp file
$out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? "wb" : "ab");
if ($out) {
// Read binary input stream and append it to temp file
$in = fopen("php://input", "rb");
if ($in) {
while ($buff = fread($in, 4096))
fwrite($out, $buff);
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}');
fclose($in);
fclose($out);
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}');
}
// Return JSON-RPC response
die('{"jsonrpc" : "2.0", "result" : null, "id" : "id"}');
?>

View File

@ -0,0 +1,70 @@
jQuery(document).ready(function($) {
// $() will work as an alias for jQuery() inside of this function
var map_canvas = $('#map_canvas');
var soundmark;
if (map_canvas){
$('#map_canvas').gmap({'callback': function(map){
$(map).click( function (event){
if (soundmark == undefined){
soundmark = map_canvas.gmap('addMarker', {'position': event.latLng, 'title':'', 'draggable':true}, function(map, marker){
var marker_position=marker.getPosition();
$('#soundmap-marker-lat').val(marker_position.lat());
$('#soundmap-marker-lng').val(marker_position.lng());
});
}else{
var marker = soundmark.get(0);
var new_position = event.latLng;
marker.setPosition(new_position);
$('#soundmap-marker-lat').val(new_position.lat());
$('#soundmap-marker-lng').val(new_position.lng());
}
})
}});
}
$("#uploader").pluploadQueue({
// General settings
runtimes : 'gears,flash,silverlight,browserplus,html5',
url : WP_Params.plugin_url + 'js/plupload/upload.php',
max_file_size : '10mb',
chunk_size : '1mb',
unique_names : true,
multiple_queues : true,
// Specify what files to browse for
filters : [
{title : "Sound files", extensions : "mp3"},
],
// Flash settings
flash_swf_url : WP_Params.plugin_url + 'js/plupload/plupload.flash.swf',
// Silverlight settings
silverlight_xap_url : WP_Params.plugin_url + 'js/plupload/plupload.silverlight.xap'
});
$('#post').submit(function(e) {
var uploader = $('#uploader').pluploadQueue();
// Validate number of uploaded files
if (uploader.total.uploaded == 0) {
// Files in queue upload them first
if (uploader.files.length > 0) {
// When all files are uploaded submit form
uploader.bind('UploadProgress', function() {
if (uploader.total.uploaded == uploader.files.length)
$('#post').submit();
});
uploader.start();
} else
alert('You must at least upload one file.');
e.preventDefault();
}
});
});

176
soundmap/soundmap.php Normal file
View File

@ -0,0 +1,176 @@
<?php
/**
* @package Soundmap
*/
/*
Plugin Name: Soundmap
Plugin URI: http://www.soinumapa.net
Description: New version of the Soinumapa Plugin for creating sound maps
Version: 2.5.3
Author: Xavier Balderas
Author URI: http://www.xavierbalderas.com
License: GPLv2 or later
*/
function soundmap_init() {
soundmap_register_scripts();
$labels = array(
'name' => __('Marks', 'soundmap'),
'singular_name' => __('Mark', 'soundmap'),
'add_new' => _x('Add New', 'marker', 'soundmap'),
'add_new_item' => __('Add New Marker'),
'edit_item' => __('Edit Marker'),
'new_item' => __('New Marker'),
'all_items' => __('All Markers'),
'view_item' => __('View Marker'),
'search_items' => __('Search Markers'),
'not_found' => __('No markers found'),
'not_found_in_trash' => __('No markers found in Trash'),
'parent_item_colon' => '',
'menu_name' => 'Markers'
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => 5,
'register_meta_box_cb' => 'soundmap_metaboxes_register_callback',
'supports' => array('title','editor','thumbnail')
);
register_post_type('marker',$args);
}
function soundmap_register_scripts(){
//Register google maps.
wp_register_script('google-maps','http://maps.google.com/maps/api/js?libraries=geometry&sensor=true');
wp_register_script('jquery-ui','https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js');
wp_register_script('jquery-google-maps', WP_PLUGIN_URL . '/soundmap/js/jquery.ui.map.js', array('jquery', 'jquery-ui', 'google-maps'));
}
function soundmap_metaboxes_register_callback(){
add_meta_box('sounmap-map', __("Place the Marker", 'soundmap'), 'soundmap_map_meta_box', 'marker', 'normal', 'high');
add_meta_box('sounmap-sound-file', __("Add a sound file", 'soundmap'), 'soundmap_upload_file_meta_box', 'marker', 'side', 'high');
}
function soundmap_map_meta_box(){
echo '<input type="hidden" name="soundmap_map_noncename" id="soundmap_map_noncename" value="' .
wp_create_nonce( plugin_basename(__FILE__) ) . '" />';
echo '<div id="map_canvas"></div>';
echo '<label for="soundmap-marker-lat">' . __('Latitud', 'soundmap') . '</label>';
echo '<input type="text" name="soundmap_marker_lat" id="soundmap-marker-lat" value="0">';
echo '<label for="soundmap-marker-lng">' . __('Longitud', 'soundmap') . '</label>';
echo '<input type="text" name="soundmap_marker_lng" id="soundmap-marker-lng" value="0">';
}
function soundmap_upload_file_meta_box(){
echo '<form id="uploader-form" method="post" action="dump.php"><div id="uploader"></div></form> ';
}
function soundmap_rewrite_flush() {
soundmap_init();
flush_rewrite_rules();
}
function soundmap_register_admin_scripts() {
wp_register_script('soundmap-admin', WP_PLUGIN_URL . '/soundmap/js/soundmap-admin.js', array('jquery-google-maps', 'jquery-plupload'));
wp_register_style("soundmap-admin", WP_PLUGIN_URL . '/soundmap/css/soundmap-admin.css', array('plupload-style'));
//Register PLUPLOAD
wp_register_style('plupload-style',WP_PLUGIN_URL . '/soundmap/css/jquery.plupload.queue.css');
wp_register_script('plupload', WP_PLUGIN_URL . '/soundmap/js/plupload/plupload.full.js');
wp_register_script('jquery-plupload', WP_PLUGIN_URL . '/soundmap/js/plupload/jquery.plupload.queue.js', array('plupload'));
}
function soundmap_admin_enqueue_scripts() {
wp_enqueue_script('soundmap-admin');
wp_enqueue_style('soundmap-admin');
$params = array();
$params['plugin_url'] = WP_PLUGIN_URL . '/soundmap/';
wp_localize_script('soundmap-admin','WP_Params',$params);
}
function soundmap_save_options(){
}
function soundmap_load_options(){
}
function soundmap_save_post($post_id) {
// verify if this is an auto save routine.
// If it is our form has not been submitted, so we dont want to do anything
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
return;
// verify this came from the our screen and with proper authorization,
// because save_post can be triggered at other times
if (isset($_POST['soundmap_map_noncename'])){
if ( !wp_verify_nonce( $_POST['soundmap_map_noncename'], plugin_basename( __FILE__ ) ) )
return;
}else{
return;
}
// Check permissions
if ( 'marker' == $_POST['post_type'] )
{
if ( !current_user_can( 'edit_post', $post_id ) )
return;
}
$soundmark_lat = $_POST['soundmap_marker_lat'];
$soundmark_lng = $_POST['soundmap_marker_lng'];
add_post_meta($post_id, 'soundmap_marker_lat', $soundmark_lat, TRUE);
add_post_meta($post_id, 'soundmap_marker_lng', $soundmark_lng, TRUE);
//before searching on all the $_POST array, let's take a look if there is any upload first!
if(!array_key_exists("uploader_0_name",$_POST))
return;
$files = preg_grep('/mp3$/', $_POST);
foreach($files as $key => $value){
if(preg_match('/^uploader_[0-9]*_name$/',$key)){
$exp = explode('_', $key);
$number = $exp[1];
$name = $value;
$tmpname = $_POST['uploader_' . $number . '_tmpname'];
soundmap_add_sound_file($name, $tmpname, $post_id);
}
}
}
function soundmap_add_sound_file ($name, $tmpname, $post_id){
// var_dump($name);
}
add_action('init', 'soundmap_init');
add_action('admin_enqueue_scripts', 'soundmap_admin_enqueue_scripts');
add_action('admin_init', 'soundmap_register_admin_scripts');
add_action('save_post', 'soundmap_save_post');
register_activation_hook(__FILE__, 'soundmap_rewrite_flush');