Added System-Info page and fixed preview js issue.

This commit is contained in:
Manson Wang committed 2014-02-06 15:07:38 +08:00
1 parent 822c23e841
commit 1eaa0f1801
11 files changed
+201 -61

No files matched your search

+14 -7
View File
@@ -1,13 +1,20 @@
$(function() {
$(".post_preview").click(function(){
$("#main-wrap").after("<span id='show_preview'></span>");
var preview_url = $(this).attr('url');
$.post($(this).attr('url'), $(".previewable").serialize() ,function(data){
$('#show_preview .modal').modal();
$("form.previewable").ajaxSubmit({
beforeSubmit: function(a,f,o){
o.dataType = 'script';
o.url = preview_url;
o.type = 'post';
},success: function(msg) {
$('#show_preview .modal').modal()
$('#show_preview .modal').height(function() {
return $(window).height() * 0.7;
});
},'script');
}});
});
$(".preview_trigger").click(function(){
$("#main-wrap").after("<span id='show_preview'></span>");
@@ -38,10 +45,10 @@ $(function() {
// o.url = url.nodeValue;
// o.type = 'post';
// },success: function(msg) {
// $('#show_preview .modal').modal()
// $('#show_preview .modal').height(function() {
// return $(window).height() * 0.7;
// });
// $('#show_preview .modal').modal()
// $('#show_preview .modal').height(function() {
// return $(window).height() * 0.7;
// });
// }
// });