Anonymous avatar Anonymous committed e7f5d1b

More extending

Comments (0)

Files changed (6)

 Also it provides register_url decorator for ModelAdmin or Inline methods. It turns method to view, which returns HttpResponse object.
 To use it you should add next line to yours
-  url(r'^admin/', include('ruadmin.urls')),
+  url(r'^admin/', include('admin_extended.urls')),
 IMPORTANT: it should be placed BEFORE including, but AFTER admin.autodiscover()
 After then you may deco yours methods like that:


-__version__ = '1.0.4'
+__version__ = '1.0.5'


 .auto-module tr.add-row, .auto-module .inline-deletelink,
 .auto-module table th:last-child, .auto-module table td.delete, .help, .auto-controller label, .auto-controller a.add-another, a.add-another, .auto-row .original p a.add-another, .auto-row .original p,
+.list .help, .list label, .list a.add-another
 {display: none;} ul {margin-left: 0px !important; padding-left: 0px !important;} ul li {list-style: none;}
+.list ul {margin-left: 0px !important; padding-left: 0px !important;}
+.list ul li {list-style: none;}


             $.each(this.controllers, function() {
-                $("fieldset .field-{0}".format(this.toString())).addClass("auto-controller");
+                $("fieldset .field-{0}".format(this.toString())).addClass("list");
             $.each(this.fields, function() {


             label: "Search",
             notFound: "No match found",
             matchCase: false,
+	    attachMethod: "prependTo",
+	    attachSelector: null
         }, options)
         this.controller = controller;
     FilteredCheckboxes.prototype.init = function() {
         var self = this;
-        var div = $("<div/>", {class: "searchContainer"}).prependTo(this.controller);
+	var place = this.attachSelector ? this.controller.find(this.attachSelector) : this.controller;
+        var div = $("<div/>", {class: "searchContainer"})[this.attachMethod](place);
         var choices = this.controller.find("ul li label");
         var input = $("<input/>", {class: "search-line vTextField"}).appendTo(div);
-        $("<span/>", {text: "Поиск: ", class: "search-label"}).prependTo(div);
+        $("<span/>", {text: self.label + " ", class: "search-label"}).prependTo(div);
         $("<span/>", {class: "deletelink"}).appendTo(div).click(function() {
         $("<div/>", {text: this.notFound, class: "not-found"}).appendTo(div).hide();
-})(jQuery || django.jQuery)
+})(jQuery || django.jQuery)


 {% extends "admin:admin/base_site.html" %}
+{% load staticfiles %}
 {% block extrahead %}
         <link rel="icon" href="{{ SETTING_FAVICON_PREFIX }}favicon.ico" type="image/x-icon">
     {% endif %}
-    <script type="text/javascript" src="{{ SETTING_STATIC_URL }}js/string.js"></script>
         <script type="text/javascript"
             src="{{ SETTING_ADMIN_JQUERY_ADDITIONAL_VERSION }}/jquery.min.js">
     {% endif %}
+    <link rel="stylesheet" href="{% static 'css/admin/autoinlines.css' %}">
+    <link rel="stylesheet" href="{% static 'css/admin/searchline.css' %}">
+    <script type="text/javascript" src="{{ SETTING_STATIC_URL }}js/string.js"></script>
+    <script src="{% static 'js/admin/autoinlines.js' %}"></script>
+    <script src="{% static 'js/admin/searchline.js' %}"></script>
+    {% block extrahead_extended %}
+    {% endblock %}
 {% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.