allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [13/14] allura git commit: [#7981] SubscriptionForm gets subscribed_to_tool from response, doesn't need it passed in beforehand
Date Wed, 30 Nov 2016 21:41:34 GMT
[#7981] SubscriptionForm gets subscribed_to_tool from response, doesn't need it passed in beforehand


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

Branch: refs/heads/db/7981
Commit: 7179a32535609390616e35cbcdbf8a3e45fbee93
Parents: aea9f02
Author: Dave Brondsema <dave@brondsema.net>
Authored: Tue Nov 29 13:43:14 2016 -0500
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Wed Nov 30 16:40:30 2016 -0500

----------------------------------------------------------------------
 Allura/allura/lib/widgets/resources/js/subscriptions.js | 2 --
 Allura/allura/lib/widgets/subscriptions.py              | 1 -
 Allura/allura/templates/repo/tree.html                  | 2 +-
 Allura/allura/templates/widgets/subscribe.html          | 1 -
 ForgeBlog/forgeblog/main.py                             | 1 -
 ForgeTracker/forgetracker/templates/tracker/ticket.html | 2 +-
 ForgeTracker/forgetracker/tracker_main.py               | 2 --
 ForgeWiki/forgewiki/wiki_main.py                        | 1 -
 8 files changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/7179a325/Allura/allura/lib/widgets/resources/js/subscriptions.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/subscriptions.js b/Allura/allura/lib/widgets/resources/js/subscriptions.js
index ceec169..5e61caf 100644
--- a/Allura/allura/lib/widgets/resources/js/subscriptions.js
+++ b/Allura/allura/lib/widgets/resources/js/subscriptions.js
@@ -23,7 +23,6 @@ var dom = React.createElement;
 var state = {
   'thing': 'tool',
   'subscribed': false,
-  'subscribed_to_tool': false,
   'url': '',
   'icon': {}
 };
@@ -64,7 +63,6 @@ SubscriptionForm = React.createClass({
       if (resp.status == 'ok') {
         set_state({
           subscribed: resp.subscribed,
-          subscribed_to_tool: resp.subscribed_to_tool
         });
         var link = this.getLinkNode();
         var text = null;

http://git-wip-us.apache.org/repos/asf/allura/blob/7179a325/Allura/allura/lib/widgets/subscriptions.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/subscriptions.py b/Allura/allura/lib/widgets/subscriptions.py
index 2595b41..2409d68 100644
--- a/Allura/allura/lib/widgets/subscriptions.py
+++ b/Allura/allura/lib/widgets/subscriptions.py
@@ -77,7 +77,6 @@ class SubscribeForm(ew.SimpleForm):
         ew.SimpleForm.defaults,
         thing='tool',
         style='icon',
-        tool_subscribed=False,
         value=None)
 
     class fields(ew_core.NameList):

http://git-wip-us.apache.org/repos/asf/allura/blob/7179a325/Allura/allura/templates/repo/tree.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tree.html b/Allura/allura/templates/repo/tree.html
index 3721225..2f0cd03 100644
--- a/Allura/allura/templates/repo/tree.html
+++ b/Allura/allura/templates/repo/tree.html
@@ -65,7 +65,7 @@ form.tarball button:hover {
 
 {{ g.icons['history'].render(href='%slog/?path=%s' % (commit.url(), path), show_title=True)
}}
 {% if c.user and c.user != c.user.anonymous() %}
-  {{c.subscribe_form.display(value=tool_subscribed, tool_subscribed=tool_subscribed, action='subscribe',
style='icon')}}
+  {{c.subscribe_form.display(value=tool_subscribed, action='subscribe', style='icon')}}
 {% endif %}
 {{ g.icons['feed'].render(href='{}feed/'.format(c.app.url)) }}
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/allura/blob/7179a325/Allura/allura/templates/widgets/subscribe.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/subscribe.html b/Allura/allura/templates/widgets/subscribe.html
index 9f46e9c..0601d5f 100644
--- a/Allura/allura/templates/widgets/subscribe.html
+++ b/Allura/allura/templates/widgets/subscribe.html
@@ -27,7 +27,6 @@
   document.SUBSCRIPTION_OPTIONS = {
     "thing": "{{thing}}",
     "subscribed": {{"true" if value else "false"}},
-    "subscribed_to_tool": {{"true" if tool_subscribed else "false"}},
     "url": "{{action}}",
     "icon": {
       "css": "{{g.icons['mail'].css}}"

http://git-wip-us.apache.org/repos/asf/allura/blob/7179a325/ForgeBlog/forgeblog/main.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/main.py b/ForgeBlog/forgeblog/main.py
index a200ea9..cb11239 100644
--- a/ForgeBlog/forgeblog/main.py
+++ b/ForgeBlog/forgeblog/main.py
@@ -354,7 +354,6 @@ class PostController(BaseController, FeedController):
         post = self._get_version(version)
         base_post = self.post
         subscribed = M.Mailbox.subscribed(artifact=self.post)
-        c.subscribe_form.tool_subscribed = M.Mailbox.subscribed()
         return dict(post=post, base_post=base_post,
                     page=page, limit=limit, count=post_count,
                     subscribed=subscribed)

http://git-wip-us.apache.org/repos/asf/allura/blob/7179a325/ForgeTracker/forgetracker/templates/tracker/ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/ticket.html b/ForgeTracker/forgetracker/templates/tracker/ticket.html
index afe0253..8665611 100644
--- a/ForgeTracker/forgetracker/templates/tracker/ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/ticket.html
@@ -36,7 +36,7 @@
 {% block actions %}
   {{ g.icons['feed'].render(href='feed.rss', title='Follow this Ticket') }}
 {% if c.user and c.user != c.user.anonymous() %}
-  {{c.subscribe_form.display(value=subscribed, tool_subscribed=tool_subscribed, action='subscribe',
style='icon')}}
+  {{c.subscribe_form.display(value=subscribed, action='subscribe', style='icon')}}
 {% endif %}
 {% if h.has_access(ticket.app, 'admin') %}
   {{ g.icons['move'].render(show_title=True, href='move') }}

http://git-wip-us.apache.org/repos/asf/allura/blob/7179a325/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 98011ef..42dffb3 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -1382,7 +1382,6 @@ class TicketController(BaseController, FeedController):
             c.ticket_custom_field = W.ticket_custom_field
             c.vote_form = W.vote_form
             tool_subscribed = M.Mailbox.subscribed()
-            c.subscribe_form.tool_subscribed = tool_subscribed
             if tool_subscribed:
                 subscribed = False
             else:
@@ -1393,7 +1392,6 @@ class TicketController(BaseController, FeedController):
             voting_enabled = self.ticket.app.config.options.get('EnableVoting')
             return dict(ticket=self.ticket, globals=c.app.globals,
                         allow_edit=has_access(self.ticket, 'update')(),
-                        tool_subscribed=tool_subscribed,
                         subscribed=subscribed, voting_enabled=voting_enabled,
                         page=page, limit=limit, count=post_count)
         else:

http://git-wip-us.apache.org/repos/asf/allura/blob/7179a325/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index ace38b6..379914a 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -596,7 +596,6 @@ class PageController(BaseController, FeedController):
         next = cur + 1
         hide_left_bar = not (c.app.show_left_bar)
         subscribed_to_page = M.Mailbox.subscribed(artifact=self.page)
-        c.subscribe_form.tool_subscribed = M.Mailbox.subscribed()
         return dict(
             page=page,
             cur=cur, prev=prev, next=next,


Mime
View raw message