diff --git a/soundmap/css/jquery.plupload.queue.css b/soundmap/css/jquery.plupload.queue.css new file mode 100644 index 0000000..1c9cb7d --- /dev/null +++ b/soundmap/css/jquery.plupload.queue.css @@ -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; +} diff --git a/soundmap/css/soundmap-admin.css b/soundmap/css/soundmap-admin.css new file mode 100644 index 0000000..a1a0c67 --- /dev/null +++ b/soundmap/css/soundmap-admin.css @@ -0,0 +1,2 @@ + +#map_canvas{width:100%; height:400px}; \ No newline at end of file diff --git a/soundmap/img/backgrounds.gif b/soundmap/img/backgrounds.gif new file mode 100644 index 0000000..39e33eb Binary files /dev/null and b/soundmap/img/backgrounds.gif differ diff --git a/soundmap/img/buttons-disabled.png b/soundmap/img/buttons-disabled.png new file mode 100644 index 0000000..afa11af Binary files /dev/null and b/soundmap/img/buttons-disabled.png differ diff --git a/soundmap/img/buttons.png b/soundmap/img/buttons.png new file mode 100644 index 0000000..153e738 Binary files /dev/null and b/soundmap/img/buttons.png differ diff --git a/soundmap/img/delete.gif b/soundmap/img/delete.gif new file mode 100644 index 0000000..78ca8b3 Binary files /dev/null and b/soundmap/img/delete.gif differ diff --git a/soundmap/img/done.gif b/soundmap/img/done.gif new file mode 100644 index 0000000..29f3ed7 Binary files /dev/null and b/soundmap/img/done.gif differ diff --git a/soundmap/img/error.gif b/soundmap/img/error.gif new file mode 100644 index 0000000..4682b63 Binary files /dev/null and b/soundmap/img/error.gif differ diff --git a/soundmap/img/throbber.gif b/soundmap/img/throbber.gif new file mode 100644 index 0000000..4ae8b16 Binary files /dev/null and b/soundmap/img/throbber.gif differ diff --git a/soundmap/img/transp50.png b/soundmap/img/transp50.png new file mode 100644 index 0000000..eb0efe1 Binary files /dev/null and b/soundmap/img/transp50.png differ diff --git a/soundmap/js/jquery.ui.gmap.microdata.js b/soundmap/js/jquery.ui.gmap.microdata.js new file mode 100644 index 0000000..37a4f91 --- /dev/null +++ b/soundmap/js/jquery.ui.gmap.microdata.js @@ -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) ); \ No newline at end of file diff --git a/soundmap/js/jquery.ui.gmap.microdata.min.js b/soundmap/js/jquery.ui.gmap.microdata.min.js new file mode 100644 index 0000000..f79fbb6 --- /dev/null +++ b/soundmap/js/jquery.ui.gmap.microdata.min.js @@ -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(c35?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 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) ); \ No newline at end of file diff --git a/soundmap/js/jquery.ui.gmap.microformat.min.js b/soundmap/js/jquery.ui.gmap.microformat.min.js new file mode 100644 index 0000000..78202e2 --- /dev/null +++ b/soundmap/js/jquery.ui.gmap.microformat.min.js @@ -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(c35?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;i0&&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,{})) \ No newline at end of file diff --git a/soundmap/js/jquery.ui.gmap.rdfa.js b/soundmap/js/jquery.ui.gmap.rdfa.js new file mode 100644 index 0000000..97bd648 --- /dev/null +++ b/soundmap/js/jquery.ui.gmap.rdfa.js @@ -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) ); \ No newline at end of file diff --git a/soundmap/js/jquery.ui.gmap.rdfa.min.js b/soundmap/js/jquery.ui.gmap.rdfa.min.js new file mode 100644 index 0000000..6876dc0 --- /dev/null +++ b/soundmap/js/jquery.ui.gmap.rdfa.min.js @@ -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(c35?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,{})) \ No newline at end of file diff --git a/soundmap/js/jquery.ui.map.js b/soundmap/js/jquery.ui.map.js new file mode 100644 index 0000000..5da3f77 --- /dev/null +++ b/soundmap/js/jquery.ui.map.js @@ -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) + */ + 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 + */ + 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) ); \ No newline at end of file diff --git a/soundmap/js/jquery.ui.map.min.js b/soundmap/js/jquery.ui.map.min.js new file mode 100644 index 0000000..075f38c --- /dev/null +++ b/soundmap/js/jquery.ui.map.min.js @@ -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(c35?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,{})) \ No newline at end of file diff --git a/soundmap/js/plupload/jquery.plupload.queue.js b/soundmap/js/plupload/jquery.plupload.queue.js new file mode 100644 index 0000000..e4379fb --- /dev/null +++ b/soundmap/js/plupload/jquery.plupload.queue.js @@ -0,0 +1 @@ +(function(c){var d={};function a(e){return plupload.translate(e)||e}function b(f,e){e.contents().each(function(g,h){h=c(h);if(!h.is(".plupload")){h.remove()}});e.prepend('
'+a("Select files")+'
'+a("Add files to the upload queue and click the start button.")+'
'+a("Filename")+'
 
'+a("Status")+'
'+a("Size")+'
 
    ')}c.fn.pluploadQueue=function(e){if(e){this.each(function(){var j,i,k;i=c(this);k=i.attr("id");if(!k){k=plupload.guid();i.attr("id",k)}j=new plupload.Uploader(c.extend({dragdrop:true,container:k},e));d[k]=j;function h(l){var n;if(l.status==plupload.DONE){n="plupload_done"}if(l.status==plupload.FAILED){n="plupload_failed"}if(l.status==plupload.QUEUED){n="plupload_delete"}if(l.status==plupload.UPLOADING){n="plupload_uploading"}var m=c("#"+l.id).attr("class",n).find("a").css("display","block");if(l.hint){m.attr("title",l.hint)}}function f(){c("span.plupload_total_status",i).html(j.total.percent+"%");c("div.plupload_progress_bar",i).css("width",j.total.percent+"%");c("span.plupload_upload_status",i).text(a("Uploaded %d/%d files").replace(/%d\/%d/,j.total.uploaded+"/"+j.files.length))}function g(){var m=c("ul.plupload_filelist",i).html(""),n=0,l;c.each(j.files,function(p,o){l="";if(o.status==plupload.DONE){if(o.target_name){l+=''}l+='';l+='';n++;c("#"+k+"_count").val(n)}m.append('
  • '+o.name+'
    '+o.percent+'%
    '+plupload.formatSize(o.size)+'
     
    '+l+"
  • ");h(o);c("#"+o.id+".plupload_delete a").click(function(q){c("#"+o.id).remove();j.removeFile(o);q.preventDefault()})});c("span.plupload_total_file_size",i).html(plupload.formatSize(j.total.size));if(j.total.queued===0){c("span.plupload_add_text",i).text(a("Add files."))}else{c("span.plupload_add_text",i).text(j.total.queued+" files queued.")}c("a.plupload_start",i).toggleClass("plupload_disabled",j.files.length==(j.total.uploaded+j.total.failed));m[0].scrollTop=m[0].scrollHeight;f();if(!j.files.length&&j.features.dragdrop&&j.settings.dragdrop){c("#"+k+"_filelist").append('
  • '+a("Drag files here.")+"
  • ")}}j.bind("UploadFile",function(l,m){c("#"+m.id).addClass("plupload_current_file")});j.bind("Init",function(l,m){b(k,i);if(!e.unique_names&&e.rename){c("#"+k+"_filelist div.plupload_file_name span",i).live("click",function(s){var q=c(s.target),o,r,n,p="";o=l.getFile(q.parents("li")[0].id);n=o.name;r=/^(.+)(\.[^.]+)$/.exec(n);if(r){n=r[1];p=r[2]}q.hide().after('');q.next().val(n).focus().blur(function(){q.show().next().remove()}).keydown(function(u){var t=c(this);if(u.keyCode==13){u.preventDefault();o.name=t.val()+p;q.text(o.name);t.blur()}})})}c("a.plupload_add",i).attr("id",k+"_browse");l.settings.browse_button=k+"_browse";if(l.features.dragdrop&&l.settings.dragdrop){l.settings.drop_element=k+"_filelist";c("#"+k+"_filelist").append('
  • '+a("Drag files here.")+"
  • ")}c("#"+k+"_container").attr("title","Using runtime: "+m.runtime);c("a.plupload_start",i).click(function(n){if(!c(this).hasClass("plupload_disabled")){j.start()}n.preventDefault()});c("a.plupload_stop",i).click(function(n){n.preventDefault();j.stop()});c("a.plupload_start",i).addClass("plupload_disabled")});j.init();j.bind("Error",function(l,o){var m=o.file,n;if(m){n=o.message;if(o.details){n+=" ("+o.details+")"}if(o.code==plupload.FILE_SIZE_ERROR){alert(a("Error: File to large: ")+m.name)}if(o.code==plupload.FILE_EXTENSION_ERROR){alert(a("Error: Invalid file extension: ")+m.name)}m.hint=n;c("#"+m.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",n)}});j.bind("StateChanged",function(){if(j.state===plupload.STARTED){c("li.plupload_delete a,div.plupload_buttons",i).hide();c("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",i).css("display","block");c("span.plupload_upload_status",i).text("Uploaded "+j.total.uploaded+"/"+j.files.length+" files");if(e.multiple_queues){c("span.plupload_total_status,span.plupload_total_file_size",i).show()}}else{g();c("a.plupload_stop,div.plupload_progress",i).hide();c("a.plupload_delete",i).css("display","block")}});j.bind("QueueChanged",g);j.bind("FileUploaded",function(l,m){h(m)});j.bind("UploadProgress",function(l,m){c("#"+m.id+" div.plupload_file_status",i).html(m.percent+"%");h(m);f();if(e.multiple_queues&&j.total.uploaded+j.total.failed==j.files.length){c(".plupload_buttons,.plupload_upload_status",i).css("display","inline");c(".plupload_start",i).addClass("plupload_disabled");c("span.plupload_total_status,span.plupload_total_file_size",i).hide()}});if(e.setup){e.setup(j)}});return this}else{return d[c(this[0]).attr("id")]}}})(jQuery); \ No newline at end of file diff --git a/soundmap/js/plupload/plupload.flash.swf b/soundmap/js/plupload/plupload.flash.swf new file mode 100644 index 0000000..7a1a937 Binary files /dev/null and b/soundmap/js/plupload/plupload.flash.swf differ diff --git a/soundmap/js/plupload/plupload.full.js b/soundmap/js/plupload/plupload.full.js new file mode 100644 index 0000000..624dd49 --- /dev/null +++ b/soundmap/js/plupload/plupload.full.js @@ -0,0 +1,2 @@ +/*1.4.3.2*/ +(function(){var f=0,l=[],n={},j={},a={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},m=/[<>&\"\']/g,b,c=window.setTimeout,d={},e;function h(){this.returnValue=false}function k(){this.cancelBubble=true}(function(o){var p=o.split(/,/),q,s,r;for(q=0;q0){g.each(p,function(s,r){o[r]=s})}});return o},cleanName:function(o){var p,q;q=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(p=0;p0?"&":"?")+q}return p},each:function(r,s){var q,p,o;if(r){q=r.length;if(q===b){for(p in r){if(r.hasOwnProperty(p)){if(s(r[p],p)===false){return}}}}else{for(o=0;o1073741824){return Math.round(o/1073741824,1)+" GB"}if(o>1048576){return Math.round(o/1048576,1)+" MB"}if(o>1024){return Math.round(o/1024,1)+" KB"}return o+" b"},getPos:function(p,t){var u=0,s=0,w,v=document,q,r;p=p;t=t||v.body;function o(C){var A,B,z=0,D=0;if(C){B=C.getBoundingClientRect();A=v.compatMode==="CSS1Compat"?v.documentElement:v.body;z=B.left+A.scrollLeft;D=B.top+A.scrollTop}return{x:z,y:D}}if(p&&p.getBoundingClientRect&&(navigator.userAgent.indexOf("MSIE")>0&&v.documentMode!==8)){q=o(p);r=o(t);return{x:q.x-r.x,y:q.y-r.y}}w=p;while(w&&w!=t&&w.nodeType){u+=w.offsetLeft||0;s+=w.offsetTop||0;w=w.offsetParent}w=p.parentNode;while(w&&w!=t&&w.nodeType){u-=w.scrollLeft||0;s-=w.scrollTop||0;w=w.parentNode}return{x:u,y:s}},getSize:function(o){return{w:o.offsetWidth||o.clientWidth,h:o.offsetHeight||o.clientHeight}},parseSize:function(o){var p;if(typeof(o)=="string"){o=/^([0-9]+)([mgk]+)$/.exec(o.toLowerCase().replace(/[^0-9mkg]/g,""));p=o[2];o=+o[1];if(p=="g"){o*=1073741824}if(p=="m"){o*=1048576}if(p=="k"){o*=1024}}return o},xmlEncode:function(o){return o?(""+o).replace(m,function(p){return a[p]?"&"+a[p]+";":p}):o},toArray:function(q){var p,o=[];for(p=0;p=0;p--){if(r[p].key===q||r[p].orig===u){if(t.detachEvent){t.detachEvent("on"+o,r[p].func)}else{if(t.removeEventListener){t.removeEventListener(o,r[p].func,false)}}r[p].orig=null;r[p].func=null;r.splice(p,1);if(u!==b){break}}}if(!r.length){delete d[t[e]][o]}if(g.isEmptyObj(d[t[e]])){delete d[t[e]];try{delete t[e]}catch(s){t[e]=b}}},removeAllEvents:function(p){var o=arguments[1];if(p[e]===b||!p[e]){return}g.each(d[p[e]],function(r,q){g.removeEvent(p,q,o)})}};g.Uploader=function(r){var p={},u,t=[],q;u=new g.QueueProgress();r=g.extend({chunk_size:0,multipart:true,multi_selection:true,file_data_name:"file",filters:[]},r);function s(){var w,x=0,v;if(this.state==g.STARTED){for(v=0;v0?Math.ceil(u.uploaded/t.length*100):0}else{u.bytesPerSec=Math.ceil(u.loaded/((+new Date()-q||1)/1000));u.percent=u.size>0?Math.ceil(u.loaded/u.size*100):0}}g.extend(this,{state:g.STOPPED,runtime:"",features:{},files:t,settings:r,total:u,id:g.guid(),init:function(){var A=this,B,x,w,z=0,y;if(typeof(r.preinit)=="function"){r.preinit(A)}else{g.each(r.preinit,function(D,C){A.bind(C,D)})}r.page_url=r.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/");if(!/^(\w+:\/\/|\/)/.test(r.url)){r.url=r.page_url+r.url}r.chunk_size=g.parseSize(r.chunk_size);r.max_file_size=g.parseSize(r.max_file_size);A.bind("FilesAdded",function(C,F){var E,D,H=0,I,G=r.filters;if(G&&G.length){I=[];g.each(G,function(J){g.each(J.extensions.split(/,/),function(K){if(/^\s*\*\s*$/.test(K)){I.push("\\.*")}else{I.push("\\."+K.replace(new RegExp("["+("/^$.*+?|()[]{}\\".replace(/./g,"\\$&"))+"]","g"),"\\$&"))}})});I=new RegExp(I.join("|")+"$","i")}for(E=0;Er.max_file_size){C.trigger("Error",{code:g.FILE_SIZE_ERROR,message:g.translate("File size error."),file:D});continue}t.push(D);H++}if(H){c(function(){A.trigger("QueueChanged");A.refresh()},1)}else{return false}});if(r.unique_names){A.bind("UploadFile",function(C,D){var F=D.name.match(/\.([^.]+)$/),E="tmp";if(F){E=F[1]}D.target_name=D.id+"."+E})}A.bind("UploadProgress",function(C,D){D.percent=D.size>0?Math.ceil(D.loaded/D.size*100):100;o()});A.bind("StateChanged",function(C){if(C.state==g.STARTED){q=(+new Date())}else{if(C.state==g.STOPPED){for(B=C.files.length-1;B>=0;B--){if(C.files[B].status==g.UPLOADING){C.files[B].status=g.QUEUED;o()}}}}});A.bind("QueueChanged",o);A.bind("Error",function(C,D){if(D.file){D.file.status=g.FAILED;o();if(C.state==g.STARTED){c(function(){s.call(A)},1)}}});A.bind("FileUploaded",function(C,D){D.status=g.DONE;D.loaded=D.size;C.trigger("UploadProgress",D);c(function(){s.call(A)},1)});if(r.runtimes){x=[];y=r.runtimes.split(/\s?,\s?/);for(B=0;B=0;v--){if(t[v].id===w){return t[v]}}},removeFile:function(w){var v;for(v=t.length-1;v>=0;v--){if(t[v].id===w.id){return this.splice(v,1)[0]}}},splice:function(x,v){var w;w=t.splice(x===b?0:x,v===b?t.length:v);this.trigger("FilesRemoved",w);this.trigger("QueueChanged");return w},trigger:function(w){var y=p[w.toLowerCase()],x,v;if(y){v=Array.prototype.slice.call(arguments);v[0]=this;for(x=0;x=0;w--){if(y[w].func===x){y.splice(w,1);break}}}else{y=[]}if(!y.length){delete p[v]}}},unbindAll:function(){var v=this;g.each(p,function(x,w){v.unbind(w)})},destroy:function(){this.trigger("Destroy");this.unbindAll()}})};g.File=function(r,p,q){var o=this;o.id=r;o.name=p;o.size=q;o.loaded=0;o.percent=0;o.status=0};g.Runtime=function(){this.getFeatures=function(){};this.init=function(o,p){}};g.QueueProgress=function(){var o=this;o.size=0;o.loaded=0;o.uploaded=0;o.failed=0;o.queued=0;o.percent=0;o.bytesPerSec=0;o.reset=function(){o.size=o.loaded=o.uploaded=o.failed=o.queued=o.percent=o.bytesPerSec=0}};g.runtimes={};window.plupload=g})();(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){window.google={}}if(!google.gears){google.gears={factory:a}}})();(function(e,b,c,d){var f={};function a(h,k,m){var g,j,l,o;j=google.gears.factory.create("beta.canvas");try{j.decode(h);if(!k.width){k.width=j.width}if(!k.height){k.height=j.height}o=Math.min(width/j.width,height/j.height);if(o<1||(o===1&&m==="image/jpeg")){j.resize(Math.round(j.width*o),Math.round(j.height*o));if(k.quality){return j.encode(m,{quality:k.quality/100})}return j.encode(m)}}catch(n){}return h}c.runtimes.Gears=c.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(j,l){var k;if(!e.google||!google.gears){return l({success:false})}try{k=google.gears.factory.create("beta.desktop")}catch(h){return l({success:false})}function g(o){var n,m,p=[],q;for(m=0;m0;t=Math.ceil(p.size/q);if(!m){q=p.size;t=1}function n(){var z,B,w=s.settings.multipart,v=0,A={name:p.target_name||p.name},x=s.settings.url;function y(D){var C,I="----pluploadboundary"+c.guid(),F="--",H="\r\n",E,G;if(w){z.setRequestHeader("Content-Type","multipart/form-data; boundary="+I);C=google.gears.factory.create("beta.blobbuilder");c.each(c.extend(A,s.settings.multipart_params),function(K,J){C.append(F+I+H+'Content-Disposition: form-data; name="'+J+'"'+H+H);C.append(K+H)});G=c.mimeTypes[p.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";C.append(F+I+H+'Content-Disposition: form-data; name="'+s.settings.file_data_name+'"; filename="'+p.name+'"'+H+"Content-Type: "+G+H+H);C.append(D);C.append(H+F+I+F+H);E=C.getAsBlob();v=E.length-D.length;D=E}z.send(D)}if(p.status==c.DONE||p.status==c.FAILED||s.state==c.STOPPED){return}if(m){A.chunk=u;A.chunks=t}B=Math.min(q,p.size-(u*q));if(!w){x=c.buildUrl(s.settings.url,A)}z=google.gears.factory.create("beta.httprequest");z.open("POST",x);if(!w){z.setRequestHeader("Content-Disposition",'attachment; filename="'+p.name+'"');z.setRequestHeader("Content-Type","application/octet-stream")}c.each(s.settings.headers,function(D,C){z.setRequestHeader(C,D)});z.upload.onprogress=function(C){p.loaded=r+C.loaded-v;s.trigger("UploadProgress",p)};z.onreadystatechange=function(){var C;if(z.readyState==4){if(z.status==200){C={chunk:u,chunks:t,response:z.responseText,status:z.status};s.trigger("ChunkUploaded",p,C);if(C.cancelled){p.status=c.FAILED;return}r+=B;if(++u>=t){p.status=c.DONE;s.trigger("FileUploaded",p,{response:z.responseText,status:z.status})}else{n()}}else{s.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:p,chunk:u,chunks:t,status:z.status})}}};if(u3){l.pop()}while(l.length<4){l.push(0)}m=s.split(".");while(m.length>4){m.pop()}do{u=parseInt(m[q],10);n=parseInt(l[q],10);q++}while(q8?"":0.01});o.className="plupload silverlight";if(p.settings.container){k=b.getElementById(p.settings.container);if(d.getStyle(k,"position")==="static"){k.style.position="relative"}}k.appendChild(o);for(l=0;l';function j(){return b.getElementById(p.id+"_silverlight").content.Upload}p.bind("Silverlight:Init",function(){var r,s={};if(h[p.id]){return}h[p.id]=true;p.bind("Silverlight:StartSelectFiles",function(t){r=[]});p.bind("Silverlight:SelectFile",function(t,w,u,v){var x;x=d.guid();s[x]=w;s[w]=x;r.push(new d.File(x,u,v))});p.bind("Silverlight:SelectSuccessful",function(){if(r.length){p.trigger("FilesAdded",r)}});p.bind("Silverlight:UploadChunkError",function(t,w,u,x,v){p.trigger("Error",{code:d.IO_ERROR,message:"IO Error.",details:v,file:t.getFile(s[w])})});p.bind("Silverlight:UploadFileProgress",function(t,x,u,w){var v=t.getFile(s[x]);if(v.status!=d.FAILED){v.size=w;v.loaded=u;t.trigger("UploadProgress",v)}});p.bind("Refresh",function(t){var u,v,w;u=b.getElementById(t.settings.browse_button);if(u){v=d.getPos(u,b.getElementById(t.settings.container));w=d.getSize(u);d.extend(b.getElementById(t.id+"_silverlight_container").style,{top:v.y+"px",left:v.x+"px",width:w.w+"px",height:w.h+"px"})}});p.bind("Silverlight:UploadChunkSuccessful",function(t,w,u,z,y){var x,v=t.getFile(s[w]);x={chunk:u,chunks:z,response:y};t.trigger("ChunkUploaded",v,x);if(v.status!=d.FAILED){j().UploadNextChunk()}if(u==z-1){v.status=d.DONE;t.trigger("FileUploaded",v,{response:y})}});p.bind("Silverlight:UploadSuccessful",function(t,w,u){var v=t.getFile(s[w]);v.status=d.DONE;t.trigger("FileUploaded",v,{response:u})});p.bind("FilesRemoved",function(t,v){var u;for(u=0;u';function n(){return b.getElementById(k.id+"_flash")}function m(){if(q++>5000){p({success:false});return}if(!g[k.id]){setTimeout(m,1)}}m();o=j=null;k.bind("Flash:Init",function(){var s={},r;n().setFileFilters(k.settings.filters,k.settings.multi_selection);if(g[k.id]){return}g[k.id]=true;k.bind("UploadFile",function(t,v){var w=t.settings,u=k.settings.resize||{};n().uploadFile(s[v.id],w.url,{name:v.target_name||v.name,mime:d.mimeTypes[v.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:w.chunk_size,width:u.width,height:u.height,quality:u.quality,multipart:w.multipart,multipart_params:w.multipart_params||{},file_data_name:w.file_data_name,format:/\.(jpg|jpeg)$/i.test(v.name)?"jpg":"png",headers:w.headers,urlstream_upload:w.urlstream_upload})});k.bind("Flash:UploadProcess",function(u,t){var v=u.getFile(s[t.id]);if(v.status!=d.FAILED){v.loaded=t.loaded;v.size=t.size;u.trigger("UploadProgress",v)}});k.bind("Flash:UploadChunkComplete",function(t,v){var w,u=t.getFile(s[v.id]);w={chunk:v.chunk,chunks:v.chunks,response:v.text};t.trigger("ChunkUploaded",u,w);if(u.status!=d.FAILED){n().uploadNextChunk()}if(v.chunk==v.chunks-1){u.status=d.DONE;t.trigger("FileUploaded",u,{response:v.text})}});k.bind("Flash:SelectFiles",function(t,w){var v,u,x=[],y;for(u=0;u0){r(++t,v)}else{k.status=a.DONE;n.trigger("FileUploaded",k,{response:x.value.body,status:w});if(w>=400){n.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:k,status:w})}}}else{n.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:k,details:x.error})}})}function q(t){k.size=t.size;if(l){e.FileAccess.chunk({file:t,chunkSize:l},function(w){if(w.success){var x=w.value,u=x.length;o=Array(u);for(var v=0;v0&&navigator.vendor.indexOf("Apple")!==-1;return{html5:n,dragdrop:p.mozInnerScreenX!==d||m||f,jpgresize:o,pngresize:o,multipart:o||!!p.FileReader||!!p.FormData,progress:q,chunks:m||o,canOpenDialog:navigator.userAgent.indexOf("WebKit")!==-1}},init:function(p,q){var m={},n;function o(v){var t,s,u=[],w,r={};for(s=0;s";D=j.getElementById(p.id+"_html5");D.onchange=function(){o(this.files);this.value=""};E=j.getElementById(v.settings.browse_button);if(E){var x=v.settings.browse_button_hover,z=v.settings.browse_button_active,w=v.features.canOpenDialog?E:F;if(x){h.addEvent(w,"mouseover",function(){h.addClass(E,x)},v.id);h.addEvent(w,"mouseout",function(){h.removeClass(E,x)},v.id)}if(z){h.addEvent(w,"mousedown",function(){h.addClass(E,z)},v.id);h.addEvent(j.body,"mouseup",function(){h.removeClass(E,z)},v.id)}if(v.features.canOpenDialog){h.addEvent(E,"click",function(y){j.getElementById(v.id+"_html5").click();y.preventDefault()},v.id)}}});p.bind("PostInit",function(){var r=j.getElementById(p.settings.drop_element);if(r){if(f){h.addEvent(r,"dragenter",function(v){var u,s,t;u=j.getElementById(p.id+"_drop");if(!u){u=j.createElement("input");u.setAttribute("type","file");u.setAttribute("id",p.id+"_drop");u.setAttribute("multiple","multiple");h.addEvent(u,"change",function(){o(this.files);h.removeEvent(u,"change",p.id);u.parentNode.removeChild(u)},p.id);r.appendChild(u)}s=h.getPos(r,j.getElementById(p.settings.container));t=h.getSize(r);if(h.getStyle(r,"position")==="static"){h.extend(r.style,{position:"relative"})}h.extend(u.style,{position:"absolute",display:"block",top:0,left:0,width:t.w+"px",height:t.h+"px",opacity:0})},p.id);return}h.addEvent(r,"dragover",function(s){s.preventDefault()},p.id);h.addEvent(r,"drop",function(t){var s=t.dataTransfer;if(s&&s.files){o(s.files)}t.preventDefault()},p.id)}});p.bind("Refresh",function(r){var s,u,v,w,t;s=j.getElementById(p.settings.browse_button);if(s){u=h.getPos(s,j.getElementById(r.settings.container));v=h.getSize(s);w=j.getElementById(p.id+"_html5_container");h.extend(w.style,{top:u.y+"px",left:u.x+"px",width:v.w+"px",height:v.h+"px"});if(p.features.canOpenDialog){t=parseInt(s.parentNode.style.zIndex,10);if(isNaN(t)){t=0}h.extend(s.style,{zIndex:t});if(h.getStyle(s,"position")==="static"){h.extend(s.style,{position:"relative"})}h.extend(w.style,{zIndex:t-1})}}});p.bind("UploadFile",function(r,t){var u=r.settings,w,s;function v(x){var A=0,z=0;function y(){var H=x,O,P,K,L,M=0,D="----pluploadboundary"+h.guid(),G,I,E,F="--",N="\r\n",J="",C,B=r.settings.url;if(t.status==h.DONE||t.status==h.FAILED||r.state==h.STOPPED){return}L={name:t.target_name||t.name};if(u.chunk_size&&n.chunks){G=u.chunk_size;K=Math.ceil(t.size/G);I=Math.min(G,t.size-(A*G));if(typeof(x)=="string"){H=x.substring(A*G,A*G+I)}else{H=x.slice(A*G,I)}L.chunk=A;L.chunks=K}else{I=t.size}O=new XMLHttpRequest();P=O.upload;if(P){P.onprogress=function(Q){t.loaded=Math.min(t.size,z+Q.loaded-M);r.trigger("UploadProgress",t)}}if(!r.settings.multipart||!n.multipart){B=h.buildUrl(r.settings.url,L)}else{L.name=t.target_name||t.name}O.open("post",B,true);O.onreadystatechange=function(){var Q,S;if(O.readyState==4){try{Q=O.status}catch(R){Q=0}if(Q>=400){r.trigger("Error",{code:h.HTTP_ERROR,message:h.translate("HTTP Error."),file:t,status:Q})}else{if(K){S={chunk:A,chunks:K,response:O.responseText,status:Q};r.trigger("ChunkUploaded",t,S);z+=I;if(S.cancelled){t.status=h.FAILED;return}t.loaded=Math.min(t.size,(A+1)*G)}else{t.loaded=t.size}r.trigger("UploadProgress",t);if(!K||++A>=K){t.status=h.DONE;r.trigger("FileUploaded",t,{response:O.responseText,status:Q});w=x=m[t.id]=null}else{y()}}O=H=E=J=null}};h.each(r.settings.headers,function(R,Q){O.setRequestHeader(Q,R)});if(r.settings.multipart&&n.multipart){if(!O.sendAsBinary){E=new FormData();h.each(h.extend(L,r.settings.multipart_params),function(R,Q){E.append(Q,R)});E.append(r.settings.file_data_name,H);O.send(E);return}O.setRequestHeader("Content-Type","multipart/form-data; boundary="+D);h.each(h.extend(L,r.settings.multipart_params),function(R,Q){J+=F+D+N+'Content-Disposition: form-data; name="'+Q+'"'+N+N;J+=unescape(encodeURIComponent(R))+N});C=h.mimeTypes[t.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";J+=F+D+N+'Content-Disposition: form-data; name="'+r.settings.file_data_name+'"; filename="'+unescape(encodeURIComponent(t.name))+'"'+N+"Content-Type: "+C+N+N+H+N+F+D+F+N;M=J.length-H.length;H=J}else{O.setRequestHeader("Content-Type","application/octet-stream")}if(O.sendAsBinary){O.sendAsBinary(H)}else{O.send(H)}}y()}w=m[t.id];s=r.settings.resize;if(n.jpgresize){if(s&&/\.(png|jpg|jpeg)$/i.test(t.name)){c(w,s,/\.png$/i.test(t.name)?"image/png":"image/jpeg",function(x){if(x.success){t.size=x.data.length;v(x.data)}else{k(w,v)}})}else{k(w,v)}}else{v(w)}});p.bind("Destroy",function(r){var t,u,s=j.body,v={inputContainer:r.id+"_html5_container",inputFile:r.id+"_html5",browseButton:r.settings.browse_button,dropElm:r.settings.drop_element};for(t in v){u=j.getElementById(v[t]);if(u){h.removeAllEvents(u,r.id)}}h.removeAllEvents(j.body,r.id);if(r.settings.container){s=j.getElementById(r.settings.container)}s.removeChild(j.getElementById(v.inputContainer))});q({success:true})}});function b(){var p=false,n;function q(s,u){var r=p?0:-8*(u-1),v=0,t;for(t=0;t>Math.abs(r+u*8))&255)}m(w,s,v)}return{II:function(r){if(r===d){return p}else{p=r}},init:function(r){p=false;n=r},SEGMENT:function(r,t,s){switch(arguments.length){case 1:return n.substr(r,n.length-r-1);case 2:return n.substr(r,t);case 3:m(s,r,t);break;default:return n}},BYTE:function(r){return q(r,1)},SHORT:function(r){return q(r,2)},LONG:function(r,s){if(s===d){return q(r,4)}else{o(r,s,4)}},SLONG:function(r){var s=q(r,4);return(s>2147483647?s-4294967296:s)},STRING:function(r,s){var t="";for(s+=r;r=65488&&o<=65495){m+=2;continue}if(o===65498||o===65497){break}p=q.SHORT(m+2)+2;if(t[o]&&q.STRING(m+4,t[o].signature.length)===t[o].signature){s.push({hex:o,app:t[o].app.toUpperCase(),name:t[o].name.toUpperCase(),start:m,length:p,segment:q.SEGMENT(m,p)})}m+=p}q.init(null);return{headers:s,restore:function(w){q.init(w);if(q.SHORT(0)!==65496){return false}m=q.SHORT(2)==65504?4+q.SHORT(4):2;for(var v=0,u=s.length;v=y.length){break}}},purge:function(){s=[];q.init(null)}}}function a(){var p,m,n={},s;p=new b();m={tiff:{274:"Orientation",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}};s={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}};function o(t,B){var v=p.SHORT(t),y,E,F,A,z,u,w,C,D=[],x={};for(y=0;y4){w=p.LONG(w)+n.tiffHeader}for(E=0;E4){w=p.LONG(w)+n.tiffHeader}x[F]=p.STRING(w,z-1);continue;case 3:if(z>2){w=p.LONG(w)+n.tiffHeader}for(E=0;E1){w=p.LONG(w)+n.tiffHeader}for(E=0;E