Re: [pmapper-users] search one layer
It works Thanks a lot! Bogumił W dniu 2014-07-23 20:38, Armin Burger pisze: > $.extend(PM.Query, > { > createSearchItems: function(url) { > $.ajax({ > url: url, > dataType: "json", > success: function(response){ > var searchJson = response.searchJson; > var action = response.action; > > if (action == 'searchitem') { > PM.Query.createSearchInput(searchJson); > } else { > delete searchJson.options[0]; > var searchHtml = PM.Query.json2Select(searchJson, "0"); > $('#searchoptions').html(searchHtml); > PM.Query.setSearchInput(); > $('#searchoptions').html(_p("Search > for")).css({"white-space": "nowrap"}); > } > }, > error: function (XMLHttpRequest, textStatus, errorThrown) { > if (window.console) console.log(errorThrown); > } > }); > } > > }); -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users
Re: [pmapper-users] search one layer
I suppose some error in brackets (syntax error). I am trying to find... Bogumil W dniu 2014-07-23 20:38, Armin Burger pisze: > Ok, the change event is not applied if no change happens... Try the > following for the custom.js which should also improve the labels and > logic in this case: > > $.extend(PM.Query, > { > createSearchItems: function(url) { > $.ajax({ > url: url, > dataType: "json", > success: function(response){ > var searchJson = response.searchJson; > var action = response.action; > > if (action == 'searchitem') { > PM.Query.createSearchInput(searchJson); > } else { > delete searchJson.options[0]; > var searchHtml = PM.Query.json2Select(searchJson, "0"); > $('#searchoptions').html(searchHtml); > PM.Query.setSearchInput(); > $('#searchoptions').html(_p("Search > for")).css({"white-space": "nowrap"}); > } > }, > error: function (XMLHttpRequest, textStatus, errorThrown) { > if (window.console) console.log(errorThrown); > } > }); > } > > }); > > > On 07/23/2014 08:58 AM, Bogumił Szady wrote: >> Hello, >> Thanks. I have tried to insert this modification. >> I see my layer defined, but without white box on the right to put the >> search attribute. >> Where is the the problem? >> >> best >> >> Bogumił >> >> >> W dniu 2014-07-22 23:11, Armin Burger pisze: >>> not a very elegant solution, but should work: >>> >>> add the following block at the end of your >>>/config/[your-config]/custom.js >>> file >>> >>> $.extend(PM.Query, >>> { >>> createSearchItems: function(url) { >>> $.ajax({ >>> url: url, >>> dataType: "json", >>> success: function(response){ >>> var searchJson = response.searchJson; >>> var action = response.action; >>> >>> //--- >>> delete searchJson.options[0]; >>> //--- >>> >>> if (action == 'searchitem') { >>> PM.Query.createSearchInput(searchJson); >>> } else { >>> var searchHtml = PM.Query.json2Select(searchJson, >>> "0"); >>> $('#searchoptions').html(searchHtml); >>> } >>> }, >>> error: function (XMLHttpRequest, textStatus, errorThrown) { >>> if (window.console) console.log(errorThrown); >>> } >>> }); >>> } >>> >>> }); >>> >>> >>> >>> >>> or use >>> >>> //--- >>> if (Object.keys(searchJson.options).length < 3) { >>> delete searchJson.options[0]; >>> } >>> //--- >>> >>> to do this just in case the search has just 1 layer defined for search, >>> in case you once will add another one you don't remember what you once >>> modified... >>> >>> >>> On 07/22/2014 07:25 PM, Bogumił Szady wrote: Hello, Is it possible to get one default search field turned on in the moment of starting of application window? I have only one layer to search and I would like to avoid every time selecting layer to search. all the best Bogumił -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users >>> -- >>> Want fast and easy access to all the code in your enterprise? Index and >>> search up to 200,000 lines of code with a free copy of Black Duck >>> Code Sight - the same software that powers the world's largest code >>> search on Ohloh, the Black Duck Open Hub! Try it now. >>> http://p.sf.net/sfu/bds >>> ___ >>> pmapper-users mailing list >>> pmapper-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/pmapper-users >> -- >> Want fast and easy access to all the code in your enterprise? Index
Re: [pmapper-users] search one layer
I have tried and it doesn't work. Like before I have normal "search for" label and then I have to select my one layer to search. :( Bogumił W dniu 2014-07-23 20:38, Armin Burger pisze: > Ok, the change event is not applied if no change happens... Try the > following for the custom.js which should also improve the labels and > logic in this case: > > $.extend(PM.Query, > { > createSearchItems: function(url) { > $.ajax({ > url: url, > dataType: "json", > success: function(response){ > var searchJson = response.searchJson; > var action = response.action; > > if (action == 'searchitem') { > PM.Query.createSearchInput(searchJson); > } else { > delete searchJson.options[0]; > var searchHtml = PM.Query.json2Select(searchJson, "0"); > $('#searchoptions').html(searchHtml); > PM.Query.setSearchInput(); > $('#searchoptions').html(_p("Search > for")).css({"white-space": "nowrap"}); > } > }, > error: function (XMLHttpRequest, textStatus, errorThrown) { > if (window.console) console.log(errorThrown); > } > }); > } > > }); > > > On 07/23/2014 08:58 AM, Bogumił Szady wrote: >> Hello, >> Thanks. I have tried to insert this modification. >> I see my layer defined, but without white box on the right to put the >> search attribute. >> Where is the the problem? >> >> best >> >> Bogumił >> >> >> W dniu 2014-07-22 23:11, Armin Burger pisze: >>> not a very elegant solution, but should work: >>> >>> add the following block at the end of your >>>/config/[your-config]/custom.js >>> file >>> >>> $.extend(PM.Query, >>> { >>> createSearchItems: function(url) { >>> $.ajax({ >>> url: url, >>> dataType: "json", >>> success: function(response){ >>> var searchJson = response.searchJson; >>> var action = response.action; >>> >>> //--- >>> delete searchJson.options[0]; >>> //--- >>> >>> if (action == 'searchitem') { >>> PM.Query.createSearchInput(searchJson); >>> } else { >>> var searchHtml = PM.Query.json2Select(searchJson, >>> "0"); >>> $('#searchoptions').html(searchHtml); >>> } >>> }, >>> error: function (XMLHttpRequest, textStatus, errorThrown) { >>> if (window.console) console.log(errorThrown); >>> } >>> }); >>> } >>> >>> }); >>> >>> >>> >>> >>> or use >>> >>> //--- >>> if (Object.keys(searchJson.options).length < 3) { >>> delete searchJson.options[0]; >>> } >>> //--- >>> >>> to do this just in case the search has just 1 layer defined for search, >>> in case you once will add another one you don't remember what you once >>> modified... >>> >>> >>> On 07/22/2014 07:25 PM, Bogumił Szady wrote: Hello, Is it possible to get one default search field turned on in the moment of starting of application window? I have only one layer to search and I would like to avoid every time selecting layer to search. all the best Bogumił -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users >>> -- >>> Want fast and easy access to all the code in your enterprise? Index and >>> search up to 200,000 lines of code with a free copy of Black Duck >>> Code Sight - the same software that powers the world's largest code >>> search on Ohloh, the Black Duck Open Hub! Try it now. >>> http://p.sf.net/sfu/bds >>> ___ >>> pmapper-users mailing list >>> pmapper-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/pmapper-users >> -- >> Want
Re: [pmapper-users] search one layer
Ok, the change event is not applied if no change happens... Try the following for the custom.js which should also improve the labels and logic in this case: $.extend(PM.Query, { createSearchItems: function(url) { $.ajax({ url: url, dataType: "json", success: function(response){ var searchJson = response.searchJson; var action = response.action; if (action == 'searchitem') { PM.Query.createSearchInput(searchJson); } else { delete searchJson.options[0]; var searchHtml = PM.Query.json2Select(searchJson, "0"); $('#searchoptions').html(searchHtml); PM.Query.setSearchInput(); $('#searchoptions').html(_p("Search for")).css({"white-space": "nowrap"}); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { if (window.console) console.log(errorThrown); } }); } }); On 07/23/2014 08:58 AM, Bogumił Szady wrote: > Hello, > Thanks. I have tried to insert this modification. > I see my layer defined, but without white box on the right to put the > search attribute. > Where is the the problem? > > best > > Bogumił > > > W dniu 2014-07-22 23:11, Armin Burger pisze: >> not a very elegant solution, but should work: >> >> add the following block at the end of your >> /config/[your-config]/custom.js >> file >> >> $.extend(PM.Query, >> { >>createSearchItems: function(url) { >>$.ajax({ >>url: url, >>dataType: "json", >>success: function(response){ >>var searchJson = response.searchJson; >>var action = response.action; >> >>//--- >>delete searchJson.options[0]; >>//--- >> >>if (action == 'searchitem') { >>PM.Query.createSearchInput(searchJson); >>} else { >>var searchHtml = PM.Query.json2Select(searchJson, >> "0"); >>$('#searchoptions').html(searchHtml); >>} >>}, >>error: function (XMLHttpRequest, textStatus, errorThrown) { >>if (window.console) console.log(errorThrown); >>} >>}); >>} >> >> }); >> >> >> >> >> or use >> >>//--- >>if (Object.keys(searchJson.options).length < 3) { >>delete searchJson.options[0]; >>} >>//--- >> >> to do this just in case the search has just 1 layer defined for search, >> in case you once will add another one you don't remember what you once >> modified... >> >> >> On 07/22/2014 07:25 PM, Bogumił Szady wrote: >>> Hello, >>> Is it possible to get one default search field turned on in the moment >>> of starting of application window? >>> I have only one layer to search and I would like to avoid every time >>> selecting layer to search. >>> >>> >>> all the best >>> >>> Bogumił >>> >>> -- >>> Want fast and easy access to all the code in your enterprise? Index and >>> search up to 200,000 lines of code with a free copy of Black Duck >>> Code Sight - the same software that powers the world's largest code >>> search on Ohloh, the Black Duck Open Hub! Try it now. >>> http://p.sf.net/sfu/bds >>> ___ >>> pmapper-users mailing list >>> pmapper-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/pmapper-users >>> >> -- >> Want fast and easy access to all the code in your enterprise? Index and >> search up to 200,000 lines of code with a free copy of Black Duck >> Code Sight - the same software that powers the world's largest code >> search on Ohloh, the Black Duck Open Hub! Try it now. >> http://p.sf.net/sfu/bds >> ___ >> pmapper-users mailing list >> pmapper-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/pmapper-users > > -- > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > ___ > pmapper-users mailing list > pmapper-users@lists.sourceforg
Re: [pmapper-users] search one layer
Hello, Thanks. I have tried to insert this modification. I see my layer defined, but without white box on the right to put the search attribute. Where is the the problem? best Bogumił W dniu 2014-07-22 23:11, Armin Burger pisze: > not a very elegant solution, but should work: > > add the following block at the end of your > /config/[your-config]/custom.js > file > > $.extend(PM.Query, > { > createSearchItems: function(url) { > $.ajax({ > url: url, > dataType: "json", > success: function(response){ > var searchJson = response.searchJson; > var action = response.action; > > //--- > delete searchJson.options[0]; > //--- > > if (action == 'searchitem') { > PM.Query.createSearchInput(searchJson); > } else { > var searchHtml = PM.Query.json2Select(searchJson, "0"); > $('#searchoptions').html(searchHtml); > } > }, > error: function (XMLHttpRequest, textStatus, errorThrown) { > if (window.console) console.log(errorThrown); > } > }); > } > > }); > > > > > or use > > //--- > if (Object.keys(searchJson.options).length < 3) { > delete searchJson.options[0]; > } > //--- > > to do this just in case the search has just 1 layer defined for search, > in case you once will add another one you don't remember what you once > modified... > > > On 07/22/2014 07:25 PM, Bogumił Szady wrote: >> Hello, >> Is it possible to get one default search field turned on in the moment >> of starting of application window? >> I have only one layer to search and I would like to avoid every time >> selecting layer to search. >> >> >> all the best >> >> Bogumił >> >> -- >> Want fast and easy access to all the code in your enterprise? Index and >> search up to 200,000 lines of code with a free copy of Black Duck >> Code Sight - the same software that powers the world's largest code >> search on Ohloh, the Black Duck Open Hub! Try it now. >> http://p.sf.net/sfu/bds >> ___ >> pmapper-users mailing list >> pmapper-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/pmapper-users >> > -- > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > ___ > pmapper-users mailing list > pmapper-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pmapper-users -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users
Re: [pmapper-users] search one layer
not a very elegant solution, but should work: add the following block at the end of your /config/[your-config]/custom.js file $.extend(PM.Query, { createSearchItems: function(url) { $.ajax({ url: url, dataType: "json", success: function(response){ var searchJson = response.searchJson; var action = response.action; //--- delete searchJson.options[0]; //--- if (action == 'searchitem') { PM.Query.createSearchInput(searchJson); } else { var searchHtml = PM.Query.json2Select(searchJson, "0"); $('#searchoptions').html(searchHtml); } }, error: function (XMLHttpRequest, textStatus, errorThrown) { if (window.console) console.log(errorThrown); } }); } }); or use //--- if (Object.keys(searchJson.options).length < 3) { delete searchJson.options[0]; } //--- to do this just in case the search has just 1 layer defined for search, in case you once will add another one you don't remember what you once modified... On 07/22/2014 07:25 PM, Bogumił Szady wrote: > Hello, > Is it possible to get one default search field turned on in the moment > of starting of application window? > I have only one layer to search and I would like to avoid every time > selecting layer to search. > > > all the best > > Bogumił > > -- > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > ___ > pmapper-users mailing list > pmapper-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pmapper-users > -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users
[pmapper-users] search one layer
Hello, Is it possible to get one default search field turned on in the moment of starting of application window? I have only one layer to search and I would like to avoid every time selecting layer to search. all the best Bogumił -- Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds ___ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users