diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index 29a3cf246..f747cc8ca 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -101,7 +101,22 @@ class iTopWebPage extends NiceWebPage SetUserPreference('menu_pane', 'open', true); } } - } + }, + center: { + onresize_end: function(name, elt, state, options, layout) + { + $('.v-resizable').each( function() { + var fixedWidth = $(this).parent().innerWidth() - 6; + $(this).width(fixedWidth); + // Make sure it cannot be resized horizontally + $(this).resizable('options', { minWidth: fixedWidth, maxWidth: fixedWidth }); + // Now adjust all the child 'items' + var innerWidth = $(this).innerWidth() - 10; + $(this).find('.item').width(innerWidth); + }); + } + + } }); myLayout.addPinBtn( "#tPinMenu", "west" ); //myLayout.open( "west" ); @@ -227,6 +242,67 @@ class iTopWebPage extends NiceWebPage changeYear: true }); $('.resizable').resizable(); // Make resizable everything that claims to be resizable ! + // Adjust initial size + $('.v-resizable').each( function() + { + var parent_id = $(this).parent().id; + // Restore the saved height + var iHeight = GetUserPreference(parent_id+'_'+this.id+'_height', undefined); + if (iHeight != undefined) + { + $(this).height(parseInt(iHeight, 10)); // Parse in base 10 !); + } + // Adjust the child 'item''s height and width to fit + var container = $(this); + var fixedWidth = container.parent().innerWidth() - 6; + // Set the width to fit the parent + $(this).width(fixedWidth); + var headerHeight = $(this).find('.drag_handle').height(); + // Now adjust the width and height of the child 'item' + container.find('.item').height(container.innerHeight() - headerHeight - 12).width(fixedWidth - 10); + } + ); + // Make resizable, vertically only everything that claims to be v-resizable ! + $('.v-resizable').resizable( { handles: 's', minHeight: $(this).find('.drag_handle').height(), minWidth: $(this).parent().innerWidth() - 6, maxWidth: $(this).parent().innerWidth() - 6, stop: function() + { + // Adjust the content + var container = $(this); + var headerHeight = $(this).find('.drag_handle').height(); + container.find('.item').height(container.innerHeight() - headerHeight - 12);//.width(container.innerWidth()); + var parent_id = $(this).parent().id; + SetUserPreference(parent_id+'_'+this.id+'_height', $(this).height(), true); // true => persistent + } + } ); + // Restore the persisted sortable order, for all sortable lists... if any + $('.sortable').each(function() + { + var sTemp = GetUserPreference(this.id+'_order', undefined); + if (sTemp != undefined) + { + var aSerialized = sTemp.split(','); + var sortable = $(this); + $.each(aSerialized, function(i,v) { + var item = $('#menu_'+v); + if (item.length > 0) // Check that the menu exists + { + sortable.append(item); + } + }); + } + }); + + // Make sortable, everything that claims to be sortable + $('.sortable').sortable( {axis: 'y', cursor: 'move', handle: '.drag_handle', stop: function() + { + if ($(this).hasClass('persistent')) + { + // remember the sort order for next time the page is loaded... + sSerialized = $(this).sortable('serialize', {key: 'menu'}); + var sTemp = sSerialized.replace(/menu=/g, ''); + SetUserPreference(this.id+'_order', sTemp.replace(/&/g, ','), true); // true => persistent ! + } + } + }); docWidth = $(document).width(); $('#ModalDlg').dialog({ autoOpen: false, modal: true, width: 0.8*docWidth }); // JQuery UI dialogs ShowDebug(); diff --git a/application/template.class.inc.php b/application/template.class.inc.php index 3fb8ad094..52388acbc 100644 --- a/application/template.class.inc.php +++ b/application/template.class.inc.php @@ -86,7 +86,6 @@ class DisplayTemplate $iStart = $iEnd; $iEnd = strlen($this->m_sTemplate); $iCount++; - if ($iCount > 10) break; //@@@ Why ?? Debug ?? } $oPage->add(substr($this->m_sTemplate, $iAfterTagPos)); } diff --git a/application/templates/welcome_menu.html b/application/templates/welcome_menu.html index d0b5fd9de..e8bf09bd5 100644 --- a/application/templates/welcome_menu.html +++ b/application/templates/welcome_menu.html @@ -1,114 +1,201 @@ -
-

-

-

UI:WelcomeMenu:Title

-

- - - - - - - - -
+ + + - -

Incident Management

-SELECT Incident + +
-

Configuration Management

- - - - - - - - - - - -
- - -

Class:BusinessProcess

-SELECT BusinessProcess

-SELECT BusinessProcess -
-
- - -

Class:Contact

-SELECT Contact

-SELECT Contact -
-
- - -

Class:Location

-SELECT Location

-SELECT Location -
-
- - -

Class:Server -SELECT Server

-SELECT Server -
-
- - -

Class:DatabaseInstance

-SELECT DatabaseInstance

-SELECT DatabaseInstance -
-
- - -

Class:NetworkDevice

-SELECT NetworkDevice

-SELECT NetworkDevice -
-
-
+
+ + + + + diff --git a/core/metamodel.class.php b/core/metamodel.class.php index 47981b076..1487045d4 100644 --- a/core/metamodel.class.php +++ b/core/metamodel.class.php @@ -315,7 +315,7 @@ abstract class MetaModel return self::GetClassDescription($sClass); } } - final static public function GetClassIcon($sClass, $bImgTag = true) + final static public function GetClassIcon($sClass, $bImgTag = true, $sMoreStyles = '') { self::_check_subclass($sClass); @@ -334,7 +334,7 @@ abstract class MetaModel } if ($bImgTag && ($sIcon != '')) { - $sIcon = ""; + $sIcon = ""; } return $sIcon; } diff --git a/dictionaries/dictionary.itop.ui.php b/dictionaries/dictionary.itop.ui.php index 769dd54a9..1843b9f3b 100644 --- a/dictionaries/dictionary.itop.ui.php +++ b/dictionaries/dictionary.itop.ui.php @@ -318,8 +318,10 @@ Dict::Add('EN US', 'English', 'English', array(
  • Manage the most important asset of your IT: Documentation.
  • ', - + 'UI:WelcomeMenu:AllOpenRequests' => 'Open requests: %1$d', 'UI:WelcomeMenu:MyCalls' => 'My requests', + 'UI:WelcomeMenu:OpenIncidents' => 'Open incidents: %1$d', + 'UI:WelcomeMenu:AllConfigItems' => 'Configuration Items: %1$d', 'UI:WelcomeMenu:MyIncidents' => 'Incidents assigned to me', 'UI:AllOrganizations' => ' All Organizations ', 'UI:YourSearch' => 'Your Search', @@ -352,7 +354,7 @@ Dict::Add('EN US', 'English', 'English', array( 'UI:Button:ResetPassword' => ' Reset Password ', 'UI:SearchToggle' => 'Search', - 'UI:ClickToCreateNew' => 'Click here to create a new %1$s', + 'UI:ClickToCreateNew' => 'Create a new %1$s', 'UI:SearchFor_Class' => 'Search for %1$s objects', 'UI:NoObjectToDisplay' => 'No object to display.', 'UI:Error:MandatoryTemplateParameter_object_id' => 'Parameter object_id is mandatory when link_attr is specified. Check the definition of the display template.', @@ -836,6 +838,8 @@ When associated with a trigger, each action is given an "order" number, specifyi 'UI:PasswordConfirm' => '(Confirm)', 'UI:BeforeAdding_Class_ObjectsSaveThisObject' => 'Before adding more %1$s objects, save this object.', 'UI:DisplayThisMessageAtStartup' => 'Display this message at startup', + 'UI:RelationshipGraph' => 'Graphical view', + 'UI:RelationshipList' => 'List', 'Portal:Title' => 'iTop user portal', 'Portal:Refresh' => 'Refresh', diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index 142e894d0..5521f4572 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/dictionaries/fr.dictionary.itop.ui.php @@ -319,7 +319,10 @@ Dict::Add('FR FR', 'French', 'Français', array(

    ', + 'UI:WelcomeMenu:AllOpenRequests' => 'Requêtes en cours: %1$d', 'UI:WelcomeMenu:MyCalls' => 'Mes Appels Support', + 'UI:WelcomeMenu:OpenIncidents' => 'Incidents en cours: %1$d', + 'UI:WelcomeMenu:AllConfigItems' => 'Actifs: %1$d', 'UI:WelcomeMenu:MyIncidents' => 'Mes Incidents', 'UI:AllOrganizations' => ' Toutes les Organizations ', 'UI:YourSearch' => 'Votre recherche', @@ -354,7 +357,7 @@ Dict::Add('FR FR', 'French', 'Français', array( 'UI:SearchToggle' => 'Recherche', - 'UI:ClickToCreateNew' => 'Cliquez ici pour créer un nouvel objet de type %1$s', + 'UI:ClickToCreateNew' => 'Créer un nouvel objet de type %1$s', 'UI:NoObjectToDisplay' => 'Aucun objet à afficher.', 'UI:Error:MandatoryTemplateParameter_object_id' => 'Le paramètre object_id est obligatoire quand link_attr est spécifié. Vérifiez la définition du modèle.', 'UI:Error:MandatoryTemplateParameter_link_attr' => 'Le paramètre target_attr est obligatoire quand link_attr est spécifié. Vérifiez la définition du modèle.', @@ -846,6 +849,8 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé 'UI:PasswordConfirm' => '(Confirmer)', 'UI:BeforeAdding_Class_ObjectsSaveThisObject' => 'Enregistrez l\'objet courant avant de créer de nouveaux éléments de type %1$s.', 'UI:DisplayThisMessageAtStartup' => 'Afficher ce message au démarrage', + 'UI:RelationshipGraph' => 'Vue graphique', + 'UI:RelationshipList' => 'Liste', 'Portal:Title' => 'Portail utilisateur iTop', 'Portal:Refresh' => 'Rafraîchir', diff --git a/modules/itop-config-mgmt-1.0.0/cis_menu.html b/modules/itop-config-mgmt-1.0.0/cis_menu.html index 22b7d4ad0..4162b8d3b 100644 --- a/modules/itop-config-mgmt-1.0.0/cis_menu.html +++ b/modules/itop-config-mgmt-1.0.0/cis_menu.html @@ -1,20 +1,175 @@ -

    UI:ConfigurationManagementMenu:Title

    - - - - - - - - - -
    -SELECT FunctionalCI - -SELECT FunctionalCI -
    -

    UI-ConfigurationManagementMenu-InfraByType

    -SELECT FunctionalCI -
    -  -
    + +
    + + + + + + + + + + + + + + + +
    diff --git a/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php b/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php index a98b0013d..150ae41f7 100644 --- a/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php +++ b/modules/itop-config-mgmt-1.0.0/en.dict.itop-config-mgmt.php @@ -986,7 +986,11 @@ Dict::Add('EN US', 'English', 'English', array( 'Menu:NewCI' => 'New CI', 'Menu:NewCI+' => 'New CI', 'Menu:SearchCIs' => 'Search for CIs', -'Menu:SearchCIs+' => 'Search for CIs', +'Menu:SearchCIs+' => 'Search for CIs', +'Menu:ConfigManagement:Devices' => 'Devices', +'Menu:ConfigManagement:AllDevices' => 'Number of devices: %1$d', +'Menu:ConfigManagement:SWAndApps' => 'Software and Applications', +'Menu:ConfigManagement:Misc' => 'Miscellaneous', )); ?> diff --git a/modules/itop-config-mgmt-1.0.0/fr.dict.itop-config-mgmt.php b/modules/itop-config-mgmt-1.0.0/fr.dict.itop-config-mgmt.php index 9a9af320f..a11084894 100644 --- a/modules/itop-config-mgmt-1.0.0/fr.dict.itop-config-mgmt.php +++ b/modules/itop-config-mgmt-1.0.0/fr.dict.itop-config-mgmt.php @@ -960,5 +960,9 @@ Dict::Add('FR FR', 'French', 'Français', array( 'Menu:MobilePhone+' => 'Tous les téléphones portables', 'Menu:PC' => 'Ordinateurs personnels', 'Menu:PC+' => 'Tous les ordinateurs personnels', +'Menu:ConfigManagement:Devices' => 'Equipements', +'Menu:ConfigManagement:AllDevices' => 'Nombre d\'équipements: %1$d', +'Menu:ConfigManagement:SWAndApps' => 'Logiciels et Applications', +'Menu:ConfigManagement:Misc' => 'Divers', )); ?> diff --git a/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php b/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php index 191539b13..2a3437551 100644 --- a/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php +++ b/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php @@ -1572,17 +1572,17 @@ new SearchMenuNode('SearchCIs', 'FunctionalCI', $oCINode->GetIndex(), 1 /* fRank new OQLMenuNode('BusinessProcess', 'SELECT BusinessProcess', $oCINode->GetIndex(), 2 /* fRank */); new OQLMenuNode('ApplicationSolution', 'SELECT ApplicationSolution', $oCINode->GetIndex(), 3 /* fRank */); -$oSWNode = new TemplateMenuNode('ConfigManagementSoftware', '', $oCINode->GetIndex(), 4 /* fRank */); -new OQLMenuNode('Licence', 'SELECT Licence', $oSWNode->GetIndex(), 0 /* fRank */); -new OQLMenuNode('Patch', 'SELECT Patch', $oSWNode->GetIndex(), 1 /* fRank */); -new OQLMenuNode('ApplicationInstance', 'SELECT SoftwareInstance', $oSWNode->GetIndex(), 2 /* fRank */); +//$oSWNode = new TemplateMenuNode('ConfigManagementSoftware', '', $oCINode->GetIndex(), 4 /* fRank */); +//new OQLMenuNode('Licence', 'SELECT Licence', $oSWNode->GetIndex(), 0 /* fRank */); +//new OQLMenuNode('Patch', 'SELECT Patch', $oSWNode->GetIndex(), 1 /* fRank */); +//new OQLMenuNode('ApplicationInstance', 'SELECT SoftwareInstance', $oSWNode->GetIndex(), 2 /* fRank */); $oHWNode = new TemplateMenuNode('ConfigManagementHardware', '', $oCINode->GetIndex(), 5 /* fRank */); -new OQLMenuNode('Subnet', 'SELECT Subnet', $oHWNode->GetIndex(), 0 /* fRank */); +//new OQLMenuNode('Subnet', 'SELECT Subnet', $oHWNode->GetIndex(), 0 /* fRank */); new OQLMenuNode('NetworkDevice', 'SELECT NetworkDevice', $oHWNode->GetIndex(), 1 /* fRank */); new OQLMenuNode('Server', 'SELECT Server', $oHWNode->GetIndex(), 2 /* fRank */); new OQLMenuNode('Printer', 'SELECT Printer', $oHWNode->GetIndex(), 3 /* fRank */); -new OQLMenuNode('MobilePhone', 'SELECT MobilePhone', $oHWNode->GetIndex(), 4 /* fRank */); +//new OQLMenuNode('MobilePhone', 'SELECT MobilePhone', $oHWNode->GetIndex(), 4 /* fRank */); new OQLMenuNode('PC', 'SELECT PC', $oHWNode->GetIndex(), 5 /* fRank */); ?>