forked from servee/servee
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable unavailable features, and fix the ajax submit
- Loading branch information
1 parent
4ffd579
commit 2bbb103
Showing
7 changed files
with
57 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% load i18n %} | ||
<div class="scrollidentifier"></div> | ||
<div class="submit-row" {% if is_popup %}style="overflow: auto;"{% endif %}> | ||
{% if show_save %}<input type="submit" value="{% trans 'Save' %}" class="default" name="_save" {{ onclick_attrib }}/>{% endif %} | ||
{% if show_delete_link %}<p class="deletelink-box"><a href="delete/" class="deletelink">{% trans "Delete" %}</a></p>{% endif %} | ||
<!-- unsupported currently --> | ||
<!--{% if show_save_as_new %}<input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew" {{ onclick_attrib }}/>{%endif%}--> | ||
<!--{% if show_save_and_add_another %}<input type="submit" value="{% trans 'Save and add another' %}" name="_addanother" {{ onclick_attrib }} />{% endif %}--> | ||
<!--{% if show_save_and_continue %}<input type="submit" value="{% trans 'Save and continue editing' %}" name="_continue" {{ onclick_attrib }}/>{% endif %}--> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 1 addition & 27 deletions
28
servee/wysiwyg/tinymce/templates/wysiwyg/_wysiwyg_of_choice.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,2 @@ | ||
<script type="text/javascript" src="{{ STATIC_URL }}tinymce/jscripts/tiny_mce/jquery.tinymce.js"></script> | ||
<script type="text/javascript" src="{{ STATIC_URL }}servee/wysiwyg/js/tinymce.js"></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function(){ | ||
var $base = $("#{{ opts.module_name }}_form"); | ||
var $par = $base.parent(); | ||
load_wysiwyg($base); | ||
$base.submit(function(e){ | ||
if($base.attr("enctype") != "multipart/form-data"){ | ||
$.ajax({ | ||
"url": $base.attr("action"), | ||
"type": $base.attr("method"), | ||
"data": $base.serialize(), | ||
"success": function(data, text){ | ||
//Fracking tinymce destroy bug.... | ||
t = {}; | ||
t.keyNav = {}; | ||
t.keyNav.destroy = function(){}; | ||
$par.html(data); | ||
} | ||
}); | ||
|
||
e.preventDefault(); | ||
return false; | ||
} | ||
}); | ||
}); | ||
</script> | ||
<script type="text/javascript" src="{{ STATIC_URL }}servee/wysiwyg/js/tinymce.js"></script> |