diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-24 11:24:43 -0700 | 
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-24 11:24:43 -0700 | 
| commit | fa1d32e6466d8c6ffe77d163e2da9c71688a3c61 (patch) | |
| tree | d4025073bcad2bf49cbb36afa7e0eae24e55d3f7 /modules/tag/js | |
| parent | 0e9b80d2efb942167fef269441e65722abac5f54 (diff) | |
Partial implementation of ticket #80. Provide auto complete and suggestions on the tag add form in the tag sidebar block.  Updated the xss golden file as well.  Still to do figure out how toget it into the edit popup dialog
Diffstat (limited to 'modules/tag/js')
| -rw-r--r-- | modules/tag/js/tag.js | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js index a5aaa3f8..282da1ea 100644 --- a/modules/tag/js/tag.js +++ b/modules/tag/js/tag.js @@ -66,3 +66,18 @@ function editInPlace(element) {    };    ajaxify_editInPlaceForm();  } + +function formatTagAutoCompleteResult(row) { +  var text = $("#gAddTagForm input:text").val(); +  if (/[\s,;]/.test(text)) { +    for (var i= text.length - 1; i >= 0; i--) { +      var chr = text.charAt(i); +      if (chr == " " || chr == "," || chr == ";") { +        break; +      } +    } +    return text.substr(0, i + 1) + row[0]; +  } else { +    return row[0]; +  } +}  | 
