<%@ include file="/portal/include/include_java.jsp" %> <fmt:setBundle basename="text.jsp.framework.navigation.rules"/> <%/** * The following should be documented, preferrably on some sort of a help page: * * This is more advanced search, accepting special keywords. * * Reserved Keyword: Support: Notes: * active YES By default, only active is searched. * inactive or nonactiv YES This is the only way to search inactive. * hierarchy YES This limits to those ids visible in hierarchy. * onhierarchy YES This limits to those ids NOT visible in hierarchy. * quota YES This limits to those ids that are quota constrained. * nonquota YES This limits to those ids that are NOT quota constrained. * logged YES This limits to those ids that are logged. * unlogged or nonlogged YES This limits to those ids that are NOT logged. * indexable YES This limits to those ids that are indexable. * nonindexable YES This limits to those ids that are NOT indexable. * author:name YES This is a case-sensitive contains for the creator's username. * author (current) YES This limits to content created by current user. * name:text YES * description:text YES * starts:text YES This is name and description text*, case-insensitive. * ends:text YES This is name and description *text, case-insensitive. * contains:text YES This is name and description *text*, case-insensitive. * subscribed YES This limits to current user's subscriptions. * unsubscribed or nonsubscribed YES This limits to current user's subscriptions. * bytes:number * approved * unapproved * created:time * modified:time * expiration:days * extension:ext * * Other text is searched for as 'contains' in name and description. * * For name and description: * : and = are both equals, <> and >< and != are unequal, * < is less than, > is greater than, <= is less than or equal to, >= is greater than or equal to. **/%> <div class="navigationFind"> <asi:form id="searchRules" styleClass="" action="/rules/SearchRules.do" decorator="background" method="post" > <input type="text" id="rulesAutocomplete" name="query" /> <a><p:img page="/framework/img/search.gif" onclick="$$$('searchRules').submit()" altKey="Search" /></a> </asi:form> </div> <h6 class="navSectionTitle" onclick="categoryNavigationTabs.toggleSubsection(this)"></h6> <div class="navigationLinks"> <asi:linkBase/> <a href="<asi:url value="/design/interface"/>" target="_blank"><p:img page="/rules/img/sail_rule.gif" altKey="CreateNewSailRule"/> <fmt:message key="CreateNewSailRule" /></a> <a href="<asi:url value="/design/rule"/>" target="_blank"><p:img page="/rules/img/rule.gif" altKey="CreateNewRule"/><fmt:message key="CreateNewRule" /></a> <asi:link href="#" onclick="backgroundPage('/rules/getQueryRule.do');"><p:img page="/rules/img/query_rule.gif" altKey="CreateNewQueryRule"/> <fmt:message key="CreateNewQueryRule" /></asi:link> <asi:link href="#" onclick="backgroundPage('/rules/getConstant.do');"><p:img page="/rules/img/constant.gif" altKey="CreateNewConstant"/> <fmt:message key="CreateNewConstant" /></asi:link> <asi:link href="/rules/importRulesCheck.do?launch=leftnav" decorator="background" containerId="asiDialog"><p:img page="/components/toolbar/img/import.gif" altKey="ImportRule"/> <fmt:message key="ImportRule" /></asi:link> <c:if test="${isSystemAdmin}" > <asi:link href="/rules/rootSecurity.do?instanceId=rootSecurity" containerId="asiDialog" title="RootFolderSecurity"><p:img page="/components/toolbar/img/lock.gif" altKey="RootFolderSecurity"/><fmt:message key="RootFolderSecurity"/></asi:link> </c:if> <asi:link href="/rules/GetRulesFavorites.do"><p:img page="/components/toolbar/img/star.gif" altKey="FavoriteRules" /><fmt:message key="FavoriteRules"/></asi:link> </div> <div class="asiDivider"> </div> <h6 class="navSectionTitle" onclick="categoryNavigationTabs.toggleSubsection(this)"><fmt:message key="RulesAndConstants" /></h6> <div id="rulesLeftNav"> <asi:hierarchy instanceId="rulesHierarchy" rootNodeId="${rulesRoot}" rootNodeType="folder" menuType="content_with_noncontainers" truncate="100" startAtDepth="1" indentPixels="20" startPlusMinus="0" defaultLevelsExpanded="0" /> </div> <script type="text/javascript"> var rulesAutocomplete = new Autocomplete('rulesAutocomplete',{ singlePicker:true, useCache:false, stopSuggestingWithEsc:true, validChar:'', autocompleteType:"rules_and_folders" }); rulesAutocomplete.setDefaultMessage('<fmt:message key="searchForRule" />'); rulesAutocomplete.onAddItemCallback = function(){ /*getRule action*/ var pickedArray = rulesAutocomplete.getDescriptorsArray(); if (pickedArray.length == 1){ var id = pickedArray[0].id; var type = pickedArray[0].type; // if rule, pickedArray[0].subtype will tell if it's a rule or constant... // subtype == 0 constant, subtype == 1 rule var url = getContent(id); } } rulesAutocomplete.onkeyupCallback = function(evt){ if (evt.keyCode == ENTER_KEY){ var pickedArray = rulesAutocomplete.getDescriptorsArray(); if (pickedArray.length == 0){ $$('searchRules').submit(); } } } function getContent(id){ var url = '/contents/GetContent.do?id=' + id; backgroundPage(url); } </script>