summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar/furnitures/widgets.py8
-rw-r--r--static/js/ishtar.js2
-rw-r--r--static/media/style.css10
3 files changed, 16 insertions, 4 deletions
diff --git a/ishtar/furnitures/widgets.py b/ishtar/furnitures/widgets.py
index 596abf784..d70f08dda 100644
--- a/ishtar/furnitures/widgets.py
+++ b/ishtar/furnitures/widgets.py
@@ -92,9 +92,11 @@ class JQueryDate(forms.TextInput):
class JQueryDate(forms.TextInput):
def render(self, name, value=None, attrs=None):
rendered = super(JQueryDate, self).render(name, value, attrs)
+ # use window.onload to be sure that datepicker don't interfere
+ # with autocomplete fields
rendered += """
<script type="text/javascript"><!--//
- $(function() {
+ $(window).load(function() {
$("#id_%(name)s").datepicker($.datepicker.regional["%(country)s"]);
var val = $("#id_%(name)s").val();
if(val){
@@ -177,8 +179,8 @@ objects.get(pk=value))
if self.new:
model_name = self.associated_model._meta.object_name.lower()
url_new = reverse('new-' + model_name, args=[attrs_select['id']])
- new = u' <a href="#" onclick="open_window(\'%s\');">%s</a>' % (
- url_new, unicode(_(u"Add")))
+ new = u' <a href="#" class="add-button" '\
+ u'onclick="open_window(\'%s\');">+</a>' % url_new
html = u'''<input%(attrs_select)s/>%(new)s\
<input type="hidden"%(attrs_hidden)s/>\
<script type="text/javascript"><!--//
diff --git a/static/js/ishtar.js b/static/js/ishtar.js
index 04070bc64..b7b0403c8 100644
--- a/static/js/ishtar.js
+++ b/static/js/ishtar.js
@@ -72,7 +72,7 @@ function load_url(url){
function open_window(url){
var newwindow = window.open(url, '_blank',
- 'height=400,width=550,scrollbars=yes');
+ 'height=400,width=600,scrollbars=yes');
if (window.focus) {newwindow.focus()}
return false;
}
diff --git a/static/media/style.css b/static/media/style.css
index b4136f6a4..0ded7a460 100644
--- a/static/media/style.css
+++ b/static/media/style.css
@@ -370,3 +370,13 @@ ul.selectmulti li a.remove{
td.submit_button{
text-align:center;
}
+
+a.add-button{
+ background-color:#FFF;
+ border:2px solid #CCC;
+ -moz-border-radius:8px;
+ -webkit-border-radius:8px;
+ border-radius:8px;
+ padding:0 4px;
+ color:#61615C;
+}