Changeset 742
- Timestamp:
- 10/01/10 14:59:39 (14 years ago)
- Location:
- MDService2/trunk/MDService2
- Files:
-
- 2 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/WebContent/scripts/mdservice2_ui.js
r741 r742 63 63 $("#serverqs").attr("data",JSON.stringify(json)); 64 64 loadQuerysets(json["WorkspaceProfile"]["Querysets"],"server"); 65 }); 66 67 65 }); 66 68 67 // USER WORKSPACEPROFILE 69 68 jQuery.getJSON("/MDService2/workspaceprofile/user",function(data){ … … 72 71 loadQuerysets(jsonw["WorkspaceProfile"]["Querysets"],"user"); 73 72 }); 74 75 76 73 77 74 … … 700 697 $("#left-menu").accordion({ header: "h2",event: 'click' }); 701 698 $("#left-menu").accordion('option', 'autoHeight', false); 699 700 // hack to open the accordion without scroll-bars on init 701 $("#left-menu").accordion('option', 'active', 1); 702 703 702 704 //$("#main-menu").treeview(); 703 705 … … 989 991 } 990 992 createQueriesUI(jsonq, qs); 993 991 994 /* $('#qs_select').find("option").remove(); 992 995 -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_model.js
r741 r742 120 120 121 121 for( var i=0;i<arr_and.length;i++){ 122 arr_and[i] = arr_and[i].trim();122 arr_and[i] = $.trim(arr_and[i]); 123 123 var arr_or = arr_and[i].split(" or "); 124 124 /* … … 133 133 simple_form = ""; 134 134 for( var j=0;j<arr_or.length;j++){ 135 arr_or[j] = arr_or[j].trim();135 arr_or[j] = $.trim(arr_or[j]); 136 136 while (arr_or[j].substring(0,1) == "(" ) { 137 137 arr_or[j] = arr_or[j].substring(1,arr_or[j].length); 138 arr_or[j] = arr_or[j].trim();138 arr_or[j] = $.trim(arr_or[j]); 139 139 } 140 140 while ( arr_or[j].substring(arr_or[j].length-1) == ")"){ 141 141 arr_or[j] = arr_or[j].substring(0,arr_or[j].length-1); 142 arr_or[j] = arr_or[j].trim();142 arr_or[j] = $.trim(arr_or[j]); 143 143 } 144 144 if (j > 0) { -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_searchclause.js
r692 r742 385 385 screl = ""; 386 386 for( var i=0;i<arr_and.length;i++){ 387 var scstring = arr_and[i].trim();387 var scstring = $.trim(arr_and[i]); 388 388 389 389 if (scstring.substring(0,1) == "(" && scstring.substring(scstring.length-1) == ")") { 390 390 scstring = scstring.substring(1,scstring.length-1); 391 scstring = scstring.trim();391 scstring = $.trim(scstring); 392 392 } 393 393 /* … … 401 401 if (i > 0) {screl = "and";} 402 402 for( var j=0;j<arr_or.length;j++){ 403 var scstr = arr_or[j].trim();403 var scstr = $.trim(arr_or[j]); 404 404 /* 405 405 if (scstr.substring(0,1) == "(" && scstr.substring(scstr.length-1) == ")") { -
MDService2/trunk/MDService2/WebContent/style/cmds-ui.css
r739 r742 24 24 25 25 label, .cmds-elem-prop .label { font-size: 0.9em; color: #014172; font-style: italic; } 26 ul { padding-left: 4px; list-style-type: none; }26 ul { padding-left: 4px; list-style-type: none; margin: 0;} 27 27 li { background: url('imgs/icon-dot-4.png') no-repeat; background-position: 0px 5px; padding-left: 8px; } 28 28 a img { border:0; } … … 75 75 76 76 /* form#searchretrieve { margin-top: 12px;} */ 77 #input-simplequery { width: 85%; margin: 12px 0px 6px 0px; font-size: 1.2em} 77 /* hack for IE */ 78 .wwFormTable {width: 100%; } 79 #input-simplequery { width: 85%; margin: 12px 0px 6px 0px; font-size: 1.2em;} 78 80 #submit-query {} 79 81 #searchclauselist {margin: 12px 0px;} -
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/Admin.java
r627 r742 9 9 import java.util.Properties; 10 10 11 import net.sf.json.JSON; 12 import net.sf.json.JSONSerializer; 13 import net.sf.json.xml.XMLSerializer; 14 11 15 import eu.clarin.cmdi.mdservice.model.Query; 12 16 … … 34 38 //System.out.println(cmdreg.listComponents()); 35 39 36 37 loadConfig(config_path); 38 39 40 testJSON(); 41 42 //loadConfig(config_path); 43 44 /* 40 45 //Query q = new Query("dc.title=dino or dinosaur", Query.RECORDSET); 41 46 //Query q = new Query("( ( Date any 2005 ) or ( Date any 2001 ) ) and ( ( Description any part ) )", Query.RECORDSET); … … 43 48 //System.out.println(q.toXCQL()); 44 49 System.out.println(q.toXPath()); 45 50 */ 46 51 //Query q = new Query("CMD", "cmdIndex"); 47 52 … … 233 238 } 234 239 235 240 public static void testJSON() { 241 Admin.notifyUser("JSON TEST"); 242 String str = "{'name':'JSON','integer':1,'double':2.0,'boolean':true,'nested':{'id':42},'array':[1,2,3]}"; 243 Query q = new Query("dc.title=dino or dinosaur", Query.RECORDSET); 244 JSON json = JSONSerializer.toJSON( str); 245 XMLSerializer xmlSerializer = new XMLSerializer(); 246 String xml = xmlSerializer.write( json ); 247 Admin.notifyUser(xml); 236 248 } 237 249 238 250 } 251 252 -
MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/WorkspaceAction.java
r728 r742 147 147 try{ 148 148 url=file.toURL(); 149 Admin.notifyUser(" JSON TEST: url" + url);149 Admin.notifyUser("DEBUG: WorkspaceAction.getBaseURL(): " + url); 150 150 } catch (MalformedURLException e){ 151 151 Admin.notifyUser("JSON exception has been caught" + e); -
MDService2/trunk/MDService2/src/struts.xml
r715 r742 30 30 31 31 32 33 34 35 32 <action name="collections/*" class="eu.clarin.cmdi.mdservice.action.CollectionProxyAction" method="execute"> 36 33 <param name="format">{1}</param> -
MDService2/trunk/MDService2/src/xsl/cmd_commons.xsl
r685 r742 155 155 156 156 <!-- Stop includes --> 157 158 159 <xsl:variable name="term_matrix" > 160 161 <xsl:for-each select="//CMD_Element" > 162 <xsl:variable name="comp_path" select="my:comppath(.)" > 163 <!-- <xsl:for-each select="ancestor::CMD_Component" > 164 <xsl:value-of select="@name" />.</xsl:for-each>--> 165 </xsl:variable> 166 <Term elem="{@name}" datcat="{@ConceptLink}" profile="{ancestor::profileDescription[1]/name}" 167 parent="{ancestor::CMD_Component[1]/@name}" comppath="{$comp_path}" > 168 <xsl:copy-of select="." /> 169 </Term> 170 </xsl:for-each> 171 172 </xsl:variable> 157 173 158 174 -
MDService2/trunk/MDService2/src/xsl/complist2view.xsl
r568 r742 53 53 </xsl:when> 54 54 <xsl:when test="$format='complist2htmlselect'" > 55 <select id="profile-select" >55 <select id="profile-select" class="cmds-ui-elem-stretch"> 56 56 <xsl:apply-templates select="/*/*" mode="select"/> 57 57 </select> -
MDService2/trunk/MDService2/src/xsl/dcif2view.xsl
r568 r742 122 122 123 123 <xsl:template match="dcif:dataCategory" mode="list"> 124 <li> 124 <li><div class="cmds-elem-plus"> 125 125 <span><a href="{my:rewriteURL(@pid)}" > 126 126 <xsl:value-of select="@name" /></a></span> … … 129 129 <xsl:value-of select="@type" />,<xsl:value-of select="@owner" /> 130 130 </div> 131 </div> 131 132 </li> 132 133 </xsl:template> … … 156 157 157 158 </xsl:variable> 158 <div class=" elem{$has_text}" >159 <span class=" elem_name"><xsl:value-of select="name()" />159 <div class="cmds-elem-prop value-{$has_text}" > 160 <span class="label"><xsl:value-of select="name()" /> 160 161 <xsl:if test="@xml:lang" >(<xsl:value-of select="@xml:lang" />)</xsl:if>: </span> 161 <span class=" elem_value"><xsl:value-of select="text()" /></span>162 <span class="value"><xsl:value-of select="text()" /></span> 162 163 <xsl:apply-templates select="*" /> 163 164 </div> -
MDService2/trunk/MDService2/src/xsl/mdset2view.xsl
r704 r742 166 166 </xsl:for-each> 167 167 --> 168 168 169 169 <xsl:for-each select="$columns/*"> 170 170 <!-- <td ><xsl:value-of select="$curr_cmd//*[name()=current()]" /></td> --> 171 172 <td >171 <xsl:variable name="curr_col_xpath" select="@xpath" /> 172 <td> 173 173 <xsl:for-each select="$curr_cmd"> 174 <xsl:value-of select="saxon:evaluate(concat('.//', $curr_col_xpath))" /> 174 <xsl:variable name="elems" select="saxon:evaluate(concat('.//', $curr_col_xpath))" /> 175 <xsl:choose> 176 <xsl:when test="count($elems) > 1" > 177 <ul> 178 <xsl:for-each select="$elems" > 179 <li><xsl:value-of select="." /></li> 180 </xsl:for-each> 181 </ul> 182 </xsl:when> 183 <xsl:otherwise> 184 <xsl:value-of select="$elems" /> 185 </xsl:otherwise> 186 </xsl:choose> 187 188 189 175 190 </xsl:for-each> 176 191 </td> … … 180 195 181 196 182 183 197 </xsl:stylesheet> -
MDService2/trunk/MDService2/src/xsl/params.xsl
r685 r742 4 4 5 5 6 <xsl:param name="format" select="'htmlpag e'"/> <!-- table|list -->6 <xsl:param name="format" select="'htmlpag'"/> <!-- table|list --> 7 7 <xsl:param name="display_values_limit" select="10" /> 8 8 <xsl:param name="max_depth" select="0" />
Note: See TracChangeset
for help on using the changeset viewer.