Bladeren bron

Usability enhancement: don't clear the "Organizations" auto complete (for the silos) without purpose when clicking on it... empty the field only when the displayed value means "All organizations".

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3751 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 9 jaren geleden
bovenliggende
commit
97cd5f3fb0
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      application/itopwebpage.class.inc.php

+ 1 - 1
application/itopwebpage.class.inc.php

@@ -570,7 +570,7 @@ EOF
 										array('iFieldSize' => 20, 'iMinChars' => MetaModel::GetConfig()->Get('min_autocomplete_chars'), 'sDefaultValue' => Dict::S('UI:AllOrganizations')),
 										null, 'select', false /* bSearchMultiple */);
 			$this->add_ready_script('$("#org_id").bind("extkeychange", function() { $("#SiloSelection form").submit(); } )');
-			$this->add_ready_script("$('#label_org_id').click( function() { $(this).val(''); $('#org_id').val(''); return true; } );\n");
+			$this->add_ready_script("$('#label_org_id').click( function() { if ($('#org_id').val() == '') { $(this).val(''); } } );\n");
 			// Add other dimensions/context information to this form
 			$oAppContext->Reset('org_id'); // org_id is handled above and we want to be able to change it here !
 			$oAppContext->Reset('menu'); // don't pass the menu, since a menu may expect more parameters