Permalink
Browse files

- Added a field to models controlling the likebox transparency

  • Loading branch information...
1 parent aba8952 commit 1cefea462badcc8852ce8e2ed939c1d2022d72a5 @chrisglass committed Oct 20, 2010
@@ -0,0 +1,77 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding field 'FacebookLikeBox.transparent'
+ db.add_column('cmsplugin_facebooklikebox', 'transparent', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False)
+
+
+ def backwards(self, orm):
+
+ # Deleting field 'FacebookLikeBox.transparent'
+ db.delete_column('cmsplugin_facebooklikebox', 'transparent')
+
+
+ models = {
+ 'cms.cmsplugin': {
+ 'Meta': {'object_name': 'CMSPlugin'},
+ 'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
+ 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
+ 'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
+ 'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
+ 'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'publisher_is_draft': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
+ 'publisher_public': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'publisher_draft'", 'unique': 'True', 'null': 'True', 'to': "orm['cms.CMSPlugin']"}),
+ 'publisher_state': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
+ },
+ 'cms.placeholder': {
+ 'Meta': {'object_name': 'Placeholder'},
+ 'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
+ },
+ 'cmsplugin_facebook.facebooklikebox': {
+ 'Meta': {'object_name': 'FacebookLikeBox', 'db_table': "'cmsplugin_facebooklikebox'", '_ormbases': ['cms.CMSPlugin']},
+ 'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
+ 'connections': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '10'}),
+ 'header': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'height': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '587'}),
+ 'pageurl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'stream': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'transparent': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'})
+ },
+ 'cmsplugin_facebook.facebooklikebutton': {
+ 'Meta': {'object_name': 'FacebookLikeButton', 'db_table': "'cmsplugin_facebooklikebutton'", '_ormbases': ['cms.CMSPlugin']},
+ 'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
+ 'color_scheme': ('django.db.models.fields.CharField', [], {'default': "'light'", 'max_length': '50'}),
+ 'font': ('django.db.models.fields.CharField', [], {'default': "'verdana'", 'max_length': '50'}),
+ 'height': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '80'}),
+ 'layout': ('django.db.models.fields.CharField', [], {'default': "'standard'", 'max_length': '50'}),
+ 'pageurl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'show_faces': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'verb': ('django.db.models.fields.CharField', [], {'default': "'like'", 'max_length': '50'}),
+ 'width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'})
+ },
+ 'cmsplugin_facebook.facebooksharebutton': {
+ 'Meta': {'object_name': 'FacebookShareButton', 'db_table': "'cmsplugin_facebooksharebutton'", '_ormbases': ['cms.CMSPlugin']},
+ 'button_text': ('django.db.models.fields.CharField', [], {'default': "u'Share'", 'max_length': '255'}),
+ 'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
+ 'share_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'style': ('django.db.models.fields.CharField', [], {'max_length': '12'})
+ }
+ }
+
+ complete_apps = ['cmsplugin_facebook']
@@ -47,6 +47,7 @@ class FacebookLikeBox(CMSPlugin):
blank=True, help_text=_("Leave empty for auto scaling"))
height = models.PositiveSmallIntegerField(_("Height"), default=587)
connections = models.PositiveSmallIntegerField(_("Amount of Users"), default=10)
+ transparent = models.BooleanField(_("Transparent"), default=True)
stream = models.BooleanField(_("Show stream"), default=True)
header = models.BooleanField(_("Show header"), default=True)
@@ -29,5 +29,5 @@
overflow:hidden;
width:{% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}px;
height:{{ instance.height }}px;"
- allowTransparency="true">
+ allowTransparency="{{instance.transparent}}">
</iframe>

0 comments on commit 1cefea4

Please sign in to comment.