if ($user->usesPlugin($this->name)) {
echo '<p>';
$arr_t = array();
- if ($user->usesTooltips()) {
- $arr_t[] = array('title' => _('Manage your mantisbt account and follow your tickets'));
- } else {
- $arr_t[] = array();
- }
+ $arr_t[] = array('title' => _('Manage your mantisbt account and follow your tickets'), 'class' => 'tabtitle');
echo util_make_link('/plugins/'.$this->name.'/?user_id=$userid&type=user&pluginname='.$this->name, _('View Personal MantisBT'), $arr_t);
echo '</p>';
}
* @param int enable tooltips : default NO
* @return bool true only currently
*/
- function getSubMenu($enable_tooltips = 0) {
+ function getSubMenu() {
global $HTML;
global $group_id;
global $user;
$labelPage[] = "/plugins/".$this->name."/?type=group&group_id=".$group_id."&pluginname=".$this->name."&view=roadmap";
$labelPage[] = "/plugins/".$this->name."/?type=group&group_id=".$group_id."&pluginname=".$this->name;
$labelAttr = array();
- if ($enable_tooltips) {
- $labelAttr[] = array('title' => _('View the roadmap, per version tickets'), 'id' => 'roadmapView');
- $labelAttr[] = array('title' => _('View all tickets.'), 'id' => 'ticketView');
- } else {
- $labelAttr[] = array();
- $labelAttr[] = array();
- }
+ $labelAttr[] = array('title' => _('View the roadmap, per version tickets'), 'id' => 'roadmapView', 'class' => 'tabtitle-nw');
+ $labelAttr[] = array('title' => _('View all tickets.'), 'id' => 'ticketView', 'class' => 'tabtitle');
$userperm = $group->getPermission($user);
if ( $userperm->isAdmin() ) {
$labelTitle[] = _('Administration');
$labelPage[] = "/plugins/".$this->name."/?type=admin&group_id=".$group_id."&pluginname=".$this->name;
$labelTitle[] = _('Statistics');
$labelPage[] = "/plugins/".$this->name."/?type=admin&group_id=".$group_id."&pluginname=".$this->name."&view=stat";
- if ($enable_tooltips) {
- $labelAttr[] = array('title' => _('Manage versions, categories and general configuration.'), 'id' => 'adminView');
- $labelAttr[] = array('title' => _('View global statistics.'), 'id' => 'statView');
- } else {
- $labelAttr[] = array();
- $labelAttr[] = array();
- }
+ $labelAttr[] = array('title' => _('Manage versions, categories and general configuration.'), 'id' => 'adminView', 'class' => 'tabtitle');
+ $labelAttr[] = array('title' => _('View global statistics.'), 'id' => 'statView', 'class' => 'tabtitle');
}
echo $HTML->subMenu($labelTitle, $labelPage, $labelAttr);
function getHeader($type) {
global $gfplugins;
$returned = false;
- html_use_tooltips();
use_javascript('/plugins/'.$this->name.'/scripts/MantisBTController.js');
use_stylesheet('/plugins/'.$this->name.'/style.css');
switch ($type) {
function getGlobalAdminView() {
global $gfplugins;
$user = session_get_user();
- $use_tooltips = $user->usesTooltips();
include $gfplugins.$this->name.'/view/admin/viewGlobalConfiguration.php';
return true;
}
global $HTML;
global $mantisbt;
-global $use_tooltips;
$mantisbtGlobalConf = $mantisbt->getGlobalconf();
-?>
-<script type="text/javascript">
-var controller;
-
-jQuery(document).ready(function() {
- controllerMantisBTAdminViewControler = new MantisBTAdminViewController({
- tipsyElements: [
- {selector: '#mantisbtinit-url', options:{gravity: 'w', delayIn: 500, delayOut: 0, fade: true}},
- {selector: '#mantisbtinit-user', options:{gravity: 'w', delayIn: 500, delayOut: 0, fade: true}},
- {selector: '#mantisbtinit-password', options:{gravity: 'w', delayIn: 500, delayOut: 0, fade: true}},
- {selector: '#mantisbtinit-syncroles', options:{gravity: 'w', delayIn: 500, delayOut: 0, fade: true}},
- ],
- inputUrl: jQuery('#mantisbturl'),
- inputUser: jQuery('#mantisbtuser'),
- inputPassword: jQuery('#mantisbtpassword'),
- });
-});
-
-</script>
-<?php
-
echo $HTML->boxTop(_('Manage configuration'));
echo '<form method="POST" Action="?type=globaladmin&pluginname='.$mantisbt->name.'&action=updateGlobalConf">';
echo '<table>';
-echo '<tr><td><label id="mantisbtinit-url" ';
-if ($use_tooltips)
- echo 'title="'._('Specify the Full URL of the MantisBT Web Server.').'"';
-echo ' >URL</label></td><td><input type="text" size="50" maxlength="255" name="url" value="'.$mantisbtGlobalConf['url'].'" /></td></tr>';
-echo '<tr><td><label id="mantisbtinit-user" ';
-if ($use_tooltips)
- echo 'title="'._('Specify the user with admin right to be used thru SOAP API.').'"';
-echo ' >SOAP User</label></td><td><input type="text" size="50" maxlength="255" name="soap_user" value="'.$mantisbtGlobalConf['soap_user'].'" /></td></tr>';
-echo '<tr><td><label id="mantisbtinit-password" ';
-if ($use_tooltips)
- echo 'title="'._('Specify the password of this user.').'"';
-echo ' >SOAP Password</label></td><td><input type="text" size="50" maxlength="255" name="soap_password" value="'.$mantisbtGlobalConf['soap_password'].'" /></td></tr>';
-echo '<tr><td><label id="mantisbtinit-syncroles" ';
-if ($use_tooltips)
- echo 'title="'._('Do you want to sync FusionForge -> MantisBT roles ? Not implemented yet.').'"';
-echo ' >Sync Roles</label></td><td><input disabled="disabled" type="checkbox" name="sync_roles" /></td></tr>';
+echo '<tr><td><label id="mantisbtinit-url" >URL</label></td>';
+echo '<td><input type="text" class="tabtitle-w" title="'._('Specify the Full URL of the MantisBT Web Server.').'" size="50" maxlength="255" name="url" value="'.$mantisbtGlobalConf['url'].'" /></td></tr>';
+echo '<tr><td><label id="mantisbtinit-user" >SOAP User</label></td>';
+echo '<td><input type="text" class="tabtitle-w" title="'._('Specify the user with admin right to be used thru SOAP API.').'" size="50" maxlength="255" name="soap_user" value="'.$mantisbtGlobalConf['soap_user'].'" /></td></tr>';
+echo '<tr><td><label id="mantisbtinit-password" >SOAP Password</label></td>';
+echo '<td><input type="text" class="tabtitle-w" title="'._('Specify the password of this user.').'" size="50" maxlength="255" name="soap_password" value="'.$mantisbtGlobalConf['soap_password'].'" /></td></tr>';
+echo '<tr><td><label id="mantisbtinit-syncroles" >Sync Roles</label></td>';
+echo '<td><input disabled="disabled" type="checkbox" class="tabtitle-w" title="'._('Do you want to sync FusionForge -> MantisBT roles ? Not implemented yet.').'" name="sync_roles" /></td></tr>';
echo '</table>';
echo '<input type="submit" value="'._('Update').'" />';
echo '</form>';
global $mantisbtConf;
global $username;
global $password;
-global $use_tooltips;
global $view;
-?>
-<script type="text/javascript">
-var controller;
-
-jQuery(document).ready(function() {
- controlerMantisBTMenuControler = new MantisBTMenuControler({
- tipsyElements: [
- {selector: '#roadmapView', options:{gravity: 'nw', delayIn: 500, delayOut: 0, fade: true}},
- {selector: '#ticketView', options:{gravity: 'nw', delayIn: 500, delayOut: 0, fade: true}},
- {selector: '#adminView', options:{gravity: 'nw', delayIn: 500, delayOut: 0, fade: true}},
- {selector: '#statView', options:{gravity: 'nw', delayIn: 500, delayOut: 0, fade: true}},
- ],
- });
-});
-
-</script>
-<?php
-
-$mantisbt->getSubMenu($use_tooltips);
+$mantisbt->getSubMenu();
switch ($view) {
case "editVersion":
global $mantisbtConf;
global $group_id;
global $gfplugins;
-global $use_tooltips;
-?>
-<script type="text/javascript">
-var controller;
-
-jQuery(document).ready(function() {
- controlerMantisBTMenuControler = new MantisBTMenuControler({
- tipsyElements: [
- {selector: '#roadmapView', options:{gravity: 'nw', delayIn: 500, delayOut: 0, fade: true}},
- {selector: '#ticketView', options:{gravity: 'nw', delayIn: 500, delayOut: 0, fade: true}},
- {selector: '#adminView', options:{gravity: 'nw', delayIn: 500, delayOut: 0, fade: true}},
- {selector: '#statView', options:{gravity: 'nw', delayIn: 500, delayOut: 0, fade: true}},
- ],
- });
-});
-
-</script>
-<?php
-
-$mantisbt->getSubMenu($use_tooltips);
+$mantisbt->getSubMenu();
// page a afficher
switch ($view) {
}
$action = getStringFromRequest('action');
}
- $use_tooltips = $user->usesTooltips();
}
if (!isset($username) || !isset($password)) {
session_redirect($redirect_url);
}
}
- $use_tooltips = $user->usesTooltips();
-
switch ($action) {
case 'inituser':
{
this.params = params;
- if ( typeof(jQuery(window).tipsy) == 'function') {
- this.initTipsy();
- }
this.bindControls();
};
-MantisBTInitUserController = function(params)
-{
- this.params = params;
-
- if ( typeof(jQuery(window).tipsy) == 'function') {
- this.initTipsy();
- }
-};
-
MantisBTAdminViewController = function(params)
{
this.params = params;
- if ( typeof(jQuery(window).tipsy) == 'function') {
- this.initTipsy();
- }
this.bindControls();
this.initCheckboxGlobalConf();
};
-MantisBTMenuControler = function(params)
-{
- this.params = params;
-
- if ( typeof(jQuery(window).tipsy) == 'function') {
- this.initTipsy();
- }
-};
-
MantisBTInitController.prototype =
{
/*! Binds the controls to the actions
this.params.checkboxGlobalConf.click(jQuery.proxy(this, "toggleAllInput"));
},
- /*! initializes tipsy
- */
- initTipsy: function() {
- for(var i = 0; i < this.params.tipsyElements.length; i++) {
- var el = this.params.tipsyElements[i];
- jQuery(el.selector).tipsy({
- gravity: el.options.gravity,
- delayIn: el.options.delayIn,
- delayOut: el.options.delayOut,
- fade: el.options.fade});
- }
- },
-
/*! disable name input
*/
toggleInputName: function() {
},
}
-MantisBTInitUserController.prototype =
-{
- /*! initializes tipsy
- */
- initTipsy: function() {
- for(var i = 0; i < this.params.tipsyElements.length; i++) {
- var el = this.params.tipsyElements[i];
- jQuery(el.selector).tipsy({
- gravity: el.options.gravity,
- delayIn: el.options.delayIn,
- delayOut: el.options.delayOut,
- fade: el.options.fade});
- }
- },
-}
-
MantisBTAdminViewController.prototype =
{
/*! Binds the controls to the actions
}
},
- /*! initializes tipsy
- */
- initTipsy: function() {
- for(var i = 0; i < this.params.tipsyElements.length; i++) {
- var el = this.params.tipsyElements[i];
- jQuery(el.selector).tipsy({
- gravity: el.options.gravity,
- delayIn: el.options.delayIn,
- delayOut: el.options.delayOut,
- fade: el.options.fade});
- }
- },
-
toggleAllInput: function() {
if (!this.params.checkboxGlobalConf.is(":checked")) {
this.params.inputUrl.attr('disabled',false);
this.params.inputPassword.attr('disabled',true);
}
},
-}
-
-MantisBTMenuControler.prototype =
-{
- /*! initializes tipsy
- */
- initTipsy: function() {
- for(var i = 0; i < this.params.tipsyElements.length; i++) {
- var el = this.params.tipsyElements[i];
- jQuery(el.selector).tipsy({
- gravity: el.options.gravity,
- delayIn: el.options.delayIn,
- delayOut: el.options.delayOut,
- fade: el.options.fade});
- }
- },
}
\ No newline at end of file