allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [3/3] git commit: [#5465] ticket:310 Add autocompletion for labels (placeholder data)
Date Wed, 10 Apr 2013 22:27:32 GMT
[#5465] ticket:310 Add autocompletion for labels (placeholder data)


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/b970ea62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b970ea62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b970ea62

Branch: refs/heads/master
Commit: b970ea62edb287531b53b57f4fc126248d693f81
Parents: 06a70ab
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Apr 10 12:49:13 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Apr 10 22:00:17 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/widgets/form_fields.py  |    7 ++++---
 ForgeTracker/forgetracker/tracker_main.py |    5 +++++
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b970ea62/Allura/allura/lib/widgets/form_fields.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/form_fields.py b/Allura/allura/lib/widgets/form_fields.py
index 67ea947..f8a4b06 100644
--- a/Allura/allura/lib/widgets/form_fields.py
+++ b/Allura/allura/lib/widgets/form_fields.py
@@ -51,10 +51,11 @@ class LabelEdit(ew.InputField):
         yield ew.CSSLink('css/jquery.tagsinput.css')
         yield onready('''
           $('input.label_edit').tagsInput({
-              'height':'100%',
-              'width':'100%'
+              'height':'100%%',
+              'width':'100%%',
+              'autocomplete_url':'%(url)stags'
           });
-        ''')
+        ''' % dict(url=c.app.url))
 
 class ProjectUserSelect(ew.InputField):
     template='jinja:allura:templates/widgets/project_user_select.html'

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b970ea62/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index dc14459..e615b17 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -481,6 +481,11 @@ class RootController(BaseController):
                 milestone_counts.append({'name': name, 'count': count})
         return {'milestone_counts': milestone_counts}
 
+    @expose('json:')
+    def tags(self, term, **kw):
+        tags = ['sad', 'happy']
+        return json.dumps(tags)
+
     @with_trailing_slash
     @h.vardec
     @expose('jinja:forgetracker:templates/tracker/index.html')


Mime
View raw message