From 29a0ad8d0ef855cb7274e7abcca6825e923df306 Mon Sep 17 00:00:00 2001 From: Eric Rochester Date: Mon, 16 Jun 2014 13:29:29 -0400 Subject: [PATCH 1/8] Don't pay attention to empty edit parameters. Fixes #84. --- models/Table/Table_NeatlineFeature.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Table/Table_NeatlineFeature.php b/models/Table/Table_NeatlineFeature.php index b333efb..cc640ee 100644 --- a/models/Table/Table_NeatlineFeature.php +++ b/models/Table/Table_NeatlineFeature.php @@ -365,7 +365,7 @@ private function _param($params, $key, $default=null) { $value = $default; try { - if (array_key_exists($key, $params)) { + if (array_key_exists($key, $params) && !empty($params[$key])) { $value = $params[$key]; } } catch (Exception $e) { From c562c19594f6191e626f4e0306c793d6705a67b0 Mon Sep 17 00:00:00 2001 From: Eric Rochester Date: Mon, 16 Jun 2014 14:33:08 -0400 Subject: [PATCH 2/8] Don't use the protocol when loading Google Maps JS. Fixes #85. --- NeatlineFeaturesPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NeatlineFeaturesPlugin.php b/NeatlineFeaturesPlugin.php index 15b474e..6926a4f 100644 --- a/NeatlineFeaturesPlugin.php +++ b/NeatlineFeaturesPlugin.php @@ -187,7 +187,7 @@ public function hookAdminHead($args) // We are also outputting the script tags to load OpenLayers here. $this->_queueJsUri( - "http://maps.google.com/maps/api/js?v=3.8&sensor=false" + "//maps.google.com/maps/api/js?v=3.8&sensor=false" ); queue_js_file('libraries/openlayers/OpenLayers.min'); queue_js_file('libraries/tile.stamen'); @@ -223,7 +223,7 @@ public function hookPublicHead() // We are also outputting the script tags to load OpenLayers here. $this->_queueJsUri( - "http://maps.google.com/maps/api/js?v=3.8&sensor=false" + "//maps.google.com/maps/api/js?v=3.8&sensor=false" ); queue_js_file('libraries/openlayers/OpenLayers.min'); queue_js_file('libraries/tile.stamen'); From fc0a974217ebeb6c1ad1a2f2891cfb381c2c159c Mon Sep 17 00:00:00 2001 From: Eric Rochester Date: Mon, 16 Jun 2014 15:45:47 -0400 Subject: [PATCH 3/8] Don't want dependencies on Vagrant. --- Gemfile | 5 ----- Gemfile.lock | 19 ------------------- 2 files changed, 24 deletions(-) diff --git a/Gemfile b/Gemfile index 6da92d5..f50b288 100644 --- a/Gemfile +++ b/Gemfile @@ -28,8 +28,3 @@ group :development do gem 'rb-fsevent' end -group :vagrant do - gem 'vagrant', '~> 1.0.3' - gem 'zayin' -end - diff --git a/Gemfile.lock b/Gemfile.lock index e0302f7..014ade4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,6 @@ GEM activesupport (3.2.12) i18n (~> 0.6) multi_json (~> 1.0) - archive-tar-minitar (0.5.2) builder (3.2.0) capybara (2.0.3) mime-types (>= 1.16) @@ -45,7 +44,6 @@ GEM em-websocket (0.5.0) eventmachine (>= 0.12.9) http_parser.rb (~> 0.5.3) - erubis (2.7.0) eventmachine (1.0.3) execjs (1.4.0) multi_json (~> 1.0) @@ -103,7 +101,6 @@ GEM em-dir-watcher (>= 0.1) em-websocket (>= 0.3.5) json (>= 1.5.3) - log4r (1.1.10) lumberjack (1.0.3) mechanize (2.6.0) domain_name (~> 0.5, >= 0.5.1) @@ -119,9 +116,6 @@ GEM multi_xml (0.5.3) net-http-digest_auth (1.3) net-http-persistent (2.8) - net-scp (1.0.4) - net-ssh (>= 1.99.1) - net-ssh (2.2.2) nokogiri (1.5.9) ntlm-http (0.1.1) peach (0.5.1) @@ -150,21 +144,10 @@ GEM unf (0.1.1) unf_ext unf_ext (0.0.6) - vagrant (1.0.7) - archive-tar-minitar (= 0.5.2) - childprocess (~> 0.3.1) - erubis (~> 2.7.0) - i18n (~> 0.6.0) - json (>= 1.5.1, < 1.8.0) - log4r (~> 1.1.9) - net-scp (~> 1.0.4) - net-ssh (~> 2.2.2) webrobots (0.1.1) websocket (1.0.7) xpath (1.0.0) nokogiri (~> 1.3) - zayin (0.2.0) - rake (~> 0.8) PLATFORMS ruby @@ -192,5 +175,3 @@ DEPENDENCIES rspec-expectations sass selenium-webdriver - vagrant (~> 1.0.3) - zayin From 7bd247798ff225f2535bbd44b143761f3ee3183f Mon Sep 17 00:00:00 2001 From: Eric Rochester Date: Mon, 16 Jun 2014 15:46:09 -0400 Subject: [PATCH 4/8] Bumped version to 2.0.3 --- package.json | 2 +- plugin.ini | 2 +- version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3fd1005..7f4563a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name" : "neatlinefeatures", - "version" : "2.0.2", + "version" : "2.0.3", "dependencies" : { "inireader" : "~0.2.4", "iniparser" : "~1.0.5", diff --git a/plugin.ini b/plugin.ini index ef83f98..58cb1e3 100644 --- a/plugin.ini +++ b/plugin.ini @@ -8,7 +8,7 @@ author="Scholars' Lab" description="Allows administrators to draw things on maps and associate them with an Omeka item." link="https://github.com/scholarslab/NeatlineFeatures" support_link="https://github.com/scholarslab/NeatlineFeatures/issues" -version="2.0.2" +version="2.0.3" tags="geospatial" omeka_minimum_version="2.0" omeka_tested_up_to="2.0" diff --git a/version b/version index f93ea0c..6acdb44 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.0.2 \ No newline at end of file +2.0.3 \ No newline at end of file From 9e8d1feff5749570f5165953a678afab17916cff Mon Sep 17 00:00:00 2001 From: Eric Rochester Date: Mon, 16 Jun 2014 15:46:34 -0400 Subject: [PATCH 5/8] Regenerated assets. --- views/shared/javascripts/featureswidget.js | 126 ++++++++---------- ...-min.js => neatline-features-2.0.3-min.js} | 2 +- ...es-2.0.2.js => neatline-features-2.0.3.js} | 126 ++++++++---------- 3 files changed, 119 insertions(+), 135 deletions(-) rename views/shared/javascripts/{neatline-features-2.0.2-min.js => neatline-features-2.0.3-min.js} (67%) rename views/shared/javascripts/{neatline-features-2.0.2.js => neatline-features-2.0.3.js} (96%) diff --git a/views/shared/javascripts/featureswidget.js b/views/shared/javascripts/featureswidget.js index f87c1c4..004743a 100644 --- a/views/shared/javascripts/featureswidget.js +++ b/views/shared/javascripts/featureswidget.js @@ -1,10 +1,10 @@ -// Generated by CoffeeScript 1.7.1 +// Generated by CoffeeScript 1.6.3 (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; (function($) { - var BaseWidget, EditWidget, ViewWidget, derefid, poll, stripFirstLine, to_s; + var BaseWidget, EditWidget, ViewWidget, derefid, poll, stripFirstLine, to_s, _ref, _ref1; derefid = function(id) { if (id[0] === '#') { return id.slice(1, id.length); @@ -93,7 +93,8 @@ __extends(ViewWidget, _super); function ViewWidget() { - return ViewWidget.__super__.constructor.apply(this, arguments); + _ref = ViewWidget.__super__.constructor.apply(this, arguments); + return _ref; } ViewWidget.prototype.init = function() { @@ -135,7 +136,8 @@ __extends(EditWidget, _super); function EditWidget() { - return EditWidget.__super__.constructor.apply(this, arguments); + _ref1 = EditWidget.__super__.constructor.apply(this, arguments); + return _ref1; } EditWidget.prototype.init = function() { @@ -193,16 +195,13 @@ }; EditWidget.prototype.captureEditor = function() { - this.fields.mapon.change((function(_this) { - return function() { - return _this._onUseMap(); - }; - })(this)); - return this.fields.html.change((function(_this) { - return function() { - return _this._updateTinyEvents(); - }; - })(this)); + var _this = this; + this.fields.mapon.change(function() { + return _this._onUseMap(); + }); + return this.fields.html.change(function() { + return _this._updateTinyEvents(); + }); }; EditWidget.prototype.populate = function(values) { @@ -225,20 +224,17 @@ }; EditWidget.prototype.wire = function() { - var updateFields; - updateFields = (function(_this) { - return function() { - return _this.updateFields(_this.fields.free.val()); - }; - })(this); + var updateFields, + _this = this; + updateFields = function() { + return _this.updateFields(_this.fields.free.val()); + }; this.fields.free.change(updateFields); - this.map.bind('featureadded.nlfeatures', updateFields).bind('update.nlfeatures', updateFields).bind('delete.nlfeatures', updateFields).bind('refresh.nlfeatures', updateFields).bind('saveview.nlfeatures', (function(_this) { - return function() { - _this.map.nlfeatures('saveViewport'); - _this.updateFields(); - return _this.flash('View Saved...'); - }; - })(this)); + this.map.bind('featureadded.nlfeatures', updateFields).bind('update.nlfeatures', updateFields).bind('delete.nlfeatures', updateFields).bind('refresh.nlfeatures', updateFields).bind('saveview.nlfeatures', function() { + _this.map.nlfeatures('saveViewport'); + _this.updateFields(); + return _this.flash('View Saved...'); + }); return this.map.nlfeatures('getMap').events.on({ changebaselayer: updateFields }); @@ -253,25 +249,23 @@ }; EditWidget.prototype.showMap = function() { - var tools; + var tools, + _this = this; tools = this.fields.map.children('button'); - return tools.hide('normal', (function(_this) { - return function() { - return _this.fields.map_container.slideDown('normal', function() { - return tools.fadeIn(); - }); - }; - })(this)); + return tools.hide('normal', function() { + return _this.fields.map_container.slideDown('normal', function() { + return tools.fadeIn(); + }); + }); }; EditWidget.prototype.hideMap = function() { - var tools; + var tools, + _this = this; tools = this.fields.map.children('button'); - return tools.fadeOut('normal', (function(_this) { - return function() { - return _this.fields.map_container.slideUp(); - }; - })(this)); + return tools.fadeOut('normal', function() { + return _this.fields.map_container.slideUp(); + }); }; EditWidget.prototype._onUseMap = function() { @@ -284,25 +278,22 @@ }; EditWidget.prototype._updateTinyEvents = function() { - var freeId; + var freeId, + _this = this; if (this.usesHtml()) { freeId = this.fields.free.attr('id'); return poll(function() { return tinymce.get(freeId) != null; - }, (function(_this) { - return function() { - _this.fields.free.unbind('change'); - return tinymce.get(freeId).onChange.add(function() { - return _this.updateFields(); - }); - }; - })(this)); - } else { - return this.fields.free.change((function(_this) { - return function() { + }, function() { + _this.fields.free.unbind('change'); + return tinymce.get(freeId).onChange.add(function() { return _this.updateFields(); - }; - })(this)); + }); + }); + } else { + return this.fields.free.change(function() { + return _this.updateFields(); + }); } }; @@ -332,16 +323,15 @@ }; EditWidget.prototype.flash = function(msg, delay) { + var _this = this; if (delay == null) { delay = 5000; } - return this.fields.flash.html(msg).fadeIn('slow', (function(_this) { - return function() { - return setTimeout(function() { - return _this.fields.flash.fadeOut('slow'); - }, delay); - }; - })(this)); + return this.fields.flash.html(msg).fadeIn('slow', function() { + return setTimeout(function() { + return _this.fields.flash.fadeOut('slow'); + }, delay); + }); }; return EditWidget; @@ -388,11 +378,11 @@ } id_prefix = deref(id_prefix); parts = (function() { - var _i, _len, _ref, _results; - _ref = id_prefix.split('-'); + var _i, _len, _ref2, _results; + _ref2 = id_prefix.split('-'); _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - p = _ref[_i]; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + p = _ref2[_i]; if (p.length > 0) { _results.push(p); } @@ -422,4 +412,6 @@ }).call(this); -//# sourceMappingURL=featureswidget.map +/* +//@ sourceMappingURL=featureswidget.map +*/ diff --git a/views/shared/javascripts/neatline-features-2.0.2-min.js b/views/shared/javascripts/neatline-features-2.0.3-min.js similarity index 67% rename from views/shared/javascripts/neatline-features-2.0.2-min.js rename to views/shared/javascripts/neatline-features-2.0.3-min.js index 2ad4146..f6f701f 100644 --- a/views/shared/javascripts/neatline-features-2.0.2-min.js +++ b/views/shared/javascripts/neatline-features-2.0.3-min.js @@ -1 +1 @@ -!function(t,e){t.widget("nlfeatures.nlfeatures",{options:{markup:{toolbar_class:"olControlEditingToolbar",id_prefix:"nlf-"},animation:{fade_duration:500},styles:{default_opacity:.4,default_color:"#ffb80e",select_point_radius:10,select_stroke_color:"#ea3a3a",point_graphic:{normal:e,selected:e}},map:{boundingBox:"90,0,-90,360",center:e,zoom:e,epsg:e,wmsAddress:e,raw_update:e},mode:null,json:null,zoom:null,center:null},_create:function(){this._instantiateOpenLayers(),this._currentVectorLayers=[],this._currentEditItem=null,this._currentEditLayer=null,this.clickedFeature=null,this.idToLayer={},this.requestData=null,"undefined"!=typeof this.options.json&&null!==this.options.json?(this.loadLocalData([this.options.json]),this.setViewport(),"edit"===this.options.mode&&this.editJson(this.options.json,!0)):this.loadData()},_instantiateOpenLayers:function(){OpenLayers.IMAGE_RELOAD_ATTEMTPS=3,OpenLayers.Util.onImageLoadErrorColor="transparent",OpenLayers.ImgPath="http://js.mapbox.com/theme/dark/";var t,n,i=!0;OpenLayers.IMAGE_RELOAD_ATTEMPTS=5,OpenLayers.DOTS_PER_INCH=25.4/.28,format=i?"image/png8":"image/png",this.options.map.boundingBox===e?t=new OpenLayers.Bounds:(n=this.options.map.boundingBox.split(","),t=new OpenLayers.Bounds(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3])));var o=this.options.map.epsg!==e?this.options.map.epsg[0]:"EPSG:4326",s=[new OpenLayers.Control.Attribution,new OpenLayers.Control.Navigation,new OpenLayers.Control.PanZoomBar];"edit"===this.options.mode&&(s=s.concat([new OpenLayers.Control.MousePosition,new OpenLayers.Control.LayerSwitcher]));var r={controls:s,maxExtent:t,maxResolution:"auto",projection:o,units:"m"};if(this.map=new OpenLayers.Map(this.element.attr("id"),r),this.options.map.wmsAddress!==e?this.baseLayer=new OpenLayers.Layer.WMS(this.options.name,this.options.map.wmsAddress,{LAYERS:this.options.map.layers,STYLES:"",format:"image/jpeg",tiled:!i,tilesOrigin:this.map.maxExtent.left+","+this.map.maxExtent.bottom},{buffer:0,displayOutsideMaxExtent:!0,isBaseLayer:!0}):(this.baseLayers=this._getBaseLayers(),this.baseLayer=this.baseLayers[this.options.base_layer]!==e?this.baseLayers[this.options.base_layer]:this.baseLayers.osm),this.map.addLayers([this.baseLayers.osm,this.baseLayers.gphy,this.baseLayers.gmap,this.baseLayers.ghyb,this.baseLayers.gsat]),this.baseLayers.swc!==e&&this.map.addLayers([this.baseLayers.stn,this.baseLayers.str,this.baseLayers.swc]),this.map.setBaseLayer(this.baseLayer),this.exists(this.options.default_map_bounds)&&(n=this.options.default_map_bounds.split(","),t=new OpenLayers.Bounds(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3]))),this.options.map.center!==e){var a=this.options.map.zoom===e?3:this.options.map.zoom,l=new OpenLayers.LonLat(this.options.map.center[0],this.options.map.center[1]);this.map.setCenter(l,a)}else this.map.zoomToExtent(t)},getMap:function(){return this.map},_getBaseLayers:function(){var t={};if(t.gphy=new OpenLayers.Layer.Google("Google Physical",{type:google.maps.MapTypeId.TERRAIN}),t.gmap=new OpenLayers.Layer.Google("Google Streets",{numZoomLevels:20}),t.ghyb=new OpenLayers.Layer.Google("Google Hybrid",{type:google.maps.MapTypeId.HYBRID,numZoomLevels:20}),t.gsat=new OpenLayers.Layer.Google("Google Satellite",{type:google.maps.MapTypeId.SATELLITE,numZoomLevels:22}),t.osm=new OpenLayers.Layer.OSM,OpenLayers.Layer.Stamen!==e){var n='Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.';t.swc=new OpenLayers.Layer.Stamen("Stamen Watercolor",{provider:"watercolor",attribution:n,tileOptions:{crossOriginKeyword:null}}),t.stn=new OpenLayers.Layer.Stamen("Stamen Toner",{provider:"toner",attribution:n,tileOptions:{crossOriginKeyword:null}}),t.str=new OpenLayers.Layer.Stamen("Stamen Terrain",{provider:"terrain",attribution:n,tileOptions:{crossOriginKeyword:null}})}return t},loadData:function(){var n=this;this._resetData(),this.exists(this.requestData)&&this.requestData.abort(),this.options.dataSources!==e&&this.options.dataSources.maps!==e&&(this.requestData=t.ajax({url:this.options.dataSources.map,dataType:"json",success:function(t){n._buildVectorLayers(t),n._addClickControls(),n.exists(n._currentEditItem)&&n.editJson(n._currentEditItem,!0)}}))},loadLocalData:function(t){this._resetData(),this._buildVectorLayers(t),"edit"===this.options.mode&&this._addClickControls()},_resetData:function(){var e=this;this._removeControls(),t.each(this._currentVectorLayers,function(t,n){e.map.removeLayer(n),n.destroy()}),this._currentVectorLayers=[],this.idToLayer={}},_buildVectorLayers:function(n){var i=this,o=!1;this.idToLayer={},this.layerToId={},t.each(n,function(n,s){var r=s.id,a=""!==s.color?s.color:i.options.styles.default_color,l=i._getStyleMap(a),u=new OpenLayers.Layer.Vector(s.title,{styleMap:l});if(null!==s.geo&&s.geo!==e){var d=new OpenLayers.Format.KML,p=d.read(s.geo);if(0===p.length){var c=new OpenLayers.Format.WKT;t.each(s.geo.split("|"),function(t,n){if(c.read(n)!==e){var i=new OpenLayers.Geometry.fromWKT(n),o=new OpenLayers.Feature.Vector(i);p.push(o)}}),o=p.length>0}p.length>0&&u.addFeatures(p)}u.setMap(i.map),i.idToLayer[r]=u,i.layerToId[u.id]=r,i._currentVectorLayers.push(u),i.map.addLayer(u)}),o&&setTimeout(function(){i.element.trigger("refresh.nlfeatures")},250)},selectFeature:function(t){this.isFocusLocked()||(this.modifyFeatures.selectFeature(t),this.clickControl.highlight(t),this.listenToFeature(t),this.clickedFeature=t,this.element.trigger("select.nlfeatures",t))},getFeatureElement:function(e){var n;return n=("#"+e.geometry.id).replace(/\./g,"\\."),t(n)},listenToFeature:function(t){var e,n,i;e=t.id,n=this,i=this.getFeatureElement(t),i.on({mousedown:function(){n.lockFocus(t)},mouseup:function(){n.unlockFocus(t)}})},unlistenToFeature:function(t,n){var i;i=this,(null===n||n===e)&&(n=this.getFeatureElement(t)),n.off("mouseup").off("mousedown")},deselectFeature:function(t,n){(null===t||t===e)&&(t=this.clickedFeature),(!this.isFocusLocked(t)||n)&&(this.clickControl.unhighlight(t),this.modifyFeatures.unselectFeature(t),this.unlistenToFeature(t),this.resetModifyFeatures(),t.nlfeatures&&(t.nlfeatures.focusLocked=!1),t===this.clickedFeature&&(this.clickedFeature=null),this.element.trigger("deselect.nlfeatures",t))},lockFocus:function(t){(null===t||t===e)&&(t=this.clickedFeature),null!==t&&t!==e&&(null===t.nlfeatures||t.nlfeatures===e?t.nlfeatures={focusLocked:!0}:t.nlfeatures.focusLocked=!0)},unlockFocus:function(t){(null===t||t===e)&&(t=this.clickedFeature),null!==t&&t!==e&&null!==t.nlfeatures&&t.nlfeatures!==e&&(t.nlfeatures.focusLocked=!1)},isFocusLocked:function(t){return(null===t||t===e)&&(t=this.clickedFeature),null!==t&&t!==e&&null!==t.nlfeatures&&t.nlfeatures!==e&&t.nlfeatures.focusLocked},_addClickControls:function(){var t=this;this._removeControls(),this.clickControl=new OpenLayers.Control.SelectFeature(this._currentVectorLayers,{hover:!0,highlightOnly:!0,overFeature:function(n){(null===n.geometry.parent||n.geometry.parent===e)&&(t.modifyFeatures!==e&&null!==t.clickedFeature&&t.clickedFeature!==e&&n.id!==t.clickedFeature.id&&t.deselectFeature(),t.modifyFeatures===e||null!==t.clickedFeature&&t.clickedFeature!==e&&n.id===t.clickedFeature.id||t.selectFeature(n))},outFeature:function(){return!1}}),this.map.addControl(this.clickControl),this.clickControl.activate(),this.map.events.register("click",this.map,function(){null!==t.clickedFeature&&t.clickedFeature!==e&&t.deselectFeature(t.clickedFeature,!0)})},_removeControls:function(){this.modifyFeatures!==e&&(this.map.removeControl(this.modifyFeatures),this.modifyFeatures.destroy(),delete this.modifyFeatures),this.editToolbar!==e&&(this.map.removeControl(this.editToolbar),this.editToolbar.destroy(),delete this.editToolbar),this.clickControl!==e&&(this.map.removeControl(this.clickControl),this.clickControl.destroy(),delete this.clickControl),this.highlightControl!==e&&(this.map.removeControl(this.highlightControl),this.highlightControl.destroy(),delete this.highlightControl)},edit:function(t,e){var n={id:t.attr("recordid"),name:t.find("span.item-title-text").text()};this.editJson(n,e)},editJson:function(n,i){var o=this;this.highlightControl!==e&&this.highlightControl.deactivate();var s=n.id;if(this._currentEditLayer=this.idToLayer[s],this._currentEditId=s,this._currentEditItem=n,!this._currentEditLayer){var r=n.name;this._currentEditLayer=new OpenLayers.Layer.Vector(r),this.map.addLayer(this._currentEditLayer),this._currentEditLayer.setMap(this.map),this._currentVectorLayers.push(this._currentEditLayer),this.idToLayer[s]=this._currentEditLayer,this.layerToId[this._currentEditLayer.id]=s}var a=[new OpenLayers.Control.Navigation,new OpenLayers.Control.DrawFeature(this._currentEditLayer,OpenLayers.Handler.Path,{displayClass:"olControlDrawFeaturePath",featureAdded:function(){o.element.trigger("featureadded.nlfeatures")}}),new OpenLayers.Control.DrawFeature(this._currentEditLayer,OpenLayers.Handler.Point,{displayClass:"olControlDrawFeaturePoint",featureAdded:function(){o.element.trigger("featureadded.nlfeatures")}}),new OpenLayers.Control.DrawFeature(this._currentEditLayer,OpenLayers.Handler.Polygon,{displayClass:"olControlDrawFeaturePolygon",featureAdded:function(){o.element.trigger("featureadded.nlfeatures")}})];this.modifyFeatures=new OpenLayers.Control.ModifyFeature(this._currentEditLayer,{onModification:function(){o.element.trigger("featureadded.nlfeatures")},standalone:!0}),this.editToolbar=new OpenLayers.Control.Panel({defaultControl:a[0],displayClass:this.options.markup.toolbar_class}),this.editToolbar.addControls(a),this.map.addControl(this.editToolbar),this.map.addControl(this.modifyFeatures),this.modifyFeatures.activate(),this.element.editfeatures({markup:{id_prefix:this.options.markup.id_prefix}}),this.element.bind({"update.nlfeatures":function(t,e){o.modifyFeatures.mode=OpenLayers.Control.ModifyFeature.RESHAPE,e.rotate&&(o.modifyFeatures.mode|=OpenLayers.Control.ModifyFeature.ROTATE),e.scale&&(o.modifyFeatures.mode|=OpenLayers.Control.ModifyFeature.RESIZE),e.drag&&(o.modifyFeatures.mode|=OpenLayers.Control.ModifyFeature.DRAG),(e.drag||e.rotate)&&(o.modifyFeatures.mode&=-OpenLayers.Control.ModifyFeature.RESHAPE);var n=o.modifyFeatures.feature;o.exists(n)&&(o.modifyFeatures.unselectFeature(n),o.modifyFeatures.selectFeature(n))},"lockfocus.nlfeatures":function(){o.lockFocus()},"unlockfocus.nlfeatures":function(){o.unlockFocus()},"delete.nlfeatures":function(){if(o.modifyFeatures.feature){var t=o.modifyFeatures.feature;o.clickedFeature=null,o.modifyFeatures.unselectFeature(t),o._currentEditLayer.destroyFeatures([t])}}}),i?t("."+this.options.markup.toolbar_class).css("opacity",1):(this.element.editfeatures("showButtons",i),t("."+this.options.markup.toolbar_class).animate({opacity:1},this.options.animation.fade_duration)),this.options.map.raw_update!==e&&(this.options.map.raw_update,this.element.bind({"featureadded.nlfeatures":function(){o.updateRaw()},"update.nlfeatures":function(){o.updateRaw()},"delete.nlfeatures":function(){o.updateRaw()}}));var l=!1;t.each(this._currentEditLayer.features,function(t,e){e==o.clickedFeature&&(l=!0)}),l&&this.modifyFeatures.selectFeature(this.clickedFeature)},resetModifyFeatures:function(){this.modifyFeatures.mode=OpenLayers.Control.ModifyFeature.RESHAPE},editJsonItem:function(t){this.loadLocalData([t]),this.setViewport(),this.editJson(t,!0)},setViewport:function(){this.viewportOptionsValid()?this._setViewportFromOptions():this._setViewportFromData()},viewportOptionsValid:function(){var t=!0;return t=t&&null!==this.options.zoom&&this.options.zoom,t=t&&this.options.zoom>0,t=t&&null!==this.options.center&&this.options.center!==e,t=t&&null!==this.options.center.lon&&this.options.center.lon!==e,t=t&&null!==this.options.center.lat&&this.options.center.lat!==e,t=t&&!isNaN(parseFloat(this.options.center.lon)),t=t&&!isNaN(parseFloat(this.options.center.lat))},_setViewportFromOptions:function(){var t,n,i=this.options.zoom,o=this.options.center,s=new OpenLayers.LonLat(o.lon,o.lat);null!==o.srs&&o.srs!==e&&(n=new OpenLayers.Projection(o.srs),t=this.map.getProjectionObject(),s=s.transform(n,t)),this.map.setCenter(s,i,!1,!1)},_setViewportFromData:function(){var t,e,n,i,o,s,r,a,l,u;for(t=this,l=new OpenLayers.Bounds,e=0,i=this._currentVectorLayers.length,n=0;i>n;n++)for(o=this._currentVectorLayers[n],r=o.features.length,s=0;r>s;s++)e++,a=o.features[s].geometry,l.extend(a.getBounds());0===e?(u=new OpenLayers.Control.Geolocate({bind:!0,watch:!1}),u.events.on({locationfailed:function(){t.map.setCenter(new OpenLayers.LonLat(-8738850.21367,4584105.47978),3,!1,!1)}}),this.map.addControl(u),this.map.zoomTo(3),u.activate()):this.map.zoomToExtent(l,!1)},updateRaw:function(){var t=this.options.map.raw_update;if(this.exists(t)){var e=this.getWktForSave();e=e.replace(/\|/g,"|\n"),t.val(e)}},endEditWithoutSave:function(e,n){var i=t("."+this.options.markup.toolbar_class).clone();this.modifyFeatures.unselectFeature(this.clickedFeature),this.map.removeControl(this.modifyFeatures),this.map.removeControl(this.editToolbar),n||(this.element.editfeatures("hideButtons"),this.element.append(i),i.animate({opacity:0},this.options.animation.fade_duration,function(){i.remove()})),this._addClickControls(),0===this._currentEditLayer.features.length&&(this.map.removeLayer(this._currentEditLayer),this._currentVectorLayers.remove(this._currentEditLayer),delete this.idToLayer[e],delete this.layerToId[this._currentEditLayer.id],this._currentEditLayer=null),this._currentEditItem=null},getBaseLayerCode:function(){var t,e,n,i,o,s;for(s=this.map.baseLayer.name,n=null,i=["osm","gphy","gmap","ghyb","gsat","swc","stn","str"],o=0,e=i.length;e>o;o++)if(t=i[o],s===this.baseLayers[t].name){n=t;break}return n},getWktForSave:function(){var t=[];return this._getFeatures(function(e,n){t.push(n.geometry.toString())}),t.join("|")},getKml:function(){var t=new OpenLayers.Format.KML,e=[];return this._getFeatures(function(t,n){e.push(n)}),t.write(e)},_getFeatures:function(e){var n=this.exists(this.clickedFeature);n&&this.modifyFeatures.unselectFeature(this.clickedFeature),t.each(this._currentEditLayer.features,e),n&&this.modifyFeatures.selectFeature(this.clickedFeature)},getExtentForSave:function(){return this.map.getExtent().toString()},getZoomForSave:function(){return this.map.getZoom()},zoomToItemVectors:function(t){var e=this.idToLayer[t];this.exists(e)&&e.features.length>0&&this.map.zoomToExtent(e.getDataExtent())},_getStyleMap:function(t){return new OpenLayers.StyleMap({"default":new OpenLayers.Style({fillColor:t,fillOpacity:this.options.styles.default_opacity,strokeColor:t,strokeWidth:1,pointRadius:10}),select:new OpenLayers.Style({fillColor:t,fillOpacity:this.options.styles.default_opacity,strokeColor:this.options.styles.select_stroke_color,strokeWidth:2,pointRadius:10})})},setItemColor:function(t){this._currentEditLayer.styleMap=this._getStyleMap(t),this._currentEditLayer.redraw()},getCenterLonLat:function(){var t=new OpenLayers.Projection("EPSG:4326"),e=this.map.getProjectionObject();return this.map.getCenter().transform(e,t)},setCenterLonLat:function(t,e){var n=new OpenLayers.LonLat(t,e),i=new OpenLayers.Projection("EPSG:4326"),o=this.map.getProjectionObject();return this.map.panTo(n.transform(i,o))},setZoom:function(t){return this.map.zoomTo(t)},hasPoint:function(){return this.hasFeature("OpenLayers.Geometry.Point")},hasLine:function(){return this.hasFeature("OpenLayers.Geometry.LineString")},hasPolygon:function(){return this.hasFeature("OpenLayers.Geometry.Polygon")},hasFeature:function(e){return result=!1,t.each(this._currentVectorLayers,function(n,i){t.each(i.features,function(t,n){result=result||n.geometry.CLASS_NAME==e})}),result},exists:function(t){return"undefined"!=typeof t&&null!==t},getSavedZoom:function(){return this.options.zoom},getSavedCenter:function(){return this.options.center},saveViewport:function(){var t=this.map.getCenter(),e=this.map.getZoom();this.options.zoom=e,this.options.center={lon:t.lon,lat:t.lat}}})}(jQuery),function(t){t.widget("nlfeatures.editfeatures",{options:{markup:{geo_edit_class:"geo-edit",id_prefix:"nlf-"},animation:{fade_duration:500}},_createEditButton:function(e,n,i){var o=n.split(" ",1)[0];return t('")},_create:function(){var t=this,e=this.options.markup.id_prefix;"#"==e.charAt(0)&&(e=e.substr(1)),this.scaleButton=this._createEditButton(e,"scale-button radio-button sel-button","Scale"),this.rotateButton=this._createEditButton(e,"rotate-button radio-button sel-button","Rotate"),this.dragButton=this._createEditButton(e,"drag-button radio-button sel-button","Drag"),this.deleteButton=this._createEditButton(e,"delete-button sel-button","Delete"),this.viewportButton=this._createEditButton(e,"viewport-button","Save View"),this.element.append(this.dragButton),this.element.append(this.rotateButton),this.element.append(this.scaleButton),this.element.append(this.deleteButton),this.element.append(this.viewportButton),this.radioButtons=this.element.children("button.radio-button"),this.selectionButtons=this.element.children("button.sel-button"),this.radioButtons.data("activated",!1),this.disableAll(),this.element.bind({"select.nlfeatures":function(){t.enableAll()},"deselect.nlfeatures":function(){t.disableAll()}}),this.dragButton.bind({mousedown:function(){t.toggleButton(t.dragButton),t.triggerUpdateEvent()},click:function(t){t.preventDefault()}}),this.scaleButton.bind({mousedown:function(){t.toggleButton(t.scaleButton),t.triggerUpdateEvent()},click:function(t){t.preventDefault()}}),this.rotateButton.bind({mousedown:function(){t.toggleButton(t.rotateButton),t.triggerUpdateEvent()},click:function(t){t.preventDefault()}}),this.deleteButton.bind({mousedown:function(){t.element.trigger("delete.nlfeatures")},click:function(t){t.preventDefault()}}),this.viewportButton.bind({mousedown:function(){t.element.trigger("saveview.nlfeatures")},click:function(t){t.preventDefault()}})},showButtons:function(){this.element.children("button").css({display:"block !important",opacity:0}).stop().animate({opacity:1},this.options.animation.fade_duration),this.deactivateAllButtons()},hideButtons:function(){var t=this.element.children("button");t.stop().animate({opacity:0},this.options.markup.fade_duration,function(){t.css("display","none !important")})},deactivateAllButtons:function(){this.radioButtons.removeClass("primary").data("activated",!1)},disableAll:function(){this.selectionButtons.removeClass("primary").addClass("disabled"),this.selectionButtons.each(function(){this.disabled=!0})},enableAll:function(){this.selectionButtons.removeClass("disabled"),this.selectionButtons.each(function(){this.disabled=!1})},activateButton:function(t){this.deactivateAllButtons(),t.addClass("primary").data("activated",!0),this.element.trigger("lockfocus.nlfeatures")},deactivateButton:function(t){t.removeClass("primary").data("activated",!1),this.element.trigger("unlockfocus.nlfeatures")},toggleButton:function(t){t.data("activated")?this.deactivateButton(t):this.activateButton(t)},triggerUpdateEvent:function(){this.element.trigger("update.nlfeatures",[{drag:this.dragButton.data("activated"),rotate:this.rotateButton.data("activated"),scale:this.scaleButton.data("activated")}])}})}(jQuery),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var o in n)t.call(n,o)&&(e[o]=n[o]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};!function(t){var n,i,o,s,r,a,l;return s=function(t){return"#"===t[0]?t.slice(1,t.length):t},l=function(t){return null!=t?t.toString():""},r=function(t,e,n,i){var o,s,r;return null==n&&(n=null),null==i&&(i=100),o=0,s=null!=n&&0!==n?function(){return t()||o>=n}:t,r=function(){return s()?e():(o++,setTimeout(r,i))},setTimeout(r,i)},a=function(t){return null!=t?t.substr(t.indexOf("\n")+1):""},n=function(){function e(t){this.widget=t}return e.prototype.$=function(e){return t(e,this.parent)},e.prototype.value=function(){return this.widget.options.values},e.prototype.initMap=function(){var e,n,i,o,s,r,a,l;return this.map=this.fields.map,n=this.value(),i={title:"Coverage",name:"Coverage",id:this.widget.element.attr("id"),geo:null!=(s=null!=n?n.geo:void 0)?s:""},o={mode:this.widget.options.mode,json:i,markup:{id_prefix:this.widget.options.id_prefix}},o.zoom=null!=(r=null!=n?n.zoom:void 0)?r:null,o.center=null!=(a=null!=n?n.center:void 0)?a:null,o.base_layer=null!=(l=null!=n?n.base_layer:void 0)?l:null,e=t.extend(!0,{},this.widget.options.map_options,this.widget.options.values,o),this.map.nlfeatures(e),this.map},e}(),o=function(n){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.init=function(){return this.build(),this.initMap(),this.populate()},i.prototype.build=function(){var e,n,i,o;return e=t(this.widget.element),i=s(this.widget.options.id_prefix),o=t("
"),n=t("
"),e.addClass("nlfeatures").append(o).append(n),this.fields={map:t("#"+i+"map"),free:t("#"+i+"free")},e},i.prototype.populate=function(){var t,e;return t=this.widget.options.values.text,e=a(t),""===e?(this.fields.free.detach(),delete this.fields.free):this.fields.free.html(e)},i}(n),i=function(n){function i(){return i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.init=function(){return this.build(),this.initMap(),this.captureEditor(),this.populate(),this.wire()},i.prototype._buildMap=function(e,n){return t(e).addClass("nlfeatures").addClass("nlfeatures-edit").before('
\n
\n
\n
\n
\n
")},i.prototype._buildInputs=function(e,n,i){return t(e).after("\n\n\n\n\n\n')},i.prototype._buildUseMap=function(e,n,i,o){return t(".use-html",e.parent().parent()).after('')},i.prototype._populateFields=function(e,n){var i;return i=e.parent(),this.fields={map_container:i.find(".map-container"),map:t("#"+n+"map"),map_tools:i.find(".nlfeatures-map-tools"),mapon:t("#"+n+"mapon"),text:t("#"+n+"text"),free:t("#"+n+"free"),html:t("#"+n+"html"),geo:t("#"+n+"geo"),zoom:t("#"+n+"zoom"),center_lon:t("#"+n+"center_lon"),center_lat:t("#"+n+"center_lat"),base_layer:t("#"+n+"base_layer"),flash:i.find(".nlflash")}},i.prototype.build=function(){var e,n,i,o,r;return e=t(this.widget.element),n=s(this.widget.options.id_prefix),i=this.widget.options.name_prefix,o=this.widget.options.labels.html,r=this.widget.options.labels.map,this._buildMap(e,n),this._buildInputs(e,n,i),this._buildUseMap(e,n,i,r),this._populateFields(e,n),this},i.prototype.captureEditor=function(){return this.fields.mapon.change(function(t){return function(){return t._onUseMap()}}(this)),this.fields.html.change(function(t){return function(){return t._updateTinyEvents()}}(this))},i.prototype.populate=function(t){return null==t&&(t=this.widget.options.values),null!=t?(this.fields.html.prop("checked",+t.is_html),this.fields.mapon.prop("checked",+t.is_map),this.fields.geo.val(l(t.geo)),this.fields.zoom.val(l(t.zoom)),null!=t.center&&(this.fields.center_lon.val(l(t.center.lon)),this.fields.center_lat.val(l(t.center.lat))),this.fields.base_layer.val(l(t.base_layer)),this.fields.text.val(l(t.text)),this.fields.free.val(a(t.text))):void 0},i.prototype.wire=function(){var t;return t=function(t){return function(){return t.updateFields(t.fields.free.val())}}(this),this.fields.free.change(t),this.map.bind("featureadded.nlfeatures",t).bind("update.nlfeatures",t).bind("delete.nlfeatures",t).bind("refresh.nlfeatures",t).bind("saveview.nlfeatures",function(t){return function(){return t.map.nlfeatures("saveViewport"),t.updateFields(),t.flash("View Saved...")}}(this)),this.map.nlfeatures("getMap").events.on({changebaselayer:t})},i.prototype.usesHtml=function(){return this.fields.html.prop("checked")},i.prototype.usesMap=function(){return this.fields.mapon.prop("checked")},i.prototype.showMap=function(){var t;return t=this.fields.map.children("button"),t.hide("normal",function(e){return function(){return e.fields.map_container.slideDown("normal",function(){return t.fadeIn()})}}(this))},i.prototype.hideMap=function(){var t;return t=this.fields.map.children("button"),t.fadeOut("normal",function(t){return function(){return t.fields.map_container.slideUp()}}(this))},i.prototype._onUseMap=function(){return this.usesMap()?this.showMap():this.hideMap(),this.updateFields()},i.prototype._updateTinyEvents=function(){var t;return this.usesHtml()?(t=this.fields.free.attr("id"),r(function(){return null!=tinymce.get(t)},function(e){return function(){return e.fields.free.unbind("change"),tinymce.get(t).onChange.add(function(){return e.updateFields()})}}(this))):this.fields.free.change(function(t){return function(){return t.updateFields()}}(this))},i.prototype.updateFields=function(){var t,e,n,i,o;return n=this.map.nlfeatures("getWktForSave"),this.fields.geo.val(n),o=this.map.nlfeatures("getSavedZoom"),null!=o&&this.fields.zoom.val(o),e=this.map.nlfeatures("getSavedCenter"),null!=e&&(this.fields.center_lon.val(e.lon),this.fields.center_lat.val(e.lat)),t=this.map.nlfeatures("getBaseLayerCode"),null!=t&&this.fields.base_layer.val(t),i=this.usesHtml()?tinymce.get(this.fields.free.attr("id")).getContent():this.fields.free.val(),this.fields.text.val(""+n+"|"+o+"|"+(null!=e?e.lon:void 0)+"|"+(null!=e?e.lat:void 0)+"|"+t+"\n"+i)},i.prototype.flash=function(t,e){return null==e&&(e=5e3),this.fields.flash.html(t).fadeIn("slow",function(t){return function(){return setTimeout(function(){return t.fields.flash.fadeOut("slow")},e)}}(this))},i}(n),t.widget("nlfeatures.featurewidget",{options:{mode:"view",id_prefix:null,name_prefix:null,labels:{html:"Use HTML",map:"Use Map"},map_options:{},values:{geo:null,zoom:null,center:null,text:null,is_html:null,is_map:null}},_create:function(){var t,e,n;return t=this.element.attr("id"),null==(e=this.options).id_prefix&&(e.id_prefix="#"+t.substring(0,t.length-"widget".length)),null==(n=this.options).name_prefix&&(n.name_prefix=this._idPrefixToNamePrefix()),this.mode="edit"===this.options.mode?new i(this):new o(this),this.mode.init(),this.options.values.is_map?void 0:this.mode.hideMap()},_idPrefixToNamePrefix:function(t){var e,n,i,o;return null==t&&(t=this.options.id_prefix),t=deref(t),o=function(){var e,n,o,s;for(o=t.split("-"),s=[],e=0,n=o.length;n>e;e++)i=o[e],i.length>0&&s.push(i);return s}(),e=o.shift(),n=function(){var t,e,n;for(n=[],t=0,e=o.length;e>t;t++)i=o[t],n.push("["+i+"]");return n}(),""+e+n.join("")},destroy:function(){return t.Widget.prototype.destroy.call(this)},_setOptions:function(){return t.Widget.prototype._setOption.apply(this,arguments)}})}(jQuery)}.call(this); \ No newline at end of file +!function(t,e){t.widget("nlfeatures.nlfeatures",{options:{markup:{toolbar_class:"olControlEditingToolbar",id_prefix:"nlf-"},animation:{fade_duration:500},styles:{default_opacity:.4,default_color:"#ffb80e",select_point_radius:10,select_stroke_color:"#ea3a3a",point_graphic:{normal:e,selected:e}},map:{boundingBox:"90,0,-90,360",center:e,zoom:e,epsg:e,wmsAddress:e,raw_update:e},mode:null,json:null,zoom:null,center:null},_create:function(){this._instantiateOpenLayers(),this._currentVectorLayers=[],this._currentEditItem=null,this._currentEditLayer=null,this.clickedFeature=null,this.idToLayer={},this.requestData=null,"undefined"!=typeof this.options.json&&null!==this.options.json?(this.loadLocalData([this.options.json]),this.setViewport(),"edit"===this.options.mode&&this.editJson(this.options.json,!0)):this.loadData()},_instantiateOpenLayers:function(){OpenLayers.IMAGE_RELOAD_ATTEMTPS=3,OpenLayers.Util.onImageLoadErrorColor="transparent",OpenLayers.ImgPath="http://js.mapbox.com/theme/dark/";var t,n,i=!0;OpenLayers.IMAGE_RELOAD_ATTEMPTS=5,OpenLayers.DOTS_PER_INCH=25.4/.28,format=i?"image/png8":"image/png",this.options.map.boundingBox===e?t=new OpenLayers.Bounds:(n=this.options.map.boundingBox.split(","),t=new OpenLayers.Bounds(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3])));var o=this.options.map.epsg!==e?this.options.map.epsg[0]:"EPSG:4326",s=[new OpenLayers.Control.Attribution,new OpenLayers.Control.Navigation,new OpenLayers.Control.PanZoomBar];"edit"===this.options.mode&&(s=s.concat([new OpenLayers.Control.MousePosition,new OpenLayers.Control.LayerSwitcher]));var a={controls:s,maxExtent:t,maxResolution:"auto",projection:o,units:"m"};if(this.map=new OpenLayers.Map(this.element.attr("id"),a),this.options.map.wmsAddress!==e?this.baseLayer=new OpenLayers.Layer.WMS(this.options.name,this.options.map.wmsAddress,{LAYERS:this.options.map.layers,STYLES:"",format:"image/jpeg",tiled:!i,tilesOrigin:this.map.maxExtent.left+","+this.map.maxExtent.bottom},{buffer:0,displayOutsideMaxExtent:!0,isBaseLayer:!0}):(this.baseLayers=this._getBaseLayers(),this.baseLayer=this.baseLayers[this.options.base_layer]!==e?this.baseLayers[this.options.base_layer]:this.baseLayers.osm),this.map.addLayers([this.baseLayers.osm,this.baseLayers.gphy,this.baseLayers.gmap,this.baseLayers.ghyb,this.baseLayers.gsat]),this.baseLayers.swc!==e&&this.map.addLayers([this.baseLayers.stn,this.baseLayers.str,this.baseLayers.swc]),this.map.setBaseLayer(this.baseLayer),this.exists(this.options.default_map_bounds)&&(n=this.options.default_map_bounds.split(","),t=new OpenLayers.Bounds(parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3]))),this.options.map.center!==e){var r=this.options.map.zoom===e?3:this.options.map.zoom,l=new OpenLayers.LonLat(this.options.map.center[0],this.options.map.center[1]);this.map.setCenter(l,r)}else this.map.zoomToExtent(t)},getMap:function(){return this.map},_getBaseLayers:function(){var t={};if(t.gphy=new OpenLayers.Layer.Google("Google Physical",{type:google.maps.MapTypeId.TERRAIN}),t.gmap=new OpenLayers.Layer.Google("Google Streets",{numZoomLevels:20}),t.ghyb=new OpenLayers.Layer.Google("Google Hybrid",{type:google.maps.MapTypeId.HYBRID,numZoomLevels:20}),t.gsat=new OpenLayers.Layer.Google("Google Satellite",{type:google.maps.MapTypeId.SATELLITE,numZoomLevels:22}),t.osm=new OpenLayers.Layer.OSM,OpenLayers.Layer.Stamen!==e){var n='Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.';t.swc=new OpenLayers.Layer.Stamen("Stamen Watercolor",{provider:"watercolor",attribution:n,tileOptions:{crossOriginKeyword:null}}),t.stn=new OpenLayers.Layer.Stamen("Stamen Toner",{provider:"toner",attribution:n,tileOptions:{crossOriginKeyword:null}}),t.str=new OpenLayers.Layer.Stamen("Stamen Terrain",{provider:"terrain",attribution:n,tileOptions:{crossOriginKeyword:null}})}return t},loadData:function(){var n=this;this._resetData(),this.exists(this.requestData)&&this.requestData.abort(),this.options.dataSources!==e&&this.options.dataSources.maps!==e&&(this.requestData=t.ajax({url:this.options.dataSources.map,dataType:"json",success:function(t){n._buildVectorLayers(t),n._addClickControls(),n.exists(n._currentEditItem)&&n.editJson(n._currentEditItem,!0)}}))},loadLocalData:function(t){this._resetData(),this._buildVectorLayers(t),"edit"===this.options.mode&&this._addClickControls()},_resetData:function(){var e=this;this._removeControls(),t.each(this._currentVectorLayers,function(t,n){e.map.removeLayer(n),n.destroy()}),this._currentVectorLayers=[],this.idToLayer={}},_buildVectorLayers:function(n){var i=this,o=!1;this.idToLayer={},this.layerToId={},t.each(n,function(n,s){var a=s.id,r=""!==s.color?s.color:i.options.styles.default_color,l=i._getStyleMap(r),u=new OpenLayers.Layer.Vector(s.title,{styleMap:l});if(null!==s.geo&&s.geo!==e){var d=new OpenLayers.Format.KML,p=d.read(s.geo);if(0===p.length){var h=new OpenLayers.Format.WKT;t.each(s.geo.split("|"),function(t,n){if(h.read(n)!==e){var i=new OpenLayers.Geometry.fromWKT(n),o=new OpenLayers.Feature.Vector(i);p.push(o)}}),o=p.length>0}p.length>0&&u.addFeatures(p)}u.setMap(i.map),i.idToLayer[a]=u,i.layerToId[u.id]=a,i._currentVectorLayers.push(u),i.map.addLayer(u)}),o&&setTimeout(function(){i.element.trigger("refresh.nlfeatures")},250)},selectFeature:function(t){this.isFocusLocked()||(this.modifyFeatures.selectFeature(t),this.clickControl.highlight(t),this.listenToFeature(t),this.clickedFeature=t,this.element.trigger("select.nlfeatures",t))},getFeatureElement:function(e){var n;return n=("#"+e.geometry.id).replace(/\./g,"\\."),t(n)},listenToFeature:function(t){var e,n,i;e=t.id,n=this,i=this.getFeatureElement(t),i.on({mousedown:function(){n.lockFocus(t)},mouseup:function(){n.unlockFocus(t)}})},unlistenToFeature:function(t,n){var i;i=this,(null===n||n===e)&&(n=this.getFeatureElement(t)),n.off("mouseup").off("mousedown")},deselectFeature:function(t,n){(null===t||t===e)&&(t=this.clickedFeature),(!this.isFocusLocked(t)||n)&&(this.clickControl.unhighlight(t),this.modifyFeatures.unselectFeature(t),this.unlistenToFeature(t),this.resetModifyFeatures(),t.nlfeatures&&(t.nlfeatures.focusLocked=!1),t===this.clickedFeature&&(this.clickedFeature=null),this.element.trigger("deselect.nlfeatures",t))},lockFocus:function(t){(null===t||t===e)&&(t=this.clickedFeature),null!==t&&t!==e&&(null===t.nlfeatures||t.nlfeatures===e?t.nlfeatures={focusLocked:!0}:t.nlfeatures.focusLocked=!0)},unlockFocus:function(t){(null===t||t===e)&&(t=this.clickedFeature),null!==t&&t!==e&&null!==t.nlfeatures&&t.nlfeatures!==e&&(t.nlfeatures.focusLocked=!1)},isFocusLocked:function(t){return(null===t||t===e)&&(t=this.clickedFeature),null!==t&&t!==e&&null!==t.nlfeatures&&t.nlfeatures!==e&&t.nlfeatures.focusLocked},_addClickControls:function(){var t=this;this._removeControls(),this.clickControl=new OpenLayers.Control.SelectFeature(this._currentVectorLayers,{hover:!0,highlightOnly:!0,overFeature:function(n){(null===n.geometry.parent||n.geometry.parent===e)&&(t.modifyFeatures!==e&&null!==t.clickedFeature&&t.clickedFeature!==e&&n.id!==t.clickedFeature.id&&t.deselectFeature(),t.modifyFeatures===e||null!==t.clickedFeature&&t.clickedFeature!==e&&n.id===t.clickedFeature.id||t.selectFeature(n))},outFeature:function(){return!1}}),this.map.addControl(this.clickControl),this.clickControl.activate(),this.map.events.register("click",this.map,function(){null!==t.clickedFeature&&t.clickedFeature!==e&&t.deselectFeature(t.clickedFeature,!0)})},_removeControls:function(){this.modifyFeatures!==e&&(this.map.removeControl(this.modifyFeatures),this.modifyFeatures.destroy(),delete this.modifyFeatures),this.editToolbar!==e&&(this.map.removeControl(this.editToolbar),this.editToolbar.destroy(),delete this.editToolbar),this.clickControl!==e&&(this.map.removeControl(this.clickControl),this.clickControl.destroy(),delete this.clickControl),this.highlightControl!==e&&(this.map.removeControl(this.highlightControl),this.highlightControl.destroy(),delete this.highlightControl)},edit:function(t,e){var n={id:t.attr("recordid"),name:t.find("span.item-title-text").text()};this.editJson(n,e)},editJson:function(n,i){var o=this;this.highlightControl!==e&&this.highlightControl.deactivate();var s=n.id;if(this._currentEditLayer=this.idToLayer[s],this._currentEditId=s,this._currentEditItem=n,!this._currentEditLayer){var a=n.name;this._currentEditLayer=new OpenLayers.Layer.Vector(a),this.map.addLayer(this._currentEditLayer),this._currentEditLayer.setMap(this.map),this._currentVectorLayers.push(this._currentEditLayer),this.idToLayer[s]=this._currentEditLayer,this.layerToId[this._currentEditLayer.id]=s}var r=[new OpenLayers.Control.Navigation,new OpenLayers.Control.DrawFeature(this._currentEditLayer,OpenLayers.Handler.Path,{displayClass:"olControlDrawFeaturePath",featureAdded:function(){o.element.trigger("featureadded.nlfeatures")}}),new OpenLayers.Control.DrawFeature(this._currentEditLayer,OpenLayers.Handler.Point,{displayClass:"olControlDrawFeaturePoint",featureAdded:function(){o.element.trigger("featureadded.nlfeatures")}}),new OpenLayers.Control.DrawFeature(this._currentEditLayer,OpenLayers.Handler.Polygon,{displayClass:"olControlDrawFeaturePolygon",featureAdded:function(){o.element.trigger("featureadded.nlfeatures")}})];this.modifyFeatures=new OpenLayers.Control.ModifyFeature(this._currentEditLayer,{onModification:function(){o.element.trigger("featureadded.nlfeatures")},standalone:!0}),this.editToolbar=new OpenLayers.Control.Panel({defaultControl:r[0],displayClass:this.options.markup.toolbar_class}),this.editToolbar.addControls(r),this.map.addControl(this.editToolbar),this.map.addControl(this.modifyFeatures),this.modifyFeatures.activate(),this.element.editfeatures({markup:{id_prefix:this.options.markup.id_prefix}}),this.element.bind({"update.nlfeatures":function(t,e){o.modifyFeatures.mode=OpenLayers.Control.ModifyFeature.RESHAPE,e.rotate&&(o.modifyFeatures.mode|=OpenLayers.Control.ModifyFeature.ROTATE),e.scale&&(o.modifyFeatures.mode|=OpenLayers.Control.ModifyFeature.RESIZE),e.drag&&(o.modifyFeatures.mode|=OpenLayers.Control.ModifyFeature.DRAG),(e.drag||e.rotate)&&(o.modifyFeatures.mode&=-OpenLayers.Control.ModifyFeature.RESHAPE);var n=o.modifyFeatures.feature;o.exists(n)&&(o.modifyFeatures.unselectFeature(n),o.modifyFeatures.selectFeature(n))},"lockfocus.nlfeatures":function(){o.lockFocus()},"unlockfocus.nlfeatures":function(){o.unlockFocus()},"delete.nlfeatures":function(){if(o.modifyFeatures.feature){var t=o.modifyFeatures.feature;o.clickedFeature=null,o.modifyFeatures.unselectFeature(t),o._currentEditLayer.destroyFeatures([t])}}}),i?t("."+this.options.markup.toolbar_class).css("opacity",1):(this.element.editfeatures("showButtons",i),t("."+this.options.markup.toolbar_class).animate({opacity:1},this.options.animation.fade_duration)),this.options.map.raw_update!==e&&(this.options.map.raw_update,this.element.bind({"featureadded.nlfeatures":function(){o.updateRaw()},"update.nlfeatures":function(){o.updateRaw()},"delete.nlfeatures":function(){o.updateRaw()}}));var l=!1;t.each(this._currentEditLayer.features,function(t,e){e==o.clickedFeature&&(l=!0)}),l&&this.modifyFeatures.selectFeature(this.clickedFeature)},resetModifyFeatures:function(){this.modifyFeatures.mode=OpenLayers.Control.ModifyFeature.RESHAPE},editJsonItem:function(t){this.loadLocalData([t]),this.setViewport(),this.editJson(t,!0)},setViewport:function(){this.viewportOptionsValid()?this._setViewportFromOptions():this._setViewportFromData()},viewportOptionsValid:function(){var t=!0;return t=t&&null!==this.options.zoom&&this.options.zoom,t=t&&this.options.zoom>0,t=t&&null!==this.options.center&&this.options.center!==e,t=t&&null!==this.options.center.lon&&this.options.center.lon!==e,t=t&&null!==this.options.center.lat&&this.options.center.lat!==e,t=t&&!isNaN(parseFloat(this.options.center.lon)),t=t&&!isNaN(parseFloat(this.options.center.lat))},_setViewportFromOptions:function(){var t,n,i=this.options.zoom,o=this.options.center,s=new OpenLayers.LonLat(o.lon,o.lat);null!==o.srs&&o.srs!==e&&(n=new OpenLayers.Projection(o.srs),t=this.map.getProjectionObject(),s=s.transform(n,t)),this.map.setCenter(s,i,!1,!1)},_setViewportFromData:function(){var t,e,n,i,o,s,a,r,l,u;for(t=this,l=new OpenLayers.Bounds,e=0,i=this._currentVectorLayers.length,n=0;i>n;n++)for(o=this._currentVectorLayers[n],a=o.features.length,s=0;a>s;s++)e++,r=o.features[s].geometry,l.extend(r.getBounds());0===e?(u=new OpenLayers.Control.Geolocate({bind:!0,watch:!1}),u.events.on({locationfailed:function(){t.map.setCenter(new OpenLayers.LonLat(-8738850.21367,4584105.47978),3,!1,!1)}}),this.map.addControl(u),this.map.zoomTo(3),u.activate()):this.map.zoomToExtent(l,!1)},updateRaw:function(){var t=this.options.map.raw_update;if(this.exists(t)){var e=this.getWktForSave();e=e.replace(/\|/g,"|\n"),t.val(e)}},endEditWithoutSave:function(e,n){var i=t("."+this.options.markup.toolbar_class).clone();this.modifyFeatures.unselectFeature(this.clickedFeature),this.map.removeControl(this.modifyFeatures),this.map.removeControl(this.editToolbar),n||(this.element.editfeatures("hideButtons"),this.element.append(i),i.animate({opacity:0},this.options.animation.fade_duration,function(){i.remove()})),this._addClickControls(),0===this._currentEditLayer.features.length&&(this.map.removeLayer(this._currentEditLayer),this._currentVectorLayers.remove(this._currentEditLayer),delete this.idToLayer[e],delete this.layerToId[this._currentEditLayer.id],this._currentEditLayer=null),this._currentEditItem=null},getBaseLayerCode:function(){var t,e,n,i,o,s;for(s=this.map.baseLayer.name,n=null,i=["osm","gphy","gmap","ghyb","gsat","swc","stn","str"],o=0,e=i.length;e>o;o++)if(t=i[o],s===this.baseLayers[t].name){n=t;break}return n},getWktForSave:function(){var t=[];return this._getFeatures(function(e,n){t.push(n.geometry.toString())}),t.join("|")},getKml:function(){var t=new OpenLayers.Format.KML,e=[];return this._getFeatures(function(t,n){e.push(n)}),t.write(e)},_getFeatures:function(e){var n=this.exists(this.clickedFeature);n&&this.modifyFeatures.unselectFeature(this.clickedFeature),t.each(this._currentEditLayer.features,e),n&&this.modifyFeatures.selectFeature(this.clickedFeature)},getExtentForSave:function(){return this.map.getExtent().toString()},getZoomForSave:function(){return this.map.getZoom()},zoomToItemVectors:function(t){var e=this.idToLayer[t];this.exists(e)&&e.features.length>0&&this.map.zoomToExtent(e.getDataExtent())},_getStyleMap:function(t){return new OpenLayers.StyleMap({"default":new OpenLayers.Style({fillColor:t,fillOpacity:this.options.styles.default_opacity,strokeColor:t,strokeWidth:1,pointRadius:10}),select:new OpenLayers.Style({fillColor:t,fillOpacity:this.options.styles.default_opacity,strokeColor:this.options.styles.select_stroke_color,strokeWidth:2,pointRadius:10})})},setItemColor:function(t){this._currentEditLayer.styleMap=this._getStyleMap(t),this._currentEditLayer.redraw()},getCenterLonLat:function(){var t=new OpenLayers.Projection("EPSG:4326"),e=this.map.getProjectionObject();return this.map.getCenter().transform(e,t)},setCenterLonLat:function(t,e){var n=new OpenLayers.LonLat(t,e),i=new OpenLayers.Projection("EPSG:4326"),o=this.map.getProjectionObject();return this.map.panTo(n.transform(i,o))},setZoom:function(t){return this.map.zoomTo(t)},hasPoint:function(){return this.hasFeature("OpenLayers.Geometry.Point")},hasLine:function(){return this.hasFeature("OpenLayers.Geometry.LineString")},hasPolygon:function(){return this.hasFeature("OpenLayers.Geometry.Polygon")},hasFeature:function(e){return result=!1,t.each(this._currentVectorLayers,function(n,i){t.each(i.features,function(t,n){result=result||n.geometry.CLASS_NAME==e})}),result},exists:function(t){return"undefined"!=typeof t&&null!==t},getSavedZoom:function(){return this.options.zoom},getSavedCenter:function(){return this.options.center},saveViewport:function(){var t=this.map.getCenter(),e=this.map.getZoom();this.options.zoom=e,this.options.center={lon:t.lon,lat:t.lat}}})}(jQuery),function(t){t.widget("nlfeatures.editfeatures",{options:{markup:{geo_edit_class:"geo-edit",id_prefix:"nlf-"},animation:{fade_duration:500}},_createEditButton:function(e,n,i){var o=n.split(" ",1)[0];return t('")},_create:function(){var t=this,e=this.options.markup.id_prefix;"#"==e.charAt(0)&&(e=e.substr(1)),this.scaleButton=this._createEditButton(e,"scale-button radio-button sel-button","Scale"),this.rotateButton=this._createEditButton(e,"rotate-button radio-button sel-button","Rotate"),this.dragButton=this._createEditButton(e,"drag-button radio-button sel-button","Drag"),this.deleteButton=this._createEditButton(e,"delete-button sel-button","Delete"),this.viewportButton=this._createEditButton(e,"viewport-button","Save View"),this.element.append(this.dragButton),this.element.append(this.rotateButton),this.element.append(this.scaleButton),this.element.append(this.deleteButton),this.element.append(this.viewportButton),this.radioButtons=this.element.children("button.radio-button"),this.selectionButtons=this.element.children("button.sel-button"),this.radioButtons.data("activated",!1),this.disableAll(),this.element.bind({"select.nlfeatures":function(){t.enableAll()},"deselect.nlfeatures":function(){t.disableAll()}}),this.dragButton.bind({mousedown:function(){t.toggleButton(t.dragButton),t.triggerUpdateEvent()},click:function(t){t.preventDefault()}}),this.scaleButton.bind({mousedown:function(){t.toggleButton(t.scaleButton),t.triggerUpdateEvent()},click:function(t){t.preventDefault()}}),this.rotateButton.bind({mousedown:function(){t.toggleButton(t.rotateButton),t.triggerUpdateEvent()},click:function(t){t.preventDefault()}}),this.deleteButton.bind({mousedown:function(){t.element.trigger("delete.nlfeatures")},click:function(t){t.preventDefault()}}),this.viewportButton.bind({mousedown:function(){t.element.trigger("saveview.nlfeatures")},click:function(t){t.preventDefault()}})},showButtons:function(){this.element.children("button").css({display:"block !important",opacity:0}).stop().animate({opacity:1},this.options.animation.fade_duration),this.deactivateAllButtons()},hideButtons:function(){var t=this.element.children("button");t.stop().animate({opacity:0},this.options.markup.fade_duration,function(){t.css("display","none !important")})},deactivateAllButtons:function(){this.radioButtons.removeClass("primary").data("activated",!1)},disableAll:function(){this.selectionButtons.removeClass("primary").addClass("disabled"),this.selectionButtons.each(function(){this.disabled=!0})},enableAll:function(){this.selectionButtons.removeClass("disabled"),this.selectionButtons.each(function(){this.disabled=!1})},activateButton:function(t){this.deactivateAllButtons(),t.addClass("primary").data("activated",!0),this.element.trigger("lockfocus.nlfeatures")},deactivateButton:function(t){t.removeClass("primary").data("activated",!1),this.element.trigger("unlockfocus.nlfeatures")},toggleButton:function(t){t.data("activated")?this.deactivateButton(t):this.activateButton(t)},triggerUpdateEvent:function(){this.element.trigger("update.nlfeatures",[{drag:this.dragButton.data("activated"),rotate:this.rotateButton.data("activated"),scale:this.scaleButton.data("activated")}])}})}(jQuery),function(){var t={}.hasOwnProperty,e=function(e,n){function i(){this.constructor=e}for(var o in n)t.call(n,o)&&(e[o]=n[o]);return i.prototype=n.prototype,e.prototype=new i,e.__super__=n.prototype,e};!function(t){var n,i,o,s,a,r,l,u,d;return s=function(t){return"#"===t[0]?t.slice(1,t.length):t},l=function(t){return null!=t?t.toString():""},a=function(t,e,n,i){var o,s,a;return null==n&&(n=null),null==i&&(i=100),o=0,s=null!=n&&0!==n?function(){return t()||o>=n}:t,a=function(){return s()?e():(o++,setTimeout(a,i))},setTimeout(a,i)},r=function(t){return null!=t?t.substr(t.indexOf("\n")+1):""},n=function(){function e(t){this.widget=t}return e.prototype.$=function(e){return t(e,this.parent)},e.prototype.value=function(){return this.widget.options.values},e.prototype.initMap=function(){var e,n,i,o,s,a,r,l;return this.map=this.fields.map,n=this.value(),i={title:"Coverage",name:"Coverage",id:this.widget.element.attr("id"),geo:null!=(s=null!=n?n.geo:void 0)?s:""},o={mode:this.widget.options.mode,json:i,markup:{id_prefix:this.widget.options.id_prefix}},o.zoom=null!=(a=null!=n?n.zoom:void 0)?a:null,o.center=null!=(r=null!=n?n.center:void 0)?r:null,o.base_layer=null!=(l=null!=n?n.base_layer:void 0)?l:null,e=t.extend(!0,{},this.widget.options.map_options,this.widget.options.values,o),this.map.nlfeatures(e),this.map},e}(),o=function(n){function i(){return u=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.init=function(){return this.build(),this.initMap(),this.populate()},i.prototype.build=function(){var e,n,i,o;return e=t(this.widget.element),i=s(this.widget.options.id_prefix),o=t("
"),n=t("
"),e.addClass("nlfeatures").append(o).append(n),this.fields={map:t("#"+i+"map"),free:t("#"+i+"free")},e},i.prototype.populate=function(){var t,e;return t=this.widget.options.values.text,e=r(t),""===e?(this.fields.free.detach(),delete this.fields.free):this.fields.free.html(e)},i}(n),i=function(n){function i(){return d=i.__super__.constructor.apply(this,arguments)}return e(i,n),i.prototype.init=function(){return this.build(),this.initMap(),this.captureEditor(),this.populate(),this.wire()},i.prototype._buildMap=function(e,n){return t(e).addClass("nlfeatures").addClass("nlfeatures-edit").before('
\n
\n
\n
\n
\n
")},i.prototype._buildInputs=function(e,n,i){return t(e).after("\n\n\n\n\n\n')},i.prototype._buildUseMap=function(e,n,i,o){return t(".use-html",e.parent().parent()).after('')},i.prototype._populateFields=function(e,n){var i;return i=e.parent(),this.fields={map_container:i.find(".map-container"),map:t("#"+n+"map"),map_tools:i.find(".nlfeatures-map-tools"),mapon:t("#"+n+"mapon"),text:t("#"+n+"text"),free:t("#"+n+"free"),html:t("#"+n+"html"),geo:t("#"+n+"geo"),zoom:t("#"+n+"zoom"),center_lon:t("#"+n+"center_lon"),center_lat:t("#"+n+"center_lat"),base_layer:t("#"+n+"base_layer"),flash:i.find(".nlflash")}},i.prototype.build=function(){var e,n,i,o,a;return e=t(this.widget.element),n=s(this.widget.options.id_prefix),i=this.widget.options.name_prefix,o=this.widget.options.labels.html,a=this.widget.options.labels.map,this._buildMap(e,n),this._buildInputs(e,n,i),this._buildUseMap(e,n,i,a),this._populateFields(e,n),this},i.prototype.captureEditor=function(){var t=this;return this.fields.mapon.change(function(){return t._onUseMap()}),this.fields.html.change(function(){return t._updateTinyEvents()})},i.prototype.populate=function(t){return null==t&&(t=this.widget.options.values),null!=t?(this.fields.html.prop("checked",+t.is_html),this.fields.mapon.prop("checked",+t.is_map),this.fields.geo.val(l(t.geo)),this.fields.zoom.val(l(t.zoom)),null!=t.center&&(this.fields.center_lon.val(l(t.center.lon)),this.fields.center_lat.val(l(t.center.lat))),this.fields.base_layer.val(l(t.base_layer)),this.fields.text.val(l(t.text)),this.fields.free.val(r(t.text))):void 0},i.prototype.wire=function(){var t,e=this;return t=function(){return e.updateFields(e.fields.free.val())},this.fields.free.change(t),this.map.bind("featureadded.nlfeatures",t).bind("update.nlfeatures",t).bind("delete.nlfeatures",t).bind("refresh.nlfeatures",t).bind("saveview.nlfeatures",function(){return e.map.nlfeatures("saveViewport"),e.updateFields(),e.flash("View Saved...")}),this.map.nlfeatures("getMap").events.on({changebaselayer:t})},i.prototype.usesHtml=function(){return this.fields.html.prop("checked")},i.prototype.usesMap=function(){return this.fields.mapon.prop("checked")},i.prototype.showMap=function(){var t,e=this;return t=this.fields.map.children("button"),t.hide("normal",function(){return e.fields.map_container.slideDown("normal",function(){return t.fadeIn()})})},i.prototype.hideMap=function(){var t,e=this;return t=this.fields.map.children("button"),t.fadeOut("normal",function(){return e.fields.map_container.slideUp()})},i.prototype._onUseMap=function(){return this.usesMap()?this.showMap():this.hideMap(),this.updateFields()},i.prototype._updateTinyEvents=function(){var t,e=this;return this.usesHtml()?(t=this.fields.free.attr("id"),a(function(){return null!=tinymce.get(t)},function(){return e.fields.free.unbind("change"),tinymce.get(t).onChange.add(function(){return e.updateFields()})})):this.fields.free.change(function(){return e.updateFields()})},i.prototype.updateFields=function(){var t,e,n,i,o;return n=this.map.nlfeatures("getWktForSave"),this.fields.geo.val(n),o=this.map.nlfeatures("getSavedZoom"),null!=o&&this.fields.zoom.val(o),e=this.map.nlfeatures("getSavedCenter"),null!=e&&(this.fields.center_lon.val(e.lon),this.fields.center_lat.val(e.lat)),t=this.map.nlfeatures("getBaseLayerCode"),null!=t&&this.fields.base_layer.val(t),i=this.usesHtml()?tinymce.get(this.fields.free.attr("id")).getContent():this.fields.free.val(),this.fields.text.val(""+n+"|"+o+"|"+(null!=e?e.lon:void 0)+"|"+(null!=e?e.lat:void 0)+"|"+t+"\n"+i)},i.prototype.flash=function(t,e){var n=this;return null==e&&(e=5e3),this.fields.flash.html(t).fadeIn("slow",function(){return setTimeout(function(){return n.fields.flash.fadeOut("slow")},e)})},i}(n),t.widget("nlfeatures.featurewidget",{options:{mode:"view",id_prefix:null,name_prefix:null,labels:{html:"Use HTML",map:"Use Map"},map_options:{},values:{geo:null,zoom:null,center:null,text:null,is_html:null,is_map:null}},_create:function(){var t,e,n;return t=this.element.attr("id"),null==(e=this.options).id_prefix&&(e.id_prefix="#"+t.substring(0,t.length-"widget".length)),null==(n=this.options).name_prefix&&(n.name_prefix=this._idPrefixToNamePrefix()),this.mode="edit"===this.options.mode?new i(this):new o(this),this.mode.init(),this.options.values.is_map?void 0:this.mode.hideMap()},_idPrefixToNamePrefix:function(t){var e,n,i,o;return null==t&&(t=this.options.id_prefix),t=deref(t),o=function(){var e,n,o,s;for(o=t.split("-"),s=[],e=0,n=o.length;n>e;e++)i=o[e],i.length>0&&s.push(i);return s}(),e=o.shift(),n=function(){var t,e,n;for(n=[],t=0,e=o.length;e>t;t++)i=o[t],n.push("["+i+"]");return n}(),""+e+n.join("")},destroy:function(){return t.Widget.prototype.destroy.call(this)},_setOptions:function(){return t.Widget.prototype._setOption.apply(this,arguments)}})}(jQuery)}.call(this); \ No newline at end of file diff --git a/views/shared/javascripts/neatline-features-2.0.2.js b/views/shared/javascripts/neatline-features-2.0.3.js similarity index 96% rename from views/shared/javascripts/neatline-features-2.0.2.js rename to views/shared/javascripts/neatline-features-2.0.3.js index 653cbba..83c8092 100644 --- a/views/shared/javascripts/neatline-features-2.0.2.js +++ b/views/shared/javascripts/neatline-features-2.0.3.js @@ -1627,13 +1627,13 @@ -// Generated by CoffeeScript 1.7.1 +// Generated by CoffeeScript 1.6.3 (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; (function($) { - var BaseWidget, EditWidget, ViewWidget, derefid, poll, stripFirstLine, to_s; + var BaseWidget, EditWidget, ViewWidget, derefid, poll, stripFirstLine, to_s, _ref, _ref1; derefid = function(id) { if (id[0] === '#') { return id.slice(1, id.length); @@ -1722,7 +1722,8 @@ __extends(ViewWidget, _super); function ViewWidget() { - return ViewWidget.__super__.constructor.apply(this, arguments); + _ref = ViewWidget.__super__.constructor.apply(this, arguments); + return _ref; } ViewWidget.prototype.init = function() { @@ -1764,7 +1765,8 @@ __extends(EditWidget, _super); function EditWidget() { - return EditWidget.__super__.constructor.apply(this, arguments); + _ref1 = EditWidget.__super__.constructor.apply(this, arguments); + return _ref1; } EditWidget.prototype.init = function() { @@ -1822,16 +1824,13 @@ }; EditWidget.prototype.captureEditor = function() { - this.fields.mapon.change((function(_this) { - return function() { - return _this._onUseMap(); - }; - })(this)); - return this.fields.html.change((function(_this) { - return function() { - return _this._updateTinyEvents(); - }; - })(this)); + var _this = this; + this.fields.mapon.change(function() { + return _this._onUseMap(); + }); + return this.fields.html.change(function() { + return _this._updateTinyEvents(); + }); }; EditWidget.prototype.populate = function(values) { @@ -1854,20 +1853,17 @@ }; EditWidget.prototype.wire = function() { - var updateFields; - updateFields = (function(_this) { - return function() { - return _this.updateFields(_this.fields.free.val()); - }; - })(this); + var updateFields, + _this = this; + updateFields = function() { + return _this.updateFields(_this.fields.free.val()); + }; this.fields.free.change(updateFields); - this.map.bind('featureadded.nlfeatures', updateFields).bind('update.nlfeatures', updateFields).bind('delete.nlfeatures', updateFields).bind('refresh.nlfeatures', updateFields).bind('saveview.nlfeatures', (function(_this) { - return function() { - _this.map.nlfeatures('saveViewport'); - _this.updateFields(); - return _this.flash('View Saved...'); - }; - })(this)); + this.map.bind('featureadded.nlfeatures', updateFields).bind('update.nlfeatures', updateFields).bind('delete.nlfeatures', updateFields).bind('refresh.nlfeatures', updateFields).bind('saveview.nlfeatures', function() { + _this.map.nlfeatures('saveViewport'); + _this.updateFields(); + return _this.flash('View Saved...'); + }); return this.map.nlfeatures('getMap').events.on({ changebaselayer: updateFields }); @@ -1882,25 +1878,23 @@ }; EditWidget.prototype.showMap = function() { - var tools; + var tools, + _this = this; tools = this.fields.map.children('button'); - return tools.hide('normal', (function(_this) { - return function() { - return _this.fields.map_container.slideDown('normal', function() { - return tools.fadeIn(); - }); - }; - })(this)); + return tools.hide('normal', function() { + return _this.fields.map_container.slideDown('normal', function() { + return tools.fadeIn(); + }); + }); }; EditWidget.prototype.hideMap = function() { - var tools; + var tools, + _this = this; tools = this.fields.map.children('button'); - return tools.fadeOut('normal', (function(_this) { - return function() { - return _this.fields.map_container.slideUp(); - }; - })(this)); + return tools.fadeOut('normal', function() { + return _this.fields.map_container.slideUp(); + }); }; EditWidget.prototype._onUseMap = function() { @@ -1913,25 +1907,22 @@ }; EditWidget.prototype._updateTinyEvents = function() { - var freeId; + var freeId, + _this = this; if (this.usesHtml()) { freeId = this.fields.free.attr('id'); return poll(function() { return tinymce.get(freeId) != null; - }, (function(_this) { - return function() { - _this.fields.free.unbind('change'); - return tinymce.get(freeId).onChange.add(function() { - return _this.updateFields(); - }); - }; - })(this)); - } else { - return this.fields.free.change((function(_this) { - return function() { + }, function() { + _this.fields.free.unbind('change'); + return tinymce.get(freeId).onChange.add(function() { return _this.updateFields(); - }; - })(this)); + }); + }); + } else { + return this.fields.free.change(function() { + return _this.updateFields(); + }); } }; @@ -1961,16 +1952,15 @@ }; EditWidget.prototype.flash = function(msg, delay) { + var _this = this; if (delay == null) { delay = 5000; } - return this.fields.flash.html(msg).fadeIn('slow', (function(_this) { - return function() { - return setTimeout(function() { - return _this.fields.flash.fadeOut('slow'); - }, delay); - }; - })(this)); + return this.fields.flash.html(msg).fadeIn('slow', function() { + return setTimeout(function() { + return _this.fields.flash.fadeOut('slow'); + }, delay); + }); }; return EditWidget; @@ -2017,11 +2007,11 @@ } id_prefix = deref(id_prefix); parts = (function() { - var _i, _len, _ref, _results; - _ref = id_prefix.split('-'); + var _i, _len, _ref2, _results; + _ref2 = id_prefix.split('-'); _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - p = _ref[_i]; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + p = _ref2[_i]; if (p.length > 0) { _results.push(p); } @@ -2051,4 +2041,6 @@ }).call(this); -//# sourceMappingURL=featureswidget.map +/* +//@ sourceMappingURL=featureswidget.map +*/ From a5c734d01ba3253467e2d14ef8792cfc4983b8e8 Mon Sep 17 00:00:00 2001 From: Eric Rochester Date: Mon, 16 Jun 2014 16:02:21 -0400 Subject: [PATCH 6/8] Updated i18n. --- languages/de_DE.mo | Bin 573 -> 597 bytes languages/de_DE.po | 8 ++++---- languages/en_US.mo | Bin 497 -> 586 bytes languages/en_US.po | 6 +++--- languages/es.mo | Bin 545 -> 569 bytes languages/es.po | 6 +++--- languages/fi_FI.mo | Bin 509 -> 532 bytes languages/fi_FI.po | 2 +- languages/fr.mo | Bin 550 -> 574 bytes languages/fr.po | 8 ++++---- languages/it_IT.mo | Bin 507 -> 530 bytes languages/it_IT.po | 2 +- languages/nl_BE.mo | Bin 563 -> 586 bytes languages/nl_BE.po | 4 ++-- languages/pt_BR.mo | Bin 558 -> 555 bytes languages/pt_BR.po | 4 ++-- languages/ru.mo | Bin 636 -> 660 bytes languages/ru.po | 8 ++++---- 18 files changed, 24 insertions(+), 24 deletions(-) diff --git a/languages/de_DE.mo b/languages/de_DE.mo index 1b855acaba600518bed7b2801727855a87411060..e7303d17f603394eec35ac05c687cfd971046c6b 100644 GIT binary patch delta 86 zcmdnXa+PI*4)0q=28Kum1_oXrcAscjDDIbOm+A(jON&yA^)ri$OH+#{uCnJf n)-^QLH8M~zG`2D}*!azyQP7%;!6`Mbw4^Fk!8@_2B$WXGLX{b< delta 62 zcmcc0vX^Co4)0Y)28Kum1_oXr)}LruIPsu8uaT~Sg|3l_f}y3AiP>geMsr31E(WL6 QywZ}YR0Z$EqLNew0MJtpHvj+t diff --git a/languages/de_DE.po b/languages/de_DE.po index 577695b..a3a8622 100644 --- a/languages/de_DE.po +++ b/languages/de_DE.po @@ -1,20 +1,20 @@ # Translation for the Neatline Time plugin for Omeka. # # Translators: -# , 2012. +# Martin Liebeskind , 2012 msgid "" msgstr "" "Project-Id-Version: Neatline\n" -"Report-Msgid-Bugs-To: http://github.com/scholarslab/\n" +"Report-Msgid-Bugs-To: http://github.com/scholarslab/NeatlineFeatures/issues\n" "POT-Creation-Date: 2012-06-25 10:00-0500\n" -"PO-Revision-Date: 2012-08-24 19:46+0000\n" +"PO-Revision-Date: 2013-11-20 13:30+0000\n" "Last-Translator: Martin Liebeskind \n" "Language-Team: German (Germany) (http://www.transifex.com/projects/p/neatline/language/de_DE/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: de_DE\n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: views/shared/coverage.php:28 msgid "Use Map" diff --git a/languages/en_US.mo b/languages/en_US.mo index eb52ead460dc6b40c991472b7e3f0dd471c3c9cf..891183b43793e10cbdf9c6cb9197c03ac4403193 100644 GIT binary patch delta 159 zcmey!e2Qg)4&Mt#28Kum1_pK@c4C@nRUqz{npl#PnV0GYq)UrZi}f>$i%V0BC$6&R zHP$sW)HO0tFf_I@HkkO$Bg{1~Jtwm`LqQ`nFS8^yMIpE(u_U!vQ$Zu6q@=(~U%$M( zT(6`kF|Rl?Eww@~IX_pwpeR2pHMyi%zd%0^YLR|UVqSV_VtT56YF>P3u)gNxAjbIs D$|*H~ delta 70 zcmX@b@{xIh4qrbb14ASO0|Pq{zhs\n" -"Language-Team: LANGUAGE \n" +"Language-Team: English (United States) (http://www.transifex.com/projects/p/neatline/language/en_US/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/languages/es.mo b/languages/es.mo index ea0ee1b1fa63c92d31435f4bf3e4aa3e281071d6..69cf00dd5ef3f5a77d4f149e97dde789a001ce3f 100644 GIT binary patch delta 85 zcmZ3;vXfOm+A(jON&yA^)ri$OH+#{uCnJf m)-^QLH8M~zG`2D}*!WF`QNWsuA+$KLNFg;x!8frWkpTb#02o;S delta 61 zcmdnVvXEth4(~2T28Kum1_mA=7MW;SIPsu8uaT~Sxvrs+f}x3(q4{QBMj1waE{4$J P#3F^%90lLRf\n" "Language-Team: Spanish (http://www.transifex.com/projects/p/neatline/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: views/shared/coverage.php:28 msgid "Use Map" diff --git a/languages/fi_FI.mo b/languages/fi_FI.mo index 1e3104cbf6bdd0cab5a9e3815c77786d732545f9..53c704872aae8496fdfd95247b20c46a18828ac1 100644 GIT binary patch delta 39 tcmey%JcVU~3gfMbs;T0Bsfi^ynR%&hK)SRjwOBv1xVSX6cw<*FBLFMM4?_R| delta 15 XcmbQj@|Ssn3gh94s;L_n7Bd0>Fa-tj diff --git a/languages/fi_FI.po b/languages/fi_FI.po index ebff40f..22b5154 100644 --- a/languages/fi_FI.po +++ b/languages/fi_FI.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Neatline\n" -"Report-Msgid-Bugs-To: http://github.com/scholarslab/\n" +"Report-Msgid-Bugs-To: http://github.com/scholarslab/NeatlineFeatures/issues\n" "POT-Creation-Date: 2012-06-25 10:00-0500\n" "PO-Revision-Date: 2012-06-25 15:51+0000\n" "Last-Translator: FULL NAME \n" diff --git a/languages/fr.mo b/languages/fr.mo index 49a5185ccfecf6fda41de2ebda1b715f116eb7aa..eb2e967e05a8af850d1f01709cf2cee52a76ead9 100644 GIT binary patch delta 89 zcmZ3+vX5ng4)0|~28Kum1_l8j)}3fsDDIbOm+A(jON&yA^)ri$OH+#{uCnJf q)-^QLH8M~zG`2D}*!WGBQN)^yA+#hjC$l)UNFgUxp&%zQj{yL4MjB86 delta 65 zcmdnTvW#Vd4)1P828Kum1_l8j7M*BWIPsu8uaT~Sg|302f}x3(vFT=BMp;H-E{4#O T%$&^P)FOqPRE2_^#5@K7={XP1 diff --git a/languages/fr.po b/languages/fr.po index 4431b76..bc835c8 100644 --- a/languages/fr.po +++ b/languages/fr.po @@ -1,20 +1,20 @@ # Translation for the Neatline Time plugin for Omeka. # # Translators: -# , 2012. +# katinalynn , 2012 msgid "" msgstr "" "Project-Id-Version: Neatline\n" -"Report-Msgid-Bugs-To: http://github.com/scholarslab/\n" +"Report-Msgid-Bugs-To: http://github.com/scholarslab/NeatlineFeatures/issues\n" "POT-Creation-Date: 2012-06-25 10:00-0500\n" -"PO-Revision-Date: 2012-08-01 14:35+0000\n" +"PO-Revision-Date: 2013-11-20 13:30+0000\n" "Last-Translator: katinalynn \n" "Language-Team: French (http://www.transifex.com/projects/p/neatline/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1)\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" #: views/shared/coverage.php:28 msgid "Use Map" diff --git a/languages/it_IT.mo b/languages/it_IT.mo index 78981db6d8fea03af28bcec356d737f47e8bc228..7be7290ff20e4fed50da1dffbf746d1059b4d271 100644 GIT binary patch delta 39 tcmey(Jc(t33geB5s;T0Bsfi^ynR%&hK)SRjwOBv1xVSX6cw<)~BLFJv4?6$= delta 15 XcmbQl@|$^r3gf|vs;L_n7BT_=FS!Nk diff --git a/languages/it_IT.po b/languages/it_IT.po index 4900ebc..e78bd20 100644 --- a/languages/it_IT.po +++ b/languages/it_IT.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Neatline\n" -"Report-Msgid-Bugs-To: http://github.com/scholarslab/\n" +"Report-Msgid-Bugs-To: http://github.com/scholarslab/NeatlineFeatures/issues\n" "POT-Creation-Date: 2012-06-25 10:00-0500\n" "PO-Revision-Date: 2012-06-25 15:51+0000\n" "Last-Translator: FULL NAME \n" diff --git a/languages/nl_BE.mo b/languages/nl_BE.mo index 7e208d721abc254f66977d168fa97c1e7f5e53fc..8750733e64f8b57b970f8a3a6e6d0f7bf841c801 100644 GIT binary patch delta 66 zcmdnYa*Abw4(}sI28Kum1_oXrwwY*IDDIbOm+A(jON&yA^)ri$OH+#{u5#oy TG}JXRP%t#MGB()w&6W`Wc0Lo{ delta 43 xcmX@bvYBOq4)1A328Kum1_oXrR-I^BIPst(w}F|ik+FiInU#^nW?n{HMgZWe384T0 diff --git a/languages/nl_BE.po b/languages/nl_BE.po index 6ca650f..f5fdab9 100644 --- a/languages/nl_BE.po +++ b/languages/nl_BE.po @@ -5,9 +5,9 @@ msgid "" msgstr "" "Project-Id-Version: Neatline\n" -"Report-Msgid-Bugs-To: http://github.com/scholarslab/\n" +"Report-Msgid-Bugs-To: http://github.com/scholarslab/NeatlineFeatures/issues\n" "POT-Creation-Date: 2012-06-25 10:00-0500\n" -"PO-Revision-Date: 2013-06-23 16:28+0000\n" +"PO-Revision-Date: 2013-11-20 13:30+0000\n" "Last-Translator: Sam Alloing \n" "Language-Team: Dutch (Belgium) (http://www.transifex.com/projects/p/neatline/language/nl_BE/)\n" "MIME-Version: 1.0\n" diff --git a/languages/pt_BR.mo b/languages/pt_BR.mo index 090d23ad9bcfb518a286e3bbcb19e3c798753d1b..12098c88796f7edd5ce44efe853be6e6402c5ba1 100644 GIT binary patch delta 30 kcmZ3-vYKUr4)0M$28Kum1_o{*mY-<(nlWUv1|u6I0BgwxVE_OC delta 33 ncmZ3@vW{hf4(|y@28Kum1_o{*R+?z}nx!N$H*>QpBO4lzyB8W|`U8e16~Z2XqM$Y?z|j7bdu{JRxF delta 49 zcmbQj`iEtL4(~rk28Kum1_osyj+kg!IPsu8uaT~Sg|3l_f}y#Uq3LE`#stR6c}!{m DHE0Xm diff --git a/languages/ru.po b/languages/ru.po index fe576e0..b97e69d 100644 --- a/languages/ru.po +++ b/languages/ru.po @@ -1,20 +1,20 @@ # Translation for the Neatline Time plugin for Omeka. # # Translators: -# , 2012. +# Oguljan , 2012 msgid "" msgstr "" "Project-Id-Version: Neatline\n" -"Report-Msgid-Bugs-To: http://github.com/scholarslab/\n" +"Report-Msgid-Bugs-To: http://github.com/scholarslab/NeatlineFeatures/issues\n" "POT-Creation-Date: 2012-06-25 10:00-0500\n" -"PO-Revision-Date: 2012-08-24 17:15+0000\n" +"PO-Revision-Date: 2013-11-20 13:30+0000\n" "Last-Translator: Oguljan \n" "Language-Team: Russian (http://www.transifex.com/projects/p/neatline/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ru\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: views/shared/coverage.php:28 msgid "Use Map" From 1780565e02557bf2dbedaa585632dfcb45d09ba1 Mon Sep 17 00:00:00 2001 From: Eric Rochester Date: Mon, 16 Jun 2014 16:02:31 -0400 Subject: [PATCH 7/8] Don't run translations in parallel. --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 7395153..8da9cd1 100644 --- a/Rakefile +++ b/Rakefile @@ -146,7 +146,7 @@ task :update_pot do pot_duplicates = Tempfile.new("-duplicates.pot") pot_duplicates.close - files.pmap do |filename| + files.each do |filename| sh %{xgettext -L php --from-code=utf-8 -k__ --flag=__:1:pass-php-format --omit-header -F -o #{pot_temp.path} #{filename}} end From 393522899f1f4b464d3f9cfe28c876034f9a78c4 Mon Sep 17 00:00:00 2001 From: Eric Rochester Date: Mon, 16 Jun 2014 16:07:04 -0400 Subject: [PATCH 8/8] Updated database. --- features/data/db-dump.sql.gz | Bin 7227 -> 7214 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/features/data/db-dump.sql.gz b/features/data/db-dump.sql.gz index 8d91df211448a09e356e897140ec20e684e1b1a4..733ef24340fb5c66b39144c892b9c94717e6a773 100644 GIT binary patch literal 7214 zcmV+}9MR(+iwFQ;PM=c%1LZwwcjGpapSOPnHeaO9!nR1sSI^6PacuR(Z+!IF?#)c5 z_o*Qgk{I)99SEXwVf*6t=z3<3q9P^b%4ptQ5YE}w4ye8Jp2h?&*f zwfc;md1;n-W46D0uxlN2Hi;4zrH{~h%({<92cv_*+c!Hq@E`j*O0##&j~wC8pvd5# zGm(k0NaZ^g1@c}X)Xt0k!JfA=nahO1C-tK6-xNk~-t2wr z`Q+y0^lo@Ff~wK!#rg2+?uQ?LY^rA8@BLxz2sgvqj~92hOG6a(tH!v#xH!2xzrKRf z)z$D6i#S9>_3{W;Czr!pmS>YAv#qa3zdOGij()wq8p4oOc^OuNb^fE*d)MoAG)&JL z={S&UV_RLwmxwm4F_t!VW^FLmV{xtln9%;Ffvj)K43NivijxMjy zaGhn5v#PRlbv-)ycy~Se&yx$l52*U<@aEcBq-8CPb#;9=ye$T!vKmcQDt|H=nYel6M7}Sb445(fjD6mm-CTcQcPBqx4B7d6HvG%^EpSHz@ZvgC zF_-ShNk@+F$&e(6{lI?w(V2-vIGIdFsm#j8B{DTa{h*oW^k#T+H!SdKz=n0-F!tGV zKQk}Px>oNk%fr;0hSFs~6?XOU;(`&4&#z#pOOP6l9pZfKd(LN;dEpaw9K5Z-seK{^ zlFeNWAzW8A2QtkB=$vZ0v*G&_5G~f}!9P3nA0zff4yL|AhRzGc zIgw73xTEYTmY>;NB#1|MA9@!o#}-(w;?GK)LlGEV?fw1LeQRpKm8p|>G43ZwvwX}} zbz3cw$~-CYQfPG5UoCaD^>u5H%d%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