Skip to content

@dgraversen /x
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
SCN Search
noun_scnsearch_type = new CmdUtils.NounType( "scn search type",
["all" ,"library" ,"downloads","codesamples" ,"media", "forums","weblog", "wiki","help","ossnotes","teched"]);
CmdUtils.CreateCommand({
name: "scn-search",
description: "Search SCthis.typemapN",
takes: { query: noun_arb_text},
modifiers: {in: noun_scnsearch_type},
typemap: {"all":"sdn_all","library":"sdn_library","downloads":"sdn_downloads" ,"codesamples":"sdn_codesamples" ,"media":"sdn_media", "forums":"sdn_forums_rm" ,"weblog":"sdn_weblog","wiki":"sdn_wiki",
"help":"sdn_help", "ossnotes":"sdn_ossnotes", "teched":"sdn_teched_all"},
preview: function( pblock, query, modifiers) {
pblock.innerHTML = "Search SDN for : " + query.text ;
if (modifiers.in != null) {
pblock.innerHTML += " in "+ modifiers.in.text;
}
},
execute: function( query, modifiers) {
var url = "https://www.sdn.sap.com/irj/sdn/advancedsearch?query={QUERY}";
var urlString = url.replace("{QUERY}", query.text.replace(" ","+" ));
if (modifiers.in) {
urlString += "&cat=" + this.typemap[modifiers.in.text];
}
Utils.openUrlInBrowser(urlString);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.