Skip to content

Commit

Permalink
Заготовки для ведомости
Browse files Browse the repository at this point in the history
  • Loading branch information
filippov70 committed Jul 14, 2014
1 parent f1060ef commit 5ccd9a4
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions public_html/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

function parseWKT (){
shape = OpenLayers.Geometry.fromWKT($('.coord-area')[0].textContent);
var shape = OpenLayers.Geometry.fromWKT($('.coord-area')[0].textContent);
if (shape.CLASS_NAME === 'OpenLayers.Geometry.Polygon') {
console.log('OpenLayers.Geometry.Polygon');
}
Expand All @@ -39,7 +39,23 @@ function parseWKT (){

var newLink = $(this).find("a");
newLink.attr("target", "_blank");
window.open(newLink.attr("href"));
var report = window.open(newLink.attr("href"));
//report.document.body.innerHTML = '<h1>Yes!</h1>';
writeCoordReport(report.document);
}

function writeCoordReport (newDocument) {
// css

// html
newDocument.body.innerHTML = '<table class=\'coord-report\'></table>';

var row = $('<tr/>');
row.addClass('coord-report-data-row');
row.append($('<td/>').html('some data'));


$('.coord-report').append(row);
}
//require.config = {
// baseUrl: 'js',
Expand Down

0 comments on commit 5ccd9a4

Please sign in to comment.