| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Alfresco
Revision: 2849
Author: kevinr
Date: 02 Sep 2008 09:17:43
Changes:Minor improvements to search and missing I18N labels.
Files:| ... | ...@@ -48,4 +48,4 @@ | |
| 48 | 48 | #template_title_search .back-icon { |
| 49 | 49 | padding-left: 22px; |
| 50 | 50 | background: url(../images/back-arrow.png) no-repeat center left; |
| 51 | } | |
| 51 | } | |
| 52 | 52 | \ No newline at end of file |
| ... | ...@@ -253,7 +253,7 @@ | |
| 253 | 253 | * These MUST be inline in order to have access to the Alfresco.Search class (via the "me" variable). |
| 254 | 254 | */ |
| 255 | 255 | var me = this; |
| 256 | ||
| 256 | ||
| 257 | 257 | /** |
| 258 | 258 | * Thumbnail custom datacell formatter |
| 259 | 259 | * |
| ... | ...@@ -274,7 +274,7 @@ | |
| 274 | 274 | var url = me._getBrowseUrlForRecord(oRecord); |
| 275 | 275 | var imageUrl = Alfresco.constants.URL_CONTEXT + 'components/search/images/generic-result.png'; // oRecord.getData("icon32").substring(1); |
| 276 | 276 | |
| 277 | // use the preview image for the document library | |
| 277 | // use the preview image for the document | |
| 278 | 278 | if (oRecord.getData("type") == "file") |
| 279 | 279 | { |
| 280 | 280 | imageUrl = Alfresco.constants.PROXY_URI + "api/node/" + oRecord.getData("nodeRef").replace(":/", ""); |
| ... | ...@@ -282,8 +282,7 @@ | |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | // Render the cell |
| 285 | // TODO: this should use the correct icon | |
| 286 | elCell.innerHTML = '<span class="demo-other"><a href="' + encodeURI(url) + '" target="_blank"><img src="' + imageUrl + '" alt="' + extn + '" /></a></span>'; | |
| 285 | elCell.innerHTML = '<span><a href="' + encodeURI(url) + '"><img src="' + imageUrl + '" alt="' + extn + '" /></a></span>'; | |
| 287 | 286 | }; |
| 288 | 287 | |
| 289 | 288 | /** |
| ... | ...@@ -304,10 +303,12 @@ | |
| 304 | 303 | var desc = '<h3 class="itemname"><a href="' + encodeURI(url) + '">' + Alfresco.util.encodeHTML(oRecord.getData("displayName")) + '</a></h3>'; |
| 305 | 304 | // link to the site |
| 306 | 305 | desc += '<div class="detail">'; |
| 307 | desc += ' In Site: <a href="' + Alfresco.constants.URL_PAGECONTEXT + "site/" + Alfresco.util.encodeHTML(site.shortName) + '/dashboard">' + Alfresco.util.encodeHTML(site.title) + '</a>'; | |
| 306 | desc += me._msg("message.insite"); | |
| 307 | desc += ': <a href="' + Alfresco.constants.URL_PAGECONTEXT + "site/" + Alfresco.util.encodeHTML(site.shortName) + '/dashboard">' + Alfresco.util.encodeHTML(site.title) + '</a>'; | |
| 308 | 308 | desc += '</div>'; |
| 309 | 309 | desc += '<div class="details">'; |
| 310 | desc += ' Tags: '; | |
| 310 | desc += me._msg("message.tags"); | |
| 311 | desc += ': '; | |
| 311 | 312 | var tags = oRecord.getData("tags"); |
| 312 | 313 | for (var x=0; x < tags.length; x++) |
| 313 | 314 | { |
| ... | ...@@ -454,7 +455,6 @@ | |
| 454 | 455 | } |
| 455 | 456 | }, |
| 456 | 457 | |
| 457 | ||
| 458 | 458 | /** |
| 459 | 459 | * Resets the YUI DataTable errors to our custom messages |
| 460 | 460 | * NOTE: Scope could be YAHOO.widget.DataTable, so can't use "this" |
| ... | ...@@ -4,18 +4,16 @@ | |
| 4 | 4 | model.siteName = siteId; |
| 5 | 5 | model.searchTerm = (page.url.args["t"] != undefined) ? page.url.args["t"] : ""; |
| 6 | 6 | |
| 7 | model.searchAll = true; | |
| 7 | 8 | if (page.url.args["a"] != undefined) |
| 8 | 9 | { |
| 9 | model.searchAll = (page.url.args["a"] != "false"); // we want to default to true | |
| 10 | } | |
| 11 | else | |
| 12 | { | |
| 13 | model.searchAll = true; | |
| 10 | // default to search all if not specified | |
| 11 | model.searchAll = (page.url.args["a"] != "false"); | |
| 14 | 12 | } |
| 15 | 13 | |
| 16 | 14 | // fetch the site title if we got a site id |
| 17 | if (siteId.length > 0) | |
| 18 | { | |
| 15 | if (siteId.length != 0) | |
| 16 | { | |
| 19 | 17 | // Call the repository for the site profile |
| 20 | 18 | var json = remote.call("/api/sites/" + siteId); |
| 21 | 19 | if (json.status == 200) |
| ... | ...@@ -24,7 +22,7 @@ | |
| 24 | 22 | var obj = eval('(' + json + ')'); |
| 25 | 23 | if (obj) |
| 26 | 24 | { |
| 27 | model.siteName = (obj.title.length > 0) ? obj.title : obj.shortName; | |
| 25 | model.siteName = (obj.title.length != 0) ? obj.title : obj.shortName; | |
| 28 | 26 | } |
| 29 | 27 | } |
| 30 | 28 | } |
| 31 | 29 | \ No newline at end of file |
| ... | ...@@ -1,6 +1,9 @@ | |
| 1 | 1 | message.loading=Loading... |
| 2 | 2 | message.empty=No results found! |
| 3 | 3 | message.error=Error during search! |
| 4 | message.insite=In Site | |
| 5 | message.tags=Tags | |
| 6 | ||
| 4 | 7 | search.info.resultinfo=Search for ''{0}'' in {1} returned {2} results. |
| 5 | 8 | search.info.morethan=more than {0} |
| 6 | 9 | search.info.onlyshowing=Only showing first {0} results. |
| ... | ...@@ -8,5 +11,4 @@ | |
| 8 | 11 | search.info.inallsites=all sites |
| 9 | 12 | search.info.searching=Searching... |
| 10 | 13 | search.searchall=Search All Sites |
| 11 | search.searchsiteonly=Search {0} Site only | |
| 12 | ||
| 14 | search.searchsiteonly=Search {0} Site only | |
| 13 | 15 | \ No newline at end of file |