[Movecommons-commits] r631 - trunk/src
Mario Gallegos
mgallegos at ourproject.org
Sat Jun 29 21:32:15 CEST 2013
Author: mgallegos
Date: 2013-06-29 21:32:14 +0200 (Sat, 29 Jun 2013)
New Revision: 631
Modified:
trunk/src/mc-dia-form2.js
Log:
FEEDBACK - Enhancement #460: Generate icons and semantic code
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2013-06-28 20:23:37 UTC (rev 630)
+++ trunk/src/mc-dia-form2.js 2013-06-29 19:32:14 UTC (rev 631)
@@ -579,16 +579,14 @@
$j('#sixth_step').slideDown();
}
- function generate_sematic_code(){
-
+ function generate_sematic_code(){
var code='<div id="move-commons-badge"><div xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:mc="http://movecommons.org/ns#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" about="http://comunes.org" typeof="mc:Collective"></div>';
- var pText='Move Commons',comma='';
+ var pText='Move Commons',comma='',nonProfitcode='',reproduciblecode='',grassrootsCode='',reinforcingCode='';
code+='<div property="foaf:name" content="'+$j("#ininame").val()+'"></div>';//name
code+='<div rel="foaf:homepage" href="'+$j("#url").val()+'"></div>';//web address
code+=commasToLanguages($j("#languages").val());
code+='<div rel="mc:locationActivity" resource="'+$j("#location").val()+'"></div>';
-
- nonProfitcode='';
+
if($j('#np-checkbox').val()=='S'){
pText+=comma+' Non-Profit';
comma=',';
@@ -603,7 +601,6 @@
nonProfitCode='<div rel="mc:howToHelpPage" href="'+$j("#how-to-help-website").val()+'"></div>';
}
- reproduciblecode='';
if($j('#rp-checkbox').val()=='S'){
pText+=comma+' Reproducible';
comma=',';
@@ -624,7 +621,6 @@
reproducibleCode+='<div rel="mc:sharesFundingSource" href="'+$j("#funding-sources-website").val()+'"></div>';
}
- grassrootsCode='';
if($j('#gr-checkbox').val()=='S'){
pText+=comma+' Representative';
comma=',';
@@ -637,7 +633,6 @@
grassrootsCode+='<div rel="mc:focusesIn" resource="[mc:Digital]"></div>';
}
- reinforcingCode='';
if($j('#rc-checkbox').val()=='S'){
code+='<div rel="mc:moveCommonsType" resource="[mc:ReinforcesCommons]"></div>';
if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rcec60.png'){
@@ -652,13 +647,12 @@
}else{
reinforcingCode+='<div rel="mc:focusesIn" resource="[mc:Digital]"></div>';//DIGITAL COMMONS
pText+=comma+' Reinforcing the Ecology Commons';
- }
+ }
}
code=code+nonProfitcode+reproduciblecode+grassrootsCode+reinforcingCode;
code+=commasToKeywords($j("#keywords").val());
code+='<a href="http://movecommons.org/en/np-rp-rc.ec-rs/0.1<img src="http://movecommons.org/mc/0.1/images/" alt="'+pText+'" /></a><p>'+pText+'</p>'
-
$j('#semantic_code').val(code);
}
More information about the Movecommons-commits
mailing list