{if $pageObjectIDLanguageItem}
'wcf.page.objectID.{@$pageNode->identifier}': '{@$pageObjectIDLanguageItem}',
{/if}
+ {capture assign='pageObjectIDLanguageItem'}{lang __optional=true}wcf.page.pageObjectID.search.{@$pageNode->identifier}{/lang}{/capture}
+ {if $pageObjectIDLanguageItem}
+ 'wcf.page.pageObjectID.search.{@$pageNode->identifier}': '{@$pageObjectIDLanguageItem}',
+ {/if}
{/foreach}
'wcf.page.pageObjectID.search.noResults': '{lang}wcf.page.pageObjectID.search.noResults{/lang}',
'wcf.page.pageObjectID.search.results': '{lang}wcf.page.pageObjectID.search.results{/lang}',
'wcf.page.pageObjectID.search.results.description': '{lang}wcf.page.pageObjectID.search.results.description{/lang}',
- 'wcf.page.pageObjectID.search.terms': '{lang}wcf.page.pageObjectID.search.terms{/lang}',
- 'wcf.page.pageObjectID.search.terms.description': '{lang}wcf.page.pageObjectID.search.terms.description{/lang}'
+ 'wcf.page.pageObjectID.search.terms': '{lang}wcf.page.pageObjectID.search.terms{/lang}'
});
var handlers = new Dictionary();
{if $pageObjectIDLanguageItem}
'wcf.page.objectID.{@$pageNode->identifier}': '{@$pageObjectIDLanguageItem}',
{/if}
+ {capture assign='pageObjectIDLanguageItem'}{lang __optional=true}wcf.page.pageObjectID.search.{@$pageNode->identifier}{/lang}{/capture}
+ {if $pageObjectIDLanguageItem}
+ 'wcf.page.pageObjectID.search.{@$pageNode->identifier}': '{@$pageObjectIDLanguageItem}',
+ {/if}
{/foreach}
'wcf.page.pageObjectID.search.noResults': '{lang}wcf.page.pageObjectID.search.noResults{/lang}',
'wcf.page.pageObjectID.search.results': '{lang}wcf.page.pageObjectID.search.results{/lang}',
'wcf.page.pageObjectID.search.results.description': '{lang}wcf.page.pageObjectID.search.results.description{/lang}',
- 'wcf.page.pageObjectID.search.terms': '{lang}wcf.page.pageObjectID.search.terms{/lang}',
- 'wcf.page.pageObjectID.search.terms.description': '{lang}wcf.page.pageObjectID.search.terms.description{/lang}'
+ 'wcf.page.pageObjectID.search.terms': '{lang}wcf.page.pageObjectID.search.terms{/lang}'
});
var handlers = new Dictionary();
_openSearch: function(event) {
event.preventDefault();
+ var labelLanguageItem;
+ var pageIdentifier = elData(_pageId.options[_pageId.selectedIndex], 'identifier');
+ var languageItem = 'wcf.page.pageObjectID.search.' + pageIdentifier;
+ if (Language.get(languageItem) !== languageItem) {
+ labelLanguageItem = languageItem;
+ }
+
UiPageSearchHandler.open(_activePageId, _pageId.options[_pageId.selectedIndex].textContent.trim(), function(objectId) {
_pageObjectId.value = objectId;
_cache.set(_activePageId, objectId);
- });
+ }, labelLanguageItem);
},
/**
_openSearch: function(event) {
event.preventDefault();
+ var labelLanguageItem;
+ var pageIdentifier = elData(_pageId.options[_pageId.selectedIndex], 'identifier');
+ var languageItem = 'wcf.page.pageObjectID.search.' + pageIdentifier;
+ if (Language.get(languageItem) !== languageItem) {
+ labelLanguageItem = languageItem;
+ }
+
UiPageSearchHandler.open(_activePageId, _pageId.options[_pageId.selectedIndex].textContent.trim(), function(objectId) {
_pageObjectId.value = objectId;
_cache.set(_activePageId, objectId);
- });
+ }, labelLanguageItem);
}
};
});
var _callback = null;
var _searchInput = null;
+ var _searchInputLabel = null;
var _searchInputHandler = null;
var _resultList = null;
var _resultListContainer = null;
/**
* Opens the lookup overlay for provided page id.
*
- * @param {int} pageId page id
- * @param {string} title dialog title
- * @param {function} callback callback function provided with the user-selected object id
+ * @param {int} pageId page id
+ * @param {string} title dialog title
+ * @param {function} callback callback function provided with the user-selected object id
+ * @param {string?} labelLanguageItem optional language item name for the search input label
*/
- open: function (pageId, title, callback) {
+ open: function (pageId, title, callback, labelLanguageItem) {
_callback = callback;
UiDialog.open(this);
UiDialog.setTitle(this, title);
+ if (labelLanguageItem) {
+ _searchInputLabel.textContent = Language.get(labelLanguageItem);
+ }
+ else {
+ _searchInputLabel.textContent = Language.get('wcf.page.pageObjectID.search.terms');
+ }
+
this._getSearchInputHandler().setPageId(pageId);
},
onShow: function() {
if (_searchInput === null) {
_searchInput = elById('wcfUiPageSearchInput');
+ _searchInputLabel = _searchInput.parentNode.previousSibling.childNodes[0];
_resultList = elById('wcfUiPageSearchResultList');
_resultListContainer = elById('wcfUiPageSearchResultListContainer');
}
+ '<dt><label for="wcfUiPageSearchInput">' + Language.get('wcf.page.pageObjectID.search.terms') + '</label></dt>'
+ '<dd>'
+ '<input type="text" id="wcfUiPageSearchInput" class="long">'
- + '<small>' + Language.get('wcf.page.pageObjectID.search.terms.description') + '</small>'
+ '</dd>'
+ '</dl>'
+ '</div>'
<item name="wcf.page.objectID.com.woltlab.wcf.Article"><![CDATA[ID des Artikels]]></item>
<item name="wcf.page.objectID.com.woltlab.wcf.CategoryArticleList"><![CDATA[ID der Kategorie]]></item>
<item name="wcf.page.objectID.com.woltlab.wcf.User"><![CDATA[ID des Benutzers]]></item>
+ <item name="wcf.page.pageObjectID.search.com.woltlab.wcf.Article"><![CDATA[Artikeltitel durchsuchen]]></item>
+ <item name="wcf.page.pageObjectID.search.com.woltlab.wcf.CategoryArticleList"><![CDATA[Kategorietitel durchsuchen]]></item>
+ <item name="wcf.page.pageObjectID.search.com.woltlab.wcf.User"><![CDATA[Benutzernamen durchsuchen]]></item>
</category>
<category name="wcf.paidSubscription">
<item name="wcf.page.objectID.com.woltlab.wcf.Article"><![CDATA[ID of the Article]]></item>
<item name="wcf.page.objectID.com.woltlab.wcf.CategoryArticleList"><![CDATA[ID of the Category]]></item>
<item name="wcf.page.objectID.com.woltlab.wcf.User"><![CDATA[ID of the User]]></item>
+ <item name="wcf.page.pageObjectID.search.com.woltlab.wcf.Article"><![CDATA[Search Article Titles]]></item>
+ <item name="wcf.page.pageObjectID.search.com.woltlab.wcf.CategoryArticleList"><![CDATA[Search Category Titles]]></item>
+ <item name="wcf.page.pageObjectID.search.com.woltlab.wcf.User"><![CDATA[Search Usernames]]></item>
</category>
<category name="wcf.acp.page">