Skip to content

Commit

Permalink
corrects syntax + add migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Basile LEGAL committed Jun 22, 2015
1 parent 053dad7 commit a2fdce2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cms/static/cms/js/modules/cms.modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,11 @@ $(document).ready(function () {
row = iframe.contents().find('.save-box:eq(0)');
}
row.hide(); // hide submit-row
form = iframe.contents().find('form');
var form = iframe.contents().find('form');
//avoids conflict between the browser's form validation and Django's validation
form.submit(function(e){
form.submit(function(){
if (that.hideFrame) { //submit button was clicked
debugger;
that.modal.find('.cms_modal-frame iframe').hide();
//page has been saved, run checkup
that.saved = true;
Expand Down Expand Up @@ -516,7 +517,7 @@ $(document).ready(function () {
that.options.newPlugin = null;
// reset onClose when delete is triggered
if(item.hasClass('deletelink')) that.options.onClose = null;
if (! item.hasClass('default')) {// hide iframe when using buttons other than submit
if (!item.hasClass('default')) { // hide iframe when using buttons other than submit
that.modal.find('.cms_modal-frame iframe').hide();
// page has been saved or deleted, run checkup
that.saved = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('placeholderapp', '0004_auto_20150415_1913'),
]

operations = [
migrations.AddField(
model_name='example1',
name='decimal_field',
field=models.DecimalField(null=True, max_digits=5, decimal_places=1, blank=True),
preserve_default=True,
),
]
7 changes: 6 additions & 1 deletion cms/tests/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@

from django.contrib.auth.models import Permission
from django.contrib.sites.models import Site
from django import get_version
from distutils.version import StrictVersion
if StrictVersion(get_version()) >= StrictVersion('1.7'):
from django.contrib.staticfiles.testing import StaticLiveServerTestCase as LiveServerTestCase
else:
from django.test import LiveServerTestCase
from django.core.cache import cache
from django.core.urlresolvers import clear_url_caches
from django.test import LiveServerTestCase
from django.utils import unittest
from selenium import webdriver
from selenium.webdriver.common.by import By
Expand Down

0 comments on commit a2fdce2

Please sign in to comment.