This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
6 Replies Last post: Feb 9, 2010 5:35 PM by Karanam Subbarao  
Karanam Subbarao Newbie 7 posts since
Feb 8, 2010
Currently Being Moderated

Feb 8, 2010 2:18 PM

Is there a tutorial on step by step implementation of developing plugin

All,

I 'm beginner to teamcity and have begun to explore how to write plugins.

 

What I wanted to acheieve is

   1.Hide the top Navigation Bar when I click on a project (Projects, Build Queue, myChanges should be hidden)

 

 

I was looking at page.tag and I knew how to acheive it. Currently I''m taking a parameter called displayHeader which will be set to false. If it it set to false, then I will not add the following code in page.tag

 

 

 

<c:if test="${empty sessionScope['displayHeader'] or sessionScope['displayHeader'] =='true'}"> 
     <script type="text/javascript">
      if (topNavPane) {
             topNavPane.showIn('tabsContainer');
             BS.AllProjectsPopup.install();
      }
      if (userPanelNav) {
        userPanelNav.showIn('userPanel');
      }     
    </script>

 

  </c:if>

 

How do I write a plugin so that all jsp's will point to new page.tag rather than System page.tag..

 

Any team city guru's help will be appreciated...

 

Thanks

Subbarao

Pavel Sher JetBrains 2,148 posts since
Mar 6, 2008
Currently Being Moderated
Feb 8, 2010 5:55 PM in response to: Karanam Subbarao
Re: Is there a tutorial on step by step implementation of developing plugin

Some useful information about plugin development in TeamCity can be obtained here: http://confluence.jetbrains.net/display/TCD5/Extending+TeamCity

 

In your case I think you can write an extension for page header, (see http://confluence.jetbrains.net/display/TCD5/Web+UI+Extensions) which will hide navigation tab using JavaScript. page.tag itself can't be modified programmatically, that is why JS way is better.

Pavel Sher JetBrains 2,148 posts since
Mar 6, 2008
Currently Being Moderated
Feb 9, 2010 3:35 PM in response to: Karanam Subbarao
Re: Is there a tutorial on step by step implementation of developing plugin

Try to use BS.Util.hide or Prototype's Element.hide instead of BS.Hider. Actually, BS.Hider is not for hiding divs, it solves different tasks (in spite of its name).

If it won't work, please ensure your plugin is loaded by TeamCity (it should be mentioned in teamcity-server.log on startup).

Pavel Sher JetBrains 2,148 posts since
Mar 6, 2008
Currently Being Moderated
Feb 9, 2010 3:38 PM in response to: Karanam Subbarao
Re: Is there a tutorial on step by step implementation of developing plugin

Please take a look at samplePlugin.zip bundled with TeamCity distribution. While it does not contain exact solution for your task, it contains some examples of page extensions which might be useful.

More Like This

  • Retrieving data ...