diff options
Diffstat (limited to 'gstudio')
-rw-r--r-- | gstudio/admin/attribute.py | 6 | ||||
-rw-r--r-- | gstudio/static/gstudio/js/gstudio.js | 19 |
2 files changed, 13 insertions, 12 deletions
diff --git a/gstudio/admin/attribute.py b/gstudio/admin/attribute.py index 7a34cb8e..b66f66e3 100644 --- a/gstudio/admin/attribute.py +++ b/gstudio/admin/attribute.py @@ -1,4 +1,4 @@ -"""MetatypeAdmin for Gstudio""" +"""AttributeAdmin for Gstudio""" from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ @@ -9,13 +9,13 @@ import reversion from django.template.defaultfilters import slugify class AttributeAdmin(reversion.VersionAdmin): - fieldsets=((_('Attribute'),{'fields': ('subject','subject_scope','attributetype','attributetype_scope','svalue','value_scope','last_update','creation_date')}), + fieldsets=((_('Attribute'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope')}), ) class Media: - js = ("gstudio/js/gstudiojs.js",) + js = ("gstudio/js/gstudio.js",) def save_model(self, request, attribute, form, change): attribute.title = attribute.composed_sentence diff --git a/gstudio/static/gstudio/js/gstudio.js b/gstudio/static/gstudio/js/gstudio.js index d8d9d608..7ed67e24 100644 --- a/gstudio/static/gstudio/js/gstudio.js +++ b/gstudio/static/gstudio/js/gstudio.js @@ -47,23 +47,24 @@ $ = django.jQuery $("#id_attributetype").change(function() { test = $("#id_attributetype").val() - url = "/nodetypes/ajax/?id=" + test + url = "/nodetypes/ajax/ajaxattribute/?id=" + test + $.get(url, - function(data){ + function(data){ - $("#id_subject").empty() + $("#id_subject").empty() - for (var key in data) { - $('#id_subject').append( - $('<option></option>').val(key).html(data[key]) - ); - } + for (var key in data) { + $('#id_subject').append( + $('<option></option>').val(key).html(data[key]) + ); + } - }); + }); }); |