allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [06/50] [abbrv] allura git commit: [#7919] move our single admin_modal to top_nav (not all pages have the sidebar), use it for projects_groups too
Date Thu, 17 Dec 2015 19:21:53 GMT
[#7919] move our single admin_modal to top_nav (not all pages have the sidebar), use it for
projects_groups too


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

Branch: refs/heads/db/8034
Commit: 245703212be07ea3075d489cd5a7d176f0981f21
Parents: 614c156
Author: Dave Brondsema <dave@brondsema.net>
Authored: Wed Dec 2 10:39:36 2015 -0500
Committer: Heith Seewald <heiths@gmail.com>
Committed: Wed Dec 16 13:54:30 2015 -0600

----------------------------------------------------------------------
 .../ext/admin/templates/project_groups.html     |  1 -
 Allura/allura/public/nf/js/project_groups.js    | 20 --------------------
 .../templates/jinja_master/sidebar_menu.html    |  1 -
 .../allura/templates/jinja_master/top_nav.html  |  3 +++
 4 files changed, 3 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/24570321/Allura/allura/ext/admin/templates/project_groups.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/templates/project_groups.html b/Allura/allura/ext/admin/templates/project_groups.html
index 765a593..c505528 100644
--- a/Allura/allura/ext/admin/templates/project_groups.html
+++ b/Allura/allura/ext/admin/templates/project_groups.html
@@ -109,7 +109,6 @@
     </tr>
   </tbody>
 </table>
-{{c.admin_modal.display(content='<h1 id="popup_title"></h1><div id="popup_contents"></div>')}}
 {% endblock %}
 
 {% block extra_js %}

http://git-wip-us.apache.org/repos/asf/allura/blob/24570321/Allura/allura/public/nf/js/project_groups.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/project_groups.js b/Allura/allura/public/nf/js/project_groups.js
index 6dc5d5c..6e3ff30 100644
--- a/Allura/allura/public/nf/js/project_groups.js
+++ b/Allura/allura/public/nf/js/project_groups.js
@@ -19,26 +19,6 @@
 
 $(function() {
   var cval = $.cookie('_session_id');
-  // add a group
-  var csrf_input = $('<input>', {name: '_session_id', 'type': 'hidden', value: cval});
-  var $popup_title = $('#popup_title');
-  var $popup_contents = $('#popup_contents');
-  $('a.admin_modal').click(function(evt){
-    evt.preventDefault();
-    evt.stopPropagation();
-    var link = this;
-    $popup_title.html('');
-    $popup_contents.html('Loading...');
-    $.get(link.href, function (data) {
-      $popup_title.html(link.title);
-      $popup_contents.html(data);
-      $popup_contents.find('form').append(csrf_input);
-      $('.btn.link.close').click(function(){
-          $(this).trigger('close');
-          return false;
-      });
-    });
-  });
   // delete a group
   $('a.delete_group').click(function(evt){
     evt.preventDefault();

http://git-wip-us.apache.org/repos/asf/allura/blob/24570321/Allura/allura/templates/jinja_master/sidebar_menu.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/sidebar_menu.html b/Allura/allura/templates/jinja_master/sidebar_menu.html
index f95ef86..9572cda 100644
--- a/Allura/allura/templates/jinja_master/sidebar_menu.html
+++ b/Allura/allura/templates/jinja_master/sidebar_menu.html
@@ -75,7 +75,6 @@
             {{sidebar_item(c.app.admin_menu_delete_button)}}
             {{sidebar_item(None)}}
           </div>
-          {{c.app.admin_modal.display()}}
           {% if c.app.admin_menu_delete_button %}
             {{c.app.admin_tool_delete_modal.display()}}
           {% endif %}

http://git-wip-us.apache.org/repos/asf/allura/blob/24570321/Allura/allura/templates/jinja_master/top_nav.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/top_nav.html b/Allura/allura/templates/jinja_master/top_nav.html
index 21bcb48..373c4a6 100644
--- a/Allura/allura/templates/jinja_master/top_nav.html
+++ b/Allura/allura/templates/jinja_master/top_nav.html
@@ -62,5 +62,8 @@
                     }), document.getElementById('add-tool-container'));
         });
     </script>
+
+    {# hidden modal, ready to be used by any admin functionality (top_nav, sidebar, admin
page, etc) #}
+    {{ c.app.admin_modal.display() }}
 {% endif %}
 {% endif %}


Mime
View raw message